@evenicanpm/admin-integrate 1.1.0 → 1.2.0
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/documents/ProcessSchedule/fragments.ts +24 -0
- package/documents/ProcessSchedule/read.ts +12 -0
- package/documents/ProcessScheduleGroup/fragments.ts +29 -0
- package/documents/ProcessScheduleGroup/read.ts +12 -0
- package/documents/ScheduledProcess/fragments.ts +24 -0
- package/documents/ScheduledProcess/list.ts +27 -0
- package/package.json +21 -17
- package/src/api/dashboard/queries/get-process-executions.query.ts +33 -36
- package/src/api/dashboard/queries/get-process-executions.server.ts +4 -4
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +45 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-process-schedule.query.ts +45 -0
- package/src/api/scheduler/queries/get-process-schedule.server.ts +14 -0
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +45 -0
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/index.ts +3 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +23 -26
- package/src/components/breadcrumbs/index.ts +1 -1
- package/src/components/breadcrumbs/types.tsx +4 -0
- package/src/components/button/outlined-icon-button.tsx +26 -38
- package/src/components/core/date-time-popover.tsx +32 -0
- package/src/components/core/edited-typography.tsx +20 -0
- package/src/components/core/index.ts +3 -0
- package/src/components/core/loading.tsx +6 -6
- package/src/components/core/title-edit.tsx +122 -0
- package/src/components/dashboard-list/dashboard-list-row.tsx +114 -115
- package/src/components/dashboard-list/dashboard-list.tsx +119 -119
- package/src/components/data-table/table-header.tsx +85 -81
- package/src/components/data-table/table-pagination.tsx +27 -27
- package/src/components/data-table/table-row.tsx +14 -14
- package/src/components/data-table/table-skeleton.tsx +34 -34
- package/src/components/execution/execution-filter.ts +22 -22
- package/src/components/execution/execution-status-icon.tsx +16 -17
- package/src/components/execution/execution-tag.tsx +81 -80
- package/src/components/footer/footer.tsx +34 -34
- package/src/components/header/dashboard-list-header.tsx +64 -63
- package/src/components/header/execution-details-header.tsx +102 -129
- package/src/components/header/header.tsx +27 -27
- package/src/components/header/index.ts +1 -0
- package/src/components/header/integration-details-header.tsx +99 -0
- package/src/components/icons/up-down.tsx +15 -15
- package/src/components/integration-view/edges/default-edge.tsx +18 -17
- package/src/components/integration-view/elk-layout-options.ts +26 -26
- package/src/components/integration-view/elk-types.ts +16 -12
- package/src/components/integration-view/flow-types.tsx +5 -5
- package/src/components/integration-view/integration-view.tsx +132 -130
- package/src/components/integration-view/nodes/base-node.tsx +50 -0
- package/src/components/integration-view/nodes/connection-node.tsx +8 -8
- package/src/components/integration-view/nodes/entry-node.tsx +8 -8
- package/src/components/integration-view/nodes/group-node.tsx +47 -6
- package/src/components/integration-view/nodes/task-node.tsx +58 -13
- package/src/components/integration-view/temp-data/initialElements.tsx +224 -0
- package/src/components/integration-view/types.ts +6 -6
- package/src/components/layouts/main-layout.tsx +13 -13
- package/src/components/layouts/root-container.tsx +25 -25
- package/src/components/link-cards/link-card.tsx +23 -23
- package/src/components/link-cards/styles.ts +15 -15
- package/src/components/list-filter/date-filter.tsx +41 -45
- package/src/components/list-filter/date-range-filter.tsx +78 -77
- package/src/components/list-filter/list-filter-types.ts +38 -38
- package/src/components/list-filter/list-filter.tsx +363 -354
- package/src/components/list-filter/multi-select-filter.tsx +94 -95
- package/src/components/list-filter/select-filter.tsx +67 -64
- package/src/components/scheduler/day-selector.tsx +174 -0
- package/src/components/scheduler/day-tag.tsx +73 -0
- package/src/components/scheduler/index.ts +4 -0
- package/src/components/scheduler/schedule-filter.ts +25 -0
- package/src/components/scheduler/schedule-icon.tsx +87 -0
- package/src/components/scheduler/scheduler-types.ts +40 -0
- package/src/hooks/use-breadcrumbs.ts +31 -31
- package/src/hooks/use-recurrence.tsx +13 -0
- package/src/hooks/use-timestamp.tsx +21 -21
- package/src/pages/dashboard/dashboard-link-cards.tsx +99 -99
- package/src/pages/dashboard/dashboard-list-sections.tsx +130 -125
- package/src/pages/dashboard/dashboard.tsx +6 -6
- package/src/pages/execution-details/execution-details.tsx +23 -29
- package/src/pages/executions/executions-list/executions-list-row.tsx +101 -104
- package/src/pages/executions/executions-list/executions-list-table.tsx +45 -53
- package/src/pages/executions/executions-list/executions-list.tsx +219 -212
- package/src/pages/executions/executions.tsx +67 -72
- package/src/pages/integrations/integrations.tsx +17 -25
- package/src/pages/scheduler/schedule-drawer/edited/edited-types.ts +17 -0
- package/src/pages/scheduler/schedule-drawer/edited/index.ts +1 -0
- package/src/pages/scheduler/schedule-drawer/index.ts +1 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +227 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-main.tsx +292 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +77 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details-skeleton.tsx +64 -0
- package/src/pages/scheduler/schedule-drawer/schedule-details.tsx +42 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +72 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +103 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +94 -0
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +101 -0
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +93 -0
- package/src/pages/scheduler/scheduler.tsx +106 -30
- package/src/pages/scheduler/schedules-list/index.ts +1 -0
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +235 -0
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +74 -0
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +280 -0
- package/tsconfig.json +29 -26
- package/src/components/integration-view/temp-data/initialElements.ts +0 -238
|
@@ -1,10 +1,51 @@
|
|
|
1
|
+
import { Box, Card, CardContent, CardHeader, Typography } from "@mui/material";
|
|
1
2
|
import { Handle, NodeProps, Position } from "@xyflow/react";
|
|
3
|
+
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
2
4
|
|
|
3
5
|
export function GroupNode(props: NodeProps): JSX.Element {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return (
|
|
7
|
+
<Box>
|
|
8
|
+
<Card
|
|
9
|
+
sx={{
|
|
10
|
+
borderWidth: 1,
|
|
11
|
+
borderStyle: "solid",
|
|
12
|
+
borderColor: "grey.700",
|
|
13
|
+
width: props.width,
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
<CardHeader
|
|
17
|
+
title={
|
|
18
|
+
<Typography variant="h5" sx={{ textAlign: "center" }}>
|
|
19
|
+
{props?.data?.label as string}
|
|
20
|
+
</Typography>
|
|
21
|
+
}
|
|
22
|
+
sx={{
|
|
23
|
+
height: 62,
|
|
24
|
+
paddingRight: "48px",
|
|
25
|
+
}}
|
|
26
|
+
/>
|
|
27
|
+
<CardContent
|
|
28
|
+
sx={{
|
|
29
|
+
height: props.height,
|
|
30
|
+
width: (props.width || 0) + 48,
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
alignItems: "flex-end",
|
|
34
|
+
paddingRight: "48px",
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<AddCircleOutlineIcon
|
|
38
|
+
sx={{
|
|
39
|
+
color: "grey.600",
|
|
40
|
+
"&:hover": {
|
|
41
|
+
color: "#4E97FD", //Blue not implemented in the theme
|
|
42
|
+
},
|
|
43
|
+
marginLeft: "-16px",
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</CardContent>
|
|
47
|
+
<Handle type="target" position={Position.Top} />
|
|
48
|
+
</Card>
|
|
49
|
+
</Box>
|
|
50
|
+
);
|
|
10
51
|
}
|
|
@@ -1,17 +1,62 @@
|
|
|
1
|
+
import { Box, Card, CardContent, Typography, useTheme } from "@mui/material";
|
|
1
2
|
import { Handle, NodeProps, Position } from "@xyflow/react";
|
|
2
3
|
|
|
4
|
+
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
|
|
5
|
+
|
|
3
6
|
export function TaskNode(props: NodeProps): JSX.Element {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Box
|
|
11
|
+
sx={{
|
|
12
|
+
display: "flex",
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
//width: props.width + 24 + theme.spacing(1),
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Card
|
|
19
|
+
sx={{
|
|
20
|
+
borderWidth: 1,
|
|
21
|
+
borderStyle: "solid",
|
|
22
|
+
borderColor: "grey.700",
|
|
23
|
+
"&:hover": {
|
|
24
|
+
borderColor: "#4E97FD", //Blue not implemented in the theme
|
|
25
|
+
backgroundColor: "#DBF0FE",
|
|
26
|
+
},
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
<CardContent
|
|
30
|
+
sx={{
|
|
31
|
+
height: props.height,
|
|
32
|
+
width: props.width,
|
|
33
|
+
display: "flex",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
{props?.data?.icon as any}
|
|
39
|
+
<Typography
|
|
40
|
+
variant="h6"
|
|
41
|
+
sx={{ textAlign: "center", paddingLeft: theme.spacing(1) }}
|
|
42
|
+
>
|
|
43
|
+
{props?.data?.label as string}
|
|
44
|
+
</Typography>
|
|
45
|
+
</CardContent>
|
|
46
|
+
<Handle type="target" position={Position.Top} />
|
|
47
|
+
<Handle type="source" position={Position.Bottom} />
|
|
48
|
+
</Card>
|
|
49
|
+
{props?.data?.isLast ? (
|
|
50
|
+
<AddCircleOutlineIcon
|
|
51
|
+
sx={{
|
|
52
|
+
color: "grey.600",
|
|
53
|
+
marginLeft: theme.spacing(1),
|
|
54
|
+
"&:hover": {
|
|
55
|
+
color: "#4E97FD", //Blue not implemented in the theme
|
|
56
|
+
},
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
) : null}
|
|
60
|
+
</Box>
|
|
61
|
+
);
|
|
17
62
|
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { ElkExtendedEdgeWithFlow, ElkNodeWithFlow } from "../elk-types";
|
|
2
|
+
|
|
3
|
+
import StorageIcon from "@mui/icons-material/Storage";
|
|
4
|
+
import TableChartIcon from "@mui/icons-material/TableChart";
|
|
5
|
+
import SystemUpdateAltIcon from "@mui/icons-material/SystemUpdateAlt";
|
|
6
|
+
|
|
7
|
+
import { MarkerType } from "@xyflow/react";
|
|
8
|
+
import { Box } from "@mui/material";
|
|
9
|
+
|
|
10
|
+
const pullIcon = () => {
|
|
11
|
+
return (
|
|
12
|
+
<Box
|
|
13
|
+
sx={{
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
borderRadius: "5px",
|
|
18
|
+
bgcolor: "success.100",
|
|
19
|
+
borderWidth: 1,
|
|
20
|
+
borderStyle: "solid",
|
|
21
|
+
borderColor: "success.600",
|
|
22
|
+
padding: "2px",
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<StorageIcon sx={{ color: "success.500" }} />
|
|
26
|
+
</Box>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const chartIcon = () => {
|
|
31
|
+
return (
|
|
32
|
+
<Box
|
|
33
|
+
sx={{
|
|
34
|
+
display: "flex",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
justifyContent: "center",
|
|
37
|
+
borderRadius: "5px",
|
|
38
|
+
bgcolor: "paste.100",
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderStyle: "solid",
|
|
41
|
+
borderColor: "paste.600",
|
|
42
|
+
padding: "2px",
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<TableChartIcon sx={{ color: "paste.600" }} />
|
|
46
|
+
</Box>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const inputIcon = () => {
|
|
51
|
+
return (
|
|
52
|
+
<Box>
|
|
53
|
+
<SystemUpdateAltIcon sx={{ color: "grey.600" }} />
|
|
54
|
+
</Box>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const initialNodes: ElkNodeWithFlow[] = [
|
|
59
|
+
{
|
|
60
|
+
id: "1",
|
|
61
|
+
type: "task-node",
|
|
62
|
+
data: { label: "Set Entry Point", icon: inputIcon() },
|
|
63
|
+
width: 450,
|
|
64
|
+
height: 70,
|
|
65
|
+
position: { x: 0, y: 0 },
|
|
66
|
+
layoutOptions: {
|
|
67
|
+
"org.eclipse.elk.priority": "1",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
id: "2",
|
|
73
|
+
data: { label: "Group 1" },
|
|
74
|
+
position: { x: 0, y: 0 },
|
|
75
|
+
type: "group-node",
|
|
76
|
+
children: [
|
|
77
|
+
{
|
|
78
|
+
id: "2gs",
|
|
79
|
+
data: {
|
|
80
|
+
label: "Pull Data From External MS DB 1",
|
|
81
|
+
icon: pullIcon(),
|
|
82
|
+
isLast: true,
|
|
83
|
+
},
|
|
84
|
+
position: { x: 0, y: 0 },
|
|
85
|
+
type: "task-node",
|
|
86
|
+
width: 450,
|
|
87
|
+
height: 70,
|
|
88
|
+
extent: "parent",
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
{
|
|
92
|
+
id: "2g1",
|
|
93
|
+
data: {
|
|
94
|
+
label: "Stage Data 1",
|
|
95
|
+
icon: chartIcon(),
|
|
96
|
+
},
|
|
97
|
+
position: { x: 0, y: 0 },
|
|
98
|
+
width: 450,
|
|
99
|
+
height: 70,
|
|
100
|
+
type: "task-node",
|
|
101
|
+
extent: "parent",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "2gconnect1",
|
|
105
|
+
position: { x: 0, y: 0 },
|
|
106
|
+
type: "connection-node",
|
|
107
|
+
width: 1,
|
|
108
|
+
height: 1,
|
|
109
|
+
extent: "parent",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "2g3",
|
|
113
|
+
data: {
|
|
114
|
+
label: "Stage Data 2",
|
|
115
|
+
icon: chartIcon(),
|
|
116
|
+
},
|
|
117
|
+
position: { x: 0, y: 0 },
|
|
118
|
+
type: "task-node",
|
|
119
|
+
width: 450,
|
|
120
|
+
height: 70,
|
|
121
|
+
extent: "parent",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "2g4",
|
|
125
|
+
data: {
|
|
126
|
+
label: "Process Data",
|
|
127
|
+
icon: chartIcon(),
|
|
128
|
+
isLast: true,
|
|
129
|
+
},
|
|
130
|
+
position: { x: 0, y: 0 },
|
|
131
|
+
type: "task-node",
|
|
132
|
+
width: 450,
|
|
133
|
+
height: 70,
|
|
134
|
+
extent: "parent",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "2gconnect2",
|
|
138
|
+
position: { x: 0, y: 0 },
|
|
139
|
+
type: "connection-node",
|
|
140
|
+
width: 1,
|
|
141
|
+
height: 1,
|
|
142
|
+
extent: "parent",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "2g2",
|
|
146
|
+
data: {
|
|
147
|
+
label: "Stage Data 3",
|
|
148
|
+
icon: chartIcon(),
|
|
149
|
+
isLast: true,
|
|
150
|
+
},
|
|
151
|
+
position: { x: 0, y: 0 },
|
|
152
|
+
type: "task-node",
|
|
153
|
+
width: 450,
|
|
154
|
+
height: 70,
|
|
155
|
+
extent: "parent",
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
layoutOptions: {
|
|
159
|
+
"org.eclipse.elk.priority": "2",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
const markerEnd = {
|
|
165
|
+
type: MarkerType.ArrowClosed,
|
|
166
|
+
width: 20,
|
|
167
|
+
height: 20,
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const initialEdges: ElkExtendedEdgeWithFlow[] = [
|
|
171
|
+
{ id: "e1-2", sources: ["1"], targets: ["2"], type: "default-edge" },
|
|
172
|
+
{
|
|
173
|
+
id: "2gs-2gc",
|
|
174
|
+
sources: ["2gs"],
|
|
175
|
+
targets: ["2gconnect1"],
|
|
176
|
+
type: "default-edge",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "2gs-2g1",
|
|
180
|
+
sources: ["2gconnect1"],
|
|
181
|
+
targets: ["2g1"],
|
|
182
|
+
type: "default-edge",
|
|
183
|
+
markerEnd: markerEnd,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "2gs-2g2",
|
|
187
|
+
sources: ["2gconnect1"],
|
|
188
|
+
targets: ["2g2"],
|
|
189
|
+
type: "default-edge",
|
|
190
|
+
markerEnd: markerEnd,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "2gs-2g3",
|
|
194
|
+
sources: ["2gconnect1"],
|
|
195
|
+
targets: ["2g3"],
|
|
196
|
+
type: "default-edge",
|
|
197
|
+
markerEnd: markerEnd,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "2g1-2g4",
|
|
201
|
+
sources: ["2g1"],
|
|
202
|
+
targets: ["2gconnect2"],
|
|
203
|
+
type: "default-edge",
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: "2g2-2g4",
|
|
207
|
+
sources: ["2g2"],
|
|
208
|
+
targets: ["2gconnect2"],
|
|
209
|
+
type: "default-edge",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "2g3-2g4",
|
|
213
|
+
sources: ["2g3"],
|
|
214
|
+
targets: ["2gconnect2"],
|
|
215
|
+
type: "default-edge",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: "2gc-2g4",
|
|
219
|
+
sources: ["2gconnect2"],
|
|
220
|
+
targets: ["2g4"],
|
|
221
|
+
type: "default-edge",
|
|
222
|
+
markerEnd: markerEnd,
|
|
223
|
+
},
|
|
224
|
+
];
|
|
@@ -3,10 +3,10 @@ interface ElkOptions {}
|
|
|
3
3
|
interface ElkPosition {}
|
|
4
4
|
|
|
5
5
|
interface ElkItem {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
type: "input";
|
|
8
|
+
data: { label: string };
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
layoutOptions: ElkOptions;
|
|
12
12
|
}
|
|
@@ -7,22 +7,22 @@ import DashboardSidebar from "@evenicanpm/admin-core/components/layouts/main-das
|
|
|
7
7
|
import { LayoutProvider } from "@evenicanpm/admin-core/components/layouts/main-dashboard/dashboard-layout-context";
|
|
8
8
|
|
|
9
9
|
// STYLED COMPONENT
|
|
10
|
-
const StyledContainer = styled("div")((
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const StyledContainer = styled("div")(() => ({
|
|
11
|
+
margin: 0,
|
|
12
|
+
padding: 0,
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
15
|
export default function MainLayout({
|
|
16
|
-
|
|
16
|
+
children,
|
|
17
17
|
}: {
|
|
18
|
-
|
|
18
|
+
children: React.ReactNode;
|
|
19
19
|
}) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
return (
|
|
21
|
+
<LayoutProvider>
|
|
22
|
+
<DashboardSidebar />
|
|
23
|
+
<BodyWrapper>
|
|
24
|
+
<StyledContainer>{children}</StyledContainer>
|
|
25
|
+
</BodyWrapper>
|
|
26
|
+
</LayoutProvider>
|
|
27
|
+
);
|
|
28
28
|
}
|
|
@@ -7,37 +7,37 @@ import { SxProps, Breakpoint } from "@mui/system";
|
|
|
7
7
|
import { IntegrateFooter } from "@evenicanpm/admin-integrate/components/footer";
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
maxWidth?: false | Breakpoint;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
sx?: SxProps;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export default function RootContainer(props: Props) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const styles = getStyles(theme);
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const defaultMaxWidth = "xl";
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
return (
|
|
22
|
+
<Container
|
|
23
|
+
maxWidth={props.maxWidth !== undefined ? props.maxWidth : defaultMaxWidth}
|
|
24
|
+
sx={props.sx}
|
|
25
|
+
>
|
|
26
|
+
<Box sx={styles.root}>
|
|
27
|
+
<Stack spacing={2}>{props.children}</Stack>
|
|
28
|
+
<IntegrateFooter />
|
|
29
|
+
</Box>
|
|
30
|
+
</Container>
|
|
31
|
+
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const getStyles = (theme: Theme) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
return {
|
|
36
|
+
root: {
|
|
37
|
+
margin: theme.spacing(3, 4),
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
minHeight: `calc(100vh - ${theme.spacing(20)})`,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
43
|
};
|
|
@@ -6,31 +6,31 @@ import { Box, CardActionArea } from "@mui/material";
|
|
|
6
6
|
|
|
7
7
|
// ============================================================
|
|
8
8
|
type Props = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
13
|
};
|
|
14
14
|
// ============================================================
|
|
15
15
|
export default function LinkCard({ title, description, url, children }: Props) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const handleRedirect = () => {
|
|
17
|
+
if (url) {
|
|
18
|
+
redirect(url, RedirectType.push);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
return (
|
|
23
|
+
<Box sx={{ height: "100%" }}>
|
|
24
|
+
<CardActionArea onClick={handleRedirect} sx={{ height: "100%" }}>
|
|
25
|
+
<Wrapper>
|
|
26
|
+
{/* Add the icon as a child */}
|
|
27
|
+
{children}
|
|
28
|
+
<TitleText variant="h5" sx={{ textAlign: "center" }}>
|
|
29
|
+
{title}
|
|
30
|
+
</TitleText>
|
|
31
|
+
<BodyText variant="body1">{description}</BodyText>
|
|
32
|
+
</Wrapper>
|
|
33
|
+
</CardActionArea>
|
|
34
|
+
</Box>
|
|
35
|
+
);
|
|
36
36
|
}
|
|
@@ -5,25 +5,25 @@ import { Card, Typography } from "@mui/material";
|
|
|
5
5
|
|
|
6
6
|
// STYLED COMPONENTS
|
|
7
7
|
export const Wrapper = styled(Card)(({ theme }) => ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
display: "flex",
|
|
9
|
+
height: "100%",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
border: `1px solid ${theme.palette.grey[300]}`,
|
|
14
|
+
borderRadius: theme.shape.borderRadius,
|
|
15
|
+
paddingLeft: theme.spacing(4),
|
|
16
|
+
paddingRight: theme.spacing(4),
|
|
17
|
+
paddingTop: theme.spacing(3),
|
|
18
|
+
paddingBottom: theme.spacing(3),
|
|
19
|
+
backgroundColor: theme.palette.common.white,
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
22
|
export const TitleText = styled(Typography)({
|
|
23
|
-
|
|
23
|
+
textAlign: "center",
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export const BodyText = styled(Typography)(({ theme }) => ({
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
color: theme.palette.grey[600],
|
|
28
|
+
textAlign: "center",
|
|
29
29
|
}));
|
|
@@ -1,55 +1,51 @@
|
|
|
1
|
-
import { Typography,
|
|
1
|
+
import { Typography, FormControl } from "@mui/material";
|
|
2
2
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
import { DateFilter, FilterProps } from "./list-filter-types";
|
|
5
5
|
import { useTranslations } from "next-intl";
|
|
6
6
|
|
|
7
7
|
const DateFilterComponent: React.FC<FilterProps<DateFilter>> = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
filter,
|
|
9
|
+
onSet,
|
|
10
|
+
onError,
|
|
11
|
+
current,
|
|
12
12
|
}) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</FormControl>
|
|
50
|
-
);
|
|
13
|
+
const t = useTranslations("Integrate");
|
|
14
|
+
|
|
15
|
+
const [value, setValue] = useState(current);
|
|
16
|
+
const [error, setError] = useState<string | null>(null);
|
|
17
|
+
|
|
18
|
+
const updateValue = (date: null | Date | string) => {
|
|
19
|
+
const newValue: string | null =
|
|
20
|
+
date !== null && typeof date !== "string" && !isNaN(date?.getTime())
|
|
21
|
+
? date.toISOString()
|
|
22
|
+
: null;
|
|
23
|
+
|
|
24
|
+
setValue(newValue);
|
|
25
|
+
onSet(newValue);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const updateError = (error: string | null) => {
|
|
29
|
+
setError(error ? t("Filter.invalidDate") : null);
|
|
30
|
+
onError(!!error);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<FormControl>
|
|
35
|
+
<Typography>{t(filter.label)}</Typography>
|
|
36
|
+
<DatePicker
|
|
37
|
+
value={value && new Date(value as string)}
|
|
38
|
+
onChange={updateValue}
|
|
39
|
+
onError={updateError}
|
|
40
|
+
slotProps={{
|
|
41
|
+
field: { clearable: true },
|
|
42
|
+
textField: {
|
|
43
|
+
helperText: error,
|
|
44
|
+
},
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</FormControl>
|
|
48
|
+
);
|
|
51
49
|
};
|
|
52
50
|
|
|
53
|
-
const getStyles = (theme: Theme) => ({});
|
|
54
|
-
|
|
55
51
|
export default DateFilterComponent;
|