@evenicanpm/admin-integrate 1.2.2 → 1.3.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/ConfigImport/configuration-import.ts +54 -0
- package/documents/CopyProcess/copy.ts +25 -0
- package/documents/Endpoint/fragments.ts +9 -0
- package/documents/Endpoint/list.ts +22 -0
- package/documents/Process/fragments.ts +22 -0
- package/documents/Process/get-process-details.ts +73 -0
- package/documents/Process/list.ts +24 -0
- package/documents/ProcessConfig/fragments.ts +116 -0
- package/documents/ProcessConfig/read.ts +35 -0
- package/documents/ProcessExecution/fragments.ts +12 -0
- package/documents/ProcessExecution/list.ts +30 -1
- package/documents/ProcessExecutionDetails/fragments.ts +96 -0
- package/documents/ProcessExecutionDetails/read.ts +12 -0
- package/documents/ProcessScheduleGroup/read.ts +43 -0
- package/documents/ProcessTask/fragments.ts +285 -0
- package/documents/ProcessTask/read.ts +12 -0
- package/documents/ProcessTemplate/fragments.ts +69 -0
- package/documents/ProcessTemplate/list.ts +67 -0
- package/documents/ProcessTemplate/read.ts +12 -0
- package/documents/RunProcess/run.ts +11 -0
- package/package.json +4 -3
- package/src/api/Integrations/queries/get-process.query.ts +12 -12
- package/src/api/Integrations/queries/get-process.server.ts +7 -2
- package/src/api/dashboard/queries/get-process-executions.query.ts +6 -3
- package/src/api/dashboard/queries/get-process-executions.server.ts +1 -1
- package/src/api/execution-details/queries/get-process-execution-details.query.ts +46 -0
- package/src/api/execution-details/queries/get-process-execution-details.server.ts +11 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.query.ts +48 -0
- package/src/api/execution-details/queries/get-process-executions-by-process.server.ts +11 -0
- package/src/api/execution-details/queries/index.ts +2 -0
- package/src/api/process/mutations/copy-process.mutation.ts +48 -0
- package/src/api/process/mutations/copy-process.server.ts +14 -0
- package/src/api/process/mutations/index.ts +2 -0
- package/src/api/process/mutations/run-process.mutation.ts +41 -0
- package/src/api/process/mutations/run-process.server.ts +14 -0
- package/src/api/process/queries/get-process-by-id.query.ts +85 -0
- package/src/api/process/queries/get-process-by-id.server.ts +20 -0
- package/src/api/process/queries/index.ts +4 -0
- package/src/api/process-config/mutation/index.ts +2 -0
- package/src/api/process-config/mutation/process-config-import.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-import.server.ts +14 -0
- package/src/api/process-config/mutation/process-config-merge.mutation.ts +33 -0
- package/src/api/process-config/mutation/process-config-merge.server.ts +14 -0
- package/src/api/process-task/queries/get-process-task-by-id.query.ts +45 -0
- package/src/api/process-task/queries/get-process-task-by-id.server.ts +9 -0
- package/src/api/process-task/queries/index.ts +1 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/create-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/mutation/index.ts +2 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.mutation.ts +47 -0
- package/src/api/scheduler/mutation/update-process-schedule-group-details.server.ts +14 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.query.ts +48 -0
- package/src/api/scheduler/queries/get-non-scheduled-processes.server.ts +11 -0
- package/src/api/scheduler/queries/get-process-schedule-group-details.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule-group-details.server.ts +3 -3
- package/src/api/scheduler/queries/get-process-schedule.query.ts +6 -3
- package/src/api/scheduler/queries/get-process-schedule.server.ts +3 -3
- package/src/api/scheduler/queries/get-scheduled-processes.query.ts +6 -3
- package/src/api/scheduler/queries/get-scheduled-processes.server.ts +1 -1
- package/src/api/scheduler/queries/index.ts +3 -2
- package/src/api/templates/queries/get-process-template-groups.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-groups.server.ts +11 -0
- package/src/api/templates/queries/get-process-template-records.query.ts +48 -0
- package/src/api/templates/queries/get-process-template-records.server.ts +11 -0
- package/src/api/templates/queries/get-process-template.query.ts +48 -0
- package/src/api/templates/queries/get-process-template.server.ts +9 -0
- package/src/api/templates/queries/get-process-templates.query.ts +45 -0
- package/src/api/templates/queries/get-process-templates.server.ts +9 -0
- package/src/api/templates/queries/index.ts +5 -0
- package/src/api/templates/queries/template-input-search.query.ts +34 -0
- package/src/api/templates/queries/template-input-search.server.ts +35 -0
- package/src/api/templates/queries/types.ts +28 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +32 -5
- package/src/components/button/outlined-icon-button.tsx +2 -2
- package/src/components/core/date-time-popover.tsx +11 -4
- package/src/components/core/drawer-buttons.tsx +52 -0
- package/src/components/core/edited-typography.tsx +1 -1
- package/src/components/core/index.ts +4 -2
- package/src/components/core/loading.tsx +1 -1
- package/src/components/core/status-tag.tsx +97 -0
- package/src/components/core/title-edit.tsx +18 -11
- package/src/components/dashboard-list/dashboard-list-row.tsx +22 -29
- package/src/components/dashboard-list/dashboard-list.tsx +19 -15
- package/src/components/data-table/table-header.tsx +5 -7
- package/src/components/data-table/table-pagination.tsx +1 -1
- package/src/components/data-table/table-row.tsx +1 -1
- package/src/components/data-table/table-skeleton.tsx +9 -4
- package/src/components/execution/execution-filter.ts +1 -1
- package/src/components/execution/execution-status-icon.tsx +7 -7
- package/src/components/execution/execution-tag.tsx +12 -77
- package/src/components/execution/index.ts +1 -1
- package/src/components/execution-history-drawer/execution-history-drawer.tsx +203 -0
- package/src/components/execution-history-drawer/executions-card.tsx +85 -0
- package/src/components/execution-history-drawer/index.ts +1 -0
- package/src/components/footer/footer.tsx +10 -6
- package/src/components/header/dashboard-list-header.tsx +12 -7
- package/src/components/header/execution-details-header.tsx +35 -26
- package/src/components/header/header.tsx +10 -3
- package/src/components/header/index.ts +1 -1
- package/src/components/header/integration-details-header.tsx +104 -45
- package/src/components/integration-list/index.ts +2 -1
- package/src/components/integration-list/integration-filter.ts +1 -1
- package/src/components/integration-list/integration-status-icon.tsx +7 -8
- package/src/components/integration-list/integration-tag.tsx +6 -50
- package/src/components/integration-list/list/integration-list-row.tsx +161 -0
- package/src/components/integration-list/list/integration-list-table.tsx +62 -0
- package/src/{pages/integrations/integration-list → components/integration-list/list}/integration-list.tsx +47 -51
- package/src/components/integration-view/animated-svg.tsx +31 -0
- package/src/components/integration-view/edges/default-edge.tsx +1 -1
- package/src/components/integration-view/elk-layout-options.ts +2 -2
- package/src/components/integration-view/elk-types.ts +35 -6
- package/src/components/integration-view/flow-types.tsx +10 -0
- package/src/components/integration-view/integration-view.tsx +990 -55
- package/src/components/integration-view/nodes/empty-node.tsx +65 -0
- package/src/components/integration-view/nodes/entry-node.tsx +98 -4
- package/src/components/integration-view/nodes/execution-entry-node.tsx +107 -0
- package/src/components/integration-view/nodes/execution-task-node.tsx +88 -0
- package/src/components/integration-view/nodes/group-node.tsx +19 -13
- package/src/components/integration-view/nodes/row-node.tsx +19 -0
- package/src/components/integration-view/nodes/task-node.tsx +14 -8
- package/src/components/integration-view/task-icon.tsx +193 -0
- package/src/components/integration-view/temp-data/initialElements.tsx +36 -32
- package/src/components/integration-view/types.ts +2 -2
- package/src/components/layouts/main-layout.tsx +2 -3
- package/src/components/layouts/root-container.tsx +3 -6
- package/src/components/link-cards/link-card.tsx +15 -4
- package/src/components/link-cards/styles.ts +1 -1
- package/src/components/list-filter/date-filter.tsx +4 -3
- package/src/components/list-filter/date-range-filter.tsx +11 -5
- package/src/components/list-filter/index.ts +1 -1
- package/src/components/list-filter/list-filter.tsx +30 -25
- package/src/components/list-filter/multi-select-filter.tsx +11 -10
- package/src/components/list-filter/select-filter.tsx +13 -8
- package/src/components/scheduler/day-selector.tsx +29 -15
- package/src/components/scheduler/day-tag.tsx +14 -51
- package/src/components/scheduler/index.ts +2 -1
- package/src/components/scheduler/schedule-drawer/details-reducer.ts +217 -0
- package/src/components/scheduler/schedule-drawer/schedule-details-integrations.tsx +503 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-main.tsx +136 -99
- package/src/components/scheduler/schedule-drawer/schedule-details-name.tsx +94 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details-skeleton.tsx +1 -2
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-details.tsx +9 -13
- package/src/components/scheduler/schedule-drawer/schedule-drawer-group.tsx +218 -0
- package/src/{pages → components}/scheduler/schedule-drawer/schedule-drawer-legacy.tsx +6 -25
- package/src/components/scheduler/schedule-drawer/schedule-drawer.tsx +116 -0
- package/src/components/scheduler/schedule-drawer/sortable-integration-row.tsx +130 -0
- package/src/components/scheduler/schedule-filter.ts +1 -1
- package/src/components/scheduler/schedule-icon.tsx +5 -6
- package/src/components/scheduler/schedule-integration-icon.tsx +31 -0
- package/src/components/templates/index.ts +1 -0
- package/src/components/templates/inputs/index.tsx +1351 -0
- package/src/components/templates/template-filter.ts +5 -0
- package/src/components/templates/templates-list/index.ts +1 -0
- package/src/components/templates/templates-list/templates-list-row.tsx +55 -0
- package/src/components/templates/templates-list/templates-list-table.tsx +58 -0
- package/src/components/templates/templates-list/templates-list.tsx +253 -0
- package/src/components/templates/types.tsx +75 -0
- package/src/components/templates/wizard.tsx +689 -0
- package/src/hooks/use-breadcrumbs.ts +1 -1
- package/src/hooks/use-recurrence.tsx +1 -2
- package/src/pages/dashboard/dashboard-link-cards.tsx +8 -11
- package/src/pages/dashboard/dashboard-list-sections.tsx +7 -9
- package/src/pages/dashboard/dashboard.tsx +1 -2
- package/src/pages/execution-details/execution-details.tsx +211 -14
- package/src/pages/execution-details/task-execution-details.tsx +160 -0
- package/src/pages/execution-details/task-execution-drawer.tsx +54 -0
- package/src/pages/executions/executions-list/executions-list-row.tsx +21 -27
- package/src/pages/executions/executions-list/executions-list-table.tsx +28 -35
- package/src/pages/executions/executions-list/executions-list.tsx +24 -18
- package/src/pages/executions/executions.tsx +11 -15
- package/src/pages/integration-create/index.ts +1 -0
- package/src/pages/integration-create/integration-create.tsx +174 -0
- package/src/pages/integration-create/pre-creation-step.tsx +12 -0
- package/src/pages/integration-create/select-step.tsx +105 -0
- package/src/pages/integration-create/template-list-step.tsx +77 -0
- package/src/pages/integration-create/wizard-step.tsx +50 -0
- package/src/pages/integration-details/import-process/copy-tasks-list.tsx +265 -0
- package/src/pages/integration-details/import-process/copy-tasks-row.tsx +77 -0
- package/src/pages/integration-details/import-process/import-confirm.tsx +61 -0
- package/src/pages/integration-details/import-process/import-drawer.tsx +48 -0
- package/src/pages/integration-details/import-process/import-process-reducer.ts +90 -0
- package/src/pages/integration-details/import-process/import-process.tsx +149 -0
- package/src/pages/integration-details/index.ts +1 -0
- package/src/pages/integration-details/integration-details.tsx +221 -0
- package/src/pages/integration-details/task-drawer/add-task.tsx +120 -0
- package/src/pages/integration-details/task-drawer/edit-task.tsx +175 -0
- package/src/pages/integration-details/task-drawer/task-drawer.tsx +139 -0
- package/src/pages/integration-details/task-drawer/task-reducer.ts +73 -0
- package/src/pages/integrations/integrations.tsx +11 -14
- package/src/pages/scheduler/scheduler.tsx +12 -24
- package/src/pages/scheduler/schedules-list/schedules-list-row.tsx +27 -37
- package/src/pages/scheduler/schedules-list/schedules-list-table.tsx +27 -42
- package/src/pages/scheduler/schedules-list/schedules-list.tsx +48 -21
- package/src/utils/date-functions.ts +69 -0
- package/src/utils/slugify.ts +3 -0
- package/tsconfig.json +12 -4
- package/src/hooks/use-timestamp.tsx +0 -25
- package/src/pages/integrations/integration-list/integration-list-row.tsx +0 -147
- package/src/pages/integrations/integration-list/integration-list-table.tsx +0 -78
- package/src/pages/scheduler/schedule-drawer/schedule-details-integrations.tsx +0 -227
- package/src/pages/scheduler/schedule-drawer/schedule-details-name.tsx +0 -77
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-buttons.tsx +0 -72
- package/src/pages/scheduler/schedule-drawer/schedule-drawer-group.tsx +0 -103
- package/src/pages/scheduler/schedule-drawer/schedule-drawer.tsx +0 -101
- package/src/pages/scheduler/schedule-drawer/sortable-integration-row.tsx +0 -93
- /package/src/{pages/integrations/integration-list → components/integration-list/list}/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/edited-types.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/edited/index.ts +0 -0
- /package/src/{pages → components}/scheduler/schedule-drawer/index.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ElkExtendedEdgeWithFlow, ElkNodeWithFlow } from "../elk-types";
|
|
2
|
-
|
|
3
1
|
import StorageIcon from "@mui/icons-material/Storage";
|
|
4
2
|
import TableChartIcon from "@mui/icons-material/TableChart";
|
|
5
|
-
import
|
|
3
|
+
import { Box } from "@mui/material";
|
|
6
4
|
|
|
7
5
|
import { MarkerType } from "@xyflow/react";
|
|
8
|
-
import {
|
|
6
|
+
import type { ElkExtendedEdgeWithFlow, ElkNodeWithFlow } from "../elk-types";
|
|
7
|
+
|
|
8
|
+
//import { timerIcon, triggerIcon } from "../icons";
|
|
9
9
|
|
|
10
10
|
const pullIcon = () => {
|
|
11
11
|
return (
|
|
@@ -35,22 +35,15 @@ const chartIcon = () => {
|
|
|
35
35
|
alignItems: "center",
|
|
36
36
|
justifyContent: "center",
|
|
37
37
|
borderRadius: "5px",
|
|
38
|
-
bgcolor: "
|
|
38
|
+
bgcolor: "#EADDFF", // Purple not implemented in the theme
|
|
39
39
|
borderWidth: 1,
|
|
40
40
|
borderStyle: "solid",
|
|
41
|
-
borderColor: "
|
|
41
|
+
borderColor: "#6750A4", // Purple not implemented in the theme
|
|
42
42
|
padding: "2px",
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
45
|
-
<TableChartIcon sx={{ color: "
|
|
46
|
-
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const inputIcon = () => {
|
|
51
|
-
return (
|
|
52
|
-
<Box>
|
|
53
|
-
<SystemUpdateAltIcon sx={{ color: "grey.600" }} />
|
|
45
|
+
<TableChartIcon sx={{ color: "#6750A4" }} />{" "}
|
|
46
|
+
{/* Purple not implemented in the theme */}
|
|
54
47
|
</Box>
|
|
55
48
|
);
|
|
56
49
|
};
|
|
@@ -58,9 +51,15 @@ const inputIcon = () => {
|
|
|
58
51
|
export const initialNodes: ElkNodeWithFlow[] = [
|
|
59
52
|
{
|
|
60
53
|
id: "1",
|
|
61
|
-
type: "
|
|
62
|
-
data: {
|
|
63
|
-
|
|
54
|
+
type: "execution-entry-node",
|
|
55
|
+
data: {
|
|
56
|
+
label: "Trigger",
|
|
57
|
+
//icon: timerIcon(),
|
|
58
|
+
label2: "Schedule",
|
|
59
|
+
//icon2: triggerIcon(),
|
|
60
|
+
executionStatus: "400",
|
|
61
|
+
},
|
|
62
|
+
width: 200,
|
|
64
63
|
height: 70,
|
|
65
64
|
position: { x: 0, y: 0 },
|
|
66
65
|
layoutOptions: {
|
|
@@ -80,9 +79,10 @@ export const initialNodes: ElkNodeWithFlow[] = [
|
|
|
80
79
|
label: "Pull Data From External MS DB 1",
|
|
81
80
|
icon: pullIcon(),
|
|
82
81
|
isLast: true,
|
|
82
|
+
executionStatus: "500",
|
|
83
83
|
},
|
|
84
84
|
position: { x: 0, y: 0 },
|
|
85
|
-
type: "task-node",
|
|
85
|
+
type: "execution-task-node",
|
|
86
86
|
width: 450,
|
|
87
87
|
height: 70,
|
|
88
88
|
extent: "parent",
|
|
@@ -93,11 +93,12 @@ export const initialNodes: ElkNodeWithFlow[] = [
|
|
|
93
93
|
data: {
|
|
94
94
|
label: "Stage Data 1",
|
|
95
95
|
icon: chartIcon(),
|
|
96
|
+
executionStatus: "400",
|
|
96
97
|
},
|
|
97
98
|
position: { x: 0, y: 0 },
|
|
98
99
|
width: 450,
|
|
99
100
|
height: 70,
|
|
100
|
-
type: "task-node",
|
|
101
|
+
type: "execution-task-node",
|
|
101
102
|
extent: "parent",
|
|
102
103
|
},
|
|
103
104
|
{
|
|
@@ -113,9 +114,10 @@ export const initialNodes: ElkNodeWithFlow[] = [
|
|
|
113
114
|
data: {
|
|
114
115
|
label: "Stage Data 2",
|
|
115
116
|
icon: chartIcon(),
|
|
117
|
+
executionStatus: "300",
|
|
116
118
|
},
|
|
117
119
|
position: { x: 0, y: 0 },
|
|
118
|
-
type: "task-node",
|
|
120
|
+
type: "execution-task-node",
|
|
119
121
|
width: 450,
|
|
120
122
|
height: 70,
|
|
121
123
|
extent: "parent",
|
|
@@ -126,9 +128,10 @@ export const initialNodes: ElkNodeWithFlow[] = [
|
|
|
126
128
|
label: "Process Data",
|
|
127
129
|
icon: chartIcon(),
|
|
128
130
|
isLast: true,
|
|
131
|
+
executionStatus: "400",
|
|
129
132
|
},
|
|
130
133
|
position: { x: 0, y: 0 },
|
|
131
|
-
type: "task-node",
|
|
134
|
+
type: "execution-task-node",
|
|
132
135
|
width: 450,
|
|
133
136
|
height: 70,
|
|
134
137
|
extent: "parent",
|
|
@@ -147,9 +150,10 @@ export const initialNodes: ElkNodeWithFlow[] = [
|
|
|
147
150
|
label: "Stage Data 3",
|
|
148
151
|
icon: chartIcon(),
|
|
149
152
|
isLast: true,
|
|
153
|
+
executionStatus: "500",
|
|
150
154
|
},
|
|
151
155
|
position: { x: 0, y: 0 },
|
|
152
|
-
type: "task-node",
|
|
156
|
+
type: "execution-task-node",
|
|
153
157
|
width: 450,
|
|
154
158
|
height: 70,
|
|
155
159
|
extent: "parent",
|
|
@@ -173,52 +177,52 @@ export const initialEdges: ElkExtendedEdgeWithFlow[] = [
|
|
|
173
177
|
id: "2gs-2gc",
|
|
174
178
|
sources: ["2gs"],
|
|
175
179
|
targets: ["2gconnect1"],
|
|
176
|
-
type: "
|
|
180
|
+
type: "animated-edge",
|
|
177
181
|
},
|
|
178
182
|
{
|
|
179
183
|
id: "2gs-2g1",
|
|
180
184
|
sources: ["2gconnect1"],
|
|
181
185
|
targets: ["2g1"],
|
|
182
|
-
type: "
|
|
186
|
+
type: "animated-edge",
|
|
183
187
|
markerEnd: markerEnd,
|
|
184
188
|
},
|
|
185
189
|
{
|
|
186
190
|
id: "2gs-2g2",
|
|
187
191
|
sources: ["2gconnect1"],
|
|
188
192
|
targets: ["2g2"],
|
|
189
|
-
type: "
|
|
193
|
+
type: "animated-edge",
|
|
190
194
|
markerEnd: markerEnd,
|
|
191
195
|
},
|
|
192
196
|
{
|
|
193
197
|
id: "2gs-2g3",
|
|
194
198
|
sources: ["2gconnect1"],
|
|
195
199
|
targets: ["2g3"],
|
|
196
|
-
type: "
|
|
200
|
+
type: "animated-edge",
|
|
197
201
|
markerEnd: markerEnd,
|
|
198
202
|
},
|
|
199
203
|
{
|
|
200
204
|
id: "2g1-2g4",
|
|
201
205
|
sources: ["2g1"],
|
|
202
206
|
targets: ["2gconnect2"],
|
|
203
|
-
type: "
|
|
207
|
+
type: "animated-edge",
|
|
204
208
|
},
|
|
205
209
|
{
|
|
206
210
|
id: "2g2-2g4",
|
|
207
211
|
sources: ["2g2"],
|
|
208
212
|
targets: ["2gconnect2"],
|
|
209
|
-
type: "
|
|
213
|
+
type: "animated-edge",
|
|
210
214
|
},
|
|
211
215
|
{
|
|
212
|
-
id: "2g3
|
|
216
|
+
id: "2g3->2g4",
|
|
213
217
|
sources: ["2g3"],
|
|
214
218
|
targets: ["2gconnect2"],
|
|
215
|
-
type: "
|
|
219
|
+
type: "animated-edge",
|
|
216
220
|
},
|
|
217
221
|
{
|
|
218
222
|
id: "2gc-2g4",
|
|
219
223
|
sources: ["2gconnect2"],
|
|
220
224
|
targets: ["2g4"],
|
|
221
|
-
type: "
|
|
225
|
+
type: "animated-edge",
|
|
222
226
|
markerEnd: markerEnd,
|
|
223
227
|
},
|
|
224
228
|
];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { styled } from "@mui/material";
|
|
3
2
|
|
|
4
3
|
import BodyWrapper from "@evenicanpm/admin-core/components/layouts/main-dashboard/dashboard-body-wrapper";
|
|
5
|
-
import DashboardSidebar from "@evenicanpm/admin-core/components/layouts/main-dashboard/dashboard-sidebar/dashboard-sidebar";
|
|
6
|
-
|
|
7
4
|
import { LayoutProvider } from "@evenicanpm/admin-core/components/layouts/main-dashboard/dashboard-layout-context";
|
|
5
|
+
import DashboardSidebar from "@evenicanpm/admin-core/components/layouts/main-dashboard/dashboard-sidebar/dashboard-sidebar";
|
|
6
|
+
import { styled } from "@mui/material";
|
|
8
7
|
|
|
9
8
|
// STYLED COMPONENT
|
|
10
9
|
const StyledContainer = styled("div")(() => ({
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { Theme, useTheme } from "@mui/material";
|
|
4
|
-
import { Container, Box, Stack } from "@mui/material";
|
|
5
|
-
import { SxProps, Breakpoint } from "@mui/system";
|
|
6
|
-
|
|
7
1
|
import { IntegrateFooter } from "@evenicanpm/admin-integrate/components/footer";
|
|
2
|
+
import { Box, Container, Stack, type Theme, useTheme } from "@mui/material";
|
|
3
|
+
import type { Breakpoint, SxProps } from "@mui/system";
|
|
4
|
+
import type React from "react";
|
|
8
5
|
|
|
9
6
|
interface Props {
|
|
10
7
|
maxWidth?: false | Breakpoint;
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
// STYLED COMPONENTS
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { redirect, RedirectType } from "next/navigation";
|
|
2
|
+
|
|
5
3
|
import { Box, CardActionArea } from "@mui/material";
|
|
4
|
+
import { RedirectType, redirect } from "next/navigation";
|
|
5
|
+
import type React from "react";
|
|
6
|
+
import { BodyText, TitleText, Wrapper } from "./styles";
|
|
6
7
|
|
|
7
8
|
// ============================================================
|
|
8
9
|
type Props = {
|
|
9
10
|
title: string;
|
|
10
11
|
description?: string;
|
|
11
12
|
url?: string;
|
|
13
|
+
onClick?: () => void;
|
|
12
14
|
children?: React.ReactNode;
|
|
13
15
|
};
|
|
14
16
|
// ============================================================
|
|
15
|
-
export default function LinkCard({
|
|
17
|
+
export default function LinkCard({
|
|
18
|
+
title,
|
|
19
|
+
description,
|
|
20
|
+
url,
|
|
21
|
+
onClick,
|
|
22
|
+
children,
|
|
23
|
+
}: Props) {
|
|
16
24
|
const handleRedirect = () => {
|
|
25
|
+
if (onClick) {
|
|
26
|
+
onClick();
|
|
27
|
+
}
|
|
17
28
|
if (url) {
|
|
18
29
|
redirect(url, RedirectType.push);
|
|
19
30
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormControl, Typography } from "@mui/material";
|
|
2
2
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
3
|
-
import React, { useState } from "react";
|
|
4
|
-
import { DateFilter, FilterProps } from "./list-filter-types";
|
|
5
3
|
import { useTranslations } from "next-intl";
|
|
4
|
+
import type React from "react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import type { DateFilter, FilterProps } from "./list-filter-types";
|
|
6
7
|
|
|
7
8
|
const DateFilterComponent: React.FC<FilterProps<DateFilter>> = ({
|
|
8
9
|
filter,
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
FormControl,
|
|
4
|
+
type Theme,
|
|
5
|
+
Typography,
|
|
6
|
+
useTheme,
|
|
7
|
+
} from "@mui/material";
|
|
4
8
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
9
|
+
import { useTranslations } from "next-intl";
|
|
10
|
+
import type React from "react";
|
|
11
|
+
import { useState } from "react";
|
|
12
|
+
import type { DateRangeFilter, FilterProps } from "./list-filter-types";
|
|
7
13
|
|
|
8
14
|
const DateRangeFilterComponent: React.FC<FilterProps<DateRangeFilter>> = ({
|
|
9
15
|
filter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as DateFilter } from "./date-filter";
|
|
2
2
|
export { default as DateRangeFilter } from "./date-range-filter";
|
|
3
3
|
export { default as ListFilter } from "./list-filter";
|
|
4
|
+
export * from "./list-filter-types";
|
|
4
5
|
export { default as MultiSelectFilterComponent } from "./multi-select-filter";
|
|
5
6
|
export { default as SelectFilterComponent } from "./select-filter";
|
|
6
|
-
export * from "./list-filter-types";
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { debounce } from "lodash";
|
|
3
|
-
import { useTranslations } from "next-intl";
|
|
4
|
-
import React, { useEffect, useState } from "react";
|
|
5
2
|
|
|
6
3
|
import {
|
|
7
|
-
Search,
|
|
8
|
-
FilterAltOutlined,
|
|
9
|
-
CloseOutlined,
|
|
10
4
|
ArrowForwardIos,
|
|
5
|
+
CloseOutlined,
|
|
11
6
|
Delete,
|
|
7
|
+
FilterAltOutlined,
|
|
8
|
+
Search,
|
|
12
9
|
} from "@mui/icons-material";
|
|
13
10
|
import {
|
|
11
|
+
Badge,
|
|
14
12
|
Box,
|
|
15
13
|
Button,
|
|
14
|
+
ClickAwayListener,
|
|
16
15
|
IconButton,
|
|
17
|
-
TextField,
|
|
18
16
|
InputAdornment,
|
|
19
|
-
Select,
|
|
20
17
|
MenuItem,
|
|
21
|
-
Theme,
|
|
22
|
-
useTheme,
|
|
23
18
|
Paper,
|
|
24
19
|
Popper,
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
Select,
|
|
21
|
+
TextField,
|
|
22
|
+
type Theme,
|
|
23
|
+
useTheme,
|
|
27
24
|
} from "@mui/material";
|
|
28
|
-
import {
|
|
29
|
-
|
|
25
|
+
import { debounce } from "lodash";
|
|
26
|
+
import { useTranslations } from "next-intl";
|
|
27
|
+
import type React from "react";
|
|
28
|
+
import { useEffect, useState } from "react";
|
|
29
|
+
import { OutlinedIconButton } from "../button";
|
|
30
|
+
import DateFilterComponent from "./date-filter";
|
|
31
|
+
import DateRangeFilterComponent from "./date-range-filter";
|
|
32
|
+
import type {
|
|
33
|
+
FilterConfig,
|
|
30
34
|
FilterResult,
|
|
35
|
+
Filters,
|
|
31
36
|
ListFilterOutput,
|
|
32
|
-
FilterConfig,
|
|
33
37
|
} from "./list-filter-types";
|
|
34
|
-
|
|
35
|
-
import { OutlinedIconButton } from "../button";
|
|
36
|
-
import SelectFilterComponent from "./select-filter";
|
|
37
38
|
import MultiSelectFilterComponent from "./multi-select-filter";
|
|
38
|
-
import
|
|
39
|
-
import DateRangeFilterComponent from "./date-range-filter";
|
|
39
|
+
import SelectFilterComponent from "./select-filter";
|
|
40
40
|
|
|
41
41
|
interface FilterProps<FilterShape extends Filters> {
|
|
42
42
|
setFilters: (filterUpdate: ListFilterOutput<FilterShape>) => void;
|
|
@@ -74,14 +74,14 @@ const ListFilter = function ListFilter<FilterShape extends Filters>(
|
|
|
74
74
|
if (filter.type === "select" && filter.value)
|
|
75
75
|
return {
|
|
76
76
|
...values,
|
|
77
|
-
// @ts-
|
|
77
|
+
// @ts-expect-error
|
|
78
78
|
[key]: filter.options.find((o) => o.id === filter.value[0].id),
|
|
79
79
|
};
|
|
80
80
|
if (filter.type === "multiSelect" && filter.value)
|
|
81
81
|
return {
|
|
82
82
|
...values,
|
|
83
83
|
[key]: filter.options.filter((o) =>
|
|
84
|
-
// @ts-
|
|
84
|
+
// @ts-expect-error
|
|
85
85
|
filter.value.find((v) => v.id === o.id),
|
|
86
86
|
),
|
|
87
87
|
};
|
|
@@ -217,7 +217,12 @@ const ListFilter = function ListFilter<FilterShape extends Filters>(
|
|
|
217
217
|
<FilterAltOutlined />
|
|
218
218
|
</OutlinedIconButton>
|
|
219
219
|
</Badge>
|
|
220
|
-
<Popper
|
|
220
|
+
<Popper
|
|
221
|
+
sx={{ zIndex: theme.zIndex.drawer + 1 }}
|
|
222
|
+
open={open}
|
|
223
|
+
anchorEl={anchorEl}
|
|
224
|
+
placement="bottom-start"
|
|
225
|
+
>
|
|
221
226
|
<Paper sx={styles.popOut} elevation={3}>
|
|
222
227
|
<Box sx={styles.closeRow}>
|
|
223
228
|
{manualClose ? (
|
|
@@ -298,7 +303,7 @@ const ListFilter = function ListFilter<FilterShape extends Filters>(
|
|
|
298
303
|
startIcon={<Delete />}
|
|
299
304
|
onClick={handleFilterClear}
|
|
300
305
|
>
|
|
301
|
-
|
|
306
|
+
{t("clear")}
|
|
302
307
|
</Button>
|
|
303
308
|
) : (
|
|
304
309
|
""
|
|
@@ -311,7 +316,7 @@ const ListFilter = function ListFilter<FilterShape extends Filters>(
|
|
|
311
316
|
disabled={Object.values(filterErrors).some((v) => v)}
|
|
312
317
|
onClick={handleFilterSet}
|
|
313
318
|
>
|
|
314
|
-
|
|
319
|
+
{t("filter")}
|
|
315
320
|
</Button>
|
|
316
321
|
</Box>
|
|
317
322
|
</Box>
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CloseOutlined } from "@mui/icons-material";
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
|
|
4
|
+
Chip,
|
|
5
|
+
FormControl,
|
|
5
6
|
IconButton,
|
|
6
7
|
InputAdornment,
|
|
7
|
-
Select,
|
|
8
8
|
MenuItem,
|
|
9
|
-
|
|
9
|
+
Select,
|
|
10
|
+
type Theme,
|
|
11
|
+
Typography,
|
|
10
12
|
useTheme,
|
|
11
|
-
FormControl,
|
|
12
|
-
Chip,
|
|
13
13
|
} from "@mui/material";
|
|
14
|
-
import {
|
|
15
|
-
import React
|
|
16
|
-
import {
|
|
14
|
+
import { useTranslations } from "next-intl";
|
|
15
|
+
import type React from "react";
|
|
16
|
+
import { useState } from "react";
|
|
17
|
+
import type {
|
|
17
18
|
FilterOption,
|
|
18
|
-
MultiSelectFilter,
|
|
19
19
|
FilterProps,
|
|
20
|
+
MultiSelectFilter,
|
|
20
21
|
} from "./list-filter-types";
|
|
21
22
|
|
|
22
23
|
const MultiSelectFilterComponent: React.FC<FilterProps<MultiSelectFilter>> = ({
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CloseOutlined } from "@mui/icons-material";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
FormControl,
|
|
4
4
|
IconButton,
|
|
5
5
|
InputAdornment,
|
|
6
|
-
Select,
|
|
7
6
|
MenuItem,
|
|
8
|
-
|
|
7
|
+
Select,
|
|
8
|
+
type Theme,
|
|
9
|
+
Typography,
|
|
9
10
|
useTheme,
|
|
10
|
-
FormControl,
|
|
11
11
|
} from "@mui/material";
|
|
12
|
-
import {
|
|
13
|
-
import React
|
|
14
|
-
import {
|
|
12
|
+
import { useTranslations } from "next-intl";
|
|
13
|
+
import type React from "react";
|
|
14
|
+
import { useState } from "react";
|
|
15
|
+
import type {
|
|
16
|
+
FilterOption,
|
|
17
|
+
FilterProps,
|
|
18
|
+
SelectFilter,
|
|
19
|
+
} from "./list-filter-types";
|
|
15
20
|
|
|
16
21
|
const SelectFilterComponent: React.FC<FilterProps<SelectFilter>> = ({
|
|
17
22
|
filter,
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { useTranslations } from "next-intl";
|
|
2
1
|
// MUI
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
ButtonBase,
|
|
5
|
+
Stack,
|
|
6
|
+
type SxProps,
|
|
7
|
+
type Theme,
|
|
8
|
+
Typography,
|
|
9
|
+
useTheme,
|
|
10
|
+
} from "@mui/material";
|
|
11
|
+
import { useTranslations } from "next-intl";
|
|
5
12
|
|
|
6
13
|
// Types
|
|
7
|
-
import { IsDay } from "./scheduler-types";
|
|
14
|
+
import type { IsDay } from "./scheduler-types";
|
|
8
15
|
|
|
9
16
|
interface Props {
|
|
10
17
|
days: IsDay;
|
|
@@ -16,7 +23,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
16
23
|
const t = useTranslations("Integrate.Scheduler.DaySelector");
|
|
17
24
|
|
|
18
25
|
const theme = useTheme();
|
|
19
|
-
const styles = getStyles(theme);
|
|
26
|
+
const styles: DaySelectorStyles = getStyles(theme);
|
|
20
27
|
|
|
21
28
|
const handleClick = (field: keyof IsDay) => {
|
|
22
29
|
if (!props.disabled) {
|
|
@@ -34,7 +41,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
34
41
|
disableRipple={props.disabled}
|
|
35
42
|
>
|
|
36
43
|
<Box
|
|
37
|
-
sx={getDayStyle(styles, props.days
|
|
44
|
+
sx={getDayStyle(styles, props.days?.isMonday)}
|
|
38
45
|
alignContent="center"
|
|
39
46
|
textAlign="center"
|
|
40
47
|
>
|
|
@@ -49,7 +56,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
49
56
|
disableRipple={props.disabled}
|
|
50
57
|
>
|
|
51
58
|
<Box
|
|
52
|
-
sx={getDayStyle(styles, props.days
|
|
59
|
+
sx={getDayStyle(styles, props.days?.isTuesday)}
|
|
53
60
|
alignContent="center"
|
|
54
61
|
textAlign="center"
|
|
55
62
|
>
|
|
@@ -64,7 +71,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
64
71
|
disableRipple={props.disabled}
|
|
65
72
|
>
|
|
66
73
|
<Box
|
|
67
|
-
sx={getDayStyle(styles, props.days
|
|
74
|
+
sx={getDayStyle(styles, props.days?.isWednesday)}
|
|
68
75
|
alignContent="center"
|
|
69
76
|
textAlign="center"
|
|
70
77
|
>
|
|
@@ -79,7 +86,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
79
86
|
disableRipple={props.disabled}
|
|
80
87
|
>
|
|
81
88
|
<Box
|
|
82
|
-
sx={getDayStyle(styles, props.days
|
|
89
|
+
sx={getDayStyle(styles, props.days?.isThursday)}
|
|
83
90
|
alignContent="center"
|
|
84
91
|
textAlign="center"
|
|
85
92
|
>
|
|
@@ -94,7 +101,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
94
101
|
disableRipple={props.disabled}
|
|
95
102
|
>
|
|
96
103
|
<Box
|
|
97
|
-
sx={getDayStyle(styles, props.days
|
|
104
|
+
sx={getDayStyle(styles, props.days?.isFriday)}
|
|
98
105
|
alignContent="center"
|
|
99
106
|
textAlign="center"
|
|
100
107
|
>
|
|
@@ -109,7 +116,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
109
116
|
disableRipple={props.disabled}
|
|
110
117
|
>
|
|
111
118
|
<Box
|
|
112
|
-
sx={getDayStyle(styles, props.days
|
|
119
|
+
sx={getDayStyle(styles, props.days?.isSaturday)}
|
|
113
120
|
alignContent="center"
|
|
114
121
|
textAlign="center"
|
|
115
122
|
>
|
|
@@ -124,7 +131,7 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
124
131
|
disableRipple={props.disabled}
|
|
125
132
|
>
|
|
126
133
|
<Box
|
|
127
|
-
sx={getDayStyle(styles, props.days
|
|
134
|
+
sx={getDayStyle(styles, props.days?.isSunday)}
|
|
128
135
|
alignContent="center"
|
|
129
136
|
textAlign="center"
|
|
130
137
|
>
|
|
@@ -137,7 +144,14 @@ const DaySelector: React.FC<Props> = (props: Props) => {
|
|
|
137
144
|
);
|
|
138
145
|
};
|
|
139
146
|
|
|
140
|
-
|
|
147
|
+
interface DaySelectorStyles {
|
|
148
|
+
days: SxProps;
|
|
149
|
+
dayOfWeek: SxProps;
|
|
150
|
+
dayOfWeekSelected: SxProps;
|
|
151
|
+
dayInitial: SxProps;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const getStyles = (theme: Theme): DaySelectorStyles => {
|
|
141
155
|
return {
|
|
142
156
|
days: {
|
|
143
157
|
marginTop: theme.spacing(0),
|
|
@@ -164,9 +178,9 @@ const getStyles = (theme: Theme) => {
|
|
|
164
178
|
};
|
|
165
179
|
};
|
|
166
180
|
|
|
167
|
-
const getDayStyle = (styles:
|
|
181
|
+
const getDayStyle = (styles: DaySelectorStyles, selected: boolean): SxProps => {
|
|
168
182
|
if (selected) {
|
|
169
|
-
return { ...styles.dayOfWeek, ...styles.dayOfWeekSelected };
|
|
183
|
+
return { ...styles.dayOfWeek, ...styles.dayOfWeekSelected } as SxProps;
|
|
170
184
|
}
|
|
171
185
|
return styles.dayOfWeek;
|
|
172
186
|
};
|