flowcore-fn 9.2.9 → 9.3.2
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/pkg-index.js +549 -440
- package/dist/pkg-index.mjs +225 -116
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -55,12 +55,62 @@ __export(pkg_index_exports, {
|
|
|
55
55
|
module.exports = __toCommonJS(pkg_index_exports);
|
|
56
56
|
|
|
57
57
|
// src/components/Sidebar.jsx
|
|
58
|
-
var
|
|
59
|
-
var
|
|
58
|
+
var import_react86 = require("react");
|
|
59
|
+
var import_react87 = require("@remixicon/react");
|
|
60
60
|
var import_router = require("next/router");
|
|
61
61
|
|
|
62
62
|
// src/components/workflow/WorkflowMain.jsx
|
|
63
63
|
var import_react9 = __toESM(require("react"));
|
|
64
|
+
var import_react10 = require("react");
|
|
65
|
+
var import_sweetalert2 = __toESM(require("sweetalert2"));
|
|
66
|
+
|
|
67
|
+
// src/components/Service/ApiEndpointsProvider.js
|
|
68
|
+
var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
|
|
69
|
+
var apiEndpoints = null;
|
|
70
|
+
var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
|
|
71
|
+
if (typeof window !== "undefined" && endpoints) {
|
|
72
|
+
apiEndpoints = endpoints;
|
|
73
|
+
sessionStorage.setItem(
|
|
74
|
+
STORAGE_KEY,
|
|
75
|
+
JSON.stringify(endpoints)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
};
|
|
80
|
+
var getApiEndpoints = () => {
|
|
81
|
+
if (apiEndpoints) {
|
|
82
|
+
return apiEndpoints;
|
|
83
|
+
}
|
|
84
|
+
if (typeof window !== "undefined") {
|
|
85
|
+
const data = sessionStorage.getItem(STORAGE_KEY);
|
|
86
|
+
if (data) {
|
|
87
|
+
apiEndpoints = JSON.parse(data);
|
|
88
|
+
return apiEndpoints;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
throw new Error(
|
|
92
|
+
"Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
var ApiEndpointsProvider_default = ApiEndpointsProvider;
|
|
96
|
+
|
|
97
|
+
// src/components/Service/ApiServicepackage.js
|
|
98
|
+
var apiService = null;
|
|
99
|
+
var ApiServicepackage = ({ apiService: service }) => {
|
|
100
|
+
if (service) {
|
|
101
|
+
apiService = service;
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
};
|
|
105
|
+
var getApiService = () => {
|
|
106
|
+
if (apiService) {
|
|
107
|
+
return apiService;
|
|
108
|
+
}
|
|
109
|
+
throw new Error(
|
|
110
|
+
"ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
var ApiServicepackage_default = ApiServicepackage;
|
|
64
114
|
|
|
65
115
|
// src/components/workflow/SearchBar.jsx
|
|
66
116
|
var import_react = __toESM(require("react"));
|
|
@@ -306,7 +356,7 @@ function DeleteModal({
|
|
|
306
356
|
|
|
307
357
|
// src/components/workflow/WorkflowTable.jsx
|
|
308
358
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
309
|
-
function WorkflowTable({ pageSize, searchQuery }) {
|
|
359
|
+
function WorkflowTable({ pageSize, searchQuery, apiData }) {
|
|
310
360
|
const initialData = [
|
|
311
361
|
{
|
|
312
362
|
id: "1",
|
|
@@ -417,7 +467,10 @@ function WorkflowTable({ pageSize, searchQuery }) {
|
|
|
417
467
|
status: true
|
|
418
468
|
}
|
|
419
469
|
];
|
|
420
|
-
const [data, setData] = (0, import_react4.useState)(initialData);
|
|
470
|
+
const [data, setData] = (0, import_react4.useState)(apiData || initialData);
|
|
471
|
+
import_react4.default.useEffect(() => {
|
|
472
|
+
if (apiData) setData(apiData);
|
|
473
|
+
}, [apiData]);
|
|
421
474
|
const filteredData = data.filter(
|
|
422
475
|
(item) => item.name.toLowerCase().includes((searchQuery || "").toLowerCase()) || item.code.toLowerCase().includes((searchQuery || "").toLowerCase())
|
|
423
476
|
);
|
|
@@ -656,7 +709,8 @@ var import_react5 = __toESM(require("react"));
|
|
|
656
709
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
657
710
|
function AddWorkflowModal({
|
|
658
711
|
isOpen,
|
|
659
|
-
onClose
|
|
712
|
+
onClose,
|
|
713
|
+
workflowTypes = []
|
|
660
714
|
}) {
|
|
661
715
|
if (!isOpen) return null;
|
|
662
716
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
@@ -686,9 +740,11 @@ function AddWorkflowModal({
|
|
|
686
740
|
] }),
|
|
687
741
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("select", { className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:bg-white fc:text-slate-700 focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-indigo-500/10 focus:fc:fc:border-indigo-500", children: [
|
|
688
742
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "", children: "Select workflow type" }),
|
|
689
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value:
|
|
690
|
-
|
|
691
|
-
|
|
743
|
+
workflowTypes.length > 0 ? workflowTypes.map((type) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: type.workflowTypeId || type.WorkflowTypeId, children: type.workflowTypeName || type.WorkflowTypeName }, type.workflowTypeId || type.WorkflowTypeId)) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
744
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "petition", children: "Petition" }),
|
|
745
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "building", children: "Building Permission" }),
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "leave", children: "Leave" })
|
|
747
|
+
] })
|
|
692
748
|
] }),
|
|
693
749
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "fc:text-[10px] fc:text-red-400 fc:mt-1", children: "Choose the category this workflow belongs to" })
|
|
694
750
|
] }),
|
|
@@ -982,6 +1038,30 @@ function Workflow() {
|
|
|
982
1038
|
const [modalOpen, setModalOpen] = (0, import_react9.useState)(false);
|
|
983
1039
|
const [pageSize, setPageSize] = (0, import_react9.useState)(10);
|
|
984
1040
|
const [searchQuery, setSearchQuery] = (0, import_react9.useState)("");
|
|
1041
|
+
const [apiData, setApiData] = (0, import_react9.useState)([]);
|
|
1042
|
+
const [workflowTypes, setWorkflowTypes] = (0, import_react9.useState)([]);
|
|
1043
|
+
(0, import_react10.useEffect)(() => {
|
|
1044
|
+
(async () => {
|
|
1045
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1046
|
+
try {
|
|
1047
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.workflow) == null ? void 0 : _c.getList;
|
|
1048
|
+
const typeEndpoint = (_f = (_e = (_d = getApiEndpoints()) == null ? void 0 : _d.flowCore) == null ? void 0 : _e.workflowType) == null ? void 0 : _f.getList;
|
|
1049
|
+
if (!endpoint) throw Error("Workflow list endpoint is not configured.");
|
|
1050
|
+
const [result, types] = await Promise.all([getApiService().get(endpoint), typeEndpoint ? getApiService().get(typeEndpoint) : Promise.resolve([])]);
|
|
1051
|
+
const value = ((_g = result == null ? void 0 : result.data) == null ? void 0 : _g.data) || ((_h = result == null ? void 0 : result.data) == null ? void 0 : _h.result) || (result == null ? void 0 : result.data) || result;
|
|
1052
|
+
const rows = Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || [];
|
|
1053
|
+
const typeValue = ((_i = types == null ? void 0 : types.data) == null ? void 0 : _i.data) || ((_j = types == null ? void 0 : types.data) == null ? void 0 : _j.result) || (types == null ? void 0 : types.data) || types;
|
|
1054
|
+
const typeRows = Array.isArray(typeValue) ? typeValue : (typeValue == null ? void 0 : typeValue.items) || (typeValue == null ? void 0 : typeValue.records) || [];
|
|
1055
|
+
setWorkflowTypes(typeRows);
|
|
1056
|
+
setApiData(rows.map((item) => {
|
|
1057
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
1058
|
+
return __spreadProps(__spreadValues({}, item), { id: (_b2 = (_a2 = item.id) != null ? _a2 : item.workflowId) != null ? _b2 : item.WorkflowId, name: (_d2 = (_c2 = item.name) != null ? _c2 : item.workflowName) != null ? _d2 : item.WorkflowName, code: (_f2 = (_e2 = item.code) != null ? _e2 : item.workflowCode) != null ? _f2 : item.WorkflowCode, type: (_h2 = (_g2 = item.type) != null ? _g2 : item.workflowTypeName) != null ? _h2 : item.WorkflowTypeName, status: (_j2 = (_i2 = item.status) != null ? _i2 : item.isActive) != null ? _j2 : item.IsActive });
|
|
1059
|
+
}));
|
|
1060
|
+
} catch (error) {
|
|
1061
|
+
await import_sweetalert2.default.fire("Error", ((_l = (_k = error == null ? void 0 : error.response) == null ? void 0 : _k.data) == null ? void 0 : _l.message) || (error == null ? void 0 : error.message) || "Unable to load workflows.", "error");
|
|
1062
|
+
}
|
|
1063
|
+
})();
|
|
1064
|
+
}, [refreshKey]);
|
|
985
1065
|
const tableRef = (0, import_react9.useRef)(null);
|
|
986
1066
|
const handleRefresh = () => {
|
|
987
1067
|
console.log("Table data refreshed!");
|
|
@@ -1047,6 +1127,7 @@ function Workflow() {
|
|
|
1047
1127
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fc:flex-1 fc:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: tableRef, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1048
1128
|
WorkflowTable,
|
|
1049
1129
|
{
|
|
1130
|
+
apiData,
|
|
1050
1131
|
pageSize,
|
|
1051
1132
|
searchQuery
|
|
1052
1133
|
},
|
|
@@ -1058,17 +1139,19 @@ function Workflow() {
|
|
|
1058
1139
|
AddWorkflowModal,
|
|
1059
1140
|
{
|
|
1060
1141
|
isOpen: modalOpen,
|
|
1061
|
-
onClose: () => setModalOpen(false)
|
|
1142
|
+
onClose: () => setModalOpen(false),
|
|
1143
|
+
workflowTypes
|
|
1062
1144
|
}
|
|
1063
1145
|
)
|
|
1064
1146
|
] });
|
|
1065
1147
|
}
|
|
1066
1148
|
|
|
1067
1149
|
// src/components/workflow-type/WorkflowTypeMains.js
|
|
1068
|
-
var
|
|
1150
|
+
var import_react16 = __toESM(require("react"));
|
|
1151
|
+
var import_sweetalert23 = __toESM(require("sweetalert2"));
|
|
1069
1152
|
|
|
1070
1153
|
// src/components/workflow-type/SearchBar.jsx
|
|
1071
|
-
var
|
|
1154
|
+
var import_react11 = __toESM(require("react"));
|
|
1072
1155
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1073
1156
|
function SearchBar2({
|
|
1074
1157
|
searchQuery,
|
|
@@ -1092,10 +1175,10 @@ function SearchBar2({
|
|
|
1092
1175
|
}
|
|
1093
1176
|
|
|
1094
1177
|
// src/components/workflow-type/WorkflowTypeTable.jsx
|
|
1095
|
-
var
|
|
1178
|
+
var import_react14 = __toESM(require("react"));
|
|
1096
1179
|
|
|
1097
1180
|
// src/components/workflow-type/DeleteWorkflowType.jsx
|
|
1098
|
-
var
|
|
1181
|
+
var import_react12 = __toESM(require("react"));
|
|
1099
1182
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1100
1183
|
var DeleteWorkflowType = ({
|
|
1101
1184
|
isOpen,
|
|
@@ -1132,7 +1215,7 @@ var DeleteWorkflowType = ({
|
|
|
1132
1215
|
var DeleteWorkflowType_default = DeleteWorkflowType;
|
|
1133
1216
|
|
|
1134
1217
|
// src/components/workflow-type/EditWorkflowType.jsx
|
|
1135
|
-
var
|
|
1218
|
+
var import_react13 = __toESM(require("react"));
|
|
1136
1219
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1137
1220
|
var EditWorkflowType = ({
|
|
1138
1221
|
isOpen,
|
|
@@ -1140,13 +1223,13 @@ var EditWorkflowType = ({
|
|
|
1140
1223
|
onSave,
|
|
1141
1224
|
selectedData
|
|
1142
1225
|
}) => {
|
|
1143
|
-
const [formData, setFormData] = (0,
|
|
1226
|
+
const [formData, setFormData] = (0, import_react13.useState)({
|
|
1144
1227
|
workflowTypeCode: "",
|
|
1145
1228
|
workflowTypeName: "",
|
|
1146
1229
|
description: "",
|
|
1147
1230
|
isActive: true
|
|
1148
1231
|
});
|
|
1149
|
-
(0,
|
|
1232
|
+
(0, import_react13.useEffect)(() => {
|
|
1150
1233
|
var _a, _b;
|
|
1151
1234
|
if (selectedData) {
|
|
1152
1235
|
setFormData({
|
|
@@ -1212,7 +1295,11 @@ function WorkflowTypeTable({
|
|
|
1212
1295
|
searchQuery = "",
|
|
1213
1296
|
currentPage,
|
|
1214
1297
|
setCurrentPage,
|
|
1215
|
-
setTotalEntries
|
|
1298
|
+
setTotalEntries,
|
|
1299
|
+
apiData,
|
|
1300
|
+
onUpdate,
|
|
1301
|
+
onDeleteApi,
|
|
1302
|
+
onEdit
|
|
1216
1303
|
}) {
|
|
1217
1304
|
const initialData = [{
|
|
1218
1305
|
workflowTypeId: 1,
|
|
@@ -1465,12 +1552,15 @@ function WorkflowTypeTable({
|
|
|
1465
1552
|
updatedOn: "2026-01-29",
|
|
1466
1553
|
updatedBy: "Officer"
|
|
1467
1554
|
}];
|
|
1468
|
-
const [data, setData] = (0,
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
const [
|
|
1473
|
-
const [
|
|
1555
|
+
const [data, setData] = (0, import_react14.useState)(apiData || initialData);
|
|
1556
|
+
(0, import_react14.useEffect)(() => {
|
|
1557
|
+
if (apiData) setData(apiData);
|
|
1558
|
+
}, [apiData]);
|
|
1559
|
+
const [sortOrder, setSortOrder] = (0, import_react14.useState)("asc");
|
|
1560
|
+
const [sortKey, setSortKey] = (0, import_react14.useState)("workflowTypeId");
|
|
1561
|
+
const [selectedItem, setSelectedItem] = (0, import_react14.useState)(null);
|
|
1562
|
+
const [isEditOpen, setIsEditOpen] = (0, import_react14.useState)(false);
|
|
1563
|
+
const [isDeleteOpen, setIsDeleteOpen] = (0, import_react14.useState)(false);
|
|
1474
1564
|
const handleSort = (columnKey) => {
|
|
1475
1565
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
1476
1566
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -1486,7 +1576,7 @@ function WorkflowTypeTable({
|
|
|
1486
1576
|
const query = (searchQuery || "").toLowerCase();
|
|
1487
1577
|
return item.workflowTypeName.toLowerCase().includes(query) || item.workflowTypeCode.toLowerCase().includes(query) || item.description.toLowerCase().includes(query);
|
|
1488
1578
|
});
|
|
1489
|
-
(0,
|
|
1579
|
+
(0, import_react14.useEffect)(() => {
|
|
1490
1580
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
1491
1581
|
}, [filteredData.length, setTotalEntries]);
|
|
1492
1582
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -1496,6 +1586,10 @@ function WorkflowTypeTable({
|
|
|
1496
1586
|
length: totalPages
|
|
1497
1587
|
}, (_, i) => i + 1);
|
|
1498
1588
|
const handleEdit = (item) => {
|
|
1589
|
+
if (onEdit) {
|
|
1590
|
+
onEdit(item);
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1499
1593
|
setSelectedItem(item);
|
|
1500
1594
|
setIsEditOpen(true);
|
|
1501
1595
|
};
|
|
@@ -1504,10 +1598,18 @@ function WorkflowTypeTable({
|
|
|
1504
1598
|
setIsDeleteOpen(false);
|
|
1505
1599
|
setIsDeleteOpen(true);
|
|
1506
1600
|
};
|
|
1507
|
-
const handleConfirmDelete = (itemToDelete) => {
|
|
1601
|
+
const handleConfirmDelete = async (itemToDelete) => {
|
|
1602
|
+
if (onDeleteApi) {
|
|
1603
|
+
await onDeleteApi(itemToDelete);
|
|
1604
|
+
return;
|
|
1605
|
+
}
|
|
1508
1606
|
setData((prevData) => prevData.filter((i) => i.workflowTypeId !== itemToDelete.workflowTypeId));
|
|
1509
1607
|
};
|
|
1510
|
-
const handleSaveEdit = (updatedItem) => {
|
|
1608
|
+
const handleSaveEdit = async (updatedItem) => {
|
|
1609
|
+
if (onUpdate) {
|
|
1610
|
+
await onUpdate(updatedItem);
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1511
1613
|
setData((prevData) => prevData.map((item) => item.workflowTypeId === updatedItem.workflowTypeId ? updatedItem : item));
|
|
1512
1614
|
};
|
|
1513
1615
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "fc:space-y-5", children: [
|
|
@@ -1560,57 +1662,8 @@ function WorkflowTypeTable({
|
|
|
1560
1662
|
}
|
|
1561
1663
|
|
|
1562
1664
|
// src/components/workflow-type/AddWorkflowTypeModal.jsx
|
|
1563
|
-
var
|
|
1564
|
-
|
|
1565
|
-
// src/components/Service/ApiEndpointsProvider.js
|
|
1566
|
-
var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
|
|
1567
|
-
var apiEndpoints = null;
|
|
1568
|
-
var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
|
|
1569
|
-
if (typeof window !== "undefined" && endpoints) {
|
|
1570
|
-
apiEndpoints = endpoints;
|
|
1571
|
-
sessionStorage.setItem(
|
|
1572
|
-
STORAGE_KEY,
|
|
1573
|
-
JSON.stringify(endpoints)
|
|
1574
|
-
);
|
|
1575
|
-
}
|
|
1576
|
-
return null;
|
|
1577
|
-
};
|
|
1578
|
-
var getApiEndpoints = () => {
|
|
1579
|
-
if (apiEndpoints) {
|
|
1580
|
-
return apiEndpoints;
|
|
1581
|
-
}
|
|
1582
|
-
if (typeof window !== "undefined") {
|
|
1583
|
-
const data = sessionStorage.getItem(STORAGE_KEY);
|
|
1584
|
-
if (data) {
|
|
1585
|
-
apiEndpoints = JSON.parse(data);
|
|
1586
|
-
return apiEndpoints;
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
throw new Error(
|
|
1590
|
-
"Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
|
|
1591
|
-
);
|
|
1592
|
-
};
|
|
1593
|
-
var ApiEndpointsProvider_default = ApiEndpointsProvider;
|
|
1594
|
-
|
|
1595
|
-
// src/components/Service/ApiServicepackage.js
|
|
1596
|
-
var apiService = null;
|
|
1597
|
-
var ApiServicepackage = ({ apiService: service }) => {
|
|
1598
|
-
if (service) {
|
|
1599
|
-
apiService = service;
|
|
1600
|
-
}
|
|
1601
|
-
return null;
|
|
1602
|
-
};
|
|
1603
|
-
var getApiService = () => {
|
|
1604
|
-
if (apiService) {
|
|
1605
|
-
return apiService;
|
|
1606
|
-
}
|
|
1607
|
-
throw new Error(
|
|
1608
|
-
"ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
|
|
1609
|
-
);
|
|
1610
|
-
};
|
|
1611
|
-
var ApiServicepackage_default = ApiServicepackage;
|
|
1612
|
-
|
|
1613
|
-
// src/components/workflow-type/AddWorkflowTypeModal.jsx
|
|
1665
|
+
var import_react15 = __toESM(require("react"));
|
|
1666
|
+
var import_sweetalert22 = __toESM(require("sweetalert2"));
|
|
1614
1667
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1615
1668
|
var initialFormData = {
|
|
1616
1669
|
workflowTypeCode: "",
|
|
@@ -1619,12 +1672,12 @@ var initialFormData = {
|
|
|
1619
1672
|
createdBy: ""
|
|
1620
1673
|
};
|
|
1621
1674
|
var AddWorkflowTypeModal = ({ isOpen, onClose, onSave, createdBy = "" }) => {
|
|
1622
|
-
const [formData, setFormData] = (0,
|
|
1675
|
+
const [formData, setFormData] = (0, import_react15.useState)(__spreadProps(__spreadValues({}, initialFormData), {
|
|
1623
1676
|
createdBy
|
|
1624
1677
|
}));
|
|
1625
|
-
const [errors, setErrors] = (0,
|
|
1626
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
1627
|
-
const [submitError, setSubmitError] = (0,
|
|
1678
|
+
const [errors, setErrors] = (0, import_react15.useState)({});
|
|
1679
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react15.useState)(false);
|
|
1680
|
+
const [submitError, setSubmitError] = (0, import_react15.useState)("");
|
|
1628
1681
|
const handleChange = ({ target: { name, value } }) => {
|
|
1629
1682
|
if (name === "description" && value.length > 500) return;
|
|
1630
1683
|
setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [name]: value }));
|
|
@@ -1656,7 +1709,7 @@ var AddWorkflowTypeModal = ({ isOpen, onClose, onSave, createdBy = "" }) => {
|
|
|
1656
1709
|
setIsSubmitting(true);
|
|
1657
1710
|
setSubmitError("");
|
|
1658
1711
|
const endpoints = getApiEndpoints();
|
|
1659
|
-
const endpoint = (_b = (_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.
|
|
1712
|
+
const endpoint = (_b = (_a = endpoints == null ? void 0 : endpoints.flowCore) == null ? void 0 : _a.workflowType) == null ? void 0 : _b.create;
|
|
1660
1713
|
if (!endpoint) throw new Error("Create workflow type endpoint is not configured.");
|
|
1661
1714
|
const response = await getApiService().post(endpoint, payload);
|
|
1662
1715
|
await (onSave == null ? void 0 : onSave((_c = response == null ? void 0 : response.data) != null ? _c : response));
|
|
@@ -1664,9 +1717,9 @@ var AddWorkflowTypeModal = ({ isOpen, onClose, onSave, createdBy = "" }) => {
|
|
|
1664
1717
|
setErrors({});
|
|
1665
1718
|
onClose();
|
|
1666
1719
|
} catch (error) {
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
);
|
|
1720
|
+
const message = ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to create workflow type. Please try again.";
|
|
1721
|
+
setSubmitError(message);
|
|
1722
|
+
await import_sweetalert22.default.fire("Error", message, "error");
|
|
1670
1723
|
} finally {
|
|
1671
1724
|
setIsSubmitting(false);
|
|
1672
1725
|
}
|
|
@@ -1714,20 +1767,52 @@ var AddWorkflowTypeModal_default = AddWorkflowTypeModal;
|
|
|
1714
1767
|
// src/components/workflow-type/WorkflowTypeMains.js
|
|
1715
1768
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1716
1769
|
function WorkflowTypeMains() {
|
|
1717
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
1770
|
+
const [refreshkey, setRefreshKey] = (0, import_react16.useState)(0);
|
|
1718
1771
|
const handleRefresh = () => {
|
|
1719
1772
|
console.log("Table data refreshed!");
|
|
1720
1773
|
setRefreshKey((prev) => prev + 1);
|
|
1721
1774
|
};
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1775
|
+
const handleUpdateApi = async (item) => {
|
|
1776
|
+
var _a, _b, _c, _d, _e;
|
|
1777
|
+
try {
|
|
1778
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.workflowType) == null ? void 0 : _c.update;
|
|
1779
|
+
if (!endpoint) throw new Error("Workflow type update endpoint is not configured.");
|
|
1780
|
+
await getApiService().put(endpoint, { workflowTypeId: item.workflowTypeId, workflowTypeCode: item.workflowTypeCode.trim().toUpperCase(), workflowTypeName: item.workflowTypeName.trim(), description: (item.description || "").trim(), isActive: Boolean(item.isActive), updatedBy: item.updatedBy || item.createdBy || "System" });
|
|
1781
|
+
await import_sweetalert23.default.fire("Success", "Workflow type updated successfully.", "success");
|
|
1782
|
+
handleRefresh();
|
|
1783
|
+
return true;
|
|
1784
|
+
} catch (error) {
|
|
1785
|
+
await import_sweetalert23.default.fire("Error", ((_e = (_d = error == null ? void 0 : error.response) == null ? void 0 : _d.data) == null ? void 0 : _e.message) || (error == null ? void 0 : error.message) || "Unable to update workflow type.", "error");
|
|
1786
|
+
return false;
|
|
1787
|
+
}
|
|
1788
|
+
};
|
|
1789
|
+
const handleDeleteApi = async (item) => {
|
|
1790
|
+
return handleUpdateApi(__spreadProps(__spreadValues({}, item), { isActive: false }));
|
|
1791
|
+
};
|
|
1792
|
+
const tableRef = (0, import_react16.useRef)(null);
|
|
1793
|
+
const [modalOpen, setModalOpen] = (0, import_react16.useState)(false);
|
|
1794
|
+
const [pageSize, setPageSize] = (0, import_react16.useState)(10);
|
|
1795
|
+
const [searchQuery, setSearchQuery] = (0, import_react16.useState)("");
|
|
1796
|
+
const [currentPage, setCurrentPage] = (0, import_react16.useState)(1);
|
|
1797
|
+
const [totalEntries, setTotalEntries] = (0, import_react16.useState)(0);
|
|
1798
|
+
const [isEditOpen, setIsEditOpen] = (0, import_react16.useState)(false);
|
|
1799
|
+
const [isDeleteOpen, setIsDeleteOpen] = (0, import_react16.useState)(false);
|
|
1800
|
+
const [selectedItem, setSelectedItem] = (0, import_react16.useState)(null);
|
|
1801
|
+
const [apiData, setApiData] = (0, import_react16.useState)([]);
|
|
1802
|
+
(0, import_react16.useEffect)(() => {
|
|
1803
|
+
(async () => {
|
|
1804
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1805
|
+
try {
|
|
1806
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.workflowType) == null ? void 0 : _c.getList;
|
|
1807
|
+
if (!endpoint) throw new Error("Workflow type list endpoint is not configured.");
|
|
1808
|
+
const result = await getApiService().get(endpoint);
|
|
1809
|
+
const value = ((_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) || ((_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) || (result == null ? void 0 : result.data) || result;
|
|
1810
|
+
setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
|
|
1811
|
+
} catch (error) {
|
|
1812
|
+
await import_sweetalert23.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load workflow types.", "error");
|
|
1813
|
+
}
|
|
1814
|
+
})();
|
|
1815
|
+
}, [refreshkey]);
|
|
1731
1816
|
const handlePageSizeChange = (e) => {
|
|
1732
1817
|
setPageSize(Number(e.target.value));
|
|
1733
1818
|
setCurrentPage(1);
|
|
@@ -1772,21 +1857,24 @@ function WorkflowTypeMains() {
|
|
|
1772
1857
|
] })
|
|
1773
1858
|
] }),
|
|
1774
1859
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { ref: tableRef, children: [
|
|
1775
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowTypeTable, { pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries, onEdit: handleEdit,
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowTypeTable, { apiData, pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries, onEdit: handleEdit, onUpdate: handleUpdateApi, onDeleteApi: handleDeleteApi }, refreshkey),
|
|
1776
1861
|
" "
|
|
1777
1862
|
] })
|
|
1778
1863
|
] }) }),
|
|
1779
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AddWorkflowTypeModal_default, { isOpen: modalOpen, onClose: () => setModalOpen(false)
|
|
1780
|
-
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AddWorkflowTypeModal_default, { isOpen: modalOpen, onClose: () => setModalOpen(false), onSave: async () => {
|
|
1865
|
+
await import_sweetalert23.default.fire("Success", "Workflow type created successfully.", "success");
|
|
1866
|
+
handleRefresh();
|
|
1867
|
+
} }),
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(EditWorkflowType_default, { isOpen: isEditOpen, onClose: () => setIsEditOpen(false), onSave: handleUpdateApi, selectedData: selectedItem }),
|
|
1781
1869
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DeleteWorkflowType_default, { isOpen: isDeleteOpen, onClose: () => setIsDeleteOpen(false), onConfirm: handleConfirmDelete, itemData: selectedItem })
|
|
1782
1870
|
] });
|
|
1783
1871
|
}
|
|
1784
1872
|
|
|
1785
1873
|
// src/components/WorkflowStep/main.js
|
|
1786
|
-
var
|
|
1874
|
+
var import_react19 = __toESM(require("react"));
|
|
1787
1875
|
|
|
1788
1876
|
// src/components/Common/footer.js
|
|
1789
|
-
var
|
|
1877
|
+
var import_react17 = __toESM(require("react"));
|
|
1790
1878
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1791
1879
|
function Footer() {
|
|
1792
1880
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fc:flex fc:justify-between fc:items-center fc:px-6 fc:py-4 fc:sticky fc:bottom-0 fc:z-10 fc:border-t fc:border-gray-200 fc:rounded-xl fc:bg-slate-50/50 fc:shadow-md", children: [
|
|
@@ -1806,10 +1894,10 @@ function Footer() {
|
|
|
1806
1894
|
var import_link2 = __toESM(require("next/link"));
|
|
1807
1895
|
|
|
1808
1896
|
// src/components/WorkflowStep/AddWorkflowStepModal.js
|
|
1809
|
-
var
|
|
1897
|
+
var import_react18 = __toESM(require("react"));
|
|
1810
1898
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1811
1899
|
function AddWorkflowStepModal({ onClose }) {
|
|
1812
|
-
const [formData, setFormData] = (0,
|
|
1900
|
+
const [formData, setFormData] = (0, import_react18.useState)({
|
|
1813
1901
|
workflow: "",
|
|
1814
1902
|
stepCode: "",
|
|
1815
1903
|
stepName: "",
|
|
@@ -1822,7 +1910,7 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
1822
1910
|
excludeHolidays: true,
|
|
1823
1911
|
status: "active"
|
|
1824
1912
|
});
|
|
1825
|
-
const [errors, setErrors] = (0,
|
|
1913
|
+
const [errors, setErrors] = (0, import_react18.useState)({});
|
|
1826
1914
|
const handleChange = (field, value) => {
|
|
1827
1915
|
setFormData((prev) => __spreadProps(__spreadValues({}, prev), { [field]: value }));
|
|
1828
1916
|
if (errors[field]) {
|
|
@@ -2298,10 +2386,10 @@ function WorkflowStep() {
|
|
|
2298
2386
|
const handleDownload = () => {
|
|
2299
2387
|
console.log("Download clicked");
|
|
2300
2388
|
};
|
|
2301
|
-
const tableRef = (0,
|
|
2302
|
-
const [showModal, setShowModal] = (0,
|
|
2303
|
-
const [pageSize, setPageSize] = (0,
|
|
2304
|
-
const [sortConfig, setSortConfig] = (0,
|
|
2389
|
+
const tableRef = (0, import_react19.useRef)(null);
|
|
2390
|
+
const [showModal, setShowModal] = (0, import_react19.useState)(false);
|
|
2391
|
+
const [pageSize, setPageSize] = (0, import_react19.useState)(5);
|
|
2392
|
+
const [sortConfig, setSortConfig] = (0, import_react19.useState)({
|
|
2305
2393
|
key: "",
|
|
2306
2394
|
direction: "asc"
|
|
2307
2395
|
});
|
|
@@ -2403,14 +2491,14 @@ function WorkflowStep() {
|
|
|
2403
2491
|
}
|
|
2404
2492
|
|
|
2405
2493
|
// src/components/WorkFlowTransition/Transitiontable.js
|
|
2406
|
-
var
|
|
2494
|
+
var import_react21 = __toESM(require("react"));
|
|
2407
2495
|
var import_link3 = __toESM(require("next/link"));
|
|
2408
2496
|
|
|
2409
2497
|
// src/components/WorkFlowTransition/AddWorkFlowTransitionModal.js
|
|
2410
|
-
var
|
|
2498
|
+
var import_react20 = __toESM(require("react"));
|
|
2411
2499
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2412
2500
|
function AddWorkTransitionStepModal({ onClose, onSubmit }) {
|
|
2413
|
-
const [formData, setFormData] = (0,
|
|
2501
|
+
const [formData, setFormData] = (0, import_react20.useState)({
|
|
2414
2502
|
workflow: "",
|
|
2415
2503
|
fromStep: "",
|
|
2416
2504
|
toStep: "",
|
|
@@ -2421,7 +2509,7 @@ function AddWorkTransitionStepModal({ onClose, onSubmit }) {
|
|
|
2421
2509
|
requireComment: false,
|
|
2422
2510
|
status: "active"
|
|
2423
2511
|
});
|
|
2424
|
-
const [errors, setErrors] = (0,
|
|
2512
|
+
const [errors, setErrors] = (0, import_react20.useState)({});
|
|
2425
2513
|
const validateForm = () => {
|
|
2426
2514
|
const newErrors = {};
|
|
2427
2515
|
if (!formData.workflow) newErrors.workflow = "Workflow is required.";
|
|
@@ -2852,10 +2940,10 @@ function WorkFlowTransition() {
|
|
|
2852
2940
|
const handleDownload = () => {
|
|
2853
2941
|
console.log("Download clicked");
|
|
2854
2942
|
};
|
|
2855
|
-
const tableRef = (0,
|
|
2856
|
-
const [showModal, setShowModal] = (0,
|
|
2857
|
-
const [pageSize, setPageSize] = (0,
|
|
2858
|
-
const [sortConfig, setSortConfig] = (0,
|
|
2943
|
+
const tableRef = (0, import_react21.useRef)(null);
|
|
2944
|
+
const [showModal, setShowModal] = (0, import_react21.useState)(false);
|
|
2945
|
+
const [pageSize, setPageSize] = (0, import_react21.useState)(5);
|
|
2946
|
+
const [sortConfig, setSortConfig] = (0, import_react21.useState)({
|
|
2859
2947
|
key: "",
|
|
2860
2948
|
direction: "asc"
|
|
2861
2949
|
});
|
|
@@ -2944,10 +3032,10 @@ function WorkFlowTransition() {
|
|
|
2944
3032
|
}
|
|
2945
3033
|
|
|
2946
3034
|
// src/components/user-hierarchy-node-mapping/user_hierarachy_node_main.jsx
|
|
2947
|
-
var
|
|
3035
|
+
var import_react27 = __toESM(require("react"));
|
|
2948
3036
|
|
|
2949
3037
|
// src/components/user-hierarchy-node-mapping/adduserhierarchynode.jsx
|
|
2950
|
-
var
|
|
3038
|
+
var import_react22 = __toESM(require("react"));
|
|
2951
3039
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2952
3040
|
function AddUserHierarchyNodeMappingModal({
|
|
2953
3041
|
isOpen,
|
|
@@ -3053,7 +3141,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3053
3141
|
}
|
|
3054
3142
|
|
|
3055
3143
|
// src/components/user-hierarchy-node-mapping/searchbar.jsx
|
|
3056
|
-
var
|
|
3144
|
+
var import_react23 = __toESM(require("react"));
|
|
3057
3145
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3058
3146
|
function MappingSearchBar({
|
|
3059
3147
|
searchQuery,
|
|
@@ -3077,10 +3165,10 @@ function MappingSearchBar({
|
|
|
3077
3165
|
}
|
|
3078
3166
|
|
|
3079
3167
|
// src/components/user-hierarchy-node-mapping/userhierarchynodetable.jsx
|
|
3080
|
-
var
|
|
3168
|
+
var import_react26 = __toESM(require("react"));
|
|
3081
3169
|
|
|
3082
3170
|
// src/components/user-hierarchy-node-mapping/edit-mapping.jsx
|
|
3083
|
-
var
|
|
3171
|
+
var import_react24 = __toESM(require("react"));
|
|
3084
3172
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3085
3173
|
function EditUserHierarchyNodeMappingModal({
|
|
3086
3174
|
isOpen,
|
|
@@ -3088,14 +3176,14 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
3088
3176
|
selectedMapping,
|
|
3089
3177
|
onSave
|
|
3090
3178
|
}) {
|
|
3091
|
-
const [formData, setFormData] = (0,
|
|
3179
|
+
const [formData, setFormData] = (0, import_react24.useState)({
|
|
3092
3180
|
hierarchyNodeId: "",
|
|
3093
3181
|
roleCode: "",
|
|
3094
3182
|
isPrimary: "",
|
|
3095
3183
|
effectiveFrom: "",
|
|
3096
3184
|
effectiveTo: ""
|
|
3097
3185
|
});
|
|
3098
|
-
(0,
|
|
3186
|
+
(0, import_react24.useEffect)(() => {
|
|
3099
3187
|
if (selectedMapping) {
|
|
3100
3188
|
setFormData({
|
|
3101
3189
|
hierarchyNodeId: selectedMapping.hierarchyNodeId || "",
|
|
@@ -3276,7 +3364,7 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
3276
3364
|
}
|
|
3277
3365
|
|
|
3278
3366
|
// src/components/user-hierarchy-node-mapping/delete-mapping.jsx
|
|
3279
|
-
var
|
|
3367
|
+
var import_react25 = __toESM(require("react"));
|
|
3280
3368
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3281
3369
|
function DeleteUserHierarchyNodeMappingModal({
|
|
3282
3370
|
isOpen,
|
|
@@ -3581,9 +3669,9 @@ function UserHierarchyNodeMappingTable({
|
|
|
3581
3669
|
effectiveTo: "",
|
|
3582
3670
|
status: true
|
|
3583
3671
|
}];
|
|
3584
|
-
const [data, setData] = (0,
|
|
3585
|
-
const [sortOrder, setSortOrder] = (0,
|
|
3586
|
-
const [sortKey, setSortKey] = (0,
|
|
3672
|
+
const [data, setData] = (0, import_react26.useState)(initialData);
|
|
3673
|
+
const [sortOrder, setSortOrder] = (0, import_react26.useState)("asc");
|
|
3674
|
+
const [sortKey, setSortKey] = (0, import_react26.useState)("mappingId");
|
|
3587
3675
|
const handleSort = (columnKey) => {
|
|
3588
3676
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
3589
3677
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -3599,7 +3687,7 @@ function UserHierarchyNodeMappingTable({
|
|
|
3599
3687
|
const query = (searchQuery || "").toLowerCase();
|
|
3600
3688
|
return String(item.mappingId).toLowerCase().includes(query) || String(item.externalUserId).toLowerCase().includes(query) || String(item.hierarchyNodeId).toLowerCase().includes(query) || item.roleCode.toLowerCase().includes(query);
|
|
3601
3689
|
});
|
|
3602
|
-
(0,
|
|
3690
|
+
(0, import_react26.useEffect)(() => {
|
|
3603
3691
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
3604
3692
|
}, [filteredData.length, setTotalEntries]);
|
|
3605
3693
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -3608,9 +3696,9 @@ function UserHierarchyNodeMappingTable({
|
|
|
3608
3696
|
const pageNumbers = Array.from({
|
|
3609
3697
|
length: totalPages
|
|
3610
3698
|
}, (_, i) => i + 1);
|
|
3611
|
-
const [showEditPopup, setShowEditPopup] = (0,
|
|
3612
|
-
const [showDeletePopup, setShowDeletePopup] = (0,
|
|
3613
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
3699
|
+
const [showEditPopup, setShowEditPopup] = (0, import_react26.useState)(false);
|
|
3700
|
+
const [showDeletePopup, setShowDeletePopup] = (0, import_react26.useState)(false);
|
|
3701
|
+
const [selectedItem, setSelectedItem] = (0, import_react26.useState)(null);
|
|
3614
3702
|
const openEditPopup = (item) => {
|
|
3615
3703
|
setSelectedItem(item);
|
|
3616
3704
|
setShowEditPopup(true);
|
|
@@ -3720,17 +3808,17 @@ function UserHierarchyNodeMappingTable({
|
|
|
3720
3808
|
// src/components/user-hierarchy-node-mapping/user_hierarachy_node_main.jsx
|
|
3721
3809
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3722
3810
|
function User_hierarchy_mapping_main() {
|
|
3723
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
3811
|
+
const [refreshkey, setRefreshKey] = (0, import_react27.useState)(0);
|
|
3724
3812
|
const handleRefresh = () => {
|
|
3725
3813
|
console.log("Table data refreshed!");
|
|
3726
3814
|
setRefreshKey((prev) => prev + 1);
|
|
3727
3815
|
};
|
|
3728
|
-
const tableRef = (0,
|
|
3729
|
-
const [modalOpen, setModalOpen] = (0,
|
|
3730
|
-
const [pageSize, setPageSize] = (0,
|
|
3731
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
3732
|
-
const [currentPage, setCurrentPage] = (0,
|
|
3733
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
3816
|
+
const tableRef = (0, import_react27.useRef)(null);
|
|
3817
|
+
const [modalOpen, setModalOpen] = (0, import_react27.useState)(false);
|
|
3818
|
+
const [pageSize, setPageSize] = (0, import_react27.useState)(10);
|
|
3819
|
+
const [searchQuery, setSearchQuery] = (0, import_react27.useState)("");
|
|
3820
|
+
const [currentPage, setCurrentPage] = (0, import_react27.useState)(1);
|
|
3821
|
+
const [totalEntries, setTotalEntries] = (0, import_react27.useState)(0);
|
|
3734
3822
|
const handlePageSizeChange = (e) => {
|
|
3735
3823
|
setPageSize(Number(e.target.value));
|
|
3736
3824
|
setCurrentPage(1);
|
|
@@ -3772,10 +3860,10 @@ function User_hierarchy_mapping_main() {
|
|
|
3772
3860
|
}
|
|
3773
3861
|
|
|
3774
3862
|
// src/components/document-configuration/DocumentConfigurationmain.jsx
|
|
3775
|
-
var
|
|
3863
|
+
var import_react33 = __toESM(require("react"));
|
|
3776
3864
|
|
|
3777
3865
|
// src/components/document-configuration/SearchBar.jsx
|
|
3778
|
-
var
|
|
3866
|
+
var import_react28 = __toESM(require("react"));
|
|
3779
3867
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3780
3868
|
function SearchBar3({
|
|
3781
3869
|
searchQuery,
|
|
@@ -3792,10 +3880,10 @@ function SearchBar3({
|
|
|
3792
3880
|
}
|
|
3793
3881
|
|
|
3794
3882
|
// src/components/document-configuration/DocumentConfigurationTable.jsx
|
|
3795
|
-
var
|
|
3883
|
+
var import_react31 = __toESM(require("react"));
|
|
3796
3884
|
|
|
3797
3885
|
// src/components/document-configuration/Edit.jsx
|
|
3798
|
-
var
|
|
3886
|
+
var import_react29 = __toESM(require("react"));
|
|
3799
3887
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3800
3888
|
function EditDocumentConfiguration({
|
|
3801
3889
|
isOpen,
|
|
@@ -3803,7 +3891,7 @@ function EditDocumentConfiguration({
|
|
|
3803
3891
|
initialData,
|
|
3804
3892
|
onSave
|
|
3805
3893
|
}) {
|
|
3806
|
-
const [formData, setFormData] = (0,
|
|
3894
|
+
const [formData, setFormData] = (0, import_react29.useState)({
|
|
3807
3895
|
docName: "",
|
|
3808
3896
|
stepId: "",
|
|
3809
3897
|
extensions: "",
|
|
@@ -3812,8 +3900,8 @@ function EditDocumentConfiguration({
|
|
|
3812
3900
|
isMandatory: false,
|
|
3813
3901
|
status: "Active"
|
|
3814
3902
|
});
|
|
3815
|
-
const [errors, setErrors] = (0,
|
|
3816
|
-
(0,
|
|
3903
|
+
const [errors, setErrors] = (0, import_react29.useState)({});
|
|
3904
|
+
(0, import_react29.useEffect)(() => {
|
|
3817
3905
|
if (initialData) {
|
|
3818
3906
|
const sizeParts = (initialData.maxSize || "10 MB").split(" ");
|
|
3819
3907
|
setFormData({
|
|
@@ -3945,7 +4033,7 @@ function EditDocumentConfiguration({
|
|
|
3945
4033
|
}
|
|
3946
4034
|
|
|
3947
4035
|
// src/components/document-configuration/Delete.jsx
|
|
3948
|
-
var
|
|
4036
|
+
var import_react30 = __toESM(require("react"));
|
|
3949
4037
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3950
4038
|
function DeleteDocumentConfiguration({
|
|
3951
4039
|
isOpen,
|
|
@@ -4222,12 +4310,12 @@ function DocumentConfigTable({
|
|
|
4222
4310
|
status: "Active"
|
|
4223
4311
|
}
|
|
4224
4312
|
];
|
|
4225
|
-
const [data, setData] = (0,
|
|
4226
|
-
const [sortOrder, setSortOrder] = (0,
|
|
4227
|
-
const [sortKey, setSortKey] = (0,
|
|
4228
|
-
const [isEditOpen, setIsEditOpen] = (0,
|
|
4229
|
-
const [isDeleteOpen, setIsDeleteOpen] = (0,
|
|
4230
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
4313
|
+
const [data, setData] = (0, import_react31.useState)(initialData);
|
|
4314
|
+
const [sortOrder, setSortOrder] = (0, import_react31.useState)("asc");
|
|
4315
|
+
const [sortKey, setSortKey] = (0, import_react31.useState)("docName");
|
|
4316
|
+
const [isEditOpen, setIsEditOpen] = (0, import_react31.useState)(false);
|
|
4317
|
+
const [isDeleteOpen, setIsDeleteOpen] = (0, import_react31.useState)(false);
|
|
4318
|
+
const [selectedItem, setSelectedItem] = (0, import_react31.useState)(null);
|
|
4231
4319
|
const handleSort = (columnKey) => {
|
|
4232
4320
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
4233
4321
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -4243,7 +4331,7 @@ function DocumentConfigTable({
|
|
|
4243
4331
|
const query = (searchQuery || "").toLowerCase();
|
|
4244
4332
|
return item.docName.toLowerCase().includes(query) || item.extensions.toLowerCase().includes(query) || item.stepId.toLowerCase().includes(query);
|
|
4245
4333
|
});
|
|
4246
|
-
(0,
|
|
4334
|
+
(0, import_react31.useEffect)(() => {
|
|
4247
4335
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
4248
4336
|
}, [filteredData.length, setTotalEntries]);
|
|
4249
4337
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -4449,19 +4537,19 @@ function DocumentConfigTable({
|
|
|
4449
4537
|
}
|
|
4450
4538
|
|
|
4451
4539
|
// src/components/document-configuration/AddDocumentConfigurationModal.jsx
|
|
4452
|
-
var
|
|
4540
|
+
var import_react32 = __toESM(require("react"));
|
|
4453
4541
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4454
4542
|
function AddDocumentConfigModal({
|
|
4455
4543
|
isOpen,
|
|
4456
4544
|
onClose
|
|
4457
4545
|
}) {
|
|
4458
|
-
const [isMandatory, setIsMandatory] = (0,
|
|
4459
|
-
const [status, setStatus] = (0,
|
|
4460
|
-
const [documentName, setDocumentName] = (0,
|
|
4461
|
-
const [stepId, setStepId] = (0,
|
|
4462
|
-
const [maxSize, setMaxSize] = (0,
|
|
4463
|
-
const [allowedExtensions, setAllowedExtensions] = (0,
|
|
4464
|
-
const [errors, setErrors] = (0,
|
|
4546
|
+
const [isMandatory, setIsMandatory] = (0, import_react32.useState)(false);
|
|
4547
|
+
const [status, setStatus] = (0, import_react32.useState)("Active");
|
|
4548
|
+
const [documentName, setDocumentName] = (0, import_react32.useState)("");
|
|
4549
|
+
const [stepId, setStepId] = (0, import_react32.useState)("");
|
|
4550
|
+
const [maxSize, setMaxSize] = (0, import_react32.useState)("");
|
|
4551
|
+
const [allowedExtensions, setAllowedExtensions] = (0, import_react32.useState)("");
|
|
4552
|
+
const [errors, setErrors] = (0, import_react32.useState)({});
|
|
4465
4553
|
const handleSave = () => {
|
|
4466
4554
|
let newErrors = {};
|
|
4467
4555
|
if (!documentName.trim()) {
|
|
@@ -4594,17 +4682,17 @@ function AddDocumentConfigModal({
|
|
|
4594
4682
|
// src/components/document-configuration/DocumentConfigurationmain.jsx
|
|
4595
4683
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4596
4684
|
function DocumentConfigurationmain() {
|
|
4597
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
4685
|
+
const [refreshkey, setRefreshKey] = (0, import_react33.useState)(0);
|
|
4598
4686
|
const handleRefresh = () => {
|
|
4599
4687
|
console.log("Table data refreshed!");
|
|
4600
4688
|
setRefreshKey((prev) => prev + 1);
|
|
4601
4689
|
};
|
|
4602
|
-
const tableRef = (0,
|
|
4603
|
-
const [modalOpen, setModalOpen] = (0,
|
|
4604
|
-
const [pageSize, setPageSize] = (0,
|
|
4605
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
4606
|
-
const [currentPage, setCurrentPage] = (0,
|
|
4607
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
4690
|
+
const tableRef = (0, import_react33.useRef)(null);
|
|
4691
|
+
const [modalOpen, setModalOpen] = (0, import_react33.useState)(false);
|
|
4692
|
+
const [pageSize, setPageSize] = (0, import_react33.useState)(10);
|
|
4693
|
+
const [searchQuery, setSearchQuery] = (0, import_react33.useState)("");
|
|
4694
|
+
const [currentPage, setCurrentPage] = (0, import_react33.useState)(1);
|
|
4695
|
+
const [totalEntries, setTotalEntries] = (0, import_react33.useState)(0);
|
|
4608
4696
|
const handlePageSizeChange = (e) => {
|
|
4609
4697
|
setPageSize(Number(e.target.value));
|
|
4610
4698
|
setCurrentPage(1);
|
|
@@ -4644,10 +4732,10 @@ function DocumentConfigurationmain() {
|
|
|
4644
4732
|
}
|
|
4645
4733
|
|
|
4646
4734
|
// src/components/audit-log/AuditLogmain.jsx
|
|
4647
|
-
var
|
|
4735
|
+
var import_react37 = __toESM(require("react"));
|
|
4648
4736
|
|
|
4649
4737
|
// src/components/audit-log/SearchBar.jsx
|
|
4650
|
-
var
|
|
4738
|
+
var import_react34 = __toESM(require("react"));
|
|
4651
4739
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4652
4740
|
function SearchBar4({
|
|
4653
4741
|
searchQuery,
|
|
@@ -4664,7 +4752,7 @@ function SearchBar4({
|
|
|
4664
4752
|
}
|
|
4665
4753
|
|
|
4666
4754
|
// src/components/audit-log/AuditLogTable.jsx
|
|
4667
|
-
var
|
|
4755
|
+
var import_react35 = __toESM(require("react"));
|
|
4668
4756
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4669
4757
|
function AuditLogTable({
|
|
4670
4758
|
pageSize,
|
|
@@ -4874,9 +4962,9 @@ function AuditLogTable({
|
|
|
4874
4962
|
ip: "192.168.1.45",
|
|
4875
4963
|
time: "2026-07-17 15:55"
|
|
4876
4964
|
}];
|
|
4877
|
-
const [data, setData] = (0,
|
|
4878
|
-
const [sortOrder, setSortOrder] = (0,
|
|
4879
|
-
const [sortKey, setSortKey] = (0,
|
|
4965
|
+
const [data, setData] = (0, import_react35.useState)(initialData);
|
|
4966
|
+
const [sortOrder, setSortOrder] = (0, import_react35.useState)("asc");
|
|
4967
|
+
const [sortKey, setSortKey] = (0, import_react35.useState)("logId");
|
|
4880
4968
|
const handleSort = (columnKey) => {
|
|
4881
4969
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
4882
4970
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -4892,7 +4980,7 @@ function AuditLogTable({
|
|
|
4892
4980
|
const query = (searchQuery || "").toLowerCase();
|
|
4893
4981
|
return item.logId.toLowerCase().includes(query) || item.user.toLowerCase().includes(query) || item.section.toLowerCase().includes(query) || item.action.toLowerCase().includes(query);
|
|
4894
4982
|
});
|
|
4895
|
-
(0,
|
|
4983
|
+
(0, import_react35.useEffect)(() => {
|
|
4896
4984
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
4897
4985
|
}, [filteredData.length, setTotalEntries]);
|
|
4898
4986
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -4960,19 +5048,19 @@ function AuditLogTable({
|
|
|
4960
5048
|
}
|
|
4961
5049
|
|
|
4962
5050
|
// src/components/audit-log/AddAuditLogModal.jsx
|
|
4963
|
-
var
|
|
5051
|
+
var import_react36 = __toESM(require("react"));
|
|
4964
5052
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4965
5053
|
function AddAuditLogModal({
|
|
4966
5054
|
isOpen,
|
|
4967
5055
|
onClose
|
|
4968
5056
|
}) {
|
|
4969
|
-
const [logId, setLogId] = (0,
|
|
4970
|
-
const [userName, setUserName] = (0,
|
|
4971
|
-
const [actionType, setActionType] = (0,
|
|
4972
|
-
const [ipAddress, setIpAddress] = (0,
|
|
4973
|
-
const [sectionModule, setSectionModule] = (0,
|
|
4974
|
-
const [timestamp, setTimestamp] = (0,
|
|
4975
|
-
const [errors, setErrors] = (0,
|
|
5057
|
+
const [logId, setLogId] = (0, import_react36.useState)("");
|
|
5058
|
+
const [userName, setUserName] = (0, import_react36.useState)("");
|
|
5059
|
+
const [actionType, setActionType] = (0, import_react36.useState)("");
|
|
5060
|
+
const [ipAddress, setIpAddress] = (0, import_react36.useState)("");
|
|
5061
|
+
const [sectionModule, setSectionModule] = (0, import_react36.useState)("");
|
|
5062
|
+
const [timestamp, setTimestamp] = (0, import_react36.useState)("");
|
|
5063
|
+
const [errors, setErrors] = (0, import_react36.useState)({});
|
|
4976
5064
|
const handleCommit = () => {
|
|
4977
5065
|
let newErrors = {};
|
|
4978
5066
|
if (!logId.trim()) newErrors.logId = "Log ID is required";
|
|
@@ -5091,17 +5179,17 @@ function AddAuditLogModal({
|
|
|
5091
5179
|
// src/components/audit-log/AuditLogmain.jsx
|
|
5092
5180
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5093
5181
|
function AuditLogmain() {
|
|
5094
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
5182
|
+
const [refreshkey, setRefreshKey] = (0, import_react37.useState)(0);
|
|
5095
5183
|
const handleRefresh = () => {
|
|
5096
5184
|
console.log("Table data refreshed!");
|
|
5097
5185
|
setRefreshKey((prev) => prev + 1);
|
|
5098
5186
|
};
|
|
5099
|
-
const tableRef = (0,
|
|
5100
|
-
const [modalOpen, setModalOpen] = (0,
|
|
5101
|
-
const [pageSize, setPageSize] = (0,
|
|
5102
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
5103
|
-
const [currentPage, setCurrentPage] = (0,
|
|
5104
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
5187
|
+
const tableRef = (0, import_react37.useRef)(null);
|
|
5188
|
+
const [modalOpen, setModalOpen] = (0, import_react37.useState)(false);
|
|
5189
|
+
const [pageSize, setPageSize] = (0, import_react37.useState)(10);
|
|
5190
|
+
const [searchQuery, setSearchQuery] = (0, import_react37.useState)("");
|
|
5191
|
+
const [currentPage, setCurrentPage] = (0, import_react37.useState)(1);
|
|
5192
|
+
const [totalEntries, setTotalEntries] = (0, import_react37.useState)(0);
|
|
5105
5193
|
const handlePageSizeChange = (e) => {
|
|
5106
5194
|
setPageSize(Number(e.target.value));
|
|
5107
5195
|
setCurrentPage(1);
|
|
@@ -5160,10 +5248,10 @@ function AuditLogmain() {
|
|
|
5160
5248
|
}
|
|
5161
5249
|
|
|
5162
5250
|
// src/components/movement-history/MovementHistorymain.jsx
|
|
5163
|
-
var
|
|
5251
|
+
var import_react41 = __toESM(require("react"));
|
|
5164
5252
|
|
|
5165
5253
|
// src/components/movement-history/SearchBar.jsx
|
|
5166
|
-
var
|
|
5254
|
+
var import_react38 = __toESM(require("react"));
|
|
5167
5255
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5168
5256
|
function SearchBar5({
|
|
5169
5257
|
searchQuery,
|
|
@@ -5180,7 +5268,7 @@ function SearchBar5({
|
|
|
5180
5268
|
}
|
|
5181
5269
|
|
|
5182
5270
|
// src/components/movement-history/MovementHistoryTable.jsx
|
|
5183
|
-
var
|
|
5271
|
+
var import_react39 = __toESM(require("react"));
|
|
5184
5272
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5185
5273
|
function MovementHistoryTable({
|
|
5186
5274
|
pageSize,
|
|
@@ -5390,9 +5478,9 @@ function MovementHistoryTable({
|
|
|
5390
5478
|
toStepId: "APPROVE",
|
|
5391
5479
|
movedOn: "2026-02-12"
|
|
5392
5480
|
}];
|
|
5393
|
-
const [data, setData] = (0,
|
|
5394
|
-
const [sortOrder, setSortOrder] = (0,
|
|
5395
|
-
const [sortKey, setSortKey] = (0,
|
|
5481
|
+
const [data, setData] = (0, import_react39.useState)(initialData);
|
|
5482
|
+
const [sortOrder, setSortOrder] = (0, import_react39.useState)("asc");
|
|
5483
|
+
const [sortKey, setSortKey] = (0, import_react39.useState)("movementHistoryId");
|
|
5396
5484
|
const handleSort = (columnKey) => {
|
|
5397
5485
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
5398
5486
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -5408,7 +5496,7 @@ function MovementHistoryTable({
|
|
|
5408
5496
|
const query = (searchQuery || "").toLowerCase();
|
|
5409
5497
|
return item.movementHistoryId.toLowerCase().includes(query) || item.name.toLowerCase().includes(query) || item.toStepId.toLowerCase().includes(query);
|
|
5410
5498
|
});
|
|
5411
|
-
(0,
|
|
5499
|
+
(0, import_react39.useEffect)(() => {
|
|
5412
5500
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
5413
5501
|
}, [filteredData.length, setTotalEntries]);
|
|
5414
5502
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -5479,19 +5567,19 @@ function MovementHistoryTable({
|
|
|
5479
5567
|
}
|
|
5480
5568
|
|
|
5481
5569
|
// src/components/movement-history/AddMovementHistoryModal.jsx
|
|
5482
|
-
var
|
|
5570
|
+
var import_react40 = __toESM(require("react"));
|
|
5483
5571
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5484
5572
|
function AddMovementHistoryModal({
|
|
5485
5573
|
isOpen,
|
|
5486
5574
|
onClose
|
|
5487
5575
|
}) {
|
|
5488
|
-
const [movementHistoryId, setMovementHistoryId] = (0,
|
|
5489
|
-
const [fileInstanceId, setFileInstanceId] = (0,
|
|
5490
|
-
const [fromStepId, setFromStepId] = (0,
|
|
5491
|
-
const [toStepId, setToStepId] = (0,
|
|
5492
|
-
const [actionCode, setActionCode] = (0,
|
|
5493
|
-
const [movedOn, setMovedOn] = (0,
|
|
5494
|
-
const [errors, setErrors] = (0,
|
|
5576
|
+
const [movementHistoryId, setMovementHistoryId] = (0, import_react40.useState)("");
|
|
5577
|
+
const [fileInstanceId, setFileInstanceId] = (0, import_react40.useState)("");
|
|
5578
|
+
const [fromStepId, setFromStepId] = (0, import_react40.useState)("");
|
|
5579
|
+
const [toStepId, setToStepId] = (0, import_react40.useState)("");
|
|
5580
|
+
const [actionCode, setActionCode] = (0, import_react40.useState)("");
|
|
5581
|
+
const [movedOn, setMovedOn] = (0, import_react40.useState)("");
|
|
5582
|
+
const [errors, setErrors] = (0, import_react40.useState)({});
|
|
5495
5583
|
const handleSaveRecord = () => {
|
|
5496
5584
|
let newErrors = {};
|
|
5497
5585
|
if (!movementHistoryId.toString().trim()) newErrors.movementHistoryId = "Movement History ID is required";
|
|
@@ -5606,17 +5694,17 @@ function AddMovementHistoryModal({
|
|
|
5606
5694
|
// src/components/movement-history/MovementHistorymain.jsx
|
|
5607
5695
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5608
5696
|
function MovementHistorymain() {
|
|
5609
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
5697
|
+
const [refreshkey, setRefreshKey] = (0, import_react41.useState)(0);
|
|
5610
5698
|
const handleRefresh = () => {
|
|
5611
5699
|
console.log("Table data refreshed!");
|
|
5612
5700
|
setRefreshKey((prev) => prev + 1);
|
|
5613
5701
|
};
|
|
5614
|
-
const tableRef = (0,
|
|
5615
|
-
const [modalOpen, setModalOpen] = (0,
|
|
5616
|
-
const [pageSize, setPageSize] = (0,
|
|
5617
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
5618
|
-
const [currentPage, setCurrentPage] = (0,
|
|
5619
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
5702
|
+
const tableRef = (0, import_react41.useRef)(null);
|
|
5703
|
+
const [modalOpen, setModalOpen] = (0, import_react41.useState)(false);
|
|
5704
|
+
const [pageSize, setPageSize] = (0, import_react41.useState)(10);
|
|
5705
|
+
const [searchQuery, setSearchQuery] = (0, import_react41.useState)("");
|
|
5706
|
+
const [currentPage, setCurrentPage] = (0, import_react41.useState)(1);
|
|
5707
|
+
const [totalEntries, setTotalEntries] = (0, import_react41.useState)(0);
|
|
5620
5708
|
const handlePageSizeChange = (e) => {
|
|
5621
5709
|
setPageSize(Number(e.target.value));
|
|
5622
5710
|
setCurrentPage(1);
|
|
@@ -5659,10 +5747,10 @@ function MovementHistorymain() {
|
|
|
5659
5747
|
}
|
|
5660
5748
|
|
|
5661
5749
|
// src/components/task-permission/TaskPermissionMain.jsx
|
|
5662
|
-
var
|
|
5750
|
+
var import_react45 = __toESM(require("react"));
|
|
5663
5751
|
|
|
5664
5752
|
// src/components/task-permission/SearchBar.js
|
|
5665
|
-
var
|
|
5753
|
+
var import_react42 = __toESM(require("react"));
|
|
5666
5754
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5667
5755
|
function SearchBar6({
|
|
5668
5756
|
searchTerm,
|
|
@@ -5690,7 +5778,7 @@ function SearchBar6({
|
|
|
5690
5778
|
}
|
|
5691
5779
|
|
|
5692
5780
|
// src/components/task-permission/Table.js
|
|
5693
|
-
var
|
|
5781
|
+
var import_react43 = __toESM(require("react"));
|
|
5694
5782
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5695
5783
|
function Table({
|
|
5696
5784
|
pageSize,
|
|
@@ -5875,12 +5963,12 @@ function Table({
|
|
|
5875
5963
|
permissionType: "Write",
|
|
5876
5964
|
isStatusEnabled: true
|
|
5877
5965
|
}];
|
|
5878
|
-
const [data, setData] = (0,
|
|
5879
|
-
const [sortOrder, setSortOrder] = (0,
|
|
5880
|
-
const [sortKey, setSortKey] = (0,
|
|
5881
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
5882
|
-
const [isEditModalOpen, setIsEditModalOpen] = (0,
|
|
5883
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0,
|
|
5966
|
+
const [data, setData] = (0, import_react43.useState)(initialData);
|
|
5967
|
+
const [sortOrder, setSortOrder] = (0, import_react43.useState)("asc");
|
|
5968
|
+
const [sortKey, setSortKey] = (0, import_react43.useState)("taskId");
|
|
5969
|
+
const [selectedItem, setSelectedItem] = (0, import_react43.useState)(null);
|
|
5970
|
+
const [isEditModalOpen, setIsEditModalOpen] = (0, import_react43.useState)(false);
|
|
5971
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0, import_react43.useState)(false);
|
|
5884
5972
|
const handleEdit = (item) => {
|
|
5885
5973
|
setSelectedItem(item);
|
|
5886
5974
|
setIsEditModalOpen(true);
|
|
@@ -5937,7 +6025,7 @@ function Table({
|
|
|
5937
6025
|
}
|
|
5938
6026
|
return item.taskId && item.taskId.toString().toLowerCase().includes(query) || item.role && item.role.toLowerCase().includes(query) || item.taskName && item.taskName.toLowerCase().includes(query) || item.permissionType && item.permissionType.toLowerCase().includes(query);
|
|
5939
6027
|
});
|
|
5940
|
-
(0,
|
|
6028
|
+
(0, import_react43.useEffect)(() => {
|
|
5941
6029
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
5942
6030
|
}, [filteredData.length, setTotalEntries]);
|
|
5943
6031
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -6060,7 +6148,7 @@ function Table({
|
|
|
6060
6148
|
}
|
|
6061
6149
|
|
|
6062
6150
|
// src/components/task-permission/Popup.js
|
|
6063
|
-
var
|
|
6151
|
+
var import_react44 = __toESM(require("react"));
|
|
6064
6152
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6065
6153
|
function Popup({
|
|
6066
6154
|
isOpen,
|
|
@@ -6068,13 +6156,13 @@ function Popup({
|
|
|
6068
6156
|
onSave
|
|
6069
6157
|
}) {
|
|
6070
6158
|
if (!isOpen) return null;
|
|
6071
|
-
const [stepName, setStepName] = (0,
|
|
6072
|
-
const [stepCode, setStepCode] = (0,
|
|
6073
|
-
const [workflow, setWorkflow] = (0,
|
|
6074
|
-
const [canView, setCanView] = (0,
|
|
6075
|
-
const [canEdit, setCanEdit] = (0,
|
|
6076
|
-
const [canApprove, setCanApprove] = (0,
|
|
6077
|
-
const [canReject, setCanReject] = (0,
|
|
6159
|
+
const [stepName, setStepName] = (0, import_react44.useState)("");
|
|
6160
|
+
const [stepCode, setStepCode] = (0, import_react44.useState)("");
|
|
6161
|
+
const [workflow, setWorkflow] = (0, import_react44.useState)("");
|
|
6162
|
+
const [canView, setCanView] = (0, import_react44.useState)(false);
|
|
6163
|
+
const [canEdit, setCanEdit] = (0, import_react44.useState)(false);
|
|
6164
|
+
const [canApprove, setCanApprove] = (0, import_react44.useState)(false);
|
|
6165
|
+
const [canReject, setCanReject] = (0, import_react44.useState)(false);
|
|
6078
6166
|
const handleSubmit = (e) => {
|
|
6079
6167
|
e.preventDefault();
|
|
6080
6168
|
if (!stepName || !stepCode || !workflow) {
|
|
@@ -6191,17 +6279,17 @@ function Popup({
|
|
|
6191
6279
|
// src/components/task-permission/TaskPermissionMain.jsx
|
|
6192
6280
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6193
6281
|
function TaskPermissionMain() {
|
|
6194
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
6282
|
+
const [refreshkey, setRefreshKey] = (0, import_react45.useState)(0);
|
|
6195
6283
|
const handleRefresh = () => {
|
|
6196
6284
|
console.log("Table data refreshed!");
|
|
6197
6285
|
setRefreshKey((prev) => prev + 1);
|
|
6198
6286
|
};
|
|
6199
|
-
const tableRef = (0,
|
|
6200
|
-
const [showModal, setShowModal] = (0,
|
|
6201
|
-
const [pageSize, setPageSize] = (0,
|
|
6202
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
6203
|
-
const [currentPage, setCurrentPage] = (0,
|
|
6204
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
6287
|
+
const tableRef = (0, import_react45.useRef)(null);
|
|
6288
|
+
const [showModal, setShowModal] = (0, import_react45.useState)(false);
|
|
6289
|
+
const [pageSize, setPageSize] = (0, import_react45.useState)(10);
|
|
6290
|
+
const [searchQuery, setSearchQuery] = (0, import_react45.useState)("");
|
|
6291
|
+
const [currentPage, setCurrentPage] = (0, import_react45.useState)(1);
|
|
6292
|
+
const [totalEntries, setTotalEntries] = (0, import_react45.useState)(0);
|
|
6205
6293
|
const handlePageSizeChange = (e) => {
|
|
6206
6294
|
setPageSize(Number(e.target.value));
|
|
6207
6295
|
setCurrentPage(1);
|
|
@@ -6243,10 +6331,10 @@ function TaskPermissionMain() {
|
|
|
6243
6331
|
}
|
|
6244
6332
|
|
|
6245
6333
|
// src/components/Workflow-Setting/WorkflowSettingMain.jsx
|
|
6246
|
-
var
|
|
6334
|
+
var import_react49 = __toESM(require("react"));
|
|
6247
6335
|
|
|
6248
6336
|
// src/components/Workflow-Setting/SearchBar.js
|
|
6249
|
-
var
|
|
6337
|
+
var import_react46 = __toESM(require("react"));
|
|
6250
6338
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6251
6339
|
function SearchBar7({
|
|
6252
6340
|
searchTerm,
|
|
@@ -6274,7 +6362,7 @@ function SearchBar7({
|
|
|
6274
6362
|
}
|
|
6275
6363
|
|
|
6276
6364
|
// src/components/Workflow-Setting/Table.js
|
|
6277
|
-
var
|
|
6365
|
+
var import_react47 = __toESM(require("react"));
|
|
6278
6366
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6279
6367
|
function Table2({
|
|
6280
6368
|
pageSize,
|
|
@@ -6459,12 +6547,12 @@ function Table2({
|
|
|
6459
6547
|
SLA: "2 Hours",
|
|
6460
6548
|
isActive: true
|
|
6461
6549
|
}];
|
|
6462
|
-
const [data, setData] = (0,
|
|
6463
|
-
const [sortOrder, setSortOrder] = (0,
|
|
6464
|
-
const [sortKey, setSortKey] = (0,
|
|
6465
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
6466
|
-
const [isEditModalOpen, setIsEditModalOpen] = (0,
|
|
6467
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0,
|
|
6550
|
+
const [data, setData] = (0, import_react47.useState)(initialData);
|
|
6551
|
+
const [sortOrder, setSortOrder] = (0, import_react47.useState)("asc");
|
|
6552
|
+
const [sortKey, setSortKey] = (0, import_react47.useState)("settingId");
|
|
6553
|
+
const [selectedItem, setSelectedItem] = (0, import_react47.useState)(null);
|
|
6554
|
+
const [isEditModalOpen, setIsEditModalOpen] = (0, import_react47.useState)(false);
|
|
6555
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0, import_react47.useState)(false);
|
|
6468
6556
|
const handleEdit = (item) => {
|
|
6469
6557
|
setSelectedItem(item);
|
|
6470
6558
|
setIsEditModalOpen(true);
|
|
@@ -6521,7 +6609,7 @@ function Table2({
|
|
|
6521
6609
|
}
|
|
6522
6610
|
return item.settingId && item.settingId.toString().toLowerCase().includes(query) || item.moduleName && item.moduleName.toLowerCase().includes(query) || item.executionOrder && item.executionOrder.toString().toLowerCase().includes(query) || item.SLA && item.SLA.toLowerCase().includes(query);
|
|
6523
6611
|
});
|
|
6524
|
-
(0,
|
|
6612
|
+
(0, import_react47.useEffect)(() => {
|
|
6525
6613
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
6526
6614
|
}, [filteredData.length, setTotalEntries]);
|
|
6527
6615
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -6654,7 +6742,7 @@ function Table2({
|
|
|
6654
6742
|
}
|
|
6655
6743
|
|
|
6656
6744
|
// src/components/Workflow-Setting/Popup.js
|
|
6657
|
-
var
|
|
6745
|
+
var import_react48 = __toESM(require("react"));
|
|
6658
6746
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6659
6747
|
function Popup2({
|
|
6660
6748
|
isOpen,
|
|
@@ -6662,8 +6750,8 @@ function Popup2({
|
|
|
6662
6750
|
onSave
|
|
6663
6751
|
}) {
|
|
6664
6752
|
if (!isOpen) return null;
|
|
6665
|
-
const [settingKey, setSettingKey] = (0,
|
|
6666
|
-
const [settingValue, setSettingValue] = (0,
|
|
6753
|
+
const [settingKey, setSettingKey] = (0, import_react48.useState)("");
|
|
6754
|
+
const [settingValue, setSettingValue] = (0, import_react48.useState)("");
|
|
6667
6755
|
const handleSubmit = (e) => {
|
|
6668
6756
|
e.preventDefault();
|
|
6669
6757
|
if (!settingKey || !settingValue) {
|
|
@@ -6714,17 +6802,17 @@ function Popup2({
|
|
|
6714
6802
|
// src/components/Workflow-Setting/WorkflowSettingMain.jsx
|
|
6715
6803
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6716
6804
|
function WorkflowSettingMain() {
|
|
6717
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
6805
|
+
const [refreshkey, setRefreshKey] = (0, import_react49.useState)(0);
|
|
6718
6806
|
const handleRefresh = () => {
|
|
6719
6807
|
console.log("Table data refreshed!");
|
|
6720
6808
|
setRefreshKey((prev) => prev + 1);
|
|
6721
6809
|
};
|
|
6722
|
-
const tableRef = (0,
|
|
6723
|
-
const [showModal, setShowModal] = (0,
|
|
6724
|
-
const [pageSize, setPageSize] = (0,
|
|
6725
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
6726
|
-
const [currentPage, setCurrentPage] = (0,
|
|
6727
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
6810
|
+
const tableRef = (0, import_react49.useRef)(null);
|
|
6811
|
+
const [showModal, setShowModal] = (0, import_react49.useState)(false);
|
|
6812
|
+
const [pageSize, setPageSize] = (0, import_react49.useState)(10);
|
|
6813
|
+
const [searchQuery, setSearchQuery] = (0, import_react49.useState)("");
|
|
6814
|
+
const [currentPage, setCurrentPage] = (0, import_react49.useState)(1);
|
|
6815
|
+
const [totalEntries, setTotalEntries] = (0, import_react49.useState)(0);
|
|
6728
6816
|
const handlePageSizeChange = (e) => {
|
|
6729
6817
|
setPageSize(Number(e.target.value));
|
|
6730
6818
|
setCurrentPage(1);
|
|
@@ -6766,10 +6854,10 @@ function WorkflowSettingMain() {
|
|
|
6766
6854
|
}
|
|
6767
6855
|
|
|
6768
6856
|
// src/components/notification/NotificationMain.jsx
|
|
6769
|
-
var
|
|
6857
|
+
var import_react53 = __toESM(require("react"));
|
|
6770
6858
|
|
|
6771
6859
|
// src/components/notification/SearchBar.js
|
|
6772
|
-
var
|
|
6860
|
+
var import_react50 = __toESM(require("react"));
|
|
6773
6861
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6774
6862
|
function SearchBar8({
|
|
6775
6863
|
searchTerm,
|
|
@@ -6797,7 +6885,7 @@ function SearchBar8({
|
|
|
6797
6885
|
}
|
|
6798
6886
|
|
|
6799
6887
|
// src/components/notification/Table.js
|
|
6800
|
-
var
|
|
6888
|
+
var import_react51 = __toESM(require("react"));
|
|
6801
6889
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6802
6890
|
function Table3({
|
|
6803
6891
|
pageSize,
|
|
@@ -6982,12 +7070,12 @@ function Table3({
|
|
|
6982
7070
|
recipientGroup: "Risk Assessment",
|
|
6983
7071
|
isMuted: false
|
|
6984
7072
|
}];
|
|
6985
|
-
const [data, setData] = (0,
|
|
6986
|
-
const [sortOrder, setSortOrder] = (0,
|
|
6987
|
-
const [sortKey, setSortKey] = (0,
|
|
6988
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
6989
|
-
const [isEditModalOpen, setIsEditModalOpen] = (0,
|
|
6990
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0,
|
|
7073
|
+
const [data, setData] = (0, import_react51.useState)(initialData);
|
|
7074
|
+
const [sortOrder, setSortOrder] = (0, import_react51.useState)("asc");
|
|
7075
|
+
const [sortKey, setSortKey] = (0, import_react51.useState)("notificationId");
|
|
7076
|
+
const [selectedItem, setSelectedItem] = (0, import_react51.useState)(null);
|
|
7077
|
+
const [isEditModalOpen, setIsEditModalOpen] = (0, import_react51.useState)(false);
|
|
7078
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0, import_react51.useState)(false);
|
|
6991
7079
|
const handleEdit = (item) => {
|
|
6992
7080
|
setSelectedItem(item);
|
|
6993
7081
|
setIsEditModalOpen(true);
|
|
@@ -7044,7 +7132,7 @@ function Table3({
|
|
|
7044
7132
|
}
|
|
7045
7133
|
return item.notificationId && item.notificationId.toString().toLowerCase().includes(query) || item.eventTrigger && item.eventTrigger.toLowerCase().includes(query) || item.channelType && item.channelType.toLowerCase().includes(query) || item.recipientGroup && item.recipientGroup.toLowerCase().includes(query);
|
|
7046
7134
|
});
|
|
7047
|
-
(0,
|
|
7135
|
+
(0, import_react51.useEffect)(() => {
|
|
7048
7136
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
7049
7137
|
}, [filteredData.length, setTotalEntries]);
|
|
7050
7138
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -7172,7 +7260,7 @@ function Table3({
|
|
|
7172
7260
|
}
|
|
7173
7261
|
|
|
7174
7262
|
// src/components/notification/Popup.js
|
|
7175
|
-
var
|
|
7263
|
+
var import_react52 = __toESM(require("react"));
|
|
7176
7264
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7177
7265
|
function Popup3({
|
|
7178
7266
|
isOpen,
|
|
@@ -7180,10 +7268,10 @@ function Popup3({
|
|
|
7180
7268
|
onSave
|
|
7181
7269
|
}) {
|
|
7182
7270
|
if (!isOpen) return null;
|
|
7183
|
-
const [fileInstanceId, setFileInstanceId] = (0,
|
|
7184
|
-
const [userId, setUserId] = (0,
|
|
7185
|
-
const [type, setType] = (0,
|
|
7186
|
-
const [message, setMessage] = (0,
|
|
7271
|
+
const [fileInstanceId, setFileInstanceId] = (0, import_react52.useState)("");
|
|
7272
|
+
const [userId, setUserId] = (0, import_react52.useState)("");
|
|
7273
|
+
const [type, setType] = (0, import_react52.useState)("");
|
|
7274
|
+
const [message, setMessage] = (0, import_react52.useState)("");
|
|
7187
7275
|
const handleSubmit = (e) => {
|
|
7188
7276
|
e.preventDefault();
|
|
7189
7277
|
if (!fileInstanceId || !userId || !type || !message) {
|
|
@@ -7254,17 +7342,17 @@ function Popup3({
|
|
|
7254
7342
|
// src/components/notification/NotificationMain.jsx
|
|
7255
7343
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7256
7344
|
function NotificationMain() {
|
|
7257
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
7345
|
+
const [refreshkey, setRefreshKey] = (0, import_react53.useState)(0);
|
|
7258
7346
|
const handleRefresh = () => {
|
|
7259
7347
|
console.log("Table data refreshed!");
|
|
7260
7348
|
setRefreshKey((prev) => prev + 1);
|
|
7261
7349
|
};
|
|
7262
|
-
const tableRef = (0,
|
|
7263
|
-
const [showModal, setShowModal] = (0,
|
|
7264
|
-
const [pageSize, setPageSize] = (0,
|
|
7265
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
7266
|
-
const [currentPage, setCurrentPage] = (0,
|
|
7267
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
7350
|
+
const tableRef = (0, import_react53.useRef)(null);
|
|
7351
|
+
const [showModal, setShowModal] = (0, import_react53.useState)(false);
|
|
7352
|
+
const [pageSize, setPageSize] = (0, import_react53.useState)(10);
|
|
7353
|
+
const [searchQuery, setSearchQuery] = (0, import_react53.useState)("");
|
|
7354
|
+
const [currentPage, setCurrentPage] = (0, import_react53.useState)(1);
|
|
7355
|
+
const [totalEntries, setTotalEntries] = (0, import_react53.useState)(0);
|
|
7268
7356
|
const handlePageSizeChange = (e) => {
|
|
7269
7357
|
setPageSize(Number(e.target.value));
|
|
7270
7358
|
setCurrentPage(1);
|
|
@@ -7303,10 +7391,10 @@ function NotificationMain() {
|
|
|
7303
7391
|
}
|
|
7304
7392
|
|
|
7305
7393
|
// src/components/task-instance/task_instance_main.jsx
|
|
7306
|
-
var
|
|
7394
|
+
var import_react59 = __toESM(require("react"));
|
|
7307
7395
|
|
|
7308
7396
|
// src/components/task-instance/searchbartaskinstance.jsx
|
|
7309
|
-
var
|
|
7397
|
+
var import_react54 = __toESM(require("react"));
|
|
7310
7398
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7311
7399
|
function TaskInstanceSearchBar({
|
|
7312
7400
|
searchQuery,
|
|
@@ -7330,10 +7418,10 @@ function TaskInstanceSearchBar({
|
|
|
7330
7418
|
}
|
|
7331
7419
|
|
|
7332
7420
|
// src/components/task-instance/taskinstancetable.jsx
|
|
7333
|
-
var
|
|
7421
|
+
var import_react57 = __toESM(require("react"));
|
|
7334
7422
|
|
|
7335
7423
|
// src/components/task-instance/edit-instance.jsx
|
|
7336
|
-
var
|
|
7424
|
+
var import_react55 = __toESM(require("react"));
|
|
7337
7425
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7338
7426
|
function EditTaskInstanceModal({
|
|
7339
7427
|
isOpen,
|
|
@@ -7341,7 +7429,7 @@ function EditTaskInstanceModal({
|
|
|
7341
7429
|
selectedTask,
|
|
7342
7430
|
onSave
|
|
7343
7431
|
}) {
|
|
7344
|
-
const [formData, setFormData] = (0,
|
|
7432
|
+
const [formData, setFormData] = (0, import_react55.useState)({
|
|
7345
7433
|
assignedUserId: "",
|
|
7346
7434
|
status: "",
|
|
7347
7435
|
dueDate: "",
|
|
@@ -7349,7 +7437,7 @@ function EditTaskInstanceModal({
|
|
|
7349
7437
|
escalatedOn: "",
|
|
7350
7438
|
slaStatus: ""
|
|
7351
7439
|
});
|
|
7352
|
-
(0,
|
|
7440
|
+
(0, import_react55.useEffect)(() => {
|
|
7353
7441
|
if (selectedTask) {
|
|
7354
7442
|
setFormData({
|
|
7355
7443
|
assignedUserId: selectedTask.assignedUserId || selectedTask.assigned_user_id || "",
|
|
@@ -7547,7 +7635,7 @@ function EditTaskInstanceModal({
|
|
|
7547
7635
|
}
|
|
7548
7636
|
|
|
7549
7637
|
// src/components/task-instance/delete-instance.jsx
|
|
7550
|
-
var
|
|
7638
|
+
var import_react56 = __toESM(require("react"));
|
|
7551
7639
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7552
7640
|
function DeleteInstanceModal({
|
|
7553
7641
|
isOpen,
|
|
@@ -7852,9 +7940,9 @@ function TaskInstanceTable({
|
|
|
7852
7940
|
reminderSentOn: "2026-08-06",
|
|
7853
7941
|
escalatedOn: ""
|
|
7854
7942
|
}];
|
|
7855
|
-
const [data, setData] = (0,
|
|
7856
|
-
const [sortOrder, setSortOrder] = (0,
|
|
7857
|
-
const [sortKey, setSortKey] = (0,
|
|
7943
|
+
const [data, setData] = (0, import_react57.useState)(initialData);
|
|
7944
|
+
const [sortOrder, setSortOrder] = (0, import_react57.useState)("asc");
|
|
7945
|
+
const [sortKey, setSortKey] = (0, import_react57.useState)("taskInstanceId");
|
|
7858
7946
|
const handleSort = (columnKey) => {
|
|
7859
7947
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
7860
7948
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -7870,7 +7958,7 @@ function TaskInstanceTable({
|
|
|
7870
7958
|
const query = (searchQuery || "").toLowerCase();
|
|
7871
7959
|
return String(item.taskInstanceId).includes(query) || String(item.fileInstanceId).includes(query) || String(item.workflowStepId).includes(query) || String(item.assignedUserId).includes(query) || item.status.toLowerCase().includes(query);
|
|
7872
7960
|
});
|
|
7873
|
-
(0,
|
|
7961
|
+
(0, import_react57.useEffect)(() => {
|
|
7874
7962
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
7875
7963
|
}, [filteredData.length, setTotalEntries]);
|
|
7876
7964
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -7879,9 +7967,9 @@ function TaskInstanceTable({
|
|
|
7879
7967
|
const pageNumbers = Array.from({
|
|
7880
7968
|
length: totalPages
|
|
7881
7969
|
}, (_, i) => i + 1);
|
|
7882
|
-
const [showEditPopup, setShowEditPopup] = (0,
|
|
7883
|
-
const [showDeletePopup, setShowDeletePopup] = (0,
|
|
7884
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
7970
|
+
const [showEditPopup, setShowEditPopup] = (0, import_react57.useState)(false);
|
|
7971
|
+
const [showDeletePopup, setShowDeletePopup] = (0, import_react57.useState)(false);
|
|
7972
|
+
const [selectedItem, setSelectedItem] = (0, import_react57.useState)(null);
|
|
7885
7973
|
const openEditPopup = (item) => {
|
|
7886
7974
|
setSelectedItem(item);
|
|
7887
7975
|
setShowEditPopup(true);
|
|
@@ -8002,7 +8090,7 @@ function TaskInstanceTable({
|
|
|
8002
8090
|
}
|
|
8003
8091
|
|
|
8004
8092
|
// src/components/task-instance/addtaskinstance.jsx
|
|
8005
|
-
var
|
|
8093
|
+
var import_react58 = __toESM(require("react"));
|
|
8006
8094
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
8007
8095
|
function AddTaskInstanceModal({
|
|
8008
8096
|
isOpen,
|
|
@@ -8135,17 +8223,17 @@ function AddTaskInstanceModal({
|
|
|
8135
8223
|
// src/components/task-instance/task_instance_main.jsx
|
|
8136
8224
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
8137
8225
|
function Task_instance_main() {
|
|
8138
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
8226
|
+
const [refreshkey, setRefreshKey] = (0, import_react59.useState)(0);
|
|
8139
8227
|
const handleRefresh = () => {
|
|
8140
8228
|
console.log("Table data refreshed!");
|
|
8141
8229
|
setRefreshKey((prev) => prev + 1);
|
|
8142
8230
|
};
|
|
8143
|
-
const [modalOpen, setModalOpen] = (0,
|
|
8144
|
-
const [pageSize, setPageSize] = (0,
|
|
8145
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
8146
|
-
const tableRef = (0,
|
|
8147
|
-
const [currentPage, setCurrentPage] = (0,
|
|
8148
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
8231
|
+
const [modalOpen, setModalOpen] = (0, import_react59.useState)(false);
|
|
8232
|
+
const [pageSize, setPageSize] = (0, import_react59.useState)(10);
|
|
8233
|
+
const [searchQuery, setSearchQuery] = (0, import_react59.useState)("");
|
|
8234
|
+
const tableRef = (0, import_react59.useRef)(null);
|
|
8235
|
+
const [currentPage, setCurrentPage] = (0, import_react59.useState)(1);
|
|
8236
|
+
const [totalEntries, setTotalEntries] = (0, import_react59.useState)(0);
|
|
8149
8237
|
const handlePageSizeChange = (e) => {
|
|
8150
8238
|
setPageSize(Number(e.target.value));
|
|
8151
8239
|
setCurrentPage(1);
|
|
@@ -8212,10 +8300,10 @@ function Task_instance_main() {
|
|
|
8212
8300
|
}
|
|
8213
8301
|
|
|
8214
8302
|
// src/components/comment/comment_main.jsx
|
|
8215
|
-
var
|
|
8303
|
+
var import_react63 = __toESM(require("react"));
|
|
8216
8304
|
|
|
8217
8305
|
// src/components/comment/searchbarcomment.jsx
|
|
8218
|
-
var
|
|
8306
|
+
var import_react60 = __toESM(require("react"));
|
|
8219
8307
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
8220
8308
|
function CommentSearchBar({
|
|
8221
8309
|
searchQuery,
|
|
@@ -8239,7 +8327,7 @@ function CommentSearchBar({
|
|
|
8239
8327
|
}
|
|
8240
8328
|
|
|
8241
8329
|
// src/components/comment/commenttable.jsx
|
|
8242
|
-
var
|
|
8330
|
+
var import_react61 = __toESM(require("react"));
|
|
8243
8331
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
8244
8332
|
function CommentTable({
|
|
8245
8333
|
pageSize,
|
|
@@ -8449,9 +8537,9 @@ function CommentTable({
|
|
|
8449
8537
|
createdOn: "08 Aug 2026",
|
|
8450
8538
|
status: true
|
|
8451
8539
|
}];
|
|
8452
|
-
const [data, setData] = (0,
|
|
8453
|
-
const [sortOrder, setSortOrder] = (0,
|
|
8454
|
-
const [sortKey, setSortKey] = (0,
|
|
8540
|
+
const [data, setData] = (0, import_react61.useState)(initialData);
|
|
8541
|
+
const [sortOrder, setSortOrder] = (0, import_react61.useState)("asc");
|
|
8542
|
+
const [sortKey, setSortKey] = (0, import_react61.useState)("commentId");
|
|
8455
8543
|
const handleSort = (columnKey) => {
|
|
8456
8544
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
8457
8545
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -8467,7 +8555,7 @@ function CommentTable({
|
|
|
8467
8555
|
const query = (searchQuery || "").toLowerCase();
|
|
8468
8556
|
return String(item.commentId).toLowerCase().includes(query) || String(item.taskInstanceId).toLowerCase().includes(query) || item.comment.toLowerCase().includes(query) || String(item.commentedBy).toLowerCase().includes(query);
|
|
8469
8557
|
});
|
|
8470
|
-
(0,
|
|
8558
|
+
(0, import_react61.useEffect)(() => {
|
|
8471
8559
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
8472
8560
|
}, [filteredData.length, setTotalEntries]);
|
|
8473
8561
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -8523,15 +8611,15 @@ function CommentTable({
|
|
|
8523
8611
|
}
|
|
8524
8612
|
|
|
8525
8613
|
// src/components/comment/addcomment.jsx
|
|
8526
|
-
var
|
|
8614
|
+
var import_react62 = __toESM(require("react"));
|
|
8527
8615
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
8528
8616
|
function AddCommentModal({
|
|
8529
8617
|
isOpen,
|
|
8530
8618
|
onClose
|
|
8531
8619
|
}) {
|
|
8532
|
-
const [allowEdit, setAllowEdit] = (0,
|
|
8533
|
-
const [pinComment, setPinComment] = (0,
|
|
8534
|
-
const [sendNotification, setSendNotification] = (0,
|
|
8620
|
+
const [allowEdit, setAllowEdit] = (0, import_react62.useState)(true);
|
|
8621
|
+
const [pinComment, setPinComment] = (0, import_react62.useState)(true);
|
|
8622
|
+
const [sendNotification, setSendNotification] = (0, import_react62.useState)(false);
|
|
8535
8623
|
if (!isOpen) return null;
|
|
8536
8624
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
8537
8625
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "fc:fixed fc:inset-0 fc:bg-slate-900/50 fc:backdrop-blur-sm fc:transition-opacity fc:duration-200", onClick: onClose }),
|
|
@@ -8728,12 +8816,12 @@ function AddCommentModal({
|
|
|
8728
8816
|
// src/components/comment/comment_main.jsx
|
|
8729
8817
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8730
8818
|
function Comment_main() {
|
|
8731
|
-
const [modalOpen, setModalOpen] = (0,
|
|
8732
|
-
const [pageSize, setPageSize] = (0,
|
|
8733
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
8734
|
-
const [currentPage, setCurrentPage] = (0,
|
|
8735
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
8736
|
-
const tableRef = (0,
|
|
8819
|
+
const [modalOpen, setModalOpen] = (0, import_react63.useState)(false);
|
|
8820
|
+
const [pageSize, setPageSize] = (0, import_react63.useState)(10);
|
|
8821
|
+
const [searchQuery, setSearchQuery] = (0, import_react63.useState)("");
|
|
8822
|
+
const [currentPage, setCurrentPage] = (0, import_react63.useState)(1);
|
|
8823
|
+
const [totalEntries, setTotalEntries] = (0, import_react63.useState)(0);
|
|
8824
|
+
const tableRef = (0, import_react63.useRef)(null);
|
|
8737
8825
|
const handlePageSizeChange = (e) => {
|
|
8738
8826
|
setPageSize(Number(e.target.value));
|
|
8739
8827
|
setCurrentPage(1);
|
|
@@ -8802,10 +8890,11 @@ function Comment_main() {
|
|
|
8802
8890
|
}
|
|
8803
8891
|
|
|
8804
8892
|
// src/components/hierarchy-node/HierarchyNodeMain.jsx
|
|
8805
|
-
var
|
|
8893
|
+
var import_react69 = __toESM(require("react"));
|
|
8894
|
+
var import_sweetalert24 = __toESM(require("sweetalert2"));
|
|
8806
8895
|
|
|
8807
8896
|
// src/components/hierarchy-node/SearchBar.jsx
|
|
8808
|
-
var
|
|
8897
|
+
var import_react64 = __toESM(require("react"));
|
|
8809
8898
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8810
8899
|
function SearchBar9({ searchQuery, setSearchQuery }) {
|
|
8811
8900
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "fc:relative fc:max-w-sm fc:w-full", children: [
|
|
@@ -8841,10 +8930,10 @@ function SearchBar9({ searchQuery, setSearchQuery }) {
|
|
|
8841
8930
|
}
|
|
8842
8931
|
|
|
8843
8932
|
// src/components/hierarchy-node/HierarchyTable.jsx
|
|
8844
|
-
var
|
|
8933
|
+
var import_react67 = __toESM(require("react"));
|
|
8845
8934
|
|
|
8846
8935
|
// src/components/hierarchy-node/AddEditModal.jsx
|
|
8847
|
-
var
|
|
8936
|
+
var import_react65 = __toESM(require("react"));
|
|
8848
8937
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8849
8938
|
function AddEditModal2({
|
|
8850
8939
|
isOpen,
|
|
@@ -8852,7 +8941,7 @@ function AddEditModal2({
|
|
|
8852
8941
|
onSave,
|
|
8853
8942
|
editData
|
|
8854
8943
|
}) {
|
|
8855
|
-
const [formData, setFormData] = (0,
|
|
8944
|
+
const [formData, setFormData] = (0, import_react65.useState)({
|
|
8856
8945
|
hierarchyNodeId: "",
|
|
8857
8946
|
parentHierarchyNodeId: "",
|
|
8858
8947
|
hierarchyLevel: "",
|
|
@@ -8862,7 +8951,7 @@ function AddEditModal2({
|
|
|
8862
8951
|
externalEntityId: "",
|
|
8863
8952
|
isActive: true
|
|
8864
8953
|
});
|
|
8865
|
-
(0,
|
|
8954
|
+
(0, import_react65.useEffect)(() => {
|
|
8866
8955
|
if (editData) {
|
|
8867
8956
|
setFormData(editData);
|
|
8868
8957
|
}
|
|
@@ -9005,7 +9094,7 @@ function AddEditModal2({
|
|
|
9005
9094
|
}
|
|
9006
9095
|
|
|
9007
9096
|
// src/components/hierarchy-node/DeleteModal.jsx
|
|
9008
|
-
var
|
|
9097
|
+
var import_react66 = __toESM(require("react"));
|
|
9009
9098
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
9010
9099
|
function DeleteModal2({
|
|
9011
9100
|
isOpen,
|
|
@@ -9066,6 +9155,7 @@ function DeleteModal2({
|
|
|
9066
9155
|
// src/components/hierarchy-node/HierarchyTable.jsx
|
|
9067
9156
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
9068
9157
|
function HierarchyTable({
|
|
9158
|
+
apiData,
|
|
9069
9159
|
pageSize,
|
|
9070
9160
|
searchQuery
|
|
9071
9161
|
}) {
|
|
@@ -9160,24 +9250,27 @@ function HierarchyTable({
|
|
|
9160
9250
|
externalEntityId: 1010,
|
|
9161
9251
|
isActive: true
|
|
9162
9252
|
}];
|
|
9163
|
-
const [currentPage, setCurrentPage] = (0,
|
|
9253
|
+
const [currentPage, setCurrentPage] = (0, import_react67.useState)(1);
|
|
9164
9254
|
;
|
|
9165
|
-
const [data, setData] = (0,
|
|
9255
|
+
const [data, setData] = (0, import_react67.useState)(apiData || hierarchyData);
|
|
9256
|
+
(0, import_react67.useEffect)(() => {
|
|
9257
|
+
if (apiData) setData(apiData);
|
|
9258
|
+
}, [apiData]);
|
|
9166
9259
|
const filteredData = data.filter(
|
|
9167
9260
|
(item) => (item.nodeName || "").toLowerCase().includes((searchQuery || "").toLowerCase()) || (item.nodeType || "").toLowerCase().includes((searchQuery || "").toLowerCase()) || String(item.hierarchyNodeId).includes(searchQuery || "")
|
|
9168
9261
|
);
|
|
9169
|
-
const [sortColumn, setSortColumn] = (0,
|
|
9170
|
-
const [sortDirection, setSortDirection] = (0,
|
|
9262
|
+
const [sortColumn, setSortColumn] = (0, import_react67.useState)("");
|
|
9263
|
+
const [sortDirection, setSortDirection] = (0, import_react67.useState)("asc");
|
|
9171
9264
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
9172
9265
|
const startIndex = (currentPage - 1) * pageSize;
|
|
9173
9266
|
const visibleData = filteredData.slice(
|
|
9174
9267
|
startIndex,
|
|
9175
9268
|
startIndex + pageSize
|
|
9176
9269
|
);
|
|
9177
|
-
const [editOpen, setEditOpen] = (0,
|
|
9178
|
-
const [deleteOpen, setDeleteOpen] = (0,
|
|
9179
|
-
const [selectedNode, setSelectedNode] = (0,
|
|
9180
|
-
(0,
|
|
9270
|
+
const [editOpen, setEditOpen] = (0, import_react67.useState)(false);
|
|
9271
|
+
const [deleteOpen, setDeleteOpen] = (0, import_react67.useState)(false);
|
|
9272
|
+
const [selectedNode, setSelectedNode] = (0, import_react67.useState)(null);
|
|
9273
|
+
(0, import_react67.useEffect)(() => {
|
|
9181
9274
|
setCurrentPage(1);
|
|
9182
9275
|
}, [searchQuery, pageSize]);
|
|
9183
9276
|
const handleSort = (column) => {
|
|
@@ -9350,7 +9443,7 @@ function HierarchyTable({
|
|
|
9350
9443
|
}
|
|
9351
9444
|
|
|
9352
9445
|
// src/components/hierarchy-node/AddHierarchyNodeModal.jsx
|
|
9353
|
-
var
|
|
9446
|
+
var import_react68 = __toESM(require("react"));
|
|
9354
9447
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
9355
9448
|
function AddHierarchyNodeModal({
|
|
9356
9449
|
isOpen,
|
|
@@ -9456,10 +9549,25 @@ function AddHierarchyNodeModal({
|
|
|
9456
9549
|
// src/components/hierarchy-node/HierarchyNodeMain.jsx
|
|
9457
9550
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
9458
9551
|
function HierarchyNodeMain() {
|
|
9459
|
-
const [modalOpen, setModalOpen] = (0,
|
|
9460
|
-
const [pageSize, setPageSize] = (0,
|
|
9461
|
-
const tableRef = (0,
|
|
9462
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
9552
|
+
const [modalOpen, setModalOpen] = (0, import_react69.useState)(false);
|
|
9553
|
+
const [pageSize, setPageSize] = (0, import_react69.useState)(5);
|
|
9554
|
+
const tableRef = (0, import_react69.useRef)(null);
|
|
9555
|
+
const [searchQuery, setSearchQuery] = (0, import_react69.useState)("");
|
|
9556
|
+
const [apiData, setApiData] = (0, import_react69.useState)([]);
|
|
9557
|
+
(0, import_react69.useEffect)(() => {
|
|
9558
|
+
(async () => {
|
|
9559
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9560
|
+
try {
|
|
9561
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.hierarchyNode) == null ? void 0 : _c.getList;
|
|
9562
|
+
if (!endpoint) throw Error("Hierarchy node list endpoint is not configured.");
|
|
9563
|
+
const result = await getApiService().get(endpoint);
|
|
9564
|
+
const value = ((_d = result == null ? void 0 : result.data) == null ? void 0 : _d.data) || ((_e = result == null ? void 0 : result.data) == null ? void 0 : _e.result) || (result == null ? void 0 : result.data) || result;
|
|
9565
|
+
setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
|
|
9566
|
+
} catch (error) {
|
|
9567
|
+
await import_sweetalert24.default.fire("Error", ((_g = (_f = error == null ? void 0 : error.response) == null ? void 0 : _f.data) == null ? void 0 : _g.message) || (error == null ? void 0 : error.message) || "Unable to load hierarchy nodes.", "error");
|
|
9568
|
+
}
|
|
9569
|
+
})();
|
|
9570
|
+
}, [modalOpen]);
|
|
9463
9571
|
const handleRefresh = () => {
|
|
9464
9572
|
console.log("Refresh clicked");
|
|
9465
9573
|
};
|
|
@@ -9510,6 +9618,7 @@ function HierarchyNodeMain() {
|
|
|
9510
9618
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ref: tableRef, className: "fc:flex-1 fc:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9511
9619
|
HierarchyTable,
|
|
9512
9620
|
{
|
|
9621
|
+
apiData,
|
|
9513
9622
|
pageSize,
|
|
9514
9623
|
searchQuery
|
|
9515
9624
|
}
|
|
@@ -9521,10 +9630,10 @@ function HierarchyNodeMain() {
|
|
|
9521
9630
|
}
|
|
9522
9631
|
|
|
9523
9632
|
// src/components/file-pool/FilePoolMain.jsx
|
|
9524
|
-
var
|
|
9633
|
+
var import_react73 = __toESM(require("react"));
|
|
9525
9634
|
|
|
9526
9635
|
// src/components/file-pool/SearchBar.jsx
|
|
9527
|
-
var
|
|
9636
|
+
var import_react70 = __toESM(require("react"));
|
|
9528
9637
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
9529
9638
|
function SearchBar10() {
|
|
9530
9639
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "fc:relative fc:w-full fc:max-w-sm", children: [
|
|
@@ -9534,7 +9643,7 @@ function SearchBar10() {
|
|
|
9534
9643
|
}
|
|
9535
9644
|
|
|
9536
9645
|
// src/components/file-pool/FilePoolTable.jsx
|
|
9537
|
-
var
|
|
9646
|
+
var import_react71 = __toESM(require("react"));
|
|
9538
9647
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
9539
9648
|
function FilePoolTable({
|
|
9540
9649
|
pageSize
|
|
@@ -9610,10 +9719,10 @@ function FilePoolTable({
|
|
|
9610
9719
|
addedOn: "10-07-2026",
|
|
9611
9720
|
pulledOn: "-"
|
|
9612
9721
|
}];
|
|
9613
|
-
const [currentPage, setCurrentPage] = (0,
|
|
9614
|
-
const [data, setData] = (0,
|
|
9615
|
-
const [sortColumn, setSortColumn] = (0,
|
|
9616
|
-
const [sortDirection, setSortDirection] = (0,
|
|
9722
|
+
const [currentPage, setCurrentPage] = (0, import_react71.useState)(1);
|
|
9723
|
+
const [data, setData] = (0, import_react71.useState)(filePoolData);
|
|
9724
|
+
const [sortColumn, setSortColumn] = (0, import_react71.useState)("");
|
|
9725
|
+
const [sortDirection, setSortDirection] = (0, import_react71.useState)("asc");
|
|
9617
9726
|
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
9618
9727
|
const startIndex = (currentPage - 1) * pageSize;
|
|
9619
9728
|
const currentData = data.slice(startIndex, startIndex + pageSize);
|
|
@@ -9696,7 +9805,7 @@ function FilePoolTable({
|
|
|
9696
9805
|
}
|
|
9697
9806
|
|
|
9698
9807
|
// src/components/file-pool/AddFilePoolModal.jsx
|
|
9699
|
-
var
|
|
9808
|
+
var import_react72 = __toESM(require("react"));
|
|
9700
9809
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
9701
9810
|
function AddFilePoolModal({
|
|
9702
9811
|
isOpen,
|
|
@@ -9769,9 +9878,9 @@ function AddFilePoolModal({
|
|
|
9769
9878
|
// src/components/file-pool/FilePoolMain.jsx
|
|
9770
9879
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
9771
9880
|
function FilePoolMain() {
|
|
9772
|
-
const [modalOpen, setModalOpen] = (0,
|
|
9773
|
-
const [pageSize, setPageSize] = (0,
|
|
9774
|
-
const tableRef = (0,
|
|
9881
|
+
const [modalOpen, setModalOpen] = (0, import_react73.useState)(false);
|
|
9882
|
+
const [pageSize, setPageSize] = (0, import_react73.useState)(5);
|
|
9883
|
+
const tableRef = (0, import_react73.useRef)(null);
|
|
9775
9884
|
const handleRefresh = () => {
|
|
9776
9885
|
console.log("Refresh clicked");
|
|
9777
9886
|
};
|
|
@@ -9821,10 +9930,10 @@ function FilePoolMain() {
|
|
|
9821
9930
|
}
|
|
9822
9931
|
|
|
9823
9932
|
// src/components/uploaded-document/UploadedDocumentMain.jsx
|
|
9824
|
-
var
|
|
9933
|
+
var import_react77 = __toESM(require("react"));
|
|
9825
9934
|
|
|
9826
9935
|
// src/components/uploaded-document/SearchBar.jsx
|
|
9827
|
-
var
|
|
9936
|
+
var import_react74 = __toESM(require("react"));
|
|
9828
9937
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
9829
9938
|
function SearchBar11() {
|
|
9830
9939
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "fc:relative fc:w-full fc:max-w-sm", children: [
|
|
@@ -9834,7 +9943,7 @@ function SearchBar11() {
|
|
|
9834
9943
|
}
|
|
9835
9944
|
|
|
9836
9945
|
// src/components/uploaded-document/UploadedDocumentTable.jsx
|
|
9837
|
-
var
|
|
9946
|
+
var import_react75 = __toESM(require("react"));
|
|
9838
9947
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
9839
9948
|
function UploadedDocumentTable({
|
|
9840
9949
|
pageSize
|
|
@@ -9910,10 +10019,10 @@ function UploadedDocumentTable({
|
|
|
9910
10019
|
storagePath: "/uploads/certificate.pdf",
|
|
9911
10020
|
uploadedBy: "Admin"
|
|
9912
10021
|
}];
|
|
9913
|
-
const [data, setData] = (0,
|
|
9914
|
-
const [currentPage, setCurrentPage] = (0,
|
|
9915
|
-
const [sortColumn, setSortColumn] = (0,
|
|
9916
|
-
const [sortDirection, setSortDirection] = (0,
|
|
10022
|
+
const [data, setData] = (0, import_react75.useState)(uploadedDocuments);
|
|
10023
|
+
const [currentPage, setCurrentPage] = (0, import_react75.useState)(1);
|
|
10024
|
+
const [sortColumn, setSortColumn] = (0, import_react75.useState)("");
|
|
10025
|
+
const [sortDirection, setSortDirection] = (0, import_react75.useState)("asc");
|
|
9917
10026
|
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
9918
10027
|
const startIndex = (currentPage - 1) * pageSize;
|
|
9919
10028
|
const currentData = data.slice(startIndex, startIndex + pageSize);
|
|
@@ -9997,7 +10106,7 @@ function UploadedDocumentTable({
|
|
|
9997
10106
|
}
|
|
9998
10107
|
|
|
9999
10108
|
// src/components/uploaded-document/AddUploadedDocumentModal.jsx
|
|
10000
|
-
var
|
|
10109
|
+
var import_react76 = __toESM(require("react"));
|
|
10001
10110
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
10002
10111
|
function AddUploadedDocumentModal({
|
|
10003
10112
|
isOpen,
|
|
@@ -10113,9 +10222,9 @@ function AddUploadedDocumentModal({
|
|
|
10113
10222
|
// src/components/uploaded-document/UploadedDocumentMain.jsx
|
|
10114
10223
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
10115
10224
|
function UploadedDocumentMain() {
|
|
10116
|
-
const [modalOpen, setModalOpen] = (0,
|
|
10117
|
-
const [pageSize, setPageSize] = (0,
|
|
10118
|
-
const tableRef = (0,
|
|
10225
|
+
const [modalOpen, setModalOpen] = (0, import_react77.useState)(false);
|
|
10226
|
+
const [pageSize, setPageSize] = (0, import_react77.useState)(5);
|
|
10227
|
+
const tableRef = (0, import_react77.useRef)(null);
|
|
10119
10228
|
const handleRefresh = () => {
|
|
10120
10229
|
console.log("Refresh clicked");
|
|
10121
10230
|
};
|
|
@@ -10165,14 +10274,14 @@ function UploadedDocumentMain() {
|
|
|
10165
10274
|
}
|
|
10166
10275
|
|
|
10167
10276
|
// src/components/BuisnessEntity/BusinessEntitymain.js
|
|
10168
|
-
var
|
|
10277
|
+
var import_react79 = __toESM(require("react"));
|
|
10169
10278
|
var import_link4 = __toESM(require("next/link"));
|
|
10170
10279
|
|
|
10171
10280
|
// src/components/BuisnessEntity/AddBusinessEntityModal.js
|
|
10172
|
-
var
|
|
10281
|
+
var import_react78 = __toESM(require("react"));
|
|
10173
10282
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
10174
10283
|
function AddBusinessEntityModal({ onClose }) {
|
|
10175
|
-
const [formData, setFormData] = (0,
|
|
10284
|
+
const [formData, setFormData] = (0, import_react78.useState)({
|
|
10176
10285
|
entityType: "",
|
|
10177
10286
|
entityKey: "",
|
|
10178
10287
|
displayNumber: "",
|
|
@@ -10181,7 +10290,7 @@ function AddBusinessEntityModal({ onClose }) {
|
|
|
10181
10290
|
isVisible: true,
|
|
10182
10291
|
status: "Active"
|
|
10183
10292
|
});
|
|
10184
|
-
const [errors, setErrors] = (0,
|
|
10293
|
+
const [errors, setErrors] = (0, import_react78.useState)({});
|
|
10185
10294
|
const handleChange = (field, value) => {
|
|
10186
10295
|
setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
10187
10296
|
[field]: value
|
|
@@ -10556,10 +10665,10 @@ function BusinessEntity() {
|
|
|
10556
10665
|
const handleDownload = () => {
|
|
10557
10666
|
console.log("Download clicked");
|
|
10558
10667
|
};
|
|
10559
|
-
const tableRef = (0,
|
|
10560
|
-
const [showModal, setShowModal] = (0,
|
|
10561
|
-
const [pageSize, setPageSize] = (0,
|
|
10562
|
-
const [sortConfig, setSortConfig] = (0,
|
|
10668
|
+
const tableRef = (0, import_react79.useRef)(null);
|
|
10669
|
+
const [showModal, setShowModal] = (0, import_react79.useState)(false);
|
|
10670
|
+
const [pageSize, setPageSize] = (0, import_react79.useState)(5);
|
|
10671
|
+
const [sortConfig, setSortConfig] = (0, import_react79.useState)({
|
|
10563
10672
|
key: "",
|
|
10564
10673
|
direction: "asc"
|
|
10565
10674
|
});
|
|
@@ -10637,14 +10746,14 @@ function BusinessEntity() {
|
|
|
10637
10746
|
}
|
|
10638
10747
|
|
|
10639
10748
|
// src/components/FileInstance/FileInstancemain.js
|
|
10640
|
-
var
|
|
10749
|
+
var import_react81 = __toESM(require("react"));
|
|
10641
10750
|
var import_link5 = __toESM(require("next/link"));
|
|
10642
10751
|
|
|
10643
10752
|
// src/components/FileInstance/AddWorkFlowFileInstanceModal.js
|
|
10644
|
-
var
|
|
10753
|
+
var import_react80 = __toESM(require("react"));
|
|
10645
10754
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
10646
10755
|
function AddFileInstanceModal({ onClose }) {
|
|
10647
|
-
const [formData, setFormData] = (0,
|
|
10756
|
+
const [formData, setFormData] = (0, import_react80.useState)({
|
|
10648
10757
|
workflow: "",
|
|
10649
10758
|
businessEntityType: "",
|
|
10650
10759
|
businessEntity: "",
|
|
@@ -10654,7 +10763,7 @@ function AddFileInstanceModal({ onClose }) {
|
|
|
10654
10763
|
status: "Pending",
|
|
10655
10764
|
priority: "High"
|
|
10656
10765
|
});
|
|
10657
|
-
const [errors, setErrors] = (0,
|
|
10766
|
+
const [errors, setErrors] = (0, import_react80.useState)({});
|
|
10658
10767
|
const validateForm = () => {
|
|
10659
10768
|
const newErrors = {};
|
|
10660
10769
|
if (!formData.workflow) newErrors.workflow = "Workflow is required.";
|
|
@@ -11065,10 +11174,10 @@ function FileInstance() {
|
|
|
11065
11174
|
const handleDownload = () => {
|
|
11066
11175
|
console.log("Download clicked");
|
|
11067
11176
|
};
|
|
11068
|
-
const tableRef = (0,
|
|
11069
|
-
const [showModal, setShowModal] = (0,
|
|
11070
|
-
const [pageSize, setPageSize] = (0,
|
|
11071
|
-
const [sortConfig, setSortConfig] = (0,
|
|
11177
|
+
const tableRef = (0, import_react81.useRef)(null);
|
|
11178
|
+
const [showModal, setShowModal] = (0, import_react81.useState)(false);
|
|
11179
|
+
const [pageSize, setPageSize] = (0, import_react81.useState)(5);
|
|
11180
|
+
const [sortConfig, setSortConfig] = (0, import_react81.useState)({
|
|
11072
11181
|
key: "",
|
|
11073
11182
|
direction: "asc"
|
|
11074
11183
|
});
|
|
@@ -11176,10 +11285,10 @@ function FileInstance() {
|
|
|
11176
11285
|
}
|
|
11177
11286
|
|
|
11178
11287
|
// src/components/assignment-rule/AssignmentRuleMain.jsx
|
|
11179
|
-
var
|
|
11288
|
+
var import_react85 = __toESM(require("react"));
|
|
11180
11289
|
|
|
11181
11290
|
// src/components/assignment-rule/SearchBar.js
|
|
11182
|
-
var
|
|
11291
|
+
var import_react82 = __toESM(require("react"));
|
|
11183
11292
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
11184
11293
|
function SearchBar12({
|
|
11185
11294
|
searchQuery,
|
|
@@ -11199,7 +11308,7 @@ function SearchBar12({
|
|
|
11199
11308
|
}
|
|
11200
11309
|
|
|
11201
11310
|
// src/components/assignment-rule/Table.js
|
|
11202
|
-
var
|
|
11311
|
+
var import_react83 = __toESM(require("react"));
|
|
11203
11312
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
11204
11313
|
function Table4({
|
|
11205
11314
|
pageSize,
|
|
@@ -11307,12 +11416,12 @@ function Table4({
|
|
|
11307
11416
|
dynamicFunctionId: "4",
|
|
11308
11417
|
isPoolEnabled: true
|
|
11309
11418
|
}];
|
|
11310
|
-
const [data, setData] = (0,
|
|
11311
|
-
const [sortOrder, setSortOrder] = (0,
|
|
11312
|
-
const [sortKey, setSortKey] = (0,
|
|
11313
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
11314
|
-
const [isEditModalOpen, setIsEditModalOpen] = (0,
|
|
11315
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0,
|
|
11419
|
+
const [data, setData] = (0, import_react83.useState)(initialData);
|
|
11420
|
+
const [sortOrder, setSortOrder] = (0, import_react83.useState)("asc");
|
|
11421
|
+
const [sortKey, setSortKey] = (0, import_react83.useState)("workflowStepId");
|
|
11422
|
+
const [selectedItem, setSelectedItem] = (0, import_react83.useState)(null);
|
|
11423
|
+
const [isEditModalOpen, setIsEditModalOpen] = (0, import_react83.useState)(false);
|
|
11424
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = (0, import_react83.useState)(false);
|
|
11316
11425
|
const handleEdit = (item) => {
|
|
11317
11426
|
setSelectedItem(item);
|
|
11318
11427
|
setIsEditModalOpen(true);
|
|
@@ -11365,7 +11474,7 @@ function Table4({
|
|
|
11365
11474
|
const query = searchQuery.toLowerCase().trim();
|
|
11366
11475
|
return item.workflowStepId && item.workflowStepId.toString().toLowerCase().includes(query) || item.assignmentType && item.assignmentType.toLowerCase().includes(query) || item.hierarchyNodeType && item.hierarchyNodeType.toLowerCase().includes(query) || item.dynamicFunctionId && item.dynamicFunctionId.toString().toLowerCase().includes(query);
|
|
11367
11476
|
});
|
|
11368
|
-
(0,
|
|
11477
|
+
(0, import_react83.useEffect)(() => {
|
|
11369
11478
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
11370
11479
|
}, [filteredData.length, setTotalEntries]);
|
|
11371
11480
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -11491,7 +11600,7 @@ function Table4({
|
|
|
11491
11600
|
}
|
|
11492
11601
|
|
|
11493
11602
|
// src/components/assignment-rule/Popup.js
|
|
11494
|
-
var
|
|
11603
|
+
var import_react84 = __toESM(require("react"));
|
|
11495
11604
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
11496
11605
|
function Popup4({
|
|
11497
11606
|
isOpen,
|
|
@@ -11499,11 +11608,11 @@ function Popup4({
|
|
|
11499
11608
|
onSave
|
|
11500
11609
|
}) {
|
|
11501
11610
|
if (!isOpen) return null;
|
|
11502
|
-
const [workflowStepId, setWorkflowStepId] = (0,
|
|
11503
|
-
const [assignmentType, setAssignmentType] = (0,
|
|
11504
|
-
const [hierarchyNodeType, setHierarchyNodeType] = (0,
|
|
11505
|
-
const [dynamicFunctionId, setDynamicFunctionId] = (0,
|
|
11506
|
-
const [isPoolEnabled, setIsPoolEnabled] = (0,
|
|
11611
|
+
const [workflowStepId, setWorkflowStepId] = (0, import_react84.useState)("");
|
|
11612
|
+
const [assignmentType, setAssignmentType] = (0, import_react84.useState)("");
|
|
11613
|
+
const [hierarchyNodeType, setHierarchyNodeType] = (0, import_react84.useState)("");
|
|
11614
|
+
const [dynamicFunctionId, setDynamicFunctionId] = (0, import_react84.useState)("");
|
|
11615
|
+
const [isPoolEnabled, setIsPoolEnabled] = (0, import_react84.useState)(false);
|
|
11507
11616
|
const handleSubmit = (e) => {
|
|
11508
11617
|
e.preventDefault();
|
|
11509
11618
|
if (!workflowStepId || !assignmentType || !hierarchyNodeType) {
|
|
@@ -11580,17 +11689,17 @@ function Popup4({
|
|
|
11580
11689
|
// src/components/assignment-rule/AssignmentRuleMain.jsx
|
|
11581
11690
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
11582
11691
|
function AssignmentRuleMain() {
|
|
11583
|
-
const [refreshkey, setRefreshKey] = (0,
|
|
11692
|
+
const [refreshkey, setRefreshKey] = (0, import_react85.useState)(0);
|
|
11584
11693
|
const handleRefresh = () => {
|
|
11585
11694
|
console.log("Table data refreshed!");
|
|
11586
11695
|
setRefreshKey((prev) => prev + 1);
|
|
11587
11696
|
};
|
|
11588
|
-
const tableRef = (0,
|
|
11589
|
-
const [showModal, setShowModal] = (0,
|
|
11590
|
-
const [pageSize, setPageSize] = (0,
|
|
11591
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
11592
|
-
const [currentPage, setCurrentPage] = (0,
|
|
11593
|
-
const [totalEntries, setTotalEntries] = (0,
|
|
11697
|
+
const tableRef = (0, import_react85.useRef)(null);
|
|
11698
|
+
const [showModal, setShowModal] = (0, import_react85.useState)(false);
|
|
11699
|
+
const [pageSize, setPageSize] = (0, import_react85.useState)(10);
|
|
11700
|
+
const [searchQuery, setSearchQuery] = (0, import_react85.useState)("");
|
|
11701
|
+
const [currentPage, setCurrentPage] = (0, import_react85.useState)(1);
|
|
11702
|
+
const [totalEntries, setTotalEntries] = (0, import_react85.useState)(0);
|
|
11594
11703
|
const handlePageSizeChange = (e) => {
|
|
11595
11704
|
setPageSize(Number(e.target.value));
|
|
11596
11705
|
setCurrentPage(1);
|
|
@@ -11641,90 +11750,90 @@ var workflowItems = [
|
|
|
11641
11750
|
{
|
|
11642
11751
|
name: "Workflow Type",
|
|
11643
11752
|
component: "workflowType",
|
|
11644
|
-
icon:
|
|
11753
|
+
icon: import_react87.RiGitMergeLine
|
|
11645
11754
|
},
|
|
11646
11755
|
{
|
|
11647
11756
|
name: "Workflow",
|
|
11648
11757
|
component: "workflow",
|
|
11649
|
-
icon:
|
|
11758
|
+
icon: import_react87.RiNodeTree
|
|
11650
11759
|
},
|
|
11651
11760
|
{
|
|
11652
11761
|
name: "Workflow Step",
|
|
11653
11762
|
component: "workflowStep",
|
|
11654
|
-
icon:
|
|
11763
|
+
icon: import_react87.RiGitBranchLine
|
|
11655
11764
|
},
|
|
11656
11765
|
{
|
|
11657
11766
|
name: "Workflow Transition",
|
|
11658
11767
|
component: "workflowTransition",
|
|
11659
|
-
icon:
|
|
11768
|
+
icon: import_react87.RiCornerDownRightLine
|
|
11660
11769
|
}
|
|
11661
11770
|
];
|
|
11662
11771
|
var permissionItems = [{
|
|
11663
11772
|
name: "Task Permission",
|
|
11664
11773
|
component: "Task_permission_main",
|
|
11665
|
-
icon:
|
|
11774
|
+
icon: import_react87.RiUserSettingsLine
|
|
11666
11775
|
}, {
|
|
11667
11776
|
name: "Assignment Rule",
|
|
11668
11777
|
component: "AssignmentRuleMain",
|
|
11669
|
-
icon:
|
|
11778
|
+
icon: import_react87.RiFileShieldLine
|
|
11670
11779
|
}];
|
|
11671
11780
|
var hierarchyItems = [{
|
|
11672
11781
|
name: "Hierarchy Node",
|
|
11673
11782
|
component: "HierarchyNodeMain",
|
|
11674
|
-
icon:
|
|
11783
|
+
icon: import_react87.RiNodeTree
|
|
11675
11784
|
}, {
|
|
11676
11785
|
name: "User Hierarchy Mapping",
|
|
11677
11786
|
component: "User_hierarchy_mapping_main",
|
|
11678
|
-
icon:
|
|
11787
|
+
icon: import_react87.RiUserSharedLine
|
|
11679
11788
|
}, {
|
|
11680
11789
|
name: "Workflow Settings",
|
|
11681
11790
|
component: "WorkflowSettingMain",
|
|
11682
|
-
icon:
|
|
11791
|
+
icon: import_react87.RiSettings4Line
|
|
11683
11792
|
}];
|
|
11684
11793
|
var documentItems = [{
|
|
11685
11794
|
name: "Document Configuration",
|
|
11686
11795
|
component: "DocumentConfigurationmain",
|
|
11687
|
-
icon:
|
|
11796
|
+
icon: import_react87.RiFileSettingsLine
|
|
11688
11797
|
}];
|
|
11689
11798
|
var fileItems = [{
|
|
11690
11799
|
name: "File Instance",
|
|
11691
11800
|
component: "FileInstanceMain",
|
|
11692
|
-
icon:
|
|
11801
|
+
icon: import_react87.RiFileList3Line
|
|
11693
11802
|
}, {
|
|
11694
11803
|
name: "Business Entity",
|
|
11695
11804
|
component: "BusinessEntitymain",
|
|
11696
|
-
icon:
|
|
11805
|
+
icon: import_react87.RiFileList3Line
|
|
11697
11806
|
}, {
|
|
11698
11807
|
name: "File Pool",
|
|
11699
11808
|
component: "FilePoolMain",
|
|
11700
|
-
icon:
|
|
11809
|
+
icon: import_react87.RiDatabase2Line
|
|
11701
11810
|
}, {
|
|
11702
11811
|
name: "Uploaded Document",
|
|
11703
11812
|
component: "UploadedDocumentMain",
|
|
11704
|
-
icon:
|
|
11813
|
+
icon: import_react87.RiFileUploadLine
|
|
11705
11814
|
}];
|
|
11706
11815
|
var communicationItems = [{
|
|
11707
11816
|
name: "Notification",
|
|
11708
11817
|
component: "Notification_main",
|
|
11709
|
-
icon:
|
|
11818
|
+
icon: import_react87.RiNotification4Line
|
|
11710
11819
|
}, {
|
|
11711
11820
|
name: "Comment",
|
|
11712
11821
|
component: "Comment_main",
|
|
11713
|
-
icon:
|
|
11822
|
+
icon: import_react87.RiChat3Line
|
|
11714
11823
|
}];
|
|
11715
11824
|
var taskItems = [{
|
|
11716
11825
|
name: "Task Instance",
|
|
11717
11826
|
component: "TaskInstanceMain",
|
|
11718
|
-
icon:
|
|
11827
|
+
icon: import_react87.RiCheckboxMultipleLine
|
|
11719
11828
|
}];
|
|
11720
11829
|
var trackingItems = [{
|
|
11721
11830
|
name: "Audit Log",
|
|
11722
11831
|
component: "AuditLogmain",
|
|
11723
|
-
icon:
|
|
11832
|
+
icon: import_react87.RiShieldCheckLine
|
|
11724
11833
|
}, {
|
|
11725
11834
|
name: "Movement History",
|
|
11726
11835
|
component: "MovementHistorymain",
|
|
11727
|
-
icon:
|
|
11836
|
+
icon: import_react87.RiHistoryLine
|
|
11728
11837
|
}];
|
|
11729
11838
|
function Sidebar({
|
|
11730
11839
|
isOpen,
|
|
@@ -11732,15 +11841,15 @@ function Sidebar({
|
|
|
11732
11841
|
childrens
|
|
11733
11842
|
}) {
|
|
11734
11843
|
const router = (0, import_router.useRouter)();
|
|
11735
|
-
const [workflowOpen, setWorkflowOpen] = (0,
|
|
11736
|
-
const [permissionOpen, setPermissionOpen] = (0,
|
|
11737
|
-
const [hierarchyOpen, setHierarchyOpen] = (0,
|
|
11738
|
-
const [documentOpen, setDocumentOpen] = (0,
|
|
11739
|
-
const [filesOpen, setFilesOpen] = (0,
|
|
11740
|
-
const [tasksOpen, setTasksOpen] = (0,
|
|
11741
|
-
const [trackingOpen, setTrackingOpen] = (0,
|
|
11742
|
-
const [communicationOpen, setCommunicationOpen] = (0,
|
|
11743
|
-
const [activeComponent, setActiveComponent] = (0,
|
|
11844
|
+
const [workflowOpen, setWorkflowOpen] = (0, import_react86.useState)(false);
|
|
11845
|
+
const [permissionOpen, setPermissionOpen] = (0, import_react86.useState)(false);
|
|
11846
|
+
const [hierarchyOpen, setHierarchyOpen] = (0, import_react86.useState)(false);
|
|
11847
|
+
const [documentOpen, setDocumentOpen] = (0, import_react86.useState)(false);
|
|
11848
|
+
const [filesOpen, setFilesOpen] = (0, import_react86.useState)(false);
|
|
11849
|
+
const [tasksOpen, setTasksOpen] = (0, import_react86.useState)(false);
|
|
11850
|
+
const [trackingOpen, setTrackingOpen] = (0, import_react86.useState)(false);
|
|
11851
|
+
const [communicationOpen, setCommunicationOpen] = (0, import_react86.useState)(false);
|
|
11852
|
+
const [activeComponent, setActiveComponent] = (0, import_react86.useState)("workflowType");
|
|
11744
11853
|
const renderMenuItemold = (item) => {
|
|
11745
11854
|
const Icon = item.icon;
|
|
11746
11855
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("button", { type: "button", className: `fc:flex fc:h-[48px] fc:w-full fc:items-center fc:gap-[8px] fc:rounded-[9px] fc:px-[8px] fc:text-left fc:transition-colors fc:duration-150${router.pathname === item.path ? "bg-blue-50 text-blue-600" : "text-[#344261] hover:bg-[#F6F8FC]"}`, onClick: () => router.push(item.path), children: [
|
|
@@ -11817,7 +11926,7 @@ function Sidebar({
|
|
|
11817
11926
|
HeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(HeadingIcon, { size: 18, className: "fc:text-[#405170] fc:shrink-0" }),
|
|
11818
11927
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "fc:text-[16px] fc:font-semibold", children: title })
|
|
11819
11928
|
] }),
|
|
11820
|
-
open ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11929
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react87.RiArrowDownSLine, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react87.RiArrowRightSLine, { size: 18 })
|
|
11821
11930
|
] }),
|
|
11822
11931
|
open && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "fc:ml-[2px] fc:border-l fc:border-[#E5E9F1] fc:pl-[2px]", children: items.map(renderMenuItem) })
|
|
11823
11932
|
] });
|
|
@@ -11837,39 +11946,39 @@ function Sidebar({
|
|
|
11837
11946
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "fc:text-[12px] fc:text-[#344261]", children: "Workflow Engine" })
|
|
11838
11947
|
] })
|
|
11839
11948
|
] }),
|
|
11840
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("button", { type: "button", onClick: onToggle, className: "fc:flex fc:h-8 fc:w-8 fc:items-center fc:justify-center fc:rounded-lg hover:fc:fc:bg-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11949
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("button", { type: "button", onClick: onToggle, className: "fc:flex fc:h-8 fc:w-8 fc:items-center fc:justify-center fc:rounded-lg hover:fc:fc:bg-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react87.RiMenuLine, { size: 18 }) })
|
|
11841
11950
|
] }),
|
|
11842
11951
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "fc:min-h-0 fc:flex-1 fc:overflow-y-auto fc:overflow-x-hidden fc:px-[27px] fc:pb-[30px] fc:pt-[31px]", children: [
|
|
11843
11952
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "fc:mb-[19px] fc:ml-[15px] fc:text-[14px] fc:font-bold fc:uppercase fc:leading-[20px] fc:tracking-[0.2px] fc:text-[#3C4D74]", children: "Configuration Masters" }),
|
|
11844
11953
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "fc:flex fc:flex-col fc:gap-[3px]", children: [
|
|
11845
|
-
renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems,
|
|
11846
|
-
renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems,
|
|
11847
|
-
renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems,
|
|
11848
|
-
renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems,
|
|
11954
|
+
renderDropdown("Workflow", workflowOpen, setWorkflowOpen, workflowItems, import_react87.RiNodeTree),
|
|
11955
|
+
renderDropdown("Permissions", permissionOpen, setPermissionOpen, permissionItems, import_react87.RiShieldUserLine),
|
|
11956
|
+
renderDropdown("Documents", documentOpen, setDocumentOpen, documentItems, import_react87.RiFileSettingsLine),
|
|
11957
|
+
renderDropdown("Hierarchy", hierarchyOpen, setHierarchyOpen, hierarchyItems, import_react87.RiNodeTree)
|
|
11849
11958
|
] }),
|
|
11850
11959
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: "fc:mb-[19px] fc:ml-[15px] fc:mt-[39px] fc:text-[14px] fc:font-bold fc:uppercase fc:leading-[20px] fc:tracking-[0.2px] fc:text-[#3C4D74]", children: "Runtime" }),
|
|
11851
11960
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "fc:flex fc:flex-col fc:gap-[3px]", children: [
|
|
11852
|
-
renderDropdown("Files", filesOpen, setFilesOpen, fileItems,
|
|
11853
|
-
renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems,
|
|
11854
|
-
renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems,
|
|
11855
|
-
renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems,
|
|
11961
|
+
renderDropdown("Files", filesOpen, setFilesOpen, fileItems, import_react87.RiFolder3Line),
|
|
11962
|
+
renderDropdown("Tasks", tasksOpen, setTasksOpen, taskItems, import_react87.RiCheckboxCircleLine),
|
|
11963
|
+
renderDropdown("Tracking", trackingOpen, setTrackingOpen, trackingItems, import_react87.RiRouteLine),
|
|
11964
|
+
renderDropdown("Communication", communicationOpen, setCommunicationOpen, communicationItems, import_react87.RiMessage2Line)
|
|
11856
11965
|
] })
|
|
11857
11966
|
] }),
|
|
11858
11967
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "fc:shrink-0 fc:bg-white fc:px-[27px] fc:pb-[34px] fc:pt-[18px]", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("button", { type: "button", className: "fc:flex fc:h-[66px] fc:w-full fc:items-center fc:gap-[18px] fc:rounded-[10px] fc:border fc:border-[#E1E5ED] fc:bg-white fc:px-[23px] fc:text-left fc:text-[16px] fc:font-semibold fc:text-[#2D3A58] fc:shadow-sm hover:fc:fc:bg-[#F7F8FC] fc:transition", children: [
|
|
11859
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11968
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react87.RiSettings4Line, { size: 20 }),
|
|
11860
11969
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: "Settings" })
|
|
11861
11970
|
] }) })
|
|
11862
11971
|
] }),
|
|
11863
11972
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "fc:flex-1 fc:overflow-auto fc:bg-[#F5F7FB]", children: renderContent() }),
|
|
11864
|
-
!isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("button", { type: "button", onClick: onToggle, "aria-label": "Open sidebar", className: "fc:fixed fc:left-[px] fc:top-[30px] fc:z-[100] fc:flex fc:h-[46px] fc:w-[46px] fc:items-center fc:justify-center fc:rounded-[9px] fc:border fc:border-[#E1E5ED] fc:bg-white fc:text-[#344261] fc:shadow-[0_2px_8px_rgba(0,0,0,0.08)] fc:transition-colors hover:fc:bg-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11973
|
+
!isOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("button", { type: "button", onClick: onToggle, "aria-label": "Open sidebar", className: "fc:fixed fc:left-[px] fc:top-[30px] fc:z-[100] fc:flex fc:h-[46px] fc:w-[46px] fc:items-center fc:justify-center fc:rounded-[9px] fc:border fc:border-[#E1E5ED] fc:bg-white fc:text-[#344261] fc:shadow-[0_2px_8px_rgba(0,0,0,0.08)] fc:transition-colors hover:fc:bg-gray-100", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react87.RiMenuLine, { size: 18 }) })
|
|
11865
11974
|
] });
|
|
11866
11975
|
}
|
|
11867
11976
|
|
|
11868
11977
|
// src/components/Layout.jsx
|
|
11869
|
-
var
|
|
11978
|
+
var import_react88 = require("react");
|
|
11870
11979
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
11871
11980
|
var Layout = ({ children }) => {
|
|
11872
|
-
const [isOpen, setIsOpen] = (0,
|
|
11981
|
+
const [isOpen, setIsOpen] = (0, import_react88.useState)(true);
|
|
11873
11982
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flowcore fc:flex fc:min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
11874
11983
|
Sidebar,
|
|
11875
11984
|
{
|