@solidstarters/solid-core-ui 1.1.60 → 1.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Svg/ExcelSvg.d.ts +6 -0
- package/dist/components/Svg/ExcelSvg.d.ts.map +1 -0
- package/dist/components/Svg/ExcelSvg.js +6 -0
- package/dist/components/Svg/ExcelSvg.js.map +1 -0
- package/dist/components/Svg/PDFSvg.d.ts +5 -1
- package/dist/components/Svg/PDFSvg.d.ts.map +1 -1
- package/dist/components/Svg/PDFSvg.js +3 -2
- package/dist/components/Svg/PDFSvg.js.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js +1 -1
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +31 -18
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidOTPVerify.js +1 -1
- package/dist/components/auth/SolidOTPVerify.js.map +1 -1
- package/dist/components/common/CancelButton.d.ts.map +1 -1
- package/dist/components/common/CancelButton.js +8 -4
- package/dist/components/common/CancelButton.js.map +1 -1
- package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -1
- package/dist/components/common/SolidBreadcrumb.js +32 -15
- package/dist/components/common/SolidBreadcrumb.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +1 -1
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +4 -1
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +43 -13
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js +6 -2
- package/dist/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.js.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.d.ts.map +1 -1
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js +3 -2
- package/dist/components/core/kanban/kanban-fields/SolidShortTextKanbanField.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +3 -0
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/resources/globals.css +14 -7
- package/package.json +1 -1
- package/src/components/Svg/ExcelSvg.tsx +15 -0
- package/src/components/Svg/PDFSvg.tsx +6 -3
- package/src/components/auth/GoogleAuthChecking.tsx +1 -1
- package/src/components/auth/SolidInitialLoginOtp.tsx +13 -2
- package/src/components/auth/SolidOTPVerify.tsx +1 -1
- package/src/components/common/CancelButton.tsx +12 -6
- package/src/components/common/SolidBreadcrumb.tsx +79 -60
- package/src/components/core/kanban/KanbanBoard.tsx +3 -2
- package/src/components/core/kanban/KanbanCard.tsx +6 -3
- package/src/components/core/kanban/SolidKanbanView.tsx +44 -17
- package/src/components/core/kanban/kanban-fields/SolidMediaSingleKanbanField.tsx +14 -4
- package/src/components/core/kanban/kanban-fields/SolidShortTextKanbanField.tsx +4 -8
- package/src/components/core/list/SolidListView.tsx +4 -1
- package/src/resources/globals.css +14 -7
|
@@ -18,7 +18,7 @@ export const CancelButton = () => {
|
|
|
18
18
|
};
|
|
19
19
|
return (
|
|
20
20
|
<div>
|
|
21
|
-
<Button outlined size="small" type="button" label="Close" onClick={handleGoBack} className='bg-primary-reverse'/>
|
|
21
|
+
<Button outlined size="small" type="button" label="Close" onClick={handleGoBack} className='bg-primary-reverse' />
|
|
22
22
|
</div>
|
|
23
23
|
)
|
|
24
24
|
}
|
|
@@ -28,15 +28,21 @@ export const SolidCancelButton = () => {
|
|
|
28
28
|
const pathname = usePathname(); // Get the current path
|
|
29
29
|
|
|
30
30
|
const handleGoBack = () => {
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
router.push(newPath); // Navigate to the parent route with "/all"
|
|
31
|
+
let fromView: string | null = null;
|
|
32
|
+
if (typeof window !== "undefined") {
|
|
33
|
+
fromView = sessionStorage.getItem("fromView");
|
|
35
34
|
}
|
|
35
|
+
|
|
36
|
+
// Default to 'list' if not available
|
|
37
|
+
const view = fromView === "kanban" ? "kanban" : "list";
|
|
38
|
+
|
|
39
|
+
// Navigate back to the previous path with the appropriate view type
|
|
40
|
+
const newPath = pathname.replace(/\/form\/[^/]+$/, `/${view}`);
|
|
41
|
+
router.push(newPath);
|
|
36
42
|
};
|
|
37
43
|
return (
|
|
38
44
|
<div>
|
|
39
|
-
<Button outlined size="small" type="button" label="Close" onClick={handleGoBack}
|
|
45
|
+
<Button outlined size="small" type="button" label="Close" onClick={handleGoBack} className='bg-primary-reverse' />
|
|
40
46
|
</div>
|
|
41
47
|
)
|
|
42
48
|
}
|
|
@@ -3,82 +3,101 @@
|
|
|
3
3
|
import Link from "next/link";
|
|
4
4
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
5
5
|
import { BreadCrumb } from "primereact/breadcrumb";
|
|
6
|
-
import { useEffect } from "react";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
7
|
|
|
8
8
|
interface BreadcrumbItem {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
label: string;
|
|
10
|
+
link?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
interface Props {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
solidFormViewMetaData?: any;
|
|
15
|
+
initialEntityData?: any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const SolidBreadcrumb = (props: Props) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
19
|
+
const { solidFormViewMetaData, initialEntityData } = props;
|
|
20
|
+
const modelMetadata = solidFormViewMetaData?.data?.solidView?.model;
|
|
21
|
+
const pathname = usePathname();
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
const searchParams = useSearchParams();
|
|
24
|
+
const segments = pathname.split("/").filter(Boolean);
|
|
25
|
+
|
|
26
|
+
let userKeyFieldValue: string | null = null;
|
|
27
|
+
|
|
28
|
+
if (modelMetadata?.userKeyField) {
|
|
29
|
+
const userKeyFieldName = modelMetadata.userKeyField.name;
|
|
30
|
+
if (userKeyFieldName && initialEntityData?.[userKeyFieldName] !== undefined) {
|
|
31
|
+
userKeyFieldValue = initialEntityData[userKeyFieldName];
|
|
33
32
|
}
|
|
33
|
+
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
const queryUserKeyField = searchParams.get("userKeyField");
|
|
35
|
+
const queryUserKeyField = searchParams.get("userKeyField");
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, [pathname, userKeyFieldValue, queryUserKeyField, router]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (segments.length === 6 && segments[4] === "form" && userKeyFieldValue && !queryUserKeyField) {
|
|
39
|
+
const newUrl = `${pathname}?userKeyField=${encodeURIComponent(userKeyFieldValue)}`;
|
|
40
|
+
router.replace(newUrl, { scroll: false });
|
|
41
|
+
}
|
|
42
|
+
}, [pathname, userKeyFieldValue, queryUserKeyField, router]);
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
const [fromView, setFromView] = useState<"list" | "kanban" | null>(null);
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (typeof window !== "undefined") {
|
|
48
|
+
const storedView = sessionStorage.getItem("fromView");
|
|
49
|
+
console.log("📌 fromView loaded from sessionStorage:", storedView);
|
|
50
|
+
if (storedView === "list" || storedView === "kanban") {
|
|
51
|
+
setFromView(storedView);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, []);
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
breadcrumbItems.push({ label: moduleName, link: `/admin/core/${segments[2]}/home` });
|
|
56
|
+
let breadcrumbItems: BreadcrumbItem[] = [];
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
breadcrumbItems.push({ label: "List", link: `/admin/core/${segments[2]}/${segments[3]}/list` });
|
|
59
|
-
} else {
|
|
60
|
-
breadcrumbItems.push({ label: modelName, link: `/admin/core/${segments[2]}/${segments[3]}` });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
58
|
+
if (segments.length >= 4 && segments[0] === "admin" && segments[1] === "core") {
|
|
59
|
+
const moduleName = segments[2].replace(/-/g, " ");
|
|
60
|
+
const modelName = segments[3].replace(/-/g, " ");
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
breadcrumbItems.push({
|
|
63
|
+
label: moduleName,
|
|
64
|
+
link: `/admin/core/${segments[2]}/home`,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
if (segments.length >= 5) {
|
|
68
|
+
if (segments[4] === "form" && segments.length === 6) {
|
|
69
|
+
const view = fromView ?? "list";
|
|
70
|
+
breadcrumbItems.push({
|
|
71
|
+
label: view === "kanban" ? "Kanban" : "List",
|
|
72
|
+
link: `/admin/core/${segments[2]}/${segments[3]}/${view}`,
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
breadcrumbItems.push({
|
|
76
|
+
label: modelName,
|
|
77
|
+
link: `/admin/core/${segments[2]}/${segments[3]}`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (segments.length === 6 && segments[4] === "form") {
|
|
83
|
+
breadcrumbItems.push({
|
|
84
|
+
label: queryUserKeyField || segments[5],
|
|
85
|
+
});
|
|
68
86
|
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const items = breadcrumbItems.map((item) => ({
|
|
90
|
+
label: item.label,
|
|
91
|
+
...(item.link
|
|
92
|
+
? {
|
|
93
|
+
template: () => (
|
|
94
|
+
<Link href={item.link!}>
|
|
95
|
+
<p className="text-primary font-normal">{item.label}</p>
|
|
96
|
+
</Link>
|
|
97
|
+
),
|
|
98
|
+
}
|
|
99
|
+
: {}),
|
|
100
|
+
}));
|
|
69
101
|
|
|
70
|
-
|
|
71
|
-
label: item.label,
|
|
72
|
-
...(item.link
|
|
73
|
-
? {
|
|
74
|
-
template: () => (
|
|
75
|
-
<Link href={item.link!}>
|
|
76
|
-
<p className="text-primary font-normal">{item.label}</p>
|
|
77
|
-
</Link>
|
|
78
|
-
),
|
|
79
|
-
}
|
|
80
|
-
: {}),
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
|
-
return <BreadCrumb model={items} className="solid-breadcrumb" />;
|
|
102
|
+
return <BreadCrumb model={items} className="solid-breadcrumb" />;
|
|
84
103
|
};
|
|
@@ -118,8 +118,9 @@ export const KanbanBoard = ({ groupedView, kanbanViewData, solidKanbanViewMetaDa
|
|
|
118
118
|
);
|
|
119
119
|
})}
|
|
120
120
|
{groupedView !== false &&
|
|
121
|
-
<div
|
|
122
|
-
<Button
|
|
121
|
+
<div>
|
|
122
|
+
<Button size="small" style={{ textWrap: 'nowrap' }} text onClick={handleSwimLanePagination}>Load More...</Button>
|
|
123
|
+
</div>
|
|
123
124
|
}
|
|
124
125
|
</div>
|
|
125
126
|
</DragDropContext>
|
|
@@ -180,13 +180,16 @@ const KanbanCard: React.FC<KanbanCardProps> = ({ data, solidKanbanViewMetaData,
|
|
|
180
180
|
style={{
|
|
181
181
|
opacity: snapshot.isDragging ? 0.9 : 1,
|
|
182
182
|
transform: snapshot.isDragging ? "rotate(-2deg)" : "",
|
|
183
|
-
cursor:'pointer'
|
|
183
|
+
cursor: 'pointer'
|
|
184
184
|
}}
|
|
185
185
|
elevation={snapshot.isDragging ? 3 : 1}
|
|
186
186
|
className={`${!groupedView ? 'solid-media-card' : 'solid-kanban-card'}`}
|
|
187
|
-
onClick={() =>
|
|
187
|
+
onClick={() => {
|
|
188
|
+
if (typeof window !== "undefined") {
|
|
189
|
+
sessionStorage.setItem("fromView", "kanban");
|
|
190
|
+
}
|
|
188
191
|
router.push(`${editButtonUrl}/${data?.id}`)
|
|
189
|
-
}
|
|
192
|
+
}}
|
|
190
193
|
>
|
|
191
194
|
{renderFormDynamically(solidKanbanViewMetaData)}
|
|
192
195
|
|
|
@@ -29,8 +29,7 @@ import "yet-another-react-lightbox/plugins/counter.css";
|
|
|
29
29
|
import { useRouter, useSearchParams } from "next/navigation";
|
|
30
30
|
import { SolidKanbanViewConfigure } from "./SolidKanbanViewConfigure";
|
|
31
31
|
import { KanbanUserViewLayout } from "./KanbanUserViewLayout";
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
import { Toast } from "primereact/toast";
|
|
34
33
|
|
|
35
34
|
type SolidKanbanViewParams = {
|
|
36
35
|
moduleName: string;
|
|
@@ -64,8 +63,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
64
63
|
const [lightboxUrls, setLightboxUrls] = useState({});
|
|
65
64
|
const [filterQueryString, setFilterQueryString] = useState<any>();
|
|
66
65
|
const [isLayoutDialogVisible, setLayoutDialogVisible] = useState(false);
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const toast = useRef<Toast>(null);
|
|
69
67
|
|
|
70
68
|
const pushFiltersToRouter = (filterQueryString: any) => {
|
|
71
69
|
router.push(`?${filterQueryString}`, undefined, { shallow: true });
|
|
@@ -115,7 +113,8 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
115
113
|
useLazyGetSolidKanbanEntitiesQuery,
|
|
116
114
|
useLazyGetSolidEntityByIdQuery,
|
|
117
115
|
usePrefetch,
|
|
118
|
-
useUpdateSolidEntityMutation
|
|
116
|
+
useUpdateSolidEntityMutation,
|
|
117
|
+
usePatchUpdateSolidEntityMutation
|
|
119
118
|
} = entityApi;
|
|
120
119
|
|
|
121
120
|
// Get the kanban view layout & metadata first.
|
|
@@ -227,6 +226,14 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
227
226
|
const [columnsCount, setColumnsCount] = useState(5);
|
|
228
227
|
const [swimLaneCurrentPageNumber, setSwimLaneCurrentPageNumber] = useState(1);
|
|
229
228
|
|
|
229
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
230
|
+
toast.current?.show({
|
|
231
|
+
severity,
|
|
232
|
+
summary,
|
|
233
|
+
detail,
|
|
234
|
+
life: 3000,
|
|
235
|
+
});
|
|
236
|
+
};
|
|
230
237
|
// Get the kanban view data.
|
|
231
238
|
// const [triggerGetSolidEntitiesForKanban, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidKanbanEntitiesQuery();
|
|
232
239
|
const [triggerGetSolidEntities, { data: solidEntityKanbanViewData, isLoading, error }] = useLazyGetSolidEntitiesQuery();
|
|
@@ -242,7 +249,10 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
242
249
|
data: DeletedSolidEntities,
|
|
243
250
|
},
|
|
244
251
|
] = useDeleteMultipleSolidEntitiesMutation();
|
|
245
|
-
|
|
252
|
+
const [
|
|
253
|
+
patchKanbanView,
|
|
254
|
+
{ isSuccess: isKanbanUpdateSuccessfull, isError: isKanbanUpdateError, error: kanbanUpdateError },
|
|
255
|
+
] = usePatchUpdateSolidEntityMutation();
|
|
246
256
|
|
|
247
257
|
// After data is fetched populate the kanban view state so as to be able to render the data.
|
|
248
258
|
useEffect(() => {
|
|
@@ -544,17 +554,33 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
544
554
|
destinationGroup.groupData.records = destinationRecords;
|
|
545
555
|
|
|
546
556
|
// Update the kanbanViewData state
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
557
|
+
try {
|
|
558
|
+
const formData = new FormData();
|
|
559
|
+
formData.append(groupByFieldName, destinationGroupName);
|
|
560
|
+
const kanbanUpdateResponse = await patchKanbanView({ id: +movedItem.id, data: formData }).unwrap();
|
|
561
|
+
|
|
562
|
+
if (kanbanUpdateResponse?.statusCode === 200) {
|
|
563
|
+
showToast("success", "Success", "Kanban View Updated!");
|
|
564
|
+
// Update the kanbanViewData state
|
|
565
|
+
setKanbanViewData((prevData: typeof kanbanViewData) =>
|
|
566
|
+
prevData.map((group: any) => {
|
|
567
|
+
if (group.groupName === sourceGroupName) {
|
|
568
|
+
return sourceGroup;
|
|
569
|
+
}
|
|
570
|
+
if (group.groupName === destinationGroupName) {
|
|
571
|
+
return destinationGroup;
|
|
572
|
+
}
|
|
573
|
+
return group;
|
|
574
|
+
})
|
|
575
|
+
);
|
|
576
|
+
} else {
|
|
577
|
+
showToast("error", "Duplicate Key", kanbanUpdateResponse?.error);
|
|
578
|
+
}
|
|
579
|
+
} catch (error: any) {
|
|
580
|
+
// 6. Handle 500 or network errors
|
|
581
|
+
console.error("API error:", error);
|
|
582
|
+
showToast("error", "Something went wrong", error?.data?.message || "Something went wrong");
|
|
583
|
+
}
|
|
558
584
|
};
|
|
559
585
|
|
|
560
586
|
|
|
@@ -672,6 +698,7 @@ export const SolidKanbanView = (params: SolidKanbanViewParams) => {
|
|
|
672
698
|
|
|
673
699
|
return (
|
|
674
700
|
<div className="page-parent-wrapper">
|
|
701
|
+
<Toast ref={toast} />
|
|
675
702
|
<div className="page-header">
|
|
676
703
|
<div className="flex gap-3 align-items-center">
|
|
677
704
|
<p className="m-0 view-title">{kanbanViewTitle}</p>
|
|
@@ -7,6 +7,11 @@ import { FormEvent } from "primereact/ts-helpers";
|
|
|
7
7
|
import { FilterMatchMode } from 'primereact/api';
|
|
8
8
|
import { Document, Page, pdfjs } from "react-pdf";
|
|
9
9
|
import { Dialog } from "primereact/dialog";
|
|
10
|
+
import { PDFSvg } from '@/components/Svg/PDFSvg';
|
|
11
|
+
import Image from 'next/image';
|
|
12
|
+
import FileImage from '../../../../resources/images/fileTypes/File.png'
|
|
13
|
+
import { ExcelSvg } from '@/components/Svg/ExcelSvg';
|
|
14
|
+
|
|
10
15
|
|
|
11
16
|
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
12
17
|
|
|
@@ -22,7 +27,6 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
22
27
|
// const url = "http://localhost:8080/media-files-storage/PF Form.xls";
|
|
23
28
|
|
|
24
29
|
|
|
25
|
-
|
|
26
30
|
return (
|
|
27
31
|
<>
|
|
28
32
|
{mimeType && mimeType.includes("image/") &&
|
|
@@ -52,7 +56,7 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
52
56
|
<div onClick={(e) => e.stopPropagation()}>
|
|
53
57
|
<div className='flex align-items-end gap-2 my-2'>
|
|
54
58
|
<div onClick={() => setVisible(true)} style={{ cursor: 'pointer' }}>
|
|
55
|
-
<
|
|
59
|
+
<PDFSvg size={50} />
|
|
56
60
|
</div>
|
|
57
61
|
<p className="text-sm" style={{ cursor: 'pointer', maxWidth: '70%', wordWrap: 'break-word', overflowWrap: 'break-word' }} onClick={() => setVisible(true)}>
|
|
58
62
|
{fileName}
|
|
@@ -69,7 +73,7 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
69
73
|
{mimeType && (mimeType.includes("excel") || mimeType.includes("spreadsheet")) && (
|
|
70
74
|
<div className='flex align-items-end gap-2 my-2' onClick={(e) => e.stopPropagation()}>
|
|
71
75
|
<a href={url} download target="_blank" rel="noopener noreferrer">
|
|
72
|
-
<
|
|
76
|
+
<ExcelSvg size={50} />
|
|
73
77
|
</a>
|
|
74
78
|
<a href={url} download target="_blank" rel="noopener noreferrer" className='text-color flex align-items-start gap-2' style={{ textDecoration: 'none' }}>
|
|
75
79
|
<p className="text-sm mb-1" style={{ wordWrap: 'break-word', overflowWrap: 'break-word' }}>
|
|
@@ -86,7 +90,13 @@ const SolidMediaSingleKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, f
|
|
|
86
90
|
!mimeType.includes("spreadsheet") && (
|
|
87
91
|
<div className='flex align-items-end gap-2 my-2' onClick={(e) => e.stopPropagation()}>
|
|
88
92
|
<a href={url} download target="_blank" rel="noopener noreferrer">
|
|
89
|
-
<
|
|
93
|
+
<Image
|
|
94
|
+
src={FileImage}
|
|
95
|
+
alt={fileName}
|
|
96
|
+
className="relative"
|
|
97
|
+
height={50}
|
|
98
|
+
width={50}
|
|
99
|
+
/>
|
|
90
100
|
</a>
|
|
91
101
|
<a href={url} download target="_blank" rel="noopener noreferrer" className='text-color flex align-items-start gap-2' style={{ textDecoration: 'none' }}>
|
|
92
102
|
<p className="text-sm mb-1" style={{ wordWrap: 'break-word', overflowWrap: 'break-word' }}>
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { SolidKanbanViewFieldsParams } from '../SolidKanbanViewFields';
|
|
4
4
|
import { Dialog } from 'primereact/dialog';
|
|
5
|
-
import { Document, Page
|
|
5
|
+
import { Document, Page } from "react-pdf";
|
|
6
|
+
import { PDFSvg } from '@/components/Svg/PDFSvg';
|
|
6
7
|
import MP3Image from '../../../../resources/images/fileTypes/Mp3.png'
|
|
7
8
|
import MP4Image from '../../../../resources/images/fileTypes/Mp4.png'
|
|
8
9
|
import FileImage from '../../../../resources/images/fileTypes/File.png'
|
|
9
10
|
import Image from 'next/image';
|
|
10
|
-
import {
|
|
11
|
+
import { ExcelSvg } from '@/components/Svg/ExcelSvg';
|
|
11
12
|
const SolidShortTextKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fieldLayout, data, setLightboxUrls, setOpenLightbox, groupedView }: SolidKanbanViewFieldsParams) => {
|
|
12
13
|
const [visible, setVisible] = useState(false);
|
|
13
14
|
const renderMode = fieldLayout?.attrs?.renderMode ? fieldLayout?.attrs?.renderMode : "text";
|
|
@@ -70,12 +71,7 @@ const SolidShortTextKanbanField = ({ solidKanbanViewMetaData, fieldMetadata, fie
|
|
|
70
71
|
|
|
71
72
|
{renderMode === "image" && !groupedView && mimeType && (mimeType.includes("excel") || mimeType.includes("spreadsheet")) && (
|
|
72
73
|
<a href={data[fieldMetadata.name]} className='kanban-media-view-card mt-3' onClick={(e) => e.stopPropagation()} style={{ cursor: 'pointer' }} download target="_blank" rel="noopener noreferrer">
|
|
73
|
-
<
|
|
74
|
-
<path d="M15 10.4147V10.4146C14.9999 5.29959 19.6888 1 25.3892 1H53.5858L77 24.4142V69.5852C77 74.7288 72.5287 78.9999 66.8806 78.9999H25.1406C19.47 78.9999 15 74.7276 15 69.5852V10.4147Z" fill="white" stroke="#DBDBDB" stroke-width="2" />
|
|
75
|
-
<path d="M54.0513 16.32V0L78 24H62.0342C54.8496 24 53.7187 18.88 54.0513 16.32Z" fill="#D4D4D8" />
|
|
76
|
-
<rect x="2" y="38" width="51" height="30" rx="6" fill="#079455" />
|
|
77
|
-
<path d="M13.7955 46.9091L16.4354 51.3707H16.5376L19.1903 46.9091H22.3161L18.321 53.4545L22.4055 60H19.2223L16.5376 55.532H16.4354L13.7507 60H10.5803L14.6776 53.4545L10.657 46.9091H13.7955ZM24.0675 60V46.9091H26.8352V57.718H32.4474V60H24.0675ZM41.3819 50.674C41.3308 50.1584 41.1113 49.7578 40.7235 49.4723C40.3358 49.1868 39.8095 49.044 39.1447 49.044C38.693 49.044 38.3116 49.108 38.0005 49.2358C37.6895 49.3594 37.4508 49.532 37.2846 49.7536C37.1227 49.9751 37.0417 50.2266 37.0417 50.5078C37.0332 50.7422 37.0822 50.9467 37.1887 51.1214C37.2995 51.2962 37.4508 51.4474 37.6426 51.5753C37.8343 51.6989 38.0559 51.8075 38.3074 51.9013C38.5588 51.9908 38.8272 52.0675 39.1127 52.1314L40.2889 52.4126C40.8599 52.5405 41.3841 52.7109 41.8613 52.924C42.3386 53.1371 42.752 53.3991 43.1014 53.7102C43.4508 54.0213 43.7214 54.3878 43.9132 54.8097C44.1092 55.2315 44.2093 55.7152 44.2136 56.2607C44.2093 57.0618 44.0048 57.7564 43.6 58.3445C43.1994 58.9283 42.6199 59.3821 41.8613 59.706C41.1071 60.0256 40.1973 60.1854 39.1319 60.1854C38.0751 60.1854 37.1547 60.0234 36.3706 59.6996C35.5907 59.3757 34.9814 58.8963 34.5424 58.2614C34.1078 57.6222 33.8798 56.8317 33.8585 55.8899H36.5368C36.5666 56.3288 36.6923 56.6953 36.9139 56.9893C37.1397 57.2791 37.4402 57.4986 37.8152 57.6477C38.1944 57.7926 38.6227 57.8651 39.1 57.8651C39.5687 57.8651 39.9757 57.7969 40.3208 57.6605C40.6703 57.5241 40.9409 57.3345 41.1326 57.0916C41.3244 56.8487 41.4203 56.5696 41.4203 56.2543C41.4203 55.9602 41.3329 55.7131 41.1582 55.5128C40.9877 55.3125 40.7363 55.142 40.4039 55.0014C40.0758 54.8608 39.6731 54.733 39.1958 54.6179L37.7704 54.2599C36.6667 53.9915 35.7953 53.5717 35.1561 53.0007C34.5169 52.4297 34.1994 51.6605 34.2037 50.6932C34.1994 49.9006 34.4103 49.2081 34.8365 48.6158C35.2669 48.0234 35.8571 47.5611 36.6071 47.2287C37.3571 46.8963 38.2093 46.7301 39.1639 46.7301C40.1355 46.7301 40.9835 46.8963 41.7079 47.2287C42.4366 47.5611 43.0034 48.0234 43.4082 48.6158C43.813 49.2081 44.0218 49.8942 44.0346 50.674H41.3819Z" fill="white" />
|
|
78
|
-
</svg>
|
|
74
|
+
<ExcelSvg />
|
|
79
75
|
</a>
|
|
80
76
|
)}
|
|
81
77
|
{renderMode === "image" && !groupedView && mimeType && mimeType.includes("audio") && (
|
|
@@ -147,7 +147,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
147
147
|
} = entityApi;
|
|
148
148
|
|
|
149
149
|
// Get the list view layout & metadata first.
|
|
150
|
-
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list'}, {
|
|
150
|
+
const listViewMetaDataQs = qs.stringify({ modelName: params.modelName, moduleName: params.moduleName, viewType: 'list' }, {
|
|
151
151
|
encodeValuesOnly: true,
|
|
152
152
|
});
|
|
153
153
|
const [listViewMetaData, setListViewMetaData] = useState({});
|
|
@@ -812,6 +812,9 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
812
812
|
if (params.embeded == true) {
|
|
813
813
|
params.handlePopUpOpen(rowData?.id);
|
|
814
814
|
} else {
|
|
815
|
+
if (typeof window !== "undefined") {
|
|
816
|
+
sessionStorage.setItem("fromView", "list");
|
|
817
|
+
}
|
|
815
818
|
router.push(`${editButtonUrl}/${rowData?.id}`);
|
|
816
819
|
}
|
|
817
820
|
}}
|
|
@@ -2951,22 +2951,28 @@ li.header-li-px {
|
|
|
2951
2951
|
.kanban-ungrouped-column-content {
|
|
2952
2952
|
display: flex;
|
|
2953
2953
|
flex-wrap: wrap;
|
|
2954
|
-
gap:
|
|
2954
|
+
column-gap: 25px;
|
|
2955
|
+
row-gap: 10px;
|
|
2955
2956
|
}
|
|
2956
2957
|
|
|
2957
2958
|
.kanban-ungrouped-column .kanban-card-container {
|
|
2958
|
-
flex: 1 1 calc(20% -
|
|
2959
|
-
max-width: calc(20% -
|
|
2959
|
+
flex: 1 1 calc(20% - 20px);
|
|
2960
|
+
max-width: calc(20% - 20px);
|
|
2960
2961
|
}
|
|
2961
2962
|
|
|
2962
2963
|
.solid-kanban-card {
|
|
2963
2964
|
box-shadow: none;
|
|
2964
2965
|
border-radius: 0.5rem;
|
|
2965
|
-
border: 1px solid
|
|
2966
|
-
background: #
|
|
2966
|
+
border: 1px solid #E0E0E0;
|
|
2967
|
+
background: #FAFAFA;
|
|
2967
2968
|
padding: 9px;
|
|
2969
|
+
transition: 0.2s linear;
|
|
2968
2970
|
}
|
|
2969
2971
|
|
|
2972
|
+
.solid-kanban-card:hover {
|
|
2973
|
+
border: 1px solid #722ED1;
|
|
2974
|
+
background: #F9F0FF;
|
|
2975
|
+
}
|
|
2970
2976
|
|
|
2971
2977
|
.solid-media-card {
|
|
2972
2978
|
box-shadow: none;
|
|
@@ -3024,7 +3030,8 @@ flex-shrink: 0; */
|
|
|
3024
3030
|
border-radius: 8px;
|
|
3025
3031
|
max-height: 120px;
|
|
3026
3032
|
object-fit: contain;
|
|
3027
|
-
box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
|
|
3033
|
+
/* box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; */
|
|
3034
|
+
background-color: #fff;
|
|
3028
3035
|
}
|
|
3029
3036
|
|
|
3030
3037
|
|
|
@@ -3059,7 +3066,7 @@ flex-shrink: 0; */
|
|
|
3059
3066
|
.solid-kanban-board-wrapper {
|
|
3060
3067
|
border-top: 1px solid #CED0D6;
|
|
3061
3068
|
overflow: hidden;
|
|
3062
|
-
height: calc(100vh -
|
|
3069
|
+
height: calc(100vh - 65px) !important;
|
|
3063
3070
|
}
|
|
3064
3071
|
|
|
3065
3072
|
.solid-kanban-board-scroll-context {
|