flowcore-fn 9.3.4 → 9.3.5
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 +181 -431
- package/dist/pkg-index.mjs +440 -690
- package/package.json +1 -1
package/dist/pkg-index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
|
|
21
21
|
// src/components/Sidebar.jsx
|
|
22
|
-
import { useState as
|
|
22
|
+
import { useState as useState59 } from "react";
|
|
23
23
|
import { RiFlowChart, RiShieldUserLine, RiFolder3Line, RiCheckboxCircleLine, RiRouteLine, RiMessage2Line, RiMenuLine, RiGitMergeLine, RiNodeTree, RiGitBranchLine, RiCornerDownRightLine, RiUserSettingsLine, RiFileShieldLine, RiUserSharedLine, RiSettings4Line, RiFileSettingsLine, RiFileList3Line, RiFileUploadLine, RiNotification4Line, RiDatabase2Line, RiChat3Line, RiCheckboxMultipleLine, RiShieldCheckLine, RiHistoryLine, RiArrowDownSLine, RiArrowRightSLine } from "@remixicon/react";
|
|
24
24
|
import { useRouter } from "next/router";
|
|
25
25
|
|
|
@@ -3234,15 +3234,27 @@ function WorkFlowTransition() {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
|
|
3236
3236
|
// src/components/user-hierarchy-node-mapping/user_hierarachy_node_main.jsx
|
|
3237
|
-
import React26, { useState as
|
|
3237
|
+
import React26, { useState as useState18, useRef as useRef6, useEffect as useEffect11 } from "react";
|
|
3238
|
+
import Swal6 from "sweetalert2";
|
|
3238
3239
|
|
|
3239
3240
|
// src/components/user-hierarchy-node-mapping/adduserhierarchynode.jsx
|
|
3240
|
-
import React21 from "react";
|
|
3241
|
+
import React21, { useState as useState15 } from "react";
|
|
3241
3242
|
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3242
3243
|
function AddUserHierarchyNodeMappingModal({
|
|
3243
3244
|
isOpen,
|
|
3244
|
-
onClose
|
|
3245
|
+
onClose,
|
|
3246
|
+
onSave
|
|
3245
3247
|
}) {
|
|
3248
|
+
const [formData, setFormData] = useState15({ mappingId: "", externalUserId: "", hierarchyNodeId: "", roleCode: "", isPrimary: "", effectiveFrom: "", effectiveTo: "" });
|
|
3249
|
+
const [isSubmitting, setIsSubmitting] = useState15(false);
|
|
3250
|
+
const handleChange = (event) => setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [event.target.name]: event.target.value }));
|
|
3251
|
+
const handleSave = async () => {
|
|
3252
|
+
if (!onSave) return;
|
|
3253
|
+
setIsSubmitting(true);
|
|
3254
|
+
const success = await onSave({ externalUserId: Number(formData.externalUserId), hierarchyNodeId: Number(formData.hierarchyNodeId), roleCode: formData.roleCode, isPrimary: formData.isPrimary === "true", effectiveFrom: formData.effectiveFrom, effectiveTo: formData.effectiveTo || null, createdBy: "System" });
|
|
3255
|
+
setIsSubmitting(false);
|
|
3256
|
+
if (success) onClose();
|
|
3257
|
+
};
|
|
3246
3258
|
if (!isOpen) return null;
|
|
3247
3259
|
return /* @__PURE__ */ jsxs20("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
3248
3260
|
/* @__PURE__ */ jsx21("div", { className: "fc:fixed fc:inset-0 fc:bg-slate-900/50 fc:backdrop-blur-sm fc:transition-opacity fc:duration-200", onClick: onClose }),
|
|
@@ -3269,7 +3281,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3269
3281
|
"Mapping ID ",
|
|
3270
3282
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3271
3283
|
] }),
|
|
3272
|
-
/* @__PURE__ */ jsx21("input", { type: "text", placeholder: "Enter mapping ID", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-indigo-500/10 focus:fc:fc:border-indigo-500" }),
|
|
3284
|
+
/* @__PURE__ */ jsx21("input", { name: "mappingId", value: formData.mappingId, onChange: handleChange, type: "text", placeholder: "Enter mapping ID", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-indigo-500/10 focus:fc:fc:border-indigo-500" }),
|
|
3273
3285
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Enter the unique mapping ID" })
|
|
3274
3286
|
] }),
|
|
3275
3287
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
@@ -3277,7 +3289,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3277
3289
|
"External User ID ",
|
|
3278
3290
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3279
3291
|
] }),
|
|
3280
|
-
/* @__PURE__ */ jsx21("input", { type: "text", placeholder: "Enter external user ID", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-indigo-500/10 focus:fc:fc:border-indigo-500" }),
|
|
3292
|
+
/* @__PURE__ */ jsx21("input", { name: "externalUserId", value: formData.externalUserId, onChange: handleChange, type: "text", placeholder: "Enter external user ID", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs fc:text-slate-700 fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-indigo-500/10 focus:fc:fc:border-indigo-500" }),
|
|
3281
3293
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Enter the consumer user ID" })
|
|
3282
3294
|
] })
|
|
3283
3295
|
] }),
|
|
@@ -3286,7 +3298,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3286
3298
|
"Hierarchy Node ID ",
|
|
3287
3299
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3288
3300
|
] }),
|
|
3289
|
-
/* @__PURE__ */ jsx21("input", { type: "text", placeholder: "Enter hierarchy node ID", 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" }),
|
|
3301
|
+
/* @__PURE__ */ jsx21("input", { name: "hierarchyNodeId", value: formData.hierarchyNodeId, onChange: handleChange, type: "text", placeholder: "Enter hierarchy node ID", 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" }),
|
|
3290
3302
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Enter the hierarchy node assigned to the user" })
|
|
3291
3303
|
] }),
|
|
3292
3304
|
/* @__PURE__ */ jsxs20("div", { className: "fc:grid fc:grid-cols-2 fc:gap-5", children: [
|
|
@@ -3295,7 +3307,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3295
3307
|
"Role Code ",
|
|
3296
3308
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3297
3309
|
] }),
|
|
3298
|
-
/* @__PURE__ */ jsx21("input", { type: "text", placeholder: "Enter role code", 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" }),
|
|
3310
|
+
/* @__PURE__ */ jsx21("input", { name: "roleCode", value: formData.roleCode, onChange: handleChange, type: "text", placeholder: "Enter role code", 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" }),
|
|
3299
3311
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Enter the user role code, for example DEO or RO" })
|
|
3300
3312
|
] }),
|
|
3301
3313
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
@@ -3303,7 +3315,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3303
3315
|
"Is Primary ",
|
|
3304
3316
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3305
3317
|
] }),
|
|
3306
|
-
/* @__PURE__ */ jsxs20("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: [
|
|
3318
|
+
/* @__PURE__ */ jsxs20("select", { name: "isPrimary", value: formData.isPrimary, onChange: handleChange, 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: [
|
|
3307
3319
|
/* @__PURE__ */ jsx21("option", { value: "", children: "Select primary status" }),
|
|
3308
3320
|
/* @__PURE__ */ jsx21("option", { value: "true", children: "Yes" }),
|
|
3309
3321
|
/* @__PURE__ */ jsx21("option", { value: "false", children: "No" })
|
|
@@ -3323,12 +3335,12 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3323
3335
|
"Effective From ",
|
|
3324
3336
|
/* @__PURE__ */ jsx21("span", { className: "fc:text-red-500", children: "*" })
|
|
3325
3337
|
] }),
|
|
3326
|
-
/* @__PURE__ */ jsx21("input", { type: "date", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs 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" }),
|
|
3338
|
+
/* @__PURE__ */ jsx21("input", { name: "effectiveFrom", value: formData.effectiveFrom, onChange: handleChange, type: "date", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs 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" }),
|
|
3327
3339
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Select the date from which this mapping is effective" })
|
|
3328
3340
|
] }),
|
|
3329
3341
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
3330
3342
|
/* @__PURE__ */ jsx21("label", { className: "fc:block fc:text-xs fc:font-bold fc:text-slate-700 fc:mb-1.5", children: "Effective To" }),
|
|
3331
|
-
/* @__PURE__ */ jsx21("input", { type: "date", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs 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" }),
|
|
3343
|
+
/* @__PURE__ */ jsx21("input", { name: "effectiveTo", value: formData.effectiveTo, onChange: handleChange, type: "date", className: "fc:w-full fc:p-2.5 fc:border fc:border-slate-200 fc:rounded-xl fc:text-xs 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" }),
|
|
3332
3344
|
/* @__PURE__ */ jsx21("p", { className: "fc:text-[10px] fc:text-slate-400 fc:mt-1", children: "Select the date until which this mapping is effective" })
|
|
3333
3345
|
] })
|
|
3334
3346
|
] })
|
|
@@ -3336,7 +3348,7 @@ function AddUserHierarchyNodeMappingModal({
|
|
|
3336
3348
|
] }),
|
|
3337
3349
|
/* @__PURE__ */ jsxs20("div", { className: "fc:p-5 fc:bg-white fc:border-t fc:border-slate-100 fc:flex fc:items-center fc:justify-end fc:gap-3 fc:px-8", children: [
|
|
3338
3350
|
/* @__PURE__ */ jsx21("button", { onClick: onClose, className: "fc:px-6 fc:py-2.5 fc:border fc:border-slate-200 fc:text-slate-600 fc:text-xs fc:font-bold fc:rounded-xl hover:fc:fc:bg-slate-50 fc:transition-all fc:flex fc:items-center fc:gap-1.5", children: "\u2715 Cancel" }),
|
|
3339
|
-
/* @__PURE__ */ jsx21("button", { type: "button", className: "fc:px-6 fc:py-2.5 fc:bg-indigo-600 hover:fc:fc:bg-indigo-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-indigo-500/10 fc:transition-all fc:flex fc:items-center fc:gap-1.5", children: "\u{1F4BE} Save Mapping" })
|
|
3351
|
+
/* @__PURE__ */ jsx21("button", { type: "button", onClick: handleSave, disabled: isSubmitting, className: "fc:px-6 fc:py-2.5 fc:bg-indigo-600 hover:fc:fc:bg-indigo-700 fc:text-white fc:text-xs fc:font-bold fc:rounded-xl fc:shadow-md fc:shadow-indigo-500/10 fc:transition-all fc:flex fc:items-center fc:gap-1.5", children: "\u{1F4BE} Save Mapping" })
|
|
3340
3352
|
] })
|
|
3341
3353
|
] })
|
|
3342
3354
|
] });
|
|
@@ -3367,10 +3379,10 @@ function MappingSearchBar({
|
|
|
3367
3379
|
}
|
|
3368
3380
|
|
|
3369
3381
|
// src/components/user-hierarchy-node-mapping/userhierarchynodetable.jsx
|
|
3370
|
-
import React25, { useState as
|
|
3382
|
+
import React25, { useState as useState17, useEffect as useEffect10 } from "react";
|
|
3371
3383
|
|
|
3372
3384
|
// src/components/user-hierarchy-node-mapping/edit-mapping.jsx
|
|
3373
|
-
import React23, { useEffect as useEffect9, useState as
|
|
3385
|
+
import React23, { useEffect as useEffect9, useState as useState16 } from "react";
|
|
3374
3386
|
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3375
3387
|
function EditUserHierarchyNodeMappingModal({
|
|
3376
3388
|
isOpen,
|
|
@@ -3378,7 +3390,7 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
3378
3390
|
selectedMapping,
|
|
3379
3391
|
onSave
|
|
3380
3392
|
}) {
|
|
3381
|
-
const [formData, setFormData] =
|
|
3393
|
+
const [formData, setFormData] = useState16({
|
|
3382
3394
|
hierarchyNodeId: "",
|
|
3383
3395
|
roleCode: "",
|
|
3384
3396
|
isPrimary: "",
|
|
@@ -3403,14 +3415,23 @@ function EditUserHierarchyNodeMappingModal({
|
|
|
3403
3415
|
[name]: value
|
|
3404
3416
|
}));
|
|
3405
3417
|
};
|
|
3406
|
-
const handleSubmit = (event) => {
|
|
3418
|
+
const handleSubmit = async (event) => {
|
|
3419
|
+
var _a, _b, _c;
|
|
3407
3420
|
event.preventDefault();
|
|
3408
3421
|
if (onSave) {
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3422
|
+
const success = await onSave({
|
|
3423
|
+
mappingId: Number((_a = selectedMapping.mappingId) != null ? _a : selectedMapping.id),
|
|
3424
|
+
externalUserId: Number(selectedMapping.externalUserId),
|
|
3425
|
+
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
3426
|
+
roleCode: formData.roleCode,
|
|
3427
|
+
isPrimary: formData.isPrimary === "true",
|
|
3428
|
+
effectiveFrom: formData.effectiveFrom,
|
|
3429
|
+
effectiveTo: formData.effectiveTo || null,
|
|
3430
|
+
isActive: (_c = (_b = selectedMapping.isActive) != null ? _b : selectedMapping.status) != null ? _c : true,
|
|
3431
|
+
updatedBy: selectedMapping.updatedBy || selectedMapping.createdBy || "System"
|
|
3432
|
+
});
|
|
3433
|
+
if (success) onClose();
|
|
3412
3434
|
}
|
|
3413
|
-
onClose();
|
|
3414
3435
|
};
|
|
3415
3436
|
return /* @__PURE__ */ jsxs22("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
3416
3437
|
/* @__PURE__ */ jsx23(
|
|
@@ -3614,266 +3635,21 @@ function DeleteUserHierarchyNodeMappingModal({
|
|
|
3614
3635
|
// src/components/user-hierarchy-node-mapping/userhierarchynodetable.jsx
|
|
3615
3636
|
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3616
3637
|
function UserHierarchyNodeMappingTable({
|
|
3638
|
+
apiData,
|
|
3617
3639
|
pageSize,
|
|
3618
3640
|
searchQuery = "",
|
|
3619
3641
|
currentPage,
|
|
3620
3642
|
setCurrentPage,
|
|
3621
|
-
setTotalEntries
|
|
3643
|
+
setTotalEntries,
|
|
3644
|
+
onUpdate,
|
|
3645
|
+
onDelete
|
|
3622
3646
|
}) {
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
isPrimary: true,
|
|
3630
|
-
effectiveFrom: "2026-01-01",
|
|
3631
|
-
effectiveTo: "",
|
|
3632
|
-
status: true
|
|
3633
|
-
}, {
|
|
3634
|
-
id: 2,
|
|
3635
|
-
mappingId: 2,
|
|
3636
|
-
externalUserId: 101,
|
|
3637
|
-
hierarchyNodeId: 3,
|
|
3638
|
-
roleCode: "RO",
|
|
3639
|
-
isPrimary: false,
|
|
3640
|
-
effectiveFrom: "2026-01-01",
|
|
3641
|
-
effectiveTo: "",
|
|
3642
|
-
status: false
|
|
3643
|
-
}, {
|
|
3644
|
-
id: 3,
|
|
3645
|
-
mappingId: 3,
|
|
3646
|
-
externalUserId: 102,
|
|
3647
|
-
hierarchyNodeId: 4,
|
|
3648
|
-
roleCode: "AO",
|
|
3649
|
-
isPrimary: true,
|
|
3650
|
-
effectiveFrom: "2026-01-03",
|
|
3651
|
-
effectiveTo: "",
|
|
3652
|
-
status: true
|
|
3653
|
-
}, {
|
|
3654
|
-
id: 4,
|
|
3655
|
-
mappingId: 4,
|
|
3656
|
-
externalUserId: 103,
|
|
3657
|
-
hierarchyNodeId: 5,
|
|
3658
|
-
roleCode: "SO",
|
|
3659
|
-
isPrimary: false,
|
|
3660
|
-
effectiveFrom: "2026-01-05",
|
|
3661
|
-
effectiveTo: "2026-12-31",
|
|
3662
|
-
status: false
|
|
3663
|
-
}, {
|
|
3664
|
-
id: 5,
|
|
3665
|
-
mappingId: 5,
|
|
3666
|
-
externalUserId: 104,
|
|
3667
|
-
hierarchyNodeId: 6,
|
|
3668
|
-
roleCode: "DEO",
|
|
3669
|
-
isPrimary: true,
|
|
3670
|
-
effectiveFrom: "2026-01-07",
|
|
3671
|
-
effectiveTo: "",
|
|
3672
|
-
status: true
|
|
3673
|
-
}, {
|
|
3674
|
-
id: 6,
|
|
3675
|
-
mappingId: 6,
|
|
3676
|
-
externalUserId: 105,
|
|
3677
|
-
hierarchyNodeId: 7,
|
|
3678
|
-
roleCode: "RO",
|
|
3679
|
-
isPrimary: false,
|
|
3680
|
-
effectiveFrom: "2026-01-09",
|
|
3681
|
-
effectiveTo: "",
|
|
3682
|
-
status: false
|
|
3683
|
-
}, {
|
|
3684
|
-
id: 7,
|
|
3685
|
-
mappingId: 7,
|
|
3686
|
-
externalUserId: 106,
|
|
3687
|
-
hierarchyNodeId: 8,
|
|
3688
|
-
roleCode: "AO",
|
|
3689
|
-
isPrimary: true,
|
|
3690
|
-
effectiveFrom: "2026-01-11",
|
|
3691
|
-
effectiveTo: "",
|
|
3692
|
-
status: true
|
|
3693
|
-
}, {
|
|
3694
|
-
id: 8,
|
|
3695
|
-
mappingId: 8,
|
|
3696
|
-
externalUserId: 107,
|
|
3697
|
-
hierarchyNodeId: 9,
|
|
3698
|
-
roleCode: "SO",
|
|
3699
|
-
isPrimary: false,
|
|
3700
|
-
effectiveFrom: "2026-01-13",
|
|
3701
|
-
effectiveTo: "2026-09-30",
|
|
3702
|
-
status: false
|
|
3703
|
-
}, {
|
|
3704
|
-
id: 9,
|
|
3705
|
-
mappingId: 9,
|
|
3706
|
-
externalUserId: 108,
|
|
3707
|
-
hierarchyNodeId: 10,
|
|
3708
|
-
roleCode: "DEO",
|
|
3709
|
-
isPrimary: true,
|
|
3710
|
-
effectiveFrom: "2026-01-15",
|
|
3711
|
-
effectiveTo: "",
|
|
3712
|
-
status: true
|
|
3713
|
-
}, {
|
|
3714
|
-
id: 10,
|
|
3715
|
-
mappingId: 10,
|
|
3716
|
-
externalUserId: 109,
|
|
3717
|
-
hierarchyNodeId: 11,
|
|
3718
|
-
roleCode: "RO",
|
|
3719
|
-
isPrimary: false,
|
|
3720
|
-
effectiveFrom: "2026-01-17",
|
|
3721
|
-
effectiveTo: "",
|
|
3722
|
-
status: false
|
|
3723
|
-
}, {
|
|
3724
|
-
id: 11,
|
|
3725
|
-
mappingId: 11,
|
|
3726
|
-
externalUserId: 110,
|
|
3727
|
-
hierarchyNodeId: 12,
|
|
3728
|
-
roleCode: "AO",
|
|
3729
|
-
isPrimary: true,
|
|
3730
|
-
effectiveFrom: "2026-01-19",
|
|
3731
|
-
effectiveTo: "",
|
|
3732
|
-
status: true
|
|
3733
|
-
}, {
|
|
3734
|
-
id: 12,
|
|
3735
|
-
mappingId: 12,
|
|
3736
|
-
externalUserId: 111,
|
|
3737
|
-
hierarchyNodeId: 13,
|
|
3738
|
-
roleCode: "SO",
|
|
3739
|
-
isPrimary: false,
|
|
3740
|
-
effectiveFrom: "2026-01-21",
|
|
3741
|
-
effectiveTo: "2026-10-31",
|
|
3742
|
-
status: false
|
|
3743
|
-
}, {
|
|
3744
|
-
id: 13,
|
|
3745
|
-
mappingId: 13,
|
|
3746
|
-
externalUserId: 112,
|
|
3747
|
-
hierarchyNodeId: 14,
|
|
3748
|
-
roleCode: "DEO",
|
|
3749
|
-
isPrimary: true,
|
|
3750
|
-
effectiveFrom: "2026-01-23",
|
|
3751
|
-
effectiveTo: "",
|
|
3752
|
-
status: true
|
|
3753
|
-
}, {
|
|
3754
|
-
id: 14,
|
|
3755
|
-
mappingId: 14,
|
|
3756
|
-
externalUserId: 113,
|
|
3757
|
-
hierarchyNodeId: 15,
|
|
3758
|
-
roleCode: "RO",
|
|
3759
|
-
isPrimary: false,
|
|
3760
|
-
effectiveFrom: "2026-01-25",
|
|
3761
|
-
effectiveTo: "",
|
|
3762
|
-
status: false
|
|
3763
|
-
}, {
|
|
3764
|
-
id: 15,
|
|
3765
|
-
mappingId: 15,
|
|
3766
|
-
externalUserId: 114,
|
|
3767
|
-
hierarchyNodeId: 16,
|
|
3768
|
-
roleCode: "AO",
|
|
3769
|
-
isPrimary: true,
|
|
3770
|
-
effectiveFrom: "2026-01-27",
|
|
3771
|
-
effectiveTo: "",
|
|
3772
|
-
status: true
|
|
3773
|
-
}, {
|
|
3774
|
-
id: 16,
|
|
3775
|
-
mappingId: 16,
|
|
3776
|
-
externalUserId: 115,
|
|
3777
|
-
hierarchyNodeId: 17,
|
|
3778
|
-
roleCode: "SO",
|
|
3779
|
-
isPrimary: false,
|
|
3780
|
-
effectiveFrom: "2026-01-29",
|
|
3781
|
-
effectiveTo: "2026-11-30",
|
|
3782
|
-
status: false
|
|
3783
|
-
}, {
|
|
3784
|
-
id: 17,
|
|
3785
|
-
mappingId: 17,
|
|
3786
|
-
externalUserId: 116,
|
|
3787
|
-
hierarchyNodeId: 18,
|
|
3788
|
-
roleCode: "DEO",
|
|
3789
|
-
isPrimary: true,
|
|
3790
|
-
effectiveFrom: "2026-02-01",
|
|
3791
|
-
effectiveTo: "",
|
|
3792
|
-
status: true
|
|
3793
|
-
}, {
|
|
3794
|
-
id: 18,
|
|
3795
|
-
mappingId: 18,
|
|
3796
|
-
externalUserId: 117,
|
|
3797
|
-
hierarchyNodeId: 19,
|
|
3798
|
-
roleCode: "RO",
|
|
3799
|
-
isPrimary: false,
|
|
3800
|
-
effectiveFrom: "2026-02-03",
|
|
3801
|
-
effectiveTo: "",
|
|
3802
|
-
status: false
|
|
3803
|
-
}, {
|
|
3804
|
-
id: 19,
|
|
3805
|
-
mappingId: 19,
|
|
3806
|
-
externalUserId: 118,
|
|
3807
|
-
hierarchyNodeId: 20,
|
|
3808
|
-
roleCode: "AO",
|
|
3809
|
-
isPrimary: true,
|
|
3810
|
-
effectiveFrom: "2026-02-05",
|
|
3811
|
-
effectiveTo: "",
|
|
3812
|
-
status: true
|
|
3813
|
-
}, {
|
|
3814
|
-
id: 20,
|
|
3815
|
-
mappingId: 20,
|
|
3816
|
-
externalUserId: 119,
|
|
3817
|
-
hierarchyNodeId: 21,
|
|
3818
|
-
roleCode: "SO",
|
|
3819
|
-
isPrimary: false,
|
|
3820
|
-
effectiveFrom: "2026-02-07",
|
|
3821
|
-
effectiveTo: "2026-12-31",
|
|
3822
|
-
status: false
|
|
3823
|
-
}, {
|
|
3824
|
-
id: 21,
|
|
3825
|
-
mappingId: 21,
|
|
3826
|
-
externalUserId: 120,
|
|
3827
|
-
hierarchyNodeId: 22,
|
|
3828
|
-
roleCode: "DEO",
|
|
3829
|
-
isPrimary: true,
|
|
3830
|
-
effectiveFrom: "2026-02-09",
|
|
3831
|
-
effectiveTo: "",
|
|
3832
|
-
status: true
|
|
3833
|
-
}, {
|
|
3834
|
-
id: 22,
|
|
3835
|
-
mappingId: 22,
|
|
3836
|
-
externalUserId: 121,
|
|
3837
|
-
hierarchyNodeId: 23,
|
|
3838
|
-
roleCode: "RO",
|
|
3839
|
-
isPrimary: false,
|
|
3840
|
-
effectiveFrom: "2026-02-11",
|
|
3841
|
-
effectiveTo: "",
|
|
3842
|
-
status: false
|
|
3843
|
-
}, {
|
|
3844
|
-
id: 23,
|
|
3845
|
-
mappingId: 23,
|
|
3846
|
-
externalUserId: 122,
|
|
3847
|
-
hierarchyNodeId: 24,
|
|
3848
|
-
roleCode: "AO",
|
|
3849
|
-
isPrimary: true,
|
|
3850
|
-
effectiveFrom: "2026-02-13",
|
|
3851
|
-
effectiveTo: "",
|
|
3852
|
-
status: true
|
|
3853
|
-
}, {
|
|
3854
|
-
id: 24,
|
|
3855
|
-
mappingId: 24,
|
|
3856
|
-
externalUserId: 123,
|
|
3857
|
-
hierarchyNodeId: 25,
|
|
3858
|
-
roleCode: "SO",
|
|
3859
|
-
isPrimary: false,
|
|
3860
|
-
effectiveFrom: "2026-02-15",
|
|
3861
|
-
effectiveTo: "2026-08-31",
|
|
3862
|
-
status: false
|
|
3863
|
-
}, {
|
|
3864
|
-
id: 25,
|
|
3865
|
-
mappingId: 25,
|
|
3866
|
-
externalUserId: 124,
|
|
3867
|
-
hierarchyNodeId: 26,
|
|
3868
|
-
roleCode: "DEO",
|
|
3869
|
-
isPrimary: true,
|
|
3870
|
-
effectiveFrom: "2026-02-17",
|
|
3871
|
-
effectiveTo: "",
|
|
3872
|
-
status: true
|
|
3873
|
-
}];
|
|
3874
|
-
const [data, setData] = useState16(initialData);
|
|
3875
|
-
const [sortOrder, setSortOrder] = useState16("asc");
|
|
3876
|
-
const [sortKey, setSortKey] = useState16("mappingId");
|
|
3647
|
+
const [data, setData] = useState17(apiData || []);
|
|
3648
|
+
useEffect10(() => {
|
|
3649
|
+
setData(apiData || []);
|
|
3650
|
+
}, [apiData]);
|
|
3651
|
+
const [sortOrder, setSortOrder] = useState17("asc");
|
|
3652
|
+
const [sortKey, setSortKey] = useState17("mappingId");
|
|
3877
3653
|
const handleSort = (columnKey) => {
|
|
3878
3654
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
3879
3655
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -3898,9 +3674,9 @@ function UserHierarchyNodeMappingTable({
|
|
|
3898
3674
|
const pageNumbers = Array.from({
|
|
3899
3675
|
length: totalPages
|
|
3900
3676
|
}, (_, i) => i + 1);
|
|
3901
|
-
const [showEditPopup, setShowEditPopup] =
|
|
3902
|
-
const [showDeletePopup, setShowDeletePopup] =
|
|
3903
|
-
const [selectedItem, setSelectedItem] =
|
|
3677
|
+
const [showEditPopup, setShowEditPopup] = useState17(false);
|
|
3678
|
+
const [showDeletePopup, setShowDeletePopup] = useState17(false);
|
|
3679
|
+
const [selectedItem, setSelectedItem] = useState17(null);
|
|
3904
3680
|
const openEditPopup = (item) => {
|
|
3905
3681
|
setSelectedItem(item);
|
|
3906
3682
|
setShowEditPopup(true);
|
|
@@ -3917,16 +3693,16 @@ function UserHierarchyNodeMappingTable({
|
|
|
3917
3693
|
setShowDeletePopup(false);
|
|
3918
3694
|
setSelectedItem(null);
|
|
3919
3695
|
};
|
|
3920
|
-
const handleDelete = () => {
|
|
3921
|
-
|
|
3922
|
-
(prev) => prev.filter((item) => item.id !== (selectedItem == null ? void 0 : selectedItem.id))
|
|
3923
|
-
);
|
|
3924
|
-
closeDeletePopup();
|
|
3696
|
+
const handleDelete = async () => {
|
|
3697
|
+
if (await (onDelete == null ? void 0 : onDelete(selectedItem))) closeDeletePopup();
|
|
3925
3698
|
};
|
|
3926
3699
|
const toggleStatus = (id) => {
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3700
|
+
var _a, _b;
|
|
3701
|
+
const item = data.find((record) => {
|
|
3702
|
+
var _a2;
|
|
3703
|
+
return ((_a2 = record.mappingId) != null ? _a2 : record.id) === id;
|
|
3704
|
+
});
|
|
3705
|
+
if (item) onUpdate == null ? void 0 : onUpdate(__spreadProps(__spreadValues({}, item), { mappingId: (_a = item.mappingId) != null ? _a : item.id, isActive: !((_b = item.isActive) != null ? _b : item.status), updatedBy: item.updatedBy || item.createdBy || "System" }));
|
|
3930
3706
|
};
|
|
3931
3707
|
return /* @__PURE__ */ jsxs24("div", { className: "fc:space-y-5", children: [
|
|
3932
3708
|
/* @__PURE__ */ jsx25("div", { className: "fc:w-full fc:overflow-x-hidden fc:border fc:border-slate-200 fc:rounded-2xl fc:shadow-sm fc:max-h-[420px] fc:overflow-y-auto", children: /* @__PURE__ */ jsxs24("table", { className: "fc:w-full fc:text-left fc:border-collapse fc:bg-white fc:table-fixed", children: [
|
|
@@ -3958,29 +3734,35 @@ function UserHierarchyNodeMappingTable({
|
|
|
3958
3734
|
/* @__PURE__ */ jsx25("th", { className: "fc:py-4 fc:px-5 fc:text-s fc:bg-slate-50 fc:text-center fc:whitespace-nowrap", children: "STATUS" }),
|
|
3959
3735
|
/* @__PURE__ */ jsx25("th", { className: "fc:py-4 fc:px-5 fc:text-s fc:bg-slate-50 fc:text-center fc:whitespace-nowrap", children: "ACTION" })
|
|
3960
3736
|
] }) }),
|
|
3961
|
-
/* @__PURE__ */ jsx25("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:text-s fc:text-slate-600", children: visibleData.map((item, index) =>
|
|
3962
|
-
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
/* @__PURE__ */ jsx25(
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3737
|
+
/* @__PURE__ */ jsx25("tbody", { className: "fc:divide-y fc:divide-slate-100 fc:text-s fc:text-slate-600", children: visibleData.map((item, index) => {
|
|
3738
|
+
var _a, _b;
|
|
3739
|
+
return /* @__PURE__ */ jsxs24("tr", { className: "hover:fc:fc:bg-slate-50/50 fc:transition-colors", children: [
|
|
3740
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-4 fc:text-center fc:font-medium fc:text-slate-400", children: startIndex + index + 1 }),
|
|
3741
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-slate-600 fc:whitespace-nowrap", children: item.mappingId }),
|
|
3742
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-slate-600 fc:whitespace-nowrap", children: item.externalUserId }),
|
|
3743
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-slate-600 fc:whitespace-nowrap", children: item.hierarchyNodeId }),
|
|
3744
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-slate-600 fc:whitespace-nowrap", children: item.roleCode }),
|
|
3745
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ jsx25("span", { className: `fc:px-2 fc:py-0.5 fc:text-xs fc:font-semibold fc:rounded${item.isPrimary ? "bg-emerald-50 text-emerald-600 border border-emerald-200" : "bg-rose-50 text-rose-600 border border-rose-200"}`, children: item.isPrimary ? "\u2713 Yes" : "\u2715 No" }) }),
|
|
3746
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:whitespace-nowrap", children: item.effectiveFrom }),
|
|
3747
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:whitespace-nowrap", children: item.effectiveTo }),
|
|
3748
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-5 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ jsx25("button", { onClick: () => {
|
|
3749
|
+
var _a2;
|
|
3750
|
+
return toggleStatus((_a2 = item.mappingId) != null ? _a2 : item.id);
|
|
3751
|
+
}, className: `fc:relative fc:inline-flex fc:h-5.5 fc:w-10 fc:shrink-0 fc:cursor-pointer fc:rounded-full fc:border-2 fc:border-transparent fc:transition-colors fc:duration-200 fc:ease-in-out fc:outline-none ${((_a = item.isActive) != null ? _a : item.status) ? "fc:bg-blue-600" : "fc:bg-gray-200"}`, children: /* @__PURE__ */ jsx25("span", { className: `fc:pointer-events-none fc:inline-block fc:h-4.5 fc:w-4.5 fc:transform fc:rounded-full fc:bg-white fc:shadow fc:ring-0 fc:transition fc:duration-200 fc:ease-in-out ${((_b = item.isActive) != null ? _b : item.status) ? "fc:translate-x-5" : "fc:translate-x-0"}` }) }) }),
|
|
3752
|
+
/* @__PURE__ */ jsx25("td", { className: "fc:py-4 fc:px-2 fc:text-center fc:whitespace-nowrap", children: /* @__PURE__ */ jsxs24("div", { className: "fc:flex fc:justify-center fc:items-center fc:gap-2", children: [
|
|
3753
|
+
/* @__PURE__ */ jsx25(
|
|
3754
|
+
"button",
|
|
3755
|
+
{
|
|
3756
|
+
type: "button",
|
|
3757
|
+
onClick: () => openEditPopup(item),
|
|
3758
|
+
className: " fc:px-3 fc:py-1 fc:bg-blue-100/70 hover:fc:bg-blue-200/80 fc:text-blue-600 fc:font-semibold fc:text-xs fc:rounded-lg fc:transition-all fc:duration-150 fc:cursor-pointer",
|
|
3759
|
+
children: "Edit"
|
|
3760
|
+
}
|
|
3761
|
+
),
|
|
3762
|
+
/* @__PURE__ */ jsx25("button", { onClick: () => openDeletePopup(item), className: "fc:px-3 fc:py-1 fc:bg-rose-100/70 hover:fc:bg-rose-200/80 fc:text-rose-600 fc:font-semibold fc:text-xs fc:rounded-lg fc:transition-all fc:duration-150 fc:cursor-pointer", children: "Delete" })
|
|
3763
|
+
] }) })
|
|
3764
|
+
] }, item.id);
|
|
3765
|
+
}) })
|
|
3984
3766
|
] }) }),
|
|
3985
3767
|
/* @__PURE__ */ jsxs24("div", { className: "fc:flex fc:items-center fc:justify-end fc:gap-1 fc:text-[13px] fc:text-slate-700 fc:font-normal fc:mt-4 fc:bg-slate-50/50 fc:p-3 fc:rounded-xl fc:border fc:border-slate-100", children: [
|
|
3986
3768
|
/* @__PURE__ */ jsx25("button", { onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)), disabled: currentPage === 1, className: "fc:px-2.5 fc:py-1 fc:text-slate-500 hover:fc:fc:text-slate-900 fc:mr-2 disabled:fc:fc:opacity-40", children: "\u2039 Prev" }),
|
|
@@ -3992,7 +3774,8 @@ function UserHierarchyNodeMappingTable({
|
|
|
3992
3774
|
{
|
|
3993
3775
|
isOpen: showEditPopup,
|
|
3994
3776
|
onClose: closeEditPopup,
|
|
3995
|
-
selectedMapping: selectedItem
|
|
3777
|
+
selectedMapping: selectedItem,
|
|
3778
|
+
onSave: (payload) => onUpdate == null ? void 0 : onUpdate(payload)
|
|
3996
3779
|
}
|
|
3997
3780
|
),
|
|
3998
3781
|
/* @__PURE__ */ jsx25(
|
|
@@ -4010,21 +3793,49 @@ function UserHierarchyNodeMappingTable({
|
|
|
4010
3793
|
// src/components/user-hierarchy-node-mapping/user_hierarachy_node_main.jsx
|
|
4011
3794
|
import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4012
3795
|
function User_hierarchy_mapping_main() {
|
|
4013
|
-
const [refreshkey, setRefreshKey] =
|
|
3796
|
+
const [refreshkey, setRefreshKey] = useState18(0);
|
|
3797
|
+
const [apiData, setApiData] = useState18([]);
|
|
3798
|
+
useEffect11(() => {
|
|
3799
|
+
(async () => {
|
|
3800
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
3801
|
+
try {
|
|
3802
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.userHierarchyNodeMapping) == null ? void 0 : _c.getList;
|
|
3803
|
+
if (!endpoint) throw new Error("User hierarchy node mapping list endpoint is not configured.");
|
|
3804
|
+
const result = await getApiService().post(endpoint, {});
|
|
3805
|
+
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;
|
|
3806
|
+
setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
|
|
3807
|
+
} catch (error) {
|
|
3808
|
+
await Swal6.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 user hierarchy node mappings.", "error");
|
|
3809
|
+
}
|
|
3810
|
+
})();
|
|
3811
|
+
}, [refreshkey]);
|
|
4014
3812
|
const handleRefresh = () => {
|
|
4015
|
-
console.log("Table data refreshed!");
|
|
4016
3813
|
setRefreshKey((prev) => prev + 1);
|
|
4017
3814
|
};
|
|
4018
3815
|
const tableRef = useRef6(null);
|
|
4019
|
-
const [modalOpen, setModalOpen] =
|
|
4020
|
-
const [pageSize, setPageSize] =
|
|
4021
|
-
const [searchQuery, setSearchQuery] =
|
|
4022
|
-
const [currentPage, setCurrentPage] =
|
|
4023
|
-
const [totalEntries, setTotalEntries] =
|
|
3816
|
+
const [modalOpen, setModalOpen] = useState18(false);
|
|
3817
|
+
const [pageSize, setPageSize] = useState18(10);
|
|
3818
|
+
const [searchQuery, setSearchQuery] = useState18("");
|
|
3819
|
+
const [currentPage, setCurrentPage] = useState18(1);
|
|
3820
|
+
const [totalEntries, setTotalEntries] = useState18(0);
|
|
4024
3821
|
const handlePageSizeChange = (e) => {
|
|
4025
3822
|
setPageSize(Number(e.target.value));
|
|
4026
3823
|
setCurrentPage(1);
|
|
4027
3824
|
};
|
|
3825
|
+
const saveMapping = async (payload, isEdit = false) => {
|
|
3826
|
+
var _a, _b, _c, _d, _e;
|
|
3827
|
+
try {
|
|
3828
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.userHierarchyNodeMapping) == null ? void 0 : _c[isEdit ? "update" : "create"];
|
|
3829
|
+
if (!endpoint) throw new Error(`User hierarchy node mapping ${isEdit ? "update" : "create"} endpoint is not configured.`);
|
|
3830
|
+
await getApiService()[isEdit ? "put" : "post"](endpoint, payload);
|
|
3831
|
+
await Swal6.fire("Success", `User hierarchy node mapping ${isEdit ? "updated" : "created"} successfully.`, "success");
|
|
3832
|
+
handleRefresh();
|
|
3833
|
+
return true;
|
|
3834
|
+
} catch (error) {
|
|
3835
|
+
await Swal6.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 ${isEdit ? "update" : "create"} user hierarchy node mapping.`, "error");
|
|
3836
|
+
return false;
|
|
3837
|
+
}
|
|
3838
|
+
};
|
|
4028
3839
|
return /* @__PURE__ */ jsxs25("div", { className: "fc:min-h-screen fc:bg-slate-50 fc:p-4 md:fc:fc:p-6", children: [
|
|
4029
3840
|
/* @__PURE__ */ jsxs25("div", { className: "fc:w-full fc:space-y-5", children: [
|
|
4030
3841
|
/* @__PURE__ */ jsx26(CommonHeader, { title: "User Hierarchy Node Mapping", breadcrumbs: [{
|
|
@@ -4054,15 +3865,15 @@ function User_hierarchy_mapping_main() {
|
|
|
4054
3865
|
] })
|
|
4055
3866
|
] })
|
|
4056
3867
|
] }),
|
|
4057
|
-
/* @__PURE__ */ jsx26("div", { ref: tableRef, children: /* @__PURE__ */ jsx26(UserHierarchyNodeMappingTable, { pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries },
|
|
3868
|
+
/* @__PURE__ */ jsx26("div", { ref: tableRef, children: /* @__PURE__ */ jsx26(UserHierarchyNodeMappingTable, { apiData, pageSize, searchQuery, currentPage, setCurrentPage, setTotalEntries, onUpdate: (payload) => saveMapping(payload, true), onDelete: (item) => saveMapping(__spreadProps(__spreadValues({}, item), { mappingId: item.mappingId, isActive: false, updatedBy: item.updatedBy || item.createdBy || "System" }), true) }) })
|
|
4058
3869
|
] })
|
|
4059
3870
|
] }),
|
|
4060
|
-
/* @__PURE__ */ jsx26(AddUserHierarchyNodeMappingModal, { isOpen: modalOpen, onClose: () => setModalOpen(false) })
|
|
3871
|
+
/* @__PURE__ */ jsx26(AddUserHierarchyNodeMappingModal, { isOpen: modalOpen, onClose: () => setModalOpen(false), onSave: (payload) => saveMapping(payload) })
|
|
4061
3872
|
] });
|
|
4062
3873
|
}
|
|
4063
3874
|
|
|
4064
3875
|
// src/components/document-configuration/DocumentConfigurationmain.jsx
|
|
4065
|
-
import React32, { useState as
|
|
3876
|
+
import React32, { useState as useState22, useRef as useRef7 } from "react";
|
|
4066
3877
|
|
|
4067
3878
|
// src/components/document-configuration/SearchBar.jsx
|
|
4068
3879
|
import React27 from "react";
|
|
@@ -4082,10 +3893,10 @@ function SearchBar3({
|
|
|
4082
3893
|
}
|
|
4083
3894
|
|
|
4084
3895
|
// src/components/document-configuration/DocumentConfigurationTable.jsx
|
|
4085
|
-
import React30, { useState as
|
|
3896
|
+
import React30, { useState as useState20, useEffect as useEffect13 } from "react";
|
|
4086
3897
|
|
|
4087
3898
|
// src/components/document-configuration/Edit.jsx
|
|
4088
|
-
import React28, { useState as
|
|
3899
|
+
import React28, { useState as useState19, useEffect as useEffect12 } from "react";
|
|
4089
3900
|
import { jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4090
3901
|
function EditDocumentConfiguration({
|
|
4091
3902
|
isOpen,
|
|
@@ -4093,7 +3904,7 @@ function EditDocumentConfiguration({
|
|
|
4093
3904
|
initialData,
|
|
4094
3905
|
onSave
|
|
4095
3906
|
}) {
|
|
4096
|
-
const [formData, setFormData] =
|
|
3907
|
+
const [formData, setFormData] = useState19({
|
|
4097
3908
|
docName: "",
|
|
4098
3909
|
stepId: "",
|
|
4099
3910
|
extensions: "",
|
|
@@ -4102,8 +3913,8 @@ function EditDocumentConfiguration({
|
|
|
4102
3913
|
isMandatory: false,
|
|
4103
3914
|
status: "Active"
|
|
4104
3915
|
});
|
|
4105
|
-
const [errors, setErrors] =
|
|
4106
|
-
|
|
3916
|
+
const [errors, setErrors] = useState19({});
|
|
3917
|
+
useEffect12(() => {
|
|
4107
3918
|
if (initialData) {
|
|
4108
3919
|
const sizeParts = (initialData.maxSize || "10 MB").split(" ");
|
|
4109
3920
|
setFormData({
|
|
@@ -4512,12 +4323,12 @@ function DocumentConfigTable({
|
|
|
4512
4323
|
status: "Active"
|
|
4513
4324
|
}
|
|
4514
4325
|
];
|
|
4515
|
-
const [data, setData] =
|
|
4516
|
-
const [sortOrder, setSortOrder] =
|
|
4517
|
-
const [sortKey, setSortKey] =
|
|
4518
|
-
const [isEditOpen, setIsEditOpen] =
|
|
4519
|
-
const [isDeleteOpen, setIsDeleteOpen] =
|
|
4520
|
-
const [selectedItem, setSelectedItem] =
|
|
4326
|
+
const [data, setData] = useState20(initialData);
|
|
4327
|
+
const [sortOrder, setSortOrder] = useState20("asc");
|
|
4328
|
+
const [sortKey, setSortKey] = useState20("docName");
|
|
4329
|
+
const [isEditOpen, setIsEditOpen] = useState20(false);
|
|
4330
|
+
const [isDeleteOpen, setIsDeleteOpen] = useState20(false);
|
|
4331
|
+
const [selectedItem, setSelectedItem] = useState20(null);
|
|
4521
4332
|
const handleSort = (columnKey) => {
|
|
4522
4333
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
4523
4334
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -4533,7 +4344,7 @@ function DocumentConfigTable({
|
|
|
4533
4344
|
const query = (searchQuery || "").toLowerCase();
|
|
4534
4345
|
return item.docName.toLowerCase().includes(query) || item.extensions.toLowerCase().includes(query) || item.stepId.toLowerCase().includes(query);
|
|
4535
4346
|
});
|
|
4536
|
-
|
|
4347
|
+
useEffect13(() => {
|
|
4537
4348
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
4538
4349
|
}, [filteredData.length, setTotalEntries]);
|
|
4539
4350
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -4739,19 +4550,19 @@ function DocumentConfigTable({
|
|
|
4739
4550
|
}
|
|
4740
4551
|
|
|
4741
4552
|
// src/components/document-configuration/AddDocumentConfigurationModal.jsx
|
|
4742
|
-
import React31, { useState as
|
|
4553
|
+
import React31, { useState as useState21 } from "react";
|
|
4743
4554
|
import { jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4744
4555
|
function AddDocumentConfigModal({
|
|
4745
4556
|
isOpen,
|
|
4746
4557
|
onClose
|
|
4747
4558
|
}) {
|
|
4748
|
-
const [isMandatory, setIsMandatory] =
|
|
4749
|
-
const [status, setStatus] =
|
|
4750
|
-
const [documentName, setDocumentName] =
|
|
4751
|
-
const [stepId, setStepId] =
|
|
4752
|
-
const [maxSize, setMaxSize] =
|
|
4753
|
-
const [allowedExtensions, setAllowedExtensions] =
|
|
4754
|
-
const [errors, setErrors] =
|
|
4559
|
+
const [isMandatory, setIsMandatory] = useState21(false);
|
|
4560
|
+
const [status, setStatus] = useState21("Active");
|
|
4561
|
+
const [documentName, setDocumentName] = useState21("");
|
|
4562
|
+
const [stepId, setStepId] = useState21("");
|
|
4563
|
+
const [maxSize, setMaxSize] = useState21("");
|
|
4564
|
+
const [allowedExtensions, setAllowedExtensions] = useState21("");
|
|
4565
|
+
const [errors, setErrors] = useState21({});
|
|
4755
4566
|
const handleSave = () => {
|
|
4756
4567
|
let newErrors = {};
|
|
4757
4568
|
if (!documentName.trim()) {
|
|
@@ -4884,17 +4695,17 @@ function AddDocumentConfigModal({
|
|
|
4884
4695
|
// src/components/document-configuration/DocumentConfigurationmain.jsx
|
|
4885
4696
|
import { jsx as jsx32, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4886
4697
|
function DocumentConfigurationmain() {
|
|
4887
|
-
const [refreshkey, setRefreshKey] =
|
|
4698
|
+
const [refreshkey, setRefreshKey] = useState22(0);
|
|
4888
4699
|
const handleRefresh = () => {
|
|
4889
4700
|
console.log("Table data refreshed!");
|
|
4890
4701
|
setRefreshKey((prev) => prev + 1);
|
|
4891
4702
|
};
|
|
4892
4703
|
const tableRef = useRef7(null);
|
|
4893
|
-
const [modalOpen, setModalOpen] =
|
|
4894
|
-
const [pageSize, setPageSize] =
|
|
4895
|
-
const [searchQuery, setSearchQuery] =
|
|
4896
|
-
const [currentPage, setCurrentPage] =
|
|
4897
|
-
const [totalEntries, setTotalEntries] =
|
|
4704
|
+
const [modalOpen, setModalOpen] = useState22(false);
|
|
4705
|
+
const [pageSize, setPageSize] = useState22(10);
|
|
4706
|
+
const [searchQuery, setSearchQuery] = useState22("");
|
|
4707
|
+
const [currentPage, setCurrentPage] = useState22(1);
|
|
4708
|
+
const [totalEntries, setTotalEntries] = useState22(0);
|
|
4898
4709
|
const handlePageSizeChange = (e) => {
|
|
4899
4710
|
setPageSize(Number(e.target.value));
|
|
4900
4711
|
setCurrentPage(1);
|
|
@@ -4934,7 +4745,7 @@ function DocumentConfigurationmain() {
|
|
|
4934
4745
|
}
|
|
4935
4746
|
|
|
4936
4747
|
// src/components/audit-log/AuditLogmain.jsx
|
|
4937
|
-
import React36, { useState as
|
|
4748
|
+
import React36, { useState as useState25, useRef as useRef8 } from "react";
|
|
4938
4749
|
|
|
4939
4750
|
// src/components/audit-log/SearchBar.jsx
|
|
4940
4751
|
import React33 from "react";
|
|
@@ -4954,7 +4765,7 @@ function SearchBar4({
|
|
|
4954
4765
|
}
|
|
4955
4766
|
|
|
4956
4767
|
// src/components/audit-log/AuditLogTable.jsx
|
|
4957
|
-
import React34, { useState as
|
|
4768
|
+
import React34, { useState as useState23, useEffect as useEffect14 } from "react";
|
|
4958
4769
|
import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4959
4770
|
function AuditLogTable({
|
|
4960
4771
|
pageSize,
|
|
@@ -5164,9 +4975,9 @@ function AuditLogTable({
|
|
|
5164
4975
|
ip: "192.168.1.45",
|
|
5165
4976
|
time: "2026-07-17 15:55"
|
|
5166
4977
|
}];
|
|
5167
|
-
const [data, setData] =
|
|
5168
|
-
const [sortOrder, setSortOrder] =
|
|
5169
|
-
const [sortKey, setSortKey] =
|
|
4978
|
+
const [data, setData] = useState23(initialData);
|
|
4979
|
+
const [sortOrder, setSortOrder] = useState23("asc");
|
|
4980
|
+
const [sortKey, setSortKey] = useState23("logId");
|
|
5170
4981
|
const handleSort = (columnKey) => {
|
|
5171
4982
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
5172
4983
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -5182,7 +4993,7 @@ function AuditLogTable({
|
|
|
5182
4993
|
const query = (searchQuery || "").toLowerCase();
|
|
5183
4994
|
return item.logId.toLowerCase().includes(query) || item.user.toLowerCase().includes(query) || item.section.toLowerCase().includes(query) || item.action.toLowerCase().includes(query);
|
|
5184
4995
|
});
|
|
5185
|
-
|
|
4996
|
+
useEffect14(() => {
|
|
5186
4997
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
5187
4998
|
}, [filteredData.length, setTotalEntries]);
|
|
5188
4999
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -5250,19 +5061,19 @@ function AuditLogTable({
|
|
|
5250
5061
|
}
|
|
5251
5062
|
|
|
5252
5063
|
// src/components/audit-log/AddAuditLogModal.jsx
|
|
5253
|
-
import React35, { useState as
|
|
5064
|
+
import React35, { useState as useState24 } from "react";
|
|
5254
5065
|
import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5255
5066
|
function AddAuditLogModal({
|
|
5256
5067
|
isOpen,
|
|
5257
5068
|
onClose
|
|
5258
5069
|
}) {
|
|
5259
|
-
const [logId, setLogId] =
|
|
5260
|
-
const [userName, setUserName] =
|
|
5261
|
-
const [actionType, setActionType] =
|
|
5262
|
-
const [ipAddress, setIpAddress] =
|
|
5263
|
-
const [sectionModule, setSectionModule] =
|
|
5264
|
-
const [timestamp, setTimestamp] =
|
|
5265
|
-
const [errors, setErrors] =
|
|
5070
|
+
const [logId, setLogId] = useState24("");
|
|
5071
|
+
const [userName, setUserName] = useState24("");
|
|
5072
|
+
const [actionType, setActionType] = useState24("");
|
|
5073
|
+
const [ipAddress, setIpAddress] = useState24("");
|
|
5074
|
+
const [sectionModule, setSectionModule] = useState24("");
|
|
5075
|
+
const [timestamp, setTimestamp] = useState24("");
|
|
5076
|
+
const [errors, setErrors] = useState24({});
|
|
5266
5077
|
const handleCommit = () => {
|
|
5267
5078
|
let newErrors = {};
|
|
5268
5079
|
if (!logId.trim()) newErrors.logId = "Log ID is required";
|
|
@@ -5381,17 +5192,17 @@ function AddAuditLogModal({
|
|
|
5381
5192
|
// src/components/audit-log/AuditLogmain.jsx
|
|
5382
5193
|
import { jsx as jsx36, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5383
5194
|
function AuditLogmain() {
|
|
5384
|
-
const [refreshkey, setRefreshKey] =
|
|
5195
|
+
const [refreshkey, setRefreshKey] = useState25(0);
|
|
5385
5196
|
const handleRefresh = () => {
|
|
5386
5197
|
console.log("Table data refreshed!");
|
|
5387
5198
|
setRefreshKey((prev) => prev + 1);
|
|
5388
5199
|
};
|
|
5389
5200
|
const tableRef = useRef8(null);
|
|
5390
|
-
const [modalOpen, setModalOpen] =
|
|
5391
|
-
const [pageSize, setPageSize] =
|
|
5392
|
-
const [searchQuery, setSearchQuery] =
|
|
5393
|
-
const [currentPage, setCurrentPage] =
|
|
5394
|
-
const [totalEntries, setTotalEntries] =
|
|
5201
|
+
const [modalOpen, setModalOpen] = useState25(false);
|
|
5202
|
+
const [pageSize, setPageSize] = useState25(10);
|
|
5203
|
+
const [searchQuery, setSearchQuery] = useState25("");
|
|
5204
|
+
const [currentPage, setCurrentPage] = useState25(1);
|
|
5205
|
+
const [totalEntries, setTotalEntries] = useState25(0);
|
|
5395
5206
|
const handlePageSizeChange = (e) => {
|
|
5396
5207
|
setPageSize(Number(e.target.value));
|
|
5397
5208
|
setCurrentPage(1);
|
|
@@ -5450,7 +5261,7 @@ function AuditLogmain() {
|
|
|
5450
5261
|
}
|
|
5451
5262
|
|
|
5452
5263
|
// src/components/movement-history/MovementHistorymain.jsx
|
|
5453
|
-
import React40, { useState as
|
|
5264
|
+
import React40, { useState as useState28, useRef as useRef9 } from "react";
|
|
5454
5265
|
|
|
5455
5266
|
// src/components/movement-history/SearchBar.jsx
|
|
5456
5267
|
import React37 from "react";
|
|
@@ -5470,7 +5281,7 @@ function SearchBar5({
|
|
|
5470
5281
|
}
|
|
5471
5282
|
|
|
5472
5283
|
// src/components/movement-history/MovementHistoryTable.jsx
|
|
5473
|
-
import React38, { useState as
|
|
5284
|
+
import React38, { useState as useState26, useEffect as useEffect15 } from "react";
|
|
5474
5285
|
import { jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5475
5286
|
function MovementHistoryTable({
|
|
5476
5287
|
pageSize,
|
|
@@ -5680,9 +5491,9 @@ function MovementHistoryTable({
|
|
|
5680
5491
|
toStepId: "APPROVE",
|
|
5681
5492
|
movedOn: "2026-02-12"
|
|
5682
5493
|
}];
|
|
5683
|
-
const [data, setData] =
|
|
5684
|
-
const [sortOrder, setSortOrder] =
|
|
5685
|
-
const [sortKey, setSortKey] =
|
|
5494
|
+
const [data, setData] = useState26(initialData);
|
|
5495
|
+
const [sortOrder, setSortOrder] = useState26("asc");
|
|
5496
|
+
const [sortKey, setSortKey] = useState26("movementHistoryId");
|
|
5686
5497
|
const handleSort = (columnKey) => {
|
|
5687
5498
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
5688
5499
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -5698,7 +5509,7 @@ function MovementHistoryTable({
|
|
|
5698
5509
|
const query = (searchQuery || "").toLowerCase();
|
|
5699
5510
|
return item.movementHistoryId.toLowerCase().includes(query) || item.name.toLowerCase().includes(query) || item.toStepId.toLowerCase().includes(query);
|
|
5700
5511
|
});
|
|
5701
|
-
|
|
5512
|
+
useEffect15(() => {
|
|
5702
5513
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
5703
5514
|
}, [filteredData.length, setTotalEntries]);
|
|
5704
5515
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -5769,19 +5580,19 @@ function MovementHistoryTable({
|
|
|
5769
5580
|
}
|
|
5770
5581
|
|
|
5771
5582
|
// src/components/movement-history/AddMovementHistoryModal.jsx
|
|
5772
|
-
import React39, { useState as
|
|
5583
|
+
import React39, { useState as useState27 } from "react";
|
|
5773
5584
|
import { jsx as jsx39, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5774
5585
|
function AddMovementHistoryModal({
|
|
5775
5586
|
isOpen,
|
|
5776
5587
|
onClose
|
|
5777
5588
|
}) {
|
|
5778
|
-
const [movementHistoryId, setMovementHistoryId] =
|
|
5779
|
-
const [fileInstanceId, setFileInstanceId] =
|
|
5780
|
-
const [fromStepId, setFromStepId] =
|
|
5781
|
-
const [toStepId, setToStepId] =
|
|
5782
|
-
const [actionCode, setActionCode] =
|
|
5783
|
-
const [movedOn, setMovedOn] =
|
|
5784
|
-
const [errors, setErrors] =
|
|
5589
|
+
const [movementHistoryId, setMovementHistoryId] = useState27("");
|
|
5590
|
+
const [fileInstanceId, setFileInstanceId] = useState27("");
|
|
5591
|
+
const [fromStepId, setFromStepId] = useState27("");
|
|
5592
|
+
const [toStepId, setToStepId] = useState27("");
|
|
5593
|
+
const [actionCode, setActionCode] = useState27("");
|
|
5594
|
+
const [movedOn, setMovedOn] = useState27("");
|
|
5595
|
+
const [errors, setErrors] = useState27({});
|
|
5785
5596
|
const handleSaveRecord = () => {
|
|
5786
5597
|
let newErrors = {};
|
|
5787
5598
|
if (!movementHistoryId.toString().trim()) newErrors.movementHistoryId = "Movement History ID is required";
|
|
@@ -5896,17 +5707,17 @@ function AddMovementHistoryModal({
|
|
|
5896
5707
|
// src/components/movement-history/MovementHistorymain.jsx
|
|
5897
5708
|
import { jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5898
5709
|
function MovementHistorymain() {
|
|
5899
|
-
const [refreshkey, setRefreshKey] =
|
|
5710
|
+
const [refreshkey, setRefreshKey] = useState28(0);
|
|
5900
5711
|
const handleRefresh = () => {
|
|
5901
5712
|
console.log("Table data refreshed!");
|
|
5902
5713
|
setRefreshKey((prev) => prev + 1);
|
|
5903
5714
|
};
|
|
5904
5715
|
const tableRef = useRef9(null);
|
|
5905
|
-
const [modalOpen, setModalOpen] =
|
|
5906
|
-
const [pageSize, setPageSize] =
|
|
5907
|
-
const [searchQuery, setSearchQuery] =
|
|
5908
|
-
const [currentPage, setCurrentPage] =
|
|
5909
|
-
const [totalEntries, setTotalEntries] =
|
|
5716
|
+
const [modalOpen, setModalOpen] = useState28(false);
|
|
5717
|
+
const [pageSize, setPageSize] = useState28(10);
|
|
5718
|
+
const [searchQuery, setSearchQuery] = useState28("");
|
|
5719
|
+
const [currentPage, setCurrentPage] = useState28(1);
|
|
5720
|
+
const [totalEntries, setTotalEntries] = useState28(0);
|
|
5910
5721
|
const handlePageSizeChange = (e) => {
|
|
5911
5722
|
setPageSize(Number(e.target.value));
|
|
5912
5723
|
setCurrentPage(1);
|
|
@@ -5949,7 +5760,7 @@ function MovementHistorymain() {
|
|
|
5949
5760
|
}
|
|
5950
5761
|
|
|
5951
5762
|
// src/components/task-permission/TaskPermissionMain.jsx
|
|
5952
|
-
import React44, { useState as
|
|
5763
|
+
import React44, { useState as useState31, useRef as useRef10 } from "react";
|
|
5953
5764
|
|
|
5954
5765
|
// src/components/task-permission/SearchBar.js
|
|
5955
5766
|
import React41 from "react";
|
|
@@ -5980,7 +5791,7 @@ function SearchBar6({
|
|
|
5980
5791
|
}
|
|
5981
5792
|
|
|
5982
5793
|
// src/components/task-permission/Table.js
|
|
5983
|
-
import React42, { useState as
|
|
5794
|
+
import React42, { useState as useState29, useEffect as useEffect16 } from "react";
|
|
5984
5795
|
import { jsx as jsx42, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5985
5796
|
function Table({
|
|
5986
5797
|
pageSize,
|
|
@@ -6165,12 +5976,12 @@ function Table({
|
|
|
6165
5976
|
permissionType: "Write",
|
|
6166
5977
|
isStatusEnabled: true
|
|
6167
5978
|
}];
|
|
6168
|
-
const [data, setData] =
|
|
6169
|
-
const [sortOrder, setSortOrder] =
|
|
6170
|
-
const [sortKey, setSortKey] =
|
|
6171
|
-
const [selectedItem, setSelectedItem] =
|
|
6172
|
-
const [isEditModalOpen, setIsEditModalOpen] =
|
|
6173
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] =
|
|
5979
|
+
const [data, setData] = useState29(initialData);
|
|
5980
|
+
const [sortOrder, setSortOrder] = useState29("asc");
|
|
5981
|
+
const [sortKey, setSortKey] = useState29("taskId");
|
|
5982
|
+
const [selectedItem, setSelectedItem] = useState29(null);
|
|
5983
|
+
const [isEditModalOpen, setIsEditModalOpen] = useState29(false);
|
|
5984
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState29(false);
|
|
6174
5985
|
const handleEdit = (item) => {
|
|
6175
5986
|
setSelectedItem(item);
|
|
6176
5987
|
setIsEditModalOpen(true);
|
|
@@ -6227,7 +6038,7 @@ function Table({
|
|
|
6227
6038
|
}
|
|
6228
6039
|
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);
|
|
6229
6040
|
});
|
|
6230
|
-
|
|
6041
|
+
useEffect16(() => {
|
|
6231
6042
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
6232
6043
|
}, [filteredData.length, setTotalEntries]);
|
|
6233
6044
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -6350,7 +6161,7 @@ function Table({
|
|
|
6350
6161
|
}
|
|
6351
6162
|
|
|
6352
6163
|
// src/components/task-permission/Popup.js
|
|
6353
|
-
import React43, { useState as
|
|
6164
|
+
import React43, { useState as useState30 } from "react";
|
|
6354
6165
|
import { jsx as jsx43, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6355
6166
|
function Popup({
|
|
6356
6167
|
isOpen,
|
|
@@ -6358,13 +6169,13 @@ function Popup({
|
|
|
6358
6169
|
onSave
|
|
6359
6170
|
}) {
|
|
6360
6171
|
if (!isOpen) return null;
|
|
6361
|
-
const [stepName, setStepName] =
|
|
6362
|
-
const [stepCode, setStepCode] =
|
|
6363
|
-
const [workflow, setWorkflow] =
|
|
6364
|
-
const [canView, setCanView] =
|
|
6365
|
-
const [canEdit, setCanEdit] =
|
|
6366
|
-
const [canApprove, setCanApprove] =
|
|
6367
|
-
const [canReject, setCanReject] =
|
|
6172
|
+
const [stepName, setStepName] = useState30("");
|
|
6173
|
+
const [stepCode, setStepCode] = useState30("");
|
|
6174
|
+
const [workflow, setWorkflow] = useState30("");
|
|
6175
|
+
const [canView, setCanView] = useState30(false);
|
|
6176
|
+
const [canEdit, setCanEdit] = useState30(false);
|
|
6177
|
+
const [canApprove, setCanApprove] = useState30(false);
|
|
6178
|
+
const [canReject, setCanReject] = useState30(false);
|
|
6368
6179
|
const handleSubmit = (e) => {
|
|
6369
6180
|
e.preventDefault();
|
|
6370
6181
|
if (!stepName || !stepCode || !workflow) {
|
|
@@ -6481,17 +6292,17 @@ function Popup({
|
|
|
6481
6292
|
// src/components/task-permission/TaskPermissionMain.jsx
|
|
6482
6293
|
import { jsx as jsx44, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6483
6294
|
function TaskPermissionMain() {
|
|
6484
|
-
const [refreshkey, setRefreshKey] =
|
|
6295
|
+
const [refreshkey, setRefreshKey] = useState31(0);
|
|
6485
6296
|
const handleRefresh = () => {
|
|
6486
6297
|
console.log("Table data refreshed!");
|
|
6487
6298
|
setRefreshKey((prev) => prev + 1);
|
|
6488
6299
|
};
|
|
6489
6300
|
const tableRef = useRef10(null);
|
|
6490
|
-
const [showModal, setShowModal] =
|
|
6491
|
-
const [pageSize, setPageSize] =
|
|
6492
|
-
const [searchQuery, setSearchQuery] =
|
|
6493
|
-
const [currentPage, setCurrentPage] =
|
|
6494
|
-
const [totalEntries, setTotalEntries] =
|
|
6301
|
+
const [showModal, setShowModal] = useState31(false);
|
|
6302
|
+
const [pageSize, setPageSize] = useState31(10);
|
|
6303
|
+
const [searchQuery, setSearchQuery] = useState31("");
|
|
6304
|
+
const [currentPage, setCurrentPage] = useState31(1);
|
|
6305
|
+
const [totalEntries, setTotalEntries] = useState31(0);
|
|
6495
6306
|
const handlePageSizeChange = (e) => {
|
|
6496
6307
|
setPageSize(Number(e.target.value));
|
|
6497
6308
|
setCurrentPage(1);
|
|
@@ -6533,7 +6344,7 @@ function TaskPermissionMain() {
|
|
|
6533
6344
|
}
|
|
6534
6345
|
|
|
6535
6346
|
// src/components/Workflow-Setting/WorkflowSettingMain.jsx
|
|
6536
|
-
import React48, { useState as
|
|
6347
|
+
import React48, { useState as useState34, useRef as useRef11 } from "react";
|
|
6537
6348
|
|
|
6538
6349
|
// src/components/Workflow-Setting/SearchBar.js
|
|
6539
6350
|
import React45 from "react";
|
|
@@ -6564,7 +6375,7 @@ function SearchBar7({
|
|
|
6564
6375
|
}
|
|
6565
6376
|
|
|
6566
6377
|
// src/components/Workflow-Setting/Table.js
|
|
6567
|
-
import React46, { useState as
|
|
6378
|
+
import React46, { useState as useState32, useEffect as useEffect17 } from "react";
|
|
6568
6379
|
import { jsx as jsx46, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6569
6380
|
function Table2({
|
|
6570
6381
|
pageSize,
|
|
@@ -6749,12 +6560,12 @@ function Table2({
|
|
|
6749
6560
|
SLA: "2 Hours",
|
|
6750
6561
|
isActive: true
|
|
6751
6562
|
}];
|
|
6752
|
-
const [data, setData] =
|
|
6753
|
-
const [sortOrder, setSortOrder] =
|
|
6754
|
-
const [sortKey, setSortKey] =
|
|
6755
|
-
const [selectedItem, setSelectedItem] =
|
|
6756
|
-
const [isEditModalOpen, setIsEditModalOpen] =
|
|
6757
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] =
|
|
6563
|
+
const [data, setData] = useState32(initialData);
|
|
6564
|
+
const [sortOrder, setSortOrder] = useState32("asc");
|
|
6565
|
+
const [sortKey, setSortKey] = useState32("settingId");
|
|
6566
|
+
const [selectedItem, setSelectedItem] = useState32(null);
|
|
6567
|
+
const [isEditModalOpen, setIsEditModalOpen] = useState32(false);
|
|
6568
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState32(false);
|
|
6758
6569
|
const handleEdit = (item) => {
|
|
6759
6570
|
setSelectedItem(item);
|
|
6760
6571
|
setIsEditModalOpen(true);
|
|
@@ -6811,7 +6622,7 @@ function Table2({
|
|
|
6811
6622
|
}
|
|
6812
6623
|
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);
|
|
6813
6624
|
});
|
|
6814
|
-
|
|
6625
|
+
useEffect17(() => {
|
|
6815
6626
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
6816
6627
|
}, [filteredData.length, setTotalEntries]);
|
|
6817
6628
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -6944,7 +6755,7 @@ function Table2({
|
|
|
6944
6755
|
}
|
|
6945
6756
|
|
|
6946
6757
|
// src/components/Workflow-Setting/Popup.js
|
|
6947
|
-
import React47, { useState as
|
|
6758
|
+
import React47, { useState as useState33 } from "react";
|
|
6948
6759
|
import { jsx as jsx47, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6949
6760
|
function Popup2({
|
|
6950
6761
|
isOpen,
|
|
@@ -6952,8 +6763,8 @@ function Popup2({
|
|
|
6952
6763
|
onSave
|
|
6953
6764
|
}) {
|
|
6954
6765
|
if (!isOpen) return null;
|
|
6955
|
-
const [settingKey, setSettingKey] =
|
|
6956
|
-
const [settingValue, setSettingValue] =
|
|
6766
|
+
const [settingKey, setSettingKey] = useState33("");
|
|
6767
|
+
const [settingValue, setSettingValue] = useState33("");
|
|
6957
6768
|
const handleSubmit = (e) => {
|
|
6958
6769
|
e.preventDefault();
|
|
6959
6770
|
if (!settingKey || !settingValue) {
|
|
@@ -7004,17 +6815,17 @@ function Popup2({
|
|
|
7004
6815
|
// src/components/Workflow-Setting/WorkflowSettingMain.jsx
|
|
7005
6816
|
import { jsx as jsx48, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7006
6817
|
function WorkflowSettingMain() {
|
|
7007
|
-
const [refreshkey, setRefreshKey] =
|
|
6818
|
+
const [refreshkey, setRefreshKey] = useState34(0);
|
|
7008
6819
|
const handleRefresh = () => {
|
|
7009
6820
|
console.log("Table data refreshed!");
|
|
7010
6821
|
setRefreshKey((prev) => prev + 1);
|
|
7011
6822
|
};
|
|
7012
6823
|
const tableRef = useRef11(null);
|
|
7013
|
-
const [showModal, setShowModal] =
|
|
7014
|
-
const [pageSize, setPageSize] =
|
|
7015
|
-
const [searchQuery, setSearchQuery] =
|
|
7016
|
-
const [currentPage, setCurrentPage] =
|
|
7017
|
-
const [totalEntries, setTotalEntries] =
|
|
6824
|
+
const [showModal, setShowModal] = useState34(false);
|
|
6825
|
+
const [pageSize, setPageSize] = useState34(10);
|
|
6826
|
+
const [searchQuery, setSearchQuery] = useState34("");
|
|
6827
|
+
const [currentPage, setCurrentPage] = useState34(1);
|
|
6828
|
+
const [totalEntries, setTotalEntries] = useState34(0);
|
|
7018
6829
|
const handlePageSizeChange = (e) => {
|
|
7019
6830
|
setPageSize(Number(e.target.value));
|
|
7020
6831
|
setCurrentPage(1);
|
|
@@ -7056,7 +6867,7 @@ function WorkflowSettingMain() {
|
|
|
7056
6867
|
}
|
|
7057
6868
|
|
|
7058
6869
|
// src/components/notification/NotificationMain.jsx
|
|
7059
|
-
import React52, { useState as
|
|
6870
|
+
import React52, { useState as useState37, useRef as useRef12 } from "react";
|
|
7060
6871
|
|
|
7061
6872
|
// src/components/notification/SearchBar.js
|
|
7062
6873
|
import React49 from "react";
|
|
@@ -7087,7 +6898,7 @@ function SearchBar8({
|
|
|
7087
6898
|
}
|
|
7088
6899
|
|
|
7089
6900
|
// src/components/notification/Table.js
|
|
7090
|
-
import React50, { useState as
|
|
6901
|
+
import React50, { useState as useState35, useEffect as useEffect18 } from "react";
|
|
7091
6902
|
import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
7092
6903
|
function Table3({
|
|
7093
6904
|
pageSize,
|
|
@@ -7272,12 +7083,12 @@ function Table3({
|
|
|
7272
7083
|
recipientGroup: "Risk Assessment",
|
|
7273
7084
|
isMuted: false
|
|
7274
7085
|
}];
|
|
7275
|
-
const [data, setData] =
|
|
7276
|
-
const [sortOrder, setSortOrder] =
|
|
7277
|
-
const [sortKey, setSortKey] =
|
|
7278
|
-
const [selectedItem, setSelectedItem] =
|
|
7279
|
-
const [isEditModalOpen, setIsEditModalOpen] =
|
|
7280
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] =
|
|
7086
|
+
const [data, setData] = useState35(initialData);
|
|
7087
|
+
const [sortOrder, setSortOrder] = useState35("asc");
|
|
7088
|
+
const [sortKey, setSortKey] = useState35("notificationId");
|
|
7089
|
+
const [selectedItem, setSelectedItem] = useState35(null);
|
|
7090
|
+
const [isEditModalOpen, setIsEditModalOpen] = useState35(false);
|
|
7091
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState35(false);
|
|
7281
7092
|
const handleEdit = (item) => {
|
|
7282
7093
|
setSelectedItem(item);
|
|
7283
7094
|
setIsEditModalOpen(true);
|
|
@@ -7334,7 +7145,7 @@ function Table3({
|
|
|
7334
7145
|
}
|
|
7335
7146
|
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);
|
|
7336
7147
|
});
|
|
7337
|
-
|
|
7148
|
+
useEffect18(() => {
|
|
7338
7149
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
7339
7150
|
}, [filteredData.length, setTotalEntries]);
|
|
7340
7151
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -7462,7 +7273,7 @@ function Table3({
|
|
|
7462
7273
|
}
|
|
7463
7274
|
|
|
7464
7275
|
// src/components/notification/Popup.js
|
|
7465
|
-
import React51, { useState as
|
|
7276
|
+
import React51, { useState as useState36 } from "react";
|
|
7466
7277
|
import { jsx as jsx51, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
7467
7278
|
function Popup3({
|
|
7468
7279
|
isOpen,
|
|
@@ -7470,10 +7281,10 @@ function Popup3({
|
|
|
7470
7281
|
onSave
|
|
7471
7282
|
}) {
|
|
7472
7283
|
if (!isOpen) return null;
|
|
7473
|
-
const [fileInstanceId, setFileInstanceId] =
|
|
7474
|
-
const [userId, setUserId] =
|
|
7475
|
-
const [type, setType] =
|
|
7476
|
-
const [message, setMessage] =
|
|
7284
|
+
const [fileInstanceId, setFileInstanceId] = useState36("");
|
|
7285
|
+
const [userId, setUserId] = useState36("");
|
|
7286
|
+
const [type, setType] = useState36("");
|
|
7287
|
+
const [message, setMessage] = useState36("");
|
|
7477
7288
|
const handleSubmit = (e) => {
|
|
7478
7289
|
e.preventDefault();
|
|
7479
7290
|
if (!fileInstanceId || !userId || !type || !message) {
|
|
@@ -7544,17 +7355,17 @@ function Popup3({
|
|
|
7544
7355
|
// src/components/notification/NotificationMain.jsx
|
|
7545
7356
|
import { jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7546
7357
|
function NotificationMain() {
|
|
7547
|
-
const [refreshkey, setRefreshKey] =
|
|
7358
|
+
const [refreshkey, setRefreshKey] = useState37(0);
|
|
7548
7359
|
const handleRefresh = () => {
|
|
7549
7360
|
console.log("Table data refreshed!");
|
|
7550
7361
|
setRefreshKey((prev) => prev + 1);
|
|
7551
7362
|
};
|
|
7552
7363
|
const tableRef = useRef12(null);
|
|
7553
|
-
const [showModal, setShowModal] =
|
|
7554
|
-
const [pageSize, setPageSize] =
|
|
7555
|
-
const [searchQuery, setSearchQuery] =
|
|
7556
|
-
const [currentPage, setCurrentPage] =
|
|
7557
|
-
const [totalEntries, setTotalEntries] =
|
|
7364
|
+
const [showModal, setShowModal] = useState37(false);
|
|
7365
|
+
const [pageSize, setPageSize] = useState37(10);
|
|
7366
|
+
const [searchQuery, setSearchQuery] = useState37("");
|
|
7367
|
+
const [currentPage, setCurrentPage] = useState37(1);
|
|
7368
|
+
const [totalEntries, setTotalEntries] = useState37(0);
|
|
7558
7369
|
const handlePageSizeChange = (e) => {
|
|
7559
7370
|
setPageSize(Number(e.target.value));
|
|
7560
7371
|
setCurrentPage(1);
|
|
@@ -7593,7 +7404,7 @@ function NotificationMain() {
|
|
|
7593
7404
|
}
|
|
7594
7405
|
|
|
7595
7406
|
// src/components/task-instance/task_instance_main.jsx
|
|
7596
|
-
import React58, { useState as
|
|
7407
|
+
import React58, { useState as useState40, useRef as useRef13 } from "react";
|
|
7597
7408
|
|
|
7598
7409
|
// src/components/task-instance/searchbartaskinstance.jsx
|
|
7599
7410
|
import React53 from "react";
|
|
@@ -7620,10 +7431,10 @@ function TaskInstanceSearchBar({
|
|
|
7620
7431
|
}
|
|
7621
7432
|
|
|
7622
7433
|
// src/components/task-instance/taskinstancetable.jsx
|
|
7623
|
-
import React56, { useState as
|
|
7434
|
+
import React56, { useState as useState39, useEffect as useEffect20 } from "react";
|
|
7624
7435
|
|
|
7625
7436
|
// src/components/task-instance/edit-instance.jsx
|
|
7626
|
-
import React54, { useEffect as
|
|
7437
|
+
import React54, { useEffect as useEffect19, useState as useState38 } from "react";
|
|
7627
7438
|
import { jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
7628
7439
|
function EditTaskInstanceModal({
|
|
7629
7440
|
isOpen,
|
|
@@ -7631,7 +7442,7 @@ function EditTaskInstanceModal({
|
|
|
7631
7442
|
selectedTask,
|
|
7632
7443
|
onSave
|
|
7633
7444
|
}) {
|
|
7634
|
-
const [formData, setFormData] =
|
|
7445
|
+
const [formData, setFormData] = useState38({
|
|
7635
7446
|
assignedUserId: "",
|
|
7636
7447
|
status: "",
|
|
7637
7448
|
dueDate: "",
|
|
@@ -7639,7 +7450,7 @@ function EditTaskInstanceModal({
|
|
|
7639
7450
|
escalatedOn: "",
|
|
7640
7451
|
slaStatus: ""
|
|
7641
7452
|
});
|
|
7642
|
-
|
|
7453
|
+
useEffect19(() => {
|
|
7643
7454
|
if (selectedTask) {
|
|
7644
7455
|
setFormData({
|
|
7645
7456
|
assignedUserId: selectedTask.assignedUserId || selectedTask.assigned_user_id || "",
|
|
@@ -8142,9 +7953,9 @@ function TaskInstanceTable({
|
|
|
8142
7953
|
reminderSentOn: "2026-08-06",
|
|
8143
7954
|
escalatedOn: ""
|
|
8144
7955
|
}];
|
|
8145
|
-
const [data, setData] =
|
|
8146
|
-
const [sortOrder, setSortOrder] =
|
|
8147
|
-
const [sortKey, setSortKey] =
|
|
7956
|
+
const [data, setData] = useState39(initialData);
|
|
7957
|
+
const [sortOrder, setSortOrder] = useState39("asc");
|
|
7958
|
+
const [sortKey, setSortKey] = useState39("taskInstanceId");
|
|
8148
7959
|
const handleSort = (columnKey) => {
|
|
8149
7960
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
8150
7961
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -8160,7 +7971,7 @@ function TaskInstanceTable({
|
|
|
8160
7971
|
const query = (searchQuery || "").toLowerCase();
|
|
8161
7972
|
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);
|
|
8162
7973
|
});
|
|
8163
|
-
|
|
7974
|
+
useEffect20(() => {
|
|
8164
7975
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
8165
7976
|
}, [filteredData.length, setTotalEntries]);
|
|
8166
7977
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -8169,9 +7980,9 @@ function TaskInstanceTable({
|
|
|
8169
7980
|
const pageNumbers = Array.from({
|
|
8170
7981
|
length: totalPages
|
|
8171
7982
|
}, (_, i) => i + 1);
|
|
8172
|
-
const [showEditPopup, setShowEditPopup] =
|
|
8173
|
-
const [showDeletePopup, setShowDeletePopup] =
|
|
8174
|
-
const [selectedItem, setSelectedItem] =
|
|
7983
|
+
const [showEditPopup, setShowEditPopup] = useState39(false);
|
|
7984
|
+
const [showDeletePopup, setShowDeletePopup] = useState39(false);
|
|
7985
|
+
const [selectedItem, setSelectedItem] = useState39(null);
|
|
8175
7986
|
const openEditPopup = (item) => {
|
|
8176
7987
|
setSelectedItem(item);
|
|
8177
7988
|
setShowEditPopup(true);
|
|
@@ -8425,17 +8236,17 @@ function AddTaskInstanceModal({
|
|
|
8425
8236
|
// src/components/task-instance/task_instance_main.jsx
|
|
8426
8237
|
import { jsx as jsx58, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
8427
8238
|
function Task_instance_main() {
|
|
8428
|
-
const [refreshkey, setRefreshKey] =
|
|
8239
|
+
const [refreshkey, setRefreshKey] = useState40(0);
|
|
8429
8240
|
const handleRefresh = () => {
|
|
8430
8241
|
console.log("Table data refreshed!");
|
|
8431
8242
|
setRefreshKey((prev) => prev + 1);
|
|
8432
8243
|
};
|
|
8433
|
-
const [modalOpen, setModalOpen] =
|
|
8434
|
-
const [pageSize, setPageSize] =
|
|
8435
|
-
const [searchQuery, setSearchQuery] =
|
|
8244
|
+
const [modalOpen, setModalOpen] = useState40(false);
|
|
8245
|
+
const [pageSize, setPageSize] = useState40(10);
|
|
8246
|
+
const [searchQuery, setSearchQuery] = useState40("");
|
|
8436
8247
|
const tableRef = useRef13(null);
|
|
8437
|
-
const [currentPage, setCurrentPage] =
|
|
8438
|
-
const [totalEntries, setTotalEntries] =
|
|
8248
|
+
const [currentPage, setCurrentPage] = useState40(1);
|
|
8249
|
+
const [totalEntries, setTotalEntries] = useState40(0);
|
|
8439
8250
|
const handlePageSizeChange = (e) => {
|
|
8440
8251
|
setPageSize(Number(e.target.value));
|
|
8441
8252
|
setCurrentPage(1);
|
|
@@ -8502,7 +8313,7 @@ function Task_instance_main() {
|
|
|
8502
8313
|
}
|
|
8503
8314
|
|
|
8504
8315
|
// src/components/comment/comment_main.jsx
|
|
8505
|
-
import React62, { useState as
|
|
8316
|
+
import React62, { useState as useState43, useRef as useRef14 } from "react";
|
|
8506
8317
|
|
|
8507
8318
|
// src/components/comment/searchbarcomment.jsx
|
|
8508
8319
|
import React59 from "react";
|
|
@@ -8529,7 +8340,7 @@ function CommentSearchBar({
|
|
|
8529
8340
|
}
|
|
8530
8341
|
|
|
8531
8342
|
// src/components/comment/commenttable.jsx
|
|
8532
|
-
import React60, { useState as
|
|
8343
|
+
import React60, { useState as useState41, useEffect as useEffect21 } from "react";
|
|
8533
8344
|
import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8534
8345
|
function CommentTable({
|
|
8535
8346
|
pageSize,
|
|
@@ -8739,9 +8550,9 @@ function CommentTable({
|
|
|
8739
8550
|
createdOn: "08 Aug 2026",
|
|
8740
8551
|
status: true
|
|
8741
8552
|
}];
|
|
8742
|
-
const [data, setData] =
|
|
8743
|
-
const [sortOrder, setSortOrder] =
|
|
8744
|
-
const [sortKey, setSortKey] =
|
|
8553
|
+
const [data, setData] = useState41(initialData);
|
|
8554
|
+
const [sortOrder, setSortOrder] = useState41("asc");
|
|
8555
|
+
const [sortKey, setSortKey] = useState41("commentId");
|
|
8745
8556
|
const handleSort = (columnKey) => {
|
|
8746
8557
|
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
8747
8558
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
@@ -8757,7 +8568,7 @@ function CommentTable({
|
|
|
8757
8568
|
const query = (searchQuery || "").toLowerCase();
|
|
8758
8569
|
return String(item.commentId).toLowerCase().includes(query) || String(item.taskInstanceId).toLowerCase().includes(query) || item.comment.toLowerCase().includes(query) || String(item.commentedBy).toLowerCase().includes(query);
|
|
8759
8570
|
});
|
|
8760
|
-
|
|
8571
|
+
useEffect21(() => {
|
|
8761
8572
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
8762
8573
|
}, [filteredData.length, setTotalEntries]);
|
|
8763
8574
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -8813,15 +8624,15 @@ function CommentTable({
|
|
|
8813
8624
|
}
|
|
8814
8625
|
|
|
8815
8626
|
// src/components/comment/addcomment.jsx
|
|
8816
|
-
import React61, { useState as
|
|
8627
|
+
import React61, { useState as useState42 } from "react";
|
|
8817
8628
|
import { jsx as jsx61, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8818
8629
|
function AddCommentModal({
|
|
8819
8630
|
isOpen,
|
|
8820
8631
|
onClose
|
|
8821
8632
|
}) {
|
|
8822
|
-
const [allowEdit, setAllowEdit] =
|
|
8823
|
-
const [pinComment, setPinComment] =
|
|
8824
|
-
const [sendNotification, setSendNotification] =
|
|
8633
|
+
const [allowEdit, setAllowEdit] = useState42(true);
|
|
8634
|
+
const [pinComment, setPinComment] = useState42(true);
|
|
8635
|
+
const [sendNotification, setSendNotification] = useState42(false);
|
|
8825
8636
|
if (!isOpen) return null;
|
|
8826
8637
|
return /* @__PURE__ */ jsxs60("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
8827
8638
|
/* @__PURE__ */ jsx61("div", { className: "fc:fixed fc:inset-0 fc:bg-slate-900/50 fc:backdrop-blur-sm fc:transition-opacity fc:duration-200", onClick: onClose }),
|
|
@@ -9018,11 +8829,11 @@ function AddCommentModal({
|
|
|
9018
8829
|
// src/components/comment/comment_main.jsx
|
|
9019
8830
|
import { jsx as jsx62, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9020
8831
|
function Comment_main() {
|
|
9021
|
-
const [modalOpen, setModalOpen] =
|
|
9022
|
-
const [pageSize, setPageSize] =
|
|
9023
|
-
const [searchQuery, setSearchQuery] =
|
|
9024
|
-
const [currentPage, setCurrentPage] =
|
|
9025
|
-
const [totalEntries, setTotalEntries] =
|
|
8832
|
+
const [modalOpen, setModalOpen] = useState43(false);
|
|
8833
|
+
const [pageSize, setPageSize] = useState43(10);
|
|
8834
|
+
const [searchQuery, setSearchQuery] = useState43("");
|
|
8835
|
+
const [currentPage, setCurrentPage] = useState43(1);
|
|
8836
|
+
const [totalEntries, setTotalEntries] = useState43(0);
|
|
9026
8837
|
const tableRef = useRef14(null);
|
|
9027
8838
|
const handlePageSizeChange = (e) => {
|
|
9028
8839
|
setPageSize(Number(e.target.value));
|
|
@@ -9092,8 +8903,8 @@ function Comment_main() {
|
|
|
9092
8903
|
}
|
|
9093
8904
|
|
|
9094
8905
|
// src/components/hierarchy-node/HierarchyNodeMain.jsx
|
|
9095
|
-
import React68, { useState as
|
|
9096
|
-
import
|
|
8906
|
+
import React68, { useState as useState47, useRef as useRef15, useEffect as useEffect24 } from "react";
|
|
8907
|
+
import Swal7 from "sweetalert2";
|
|
9097
8908
|
|
|
9098
8909
|
// src/components/hierarchy-node/SearchBar.jsx
|
|
9099
8910
|
import React63 from "react";
|
|
@@ -9132,10 +8943,10 @@ function SearchBar9({ searchQuery, setSearchQuery }) {
|
|
|
9132
8943
|
}
|
|
9133
8944
|
|
|
9134
8945
|
// src/components/hierarchy-node/HierarchyTable.jsx
|
|
9135
|
-
import React66, { useState as
|
|
8946
|
+
import React66, { useState as useState45, useEffect as useEffect23 } from "react";
|
|
9136
8947
|
|
|
9137
8948
|
// src/components/hierarchy-node/AddEditModal.jsx
|
|
9138
|
-
import React64, { useEffect as
|
|
8949
|
+
import React64, { useEffect as useEffect22, useState as useState44 } from "react";
|
|
9139
8950
|
import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9140
8951
|
function AddEditModal({
|
|
9141
8952
|
isOpen,
|
|
@@ -9143,7 +8954,7 @@ function AddEditModal({
|
|
|
9143
8954
|
onSave,
|
|
9144
8955
|
editData
|
|
9145
8956
|
}) {
|
|
9146
|
-
const [formData, setFormData] =
|
|
8957
|
+
const [formData, setFormData] = useState44({
|
|
9147
8958
|
hierarchyNodeId: "",
|
|
9148
8959
|
parentHierarchyNodeId: "",
|
|
9149
8960
|
hierarchyLevel: "",
|
|
@@ -9153,7 +8964,7 @@ function AddEditModal({
|
|
|
9153
8964
|
externalEntityId: "",
|
|
9154
8965
|
isActive: true
|
|
9155
8966
|
});
|
|
9156
|
-
|
|
8967
|
+
useEffect22(() => {
|
|
9157
8968
|
if (editData) {
|
|
9158
8969
|
setFormData(editData);
|
|
9159
8970
|
}
|
|
@@ -9165,9 +8976,19 @@ function AddEditModal({
|
|
|
9165
8976
|
[name]: type === "checkbox" ? checked : value
|
|
9166
8977
|
}));
|
|
9167
8978
|
};
|
|
9168
|
-
const handleSave = () => {
|
|
9169
|
-
onSave(
|
|
9170
|
-
|
|
8979
|
+
const handleSave = async () => {
|
|
8980
|
+
const success = await (onSave == null ? void 0 : onSave({
|
|
8981
|
+
hierarchyNodeId: Number(formData.hierarchyNodeId),
|
|
8982
|
+
parentHierarchyNodeId: Number(formData.parentHierarchyNodeId || 0),
|
|
8983
|
+
hierarchyLevel: Number(formData.hierarchyLevel || 0),
|
|
8984
|
+
nodeType: formData.nodeType,
|
|
8985
|
+
nodeName: formData.nodeName,
|
|
8986
|
+
externalEntityType: formData.externalEntityType,
|
|
8987
|
+
externalEntityId: Number(formData.externalEntityId || 0),
|
|
8988
|
+
isActive: Boolean(formData.isActive),
|
|
8989
|
+
updatedBy: formData.updatedBy || formData.createdBy || "System"
|
|
8990
|
+
}));
|
|
8991
|
+
if (success) onClose();
|
|
9171
8992
|
};
|
|
9172
8993
|
return /* @__PURE__ */ jsx64("div", { className: "fc:fixed fc:inset-0 fc:bg-black/40 fc:flex fc:items-center fc:justify-center fc:z-50", children: /* @__PURE__ */ jsxs63("div", { className: "fc:bg-white fc:w-[650px] fc:rounded-2xl fc:shadow-xl fc:p-6", children: [
|
|
9173
8994
|
/* @__PURE__ */ jsxs63("div", { className: "fc:flex fc:justify-between fc:items-center fc:mb-6", children: [
|
|
@@ -9359,120 +9180,31 @@ import { jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
|
9359
9180
|
function HierarchyTable({
|
|
9360
9181
|
apiData,
|
|
9361
9182
|
pageSize,
|
|
9362
|
-
searchQuery
|
|
9183
|
+
searchQuery,
|
|
9184
|
+
onUpdate,
|
|
9185
|
+
onDelete
|
|
9363
9186
|
}) {
|
|
9364
|
-
const
|
|
9365
|
-
hierarchyNodeId: 1,
|
|
9366
|
-
parentHierarchyNodeId: 0,
|
|
9367
|
-
hierarchyLevel: 1,
|
|
9368
|
-
nodeType: "Department",
|
|
9369
|
-
nodeName: "Head Office",
|
|
9370
|
-
externalEntityType: "Organization",
|
|
9371
|
-
externalEntityId: 1001,
|
|
9372
|
-
isActive: true
|
|
9373
|
-
}, {
|
|
9374
|
-
hierarchyNodeId: 2,
|
|
9375
|
-
parentHierarchyNodeId: 1,
|
|
9376
|
-
hierarchyLevel: 2,
|
|
9377
|
-
nodeType: "District",
|
|
9378
|
-
nodeName: "Ludhiana",
|
|
9379
|
-
externalEntityType: "District",
|
|
9380
|
-
externalEntityId: 1002,
|
|
9381
|
-
isActive: true
|
|
9382
|
-
}, {
|
|
9383
|
-
hierarchyNodeId: 3,
|
|
9384
|
-
parentHierarchyNodeId: 2,
|
|
9385
|
-
hierarchyLevel: 3,
|
|
9386
|
-
nodeType: "Block",
|
|
9387
|
-
nodeName: "Samrala",
|
|
9388
|
-
externalEntityType: "Block",
|
|
9389
|
-
externalEntityId: 1003,
|
|
9390
|
-
isActive: false
|
|
9391
|
-
}, {
|
|
9392
|
-
hierarchyNodeId: 4,
|
|
9393
|
-
parentHierarchyNodeId: 2,
|
|
9394
|
-
hierarchyLevel: 3,
|
|
9395
|
-
nodeType: "Block",
|
|
9396
|
-
nodeName: "Khanna",
|
|
9397
|
-
externalEntityType: "Block",
|
|
9398
|
-
externalEntityId: 1004,
|
|
9399
|
-
isActive: true
|
|
9400
|
-
}, {
|
|
9401
|
-
hierarchyNodeId: 5,
|
|
9402
|
-
parentHierarchyNodeId: 4,
|
|
9403
|
-
hierarchyLevel: 4,
|
|
9404
|
-
nodeType: "Panchayat",
|
|
9405
|
-
nodeName: "Village A",
|
|
9406
|
-
externalEntityType: "Village",
|
|
9407
|
-
externalEntityId: 1005,
|
|
9408
|
-
isActive: true
|
|
9409
|
-
}, {
|
|
9410
|
-
hierarchyNodeId: 6,
|
|
9411
|
-
parentHierarchyNodeId: 4,
|
|
9412
|
-
hierarchyLevel: 4,
|
|
9413
|
-
nodeType: "Panchayat",
|
|
9414
|
-
nodeName: "Village B",
|
|
9415
|
-
externalEntityType: "Village",
|
|
9416
|
-
externalEntityId: 1006,
|
|
9417
|
-
isActive: false
|
|
9418
|
-
}, {
|
|
9419
|
-
hierarchyNodeId: 7,
|
|
9420
|
-
parentHierarchyNodeId: 1,
|
|
9421
|
-
hierarchyLevel: 2,
|
|
9422
|
-
nodeType: "Department",
|
|
9423
|
-
nodeName: "Finance",
|
|
9424
|
-
externalEntityType: "Department",
|
|
9425
|
-
externalEntityId: 1007,
|
|
9426
|
-
isActive: true
|
|
9427
|
-
}, {
|
|
9428
|
-
hierarchyNodeId: 8,
|
|
9429
|
-
parentHierarchyNodeId: 1,
|
|
9430
|
-
hierarchyLevel: 2,
|
|
9431
|
-
nodeType: "Department",
|
|
9432
|
-
nodeName: "HR",
|
|
9433
|
-
externalEntityType: "Department",
|
|
9434
|
-
externalEntityId: 1008,
|
|
9435
|
-
isActive: true
|
|
9436
|
-
}, {
|
|
9437
|
-
hierarchyNodeId: 9,
|
|
9438
|
-
parentHierarchyNodeId: 8,
|
|
9439
|
-
hierarchyLevel: 3,
|
|
9440
|
-
nodeType: "Branch",
|
|
9441
|
-
nodeName: "Recruitment",
|
|
9442
|
-
externalEntityType: "Branch",
|
|
9443
|
-
externalEntityId: 1009,
|
|
9444
|
-
isActive: false
|
|
9445
|
-
}, {
|
|
9446
|
-
hierarchyNodeId: 10,
|
|
9447
|
-
parentHierarchyNodeId: 8,
|
|
9448
|
-
hierarchyLevel: 3,
|
|
9449
|
-
nodeType: "Branch",
|
|
9450
|
-
nodeName: "Training",
|
|
9451
|
-
externalEntityType: "Branch",
|
|
9452
|
-
externalEntityId: 1010,
|
|
9453
|
-
isActive: true
|
|
9454
|
-
}];
|
|
9455
|
-
const [currentPage, setCurrentPage] = useState44(1);
|
|
9187
|
+
const [currentPage, setCurrentPage] = useState45(1);
|
|
9456
9188
|
;
|
|
9457
|
-
const [data, setData] =
|
|
9458
|
-
|
|
9459
|
-
|
|
9189
|
+
const [data, setData] = useState45(apiData || []);
|
|
9190
|
+
useEffect23(() => {
|
|
9191
|
+
setData(apiData || []);
|
|
9460
9192
|
}, [apiData]);
|
|
9461
9193
|
const filteredData = data.filter(
|
|
9462
9194
|
(item) => (item.nodeName || "").toLowerCase().includes((searchQuery || "").toLowerCase()) || (item.nodeType || "").toLowerCase().includes((searchQuery || "").toLowerCase()) || String(item.hierarchyNodeId).includes(searchQuery || "")
|
|
9463
9195
|
);
|
|
9464
|
-
const [sortColumn, setSortColumn] =
|
|
9465
|
-
const [sortDirection, setSortDirection] =
|
|
9196
|
+
const [sortColumn, setSortColumn] = useState45("");
|
|
9197
|
+
const [sortDirection, setSortDirection] = useState45("asc");
|
|
9466
9198
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
9467
9199
|
const startIndex = (currentPage - 1) * pageSize;
|
|
9468
9200
|
const visibleData = filteredData.slice(
|
|
9469
9201
|
startIndex,
|
|
9470
9202
|
startIndex + pageSize
|
|
9471
9203
|
);
|
|
9472
|
-
const [editOpen, setEditOpen] =
|
|
9473
|
-
const [deleteOpen, setDeleteOpen] =
|
|
9474
|
-
const [selectedNode, setSelectedNode] =
|
|
9475
|
-
|
|
9204
|
+
const [editOpen, setEditOpen] = useState45(false);
|
|
9205
|
+
const [deleteOpen, setDeleteOpen] = useState45(false);
|
|
9206
|
+
const [selectedNode, setSelectedNode] = useState45(null);
|
|
9207
|
+
useEffect23(() => {
|
|
9476
9208
|
setCurrentPage(1);
|
|
9477
9209
|
}, [searchQuery, pageSize]);
|
|
9478
9210
|
const handleSort = (column) => {
|
|
@@ -9505,21 +9237,11 @@ function HierarchyTable({
|
|
|
9505
9237
|
setSelectedNode(item);
|
|
9506
9238
|
setDeleteOpen(true);
|
|
9507
9239
|
};
|
|
9508
|
-
const handleUpdate = (updatedNode) => {
|
|
9509
|
-
|
|
9510
|
-
(prev) => prev.map(
|
|
9511
|
-
(item) => item.hierarchyNodeId === updatedNode.hierarchyNodeId ? updatedNode : item
|
|
9512
|
-
)
|
|
9513
|
-
);
|
|
9514
|
-
setEditOpen(false);
|
|
9240
|
+
const handleUpdate = async (updatedNode) => {
|
|
9241
|
+
return onUpdate == null ? void 0 : onUpdate(updatedNode);
|
|
9515
9242
|
};
|
|
9516
|
-
const confirmDelete = () => {
|
|
9517
|
-
|
|
9518
|
-
(prev) => prev.filter(
|
|
9519
|
-
(item) => item.hierarchyNodeId !== selectedNode.hierarchyNodeId
|
|
9520
|
-
)
|
|
9521
|
-
);
|
|
9522
|
-
setDeleteOpen(false);
|
|
9243
|
+
const confirmDelete = async () => {
|
|
9244
|
+
if (await (onDelete == null ? void 0 : onDelete(selectedNode))) setDeleteOpen(false);
|
|
9523
9245
|
};
|
|
9524
9246
|
return /* @__PURE__ */ jsxs65("div", { className: "fc:h-full fc:flex fc:flex-col", children: [
|
|
9525
9247
|
/* @__PURE__ */ jsx66("div", { className: "fc:rounded-2xl fc:border fc:border-slate-200 fc:overflow-hidden fc:flex fc:flex-col fc:flex-1", children: /* @__PURE__ */ jsx66("div", { className: "fc:flex-1 fc:overflow-y-auto fc:overflow-x-auto", children: /* @__PURE__ */ jsxs65("table", { className: "fc:min-w-full fc:bg-white", children: [
|
|
@@ -9645,13 +9367,23 @@ function HierarchyTable({
|
|
|
9645
9367
|
}
|
|
9646
9368
|
|
|
9647
9369
|
// src/components/hierarchy-node/AddHierarchyNodeModal.jsx
|
|
9648
|
-
import React67 from "react";
|
|
9370
|
+
import React67, { useState as useState46 } from "react";
|
|
9649
9371
|
import { jsx as jsx67, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9650
9372
|
function AddHierarchyNodeModal({
|
|
9651
9373
|
isOpen,
|
|
9652
9374
|
onClose,
|
|
9653
9375
|
onSave
|
|
9654
9376
|
}) {
|
|
9377
|
+
const [formData, setFormData] = useState46({ hierarchyNodeId: "", parentHierarchyNodeId: "", hierarchyLevel: "", nodeType: "", nodeName: "", externalEntityType: "", externalEntityId: "", isActive: "true", remarks: "" });
|
|
9378
|
+
const [isSubmitting, setIsSubmitting] = useState46(false);
|
|
9379
|
+
const handleChange = (event) => setFormData((previous) => __spreadProps(__spreadValues({}, previous), { [event.target.name]: event.target.value }));
|
|
9380
|
+
const handleSave = async () => {
|
|
9381
|
+
if (!onSave) return;
|
|
9382
|
+
setIsSubmitting(true);
|
|
9383
|
+
const success = await onSave({ parentHierarchyNodeId: Number(formData.parentHierarchyNodeId || 0), hierarchyLevel: Number(formData.hierarchyLevel || 0), nodeType: formData.nodeType, nodeName: formData.nodeName, externalEntityType: formData.externalEntityType, externalEntityId: Number(formData.externalEntityId || 0), createdBy: "System" });
|
|
9384
|
+
setIsSubmitting(false);
|
|
9385
|
+
if (success) onClose();
|
|
9386
|
+
};
|
|
9655
9387
|
if (!isOpen) return null;
|
|
9656
9388
|
return /* @__PURE__ */ jsxs66("div", { className: "fc:fixed fc:inset-0 fc:z-50 fc:flex fc:items-center fc:justify-center fc:p-4", children: [
|
|
9657
9389
|
/* @__PURE__ */ jsx67("div", { className: "fc:fixed fc:inset-0 fc:bg-slate-900/50 fc:backdrop-blur-sm", onClick: onClose }),
|
|
@@ -9672,21 +9404,21 @@ function AddHierarchyNodeModal({
|
|
|
9672
9404
|
/* @__PURE__ */ jsxs66("div", { className: "fc:grid fc:grid-cols-1 md:fc:fc:grid-cols-2 fc:gap-5", children: [
|
|
9673
9405
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9674
9406
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Hierarchy Node Id" }),
|
|
9675
|
-
/* @__PURE__ */ jsx67("input", { type: "number", placeholder: "Enter Hierarchy Node Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9407
|
+
/* @__PURE__ */ jsx67("input", { name: "hierarchyNodeId", value: formData.hierarchyNodeId, onChange: handleChange, type: "number", placeholder: "Enter Hierarchy Node Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9676
9408
|
] }),
|
|
9677
9409
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9678
9410
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Parent Hierarchy Node Id" }),
|
|
9679
|
-
/* @__PURE__ */ jsx67("input", { type: "number", placeholder: "Enter Parent Hierarchy Node Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9411
|
+
/* @__PURE__ */ jsx67("input", { name: "parentHierarchyNodeId", value: formData.parentHierarchyNodeId, onChange: handleChange, type: "number", placeholder: "Enter Parent Hierarchy Node Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9680
9412
|
] })
|
|
9681
9413
|
] }),
|
|
9682
9414
|
/* @__PURE__ */ jsxs66("div", { className: "fc:grid fc:grid-cols-1 md:fc:fc:grid-cols-2 fc:gap-5", children: [
|
|
9683
9415
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9684
9416
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Hierarchy Level" }),
|
|
9685
|
-
/* @__PURE__ */ jsx67("input", { type: "number", placeholder: "Enter Hierarchy Level", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9417
|
+
/* @__PURE__ */ jsx67("input", { name: "hierarchyLevel", value: formData.hierarchyLevel, onChange: handleChange, type: "number", placeholder: "Enter Hierarchy Level", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9686
9418
|
] }),
|
|
9687
9419
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9688
9420
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Node Type" }),
|
|
9689
|
-
/* @__PURE__ */ jsxs66("select", { className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9421
|
+
/* @__PURE__ */ jsxs66("select", { name: "nodeType", value: formData.nodeType, onChange: handleChange, className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9690
9422
|
/* @__PURE__ */ jsx67("option", { value: "", children: "Select Node Type" }),
|
|
9691
9423
|
/* @__PURE__ */ jsx67("option", { children: "District" }),
|
|
9692
9424
|
/* @__PURE__ */ jsx67("option", { children: "Block" }),
|
|
@@ -9698,12 +9430,12 @@ function AddHierarchyNodeModal({
|
|
|
9698
9430
|
] }),
|
|
9699
9431
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9700
9432
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Node Name" }),
|
|
9701
|
-
/* @__PURE__ */ jsx67("input", { type: "text", placeholder: "Enter Node Name", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9433
|
+
/* @__PURE__ */ jsx67("input", { name: "nodeName", value: formData.nodeName, onChange: handleChange, type: "text", placeholder: "Enter Node Name", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9702
9434
|
] }),
|
|
9703
9435
|
/* @__PURE__ */ jsxs66("div", { className: "fc:grid fc:grid-cols-1 md:fc:fc:grid-cols-2 fc:gap-5", children: [
|
|
9704
9436
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9705
9437
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "External Entity Type" }),
|
|
9706
|
-
/* @__PURE__ */ jsxs66("select", { className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9438
|
+
/* @__PURE__ */ jsxs66("select", { name: "externalEntityType", value: formData.externalEntityType, onChange: handleChange, className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9707
9439
|
/* @__PURE__ */ jsx67("option", { value: "", children: "Select Entity Type" }),
|
|
9708
9440
|
/* @__PURE__ */ jsx67("option", { children: "Department" }),
|
|
9709
9441
|
/* @__PURE__ */ jsx67("option", { children: "Office" }),
|
|
@@ -9713,12 +9445,12 @@ function AddHierarchyNodeModal({
|
|
|
9713
9445
|
] }),
|
|
9714
9446
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9715
9447
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "External Entity Id" }),
|
|
9716
|
-
/* @__PURE__ */ jsx67("input", { type: "number", placeholder: "Enter External Entity Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9448
|
+
/* @__PURE__ */ jsx67("input", { name: "externalEntityId", value: formData.externalEntityId, onChange: handleChange, type: "number", placeholder: "Enter External Entity Id", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9717
9449
|
] })
|
|
9718
9450
|
] }),
|
|
9719
9451
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9720
9452
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Is Active" }),
|
|
9721
|
-
/* @__PURE__ */ jsxs66("select", { className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9453
|
+
/* @__PURE__ */ jsxs66("select", { name: "isActive", value: formData.isActive, onChange: handleChange, className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:bg-white focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500", children: [
|
|
9722
9454
|
/* @__PURE__ */ jsx67("option", { value: "true", children: "Yes" }),
|
|
9723
9455
|
/* @__PURE__ */ jsx67("option", { value: "false", children: "No" })
|
|
9724
9456
|
] })
|
|
@@ -9728,7 +9460,7 @@ function AddHierarchyNodeModal({
|
|
|
9728
9460
|
/* @__PURE__ */ jsx67("div", { className: "fc:flex fc:items-center fc:gap-2 fc:text-blue-600 fc:font-semibold fc:text-sm fc:border-b fc:border-slate-100 fc:pb-3", children: "\u{1F4DD} Additional Information" }),
|
|
9729
9461
|
/* @__PURE__ */ jsxs66("div", { children: [
|
|
9730
9462
|
/* @__PURE__ */ jsx67("label", { className: "fc:block fc:text-xs fc:font-semibold fc:text-slate-700 fc:mb-2", children: "Remarks" }),
|
|
9731
|
-
/* @__PURE__ */ jsx67("textarea", { rows: 4, placeholder: "Enter remarks (optional)...", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:resize-none focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9463
|
+
/* @__PURE__ */ jsx67("textarea", { name: "remarks", value: formData.remarks, onChange: handleChange, rows: 4, placeholder: "Enter remarks (optional)...", className: "fc:w-full fc:border fc:border-slate-200 fc:rounded-xl fc:p-3 fc:text-sm fc:resize-none focus:fc:fc:outline-none focus:fc:fc:ring-2 focus:fc:fc:ring-blue-500" })
|
|
9732
9464
|
] })
|
|
9733
9465
|
] })
|
|
9734
9466
|
] }),
|
|
@@ -9738,9 +9470,10 @@ function AddHierarchyNodeModal({
|
|
|
9738
9470
|
"button",
|
|
9739
9471
|
{
|
|
9740
9472
|
type: "button",
|
|
9741
|
-
onClick:
|
|
9473
|
+
onClick: handleSave,
|
|
9474
|
+
disabled: isSubmitting,
|
|
9742
9475
|
className: "fc:px-6 fc:py-2.5 fc:rounded-xl fc:bg-blue-600 hover:fc:bg-blue-700 fc:text-white fc:font-semibold fc:text-sm fc:shadow-md fc:shadow-blue-500/20 fc:transition",
|
|
9743
|
-
children: "Save Hierarchy Node"
|
|
9476
|
+
children: isSubmitting ? "Saving..." : "Save Hierarchy Node"
|
|
9744
9477
|
}
|
|
9745
9478
|
)
|
|
9746
9479
|
] })
|
|
@@ -9751,12 +9484,13 @@ function AddHierarchyNodeModal({
|
|
|
9751
9484
|
// src/components/hierarchy-node/HierarchyNodeMain.jsx
|
|
9752
9485
|
import { jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9753
9486
|
function HierarchyNodeMain() {
|
|
9754
|
-
const [modalOpen, setModalOpen] =
|
|
9755
|
-
const [pageSize, setPageSize] =
|
|
9487
|
+
const [modalOpen, setModalOpen] = useState47(false);
|
|
9488
|
+
const [pageSize, setPageSize] = useState47(5);
|
|
9756
9489
|
const tableRef = useRef15(null);
|
|
9757
|
-
const [searchQuery, setSearchQuery] =
|
|
9758
|
-
const [apiData, setApiData] =
|
|
9759
|
-
|
|
9490
|
+
const [searchQuery, setSearchQuery] = useState47("");
|
|
9491
|
+
const [apiData, setApiData] = useState47([]);
|
|
9492
|
+
const [refreshKey, setRefreshKey] = useState47(0);
|
|
9493
|
+
useEffect24(() => {
|
|
9760
9494
|
(async () => {
|
|
9761
9495
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
9762
9496
|
try {
|
|
@@ -9766,12 +9500,26 @@ function HierarchyNodeMain() {
|
|
|
9766
9500
|
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;
|
|
9767
9501
|
setApiData(Array.isArray(value) ? value : (value == null ? void 0 : value.items) || (value == null ? void 0 : value.records) || []);
|
|
9768
9502
|
} catch (error) {
|
|
9769
|
-
await
|
|
9503
|
+
await Swal7.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");
|
|
9770
9504
|
}
|
|
9771
9505
|
})();
|
|
9772
|
-
}, [
|
|
9506
|
+
}, [refreshKey]);
|
|
9773
9507
|
const handleRefresh = () => {
|
|
9774
|
-
|
|
9508
|
+
setRefreshKey((previous) => previous + 1);
|
|
9509
|
+
};
|
|
9510
|
+
const saveNode = async (payload, isEdit = false) => {
|
|
9511
|
+
var _a, _b, _c, _d, _e;
|
|
9512
|
+
try {
|
|
9513
|
+
const endpoint = (_c = (_b = (_a = getApiEndpoints()) == null ? void 0 : _a.flowCore) == null ? void 0 : _b.hierarchyNode) == null ? void 0 : _c[isEdit ? "update" : "create"];
|
|
9514
|
+
if (!endpoint) throw new Error(`Hierarchy node ${isEdit ? "update" : "create"} endpoint is not configured.`);
|
|
9515
|
+
await getApiService()[isEdit ? "put" : "post"](endpoint, payload);
|
|
9516
|
+
await Swal7.fire("Success", `Hierarchy node ${isEdit ? "updated" : "created"} successfully.`, "success");
|
|
9517
|
+
handleRefresh();
|
|
9518
|
+
return true;
|
|
9519
|
+
} catch (error) {
|
|
9520
|
+
await Swal7.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 ${isEdit ? "update" : "create"} hierarchy node.`, "error");
|
|
9521
|
+
return false;
|
|
9522
|
+
}
|
|
9775
9523
|
};
|
|
9776
9524
|
return /* @__PURE__ */ jsxs67("div", { className: "fc:h-screen fc:bg-slate-50 fc:p-6 fc:flex fc:flex-col fc:overflow-hidden", children: [
|
|
9777
9525
|
/* @__PURE__ */ jsxs67("div", { className: "fc:w-full fc:flex fc:flex-col fc:flex-1 fc:space-y-5 fc:overflow-hidden", children: [
|
|
@@ -9822,17 +9570,19 @@ function HierarchyNodeMain() {
|
|
|
9822
9570
|
{
|
|
9823
9571
|
apiData,
|
|
9824
9572
|
pageSize,
|
|
9825
|
-
searchQuery
|
|
9573
|
+
searchQuery,
|
|
9574
|
+
onUpdate: (payload) => saveNode(payload, true),
|
|
9575
|
+
onDelete: (node) => saveNode(__spreadProps(__spreadValues({}, node), { hierarchyNodeId: node.hierarchyNodeId, isActive: false, updatedBy: node.updatedBy || node.createdBy || "System" }), true)
|
|
9826
9576
|
}
|
|
9827
9577
|
) })
|
|
9828
9578
|
] })
|
|
9829
9579
|
] }),
|
|
9830
|
-
/* @__PURE__ */ jsx68(AddHierarchyNodeModal, { isOpen: modalOpen, onClose: () => setModalOpen(false) })
|
|
9580
|
+
/* @__PURE__ */ jsx68(AddHierarchyNodeModal, { isOpen: modalOpen, onClose: () => setModalOpen(false), onSave: (payload) => saveNode(payload) })
|
|
9831
9581
|
] });
|
|
9832
9582
|
}
|
|
9833
9583
|
|
|
9834
9584
|
// src/components/file-pool/FilePoolMain.jsx
|
|
9835
|
-
import React72, { useState as
|
|
9585
|
+
import React72, { useState as useState49, useRef as useRef16 } from "react";
|
|
9836
9586
|
|
|
9837
9587
|
// src/components/file-pool/SearchBar.jsx
|
|
9838
9588
|
import React69 from "react";
|
|
@@ -9845,7 +9595,7 @@ function SearchBar10() {
|
|
|
9845
9595
|
}
|
|
9846
9596
|
|
|
9847
9597
|
// src/components/file-pool/FilePoolTable.jsx
|
|
9848
|
-
import React70, { useState as
|
|
9598
|
+
import React70, { useState as useState48 } from "react";
|
|
9849
9599
|
import { jsx as jsx70, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
9850
9600
|
function FilePoolTable({
|
|
9851
9601
|
pageSize
|
|
@@ -9921,10 +9671,10 @@ function FilePoolTable({
|
|
|
9921
9671
|
addedOn: "10-07-2026",
|
|
9922
9672
|
pulledOn: "-"
|
|
9923
9673
|
}];
|
|
9924
|
-
const [currentPage, setCurrentPage] =
|
|
9925
|
-
const [data, setData] =
|
|
9926
|
-
const [sortColumn, setSortColumn] =
|
|
9927
|
-
const [sortDirection, setSortDirection] =
|
|
9674
|
+
const [currentPage, setCurrentPage] = useState48(1);
|
|
9675
|
+
const [data, setData] = useState48(filePoolData);
|
|
9676
|
+
const [sortColumn, setSortColumn] = useState48("");
|
|
9677
|
+
const [sortDirection, setSortDirection] = useState48("asc");
|
|
9928
9678
|
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
9929
9679
|
const startIndex = (currentPage - 1) * pageSize;
|
|
9930
9680
|
const currentData = data.slice(startIndex, startIndex + pageSize);
|
|
@@ -10080,8 +9830,8 @@ function AddFilePoolModal({
|
|
|
10080
9830
|
// src/components/file-pool/FilePoolMain.jsx
|
|
10081
9831
|
import { jsx as jsx72, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
10082
9832
|
function FilePoolMain() {
|
|
10083
|
-
const [modalOpen, setModalOpen] =
|
|
10084
|
-
const [pageSize, setPageSize] =
|
|
9833
|
+
const [modalOpen, setModalOpen] = useState49(false);
|
|
9834
|
+
const [pageSize, setPageSize] = useState49(5);
|
|
10085
9835
|
const tableRef = useRef16(null);
|
|
10086
9836
|
const handleRefresh = () => {
|
|
10087
9837
|
console.log("Refresh clicked");
|
|
@@ -10132,7 +9882,7 @@ function FilePoolMain() {
|
|
|
10132
9882
|
}
|
|
10133
9883
|
|
|
10134
9884
|
// src/components/uploaded-document/UploadedDocumentMain.jsx
|
|
10135
|
-
import React76, { useState as
|
|
9885
|
+
import React76, { useState as useState51, useRef as useRef17 } from "react";
|
|
10136
9886
|
|
|
10137
9887
|
// src/components/uploaded-document/SearchBar.jsx
|
|
10138
9888
|
import React73 from "react";
|
|
@@ -10145,7 +9895,7 @@ function SearchBar11() {
|
|
|
10145
9895
|
}
|
|
10146
9896
|
|
|
10147
9897
|
// src/components/uploaded-document/UploadedDocumentTable.jsx
|
|
10148
|
-
import React74, { useState as
|
|
9898
|
+
import React74, { useState as useState50 } from "react";
|
|
10149
9899
|
import { jsx as jsx74, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
10150
9900
|
function UploadedDocumentTable({
|
|
10151
9901
|
pageSize
|
|
@@ -10221,10 +9971,10 @@ function UploadedDocumentTable({
|
|
|
10221
9971
|
storagePath: "/uploads/certificate.pdf",
|
|
10222
9972
|
uploadedBy: "Admin"
|
|
10223
9973
|
}];
|
|
10224
|
-
const [data, setData] =
|
|
10225
|
-
const [currentPage, setCurrentPage] =
|
|
10226
|
-
const [sortColumn, setSortColumn] =
|
|
10227
|
-
const [sortDirection, setSortDirection] =
|
|
9974
|
+
const [data, setData] = useState50(uploadedDocuments);
|
|
9975
|
+
const [currentPage, setCurrentPage] = useState50(1);
|
|
9976
|
+
const [sortColumn, setSortColumn] = useState50("");
|
|
9977
|
+
const [sortDirection, setSortDirection] = useState50("asc");
|
|
10228
9978
|
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
10229
9979
|
const startIndex = (currentPage - 1) * pageSize;
|
|
10230
9980
|
const currentData = data.slice(startIndex, startIndex + pageSize);
|
|
@@ -10424,8 +10174,8 @@ function AddUploadedDocumentModal({
|
|
|
10424
10174
|
// src/components/uploaded-document/UploadedDocumentMain.jsx
|
|
10425
10175
|
import { jsx as jsx76, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
10426
10176
|
function UploadedDocumentMain() {
|
|
10427
|
-
const [modalOpen, setModalOpen] =
|
|
10428
|
-
const [pageSize, setPageSize] =
|
|
10177
|
+
const [modalOpen, setModalOpen] = useState51(false);
|
|
10178
|
+
const [pageSize, setPageSize] = useState51(5);
|
|
10429
10179
|
const tableRef = useRef17(null);
|
|
10430
10180
|
const handleRefresh = () => {
|
|
10431
10181
|
console.log("Refresh clicked");
|
|
@@ -10476,14 +10226,14 @@ function UploadedDocumentMain() {
|
|
|
10476
10226
|
}
|
|
10477
10227
|
|
|
10478
10228
|
// src/components/BuisnessEntity/BusinessEntitymain.js
|
|
10479
|
-
import React78, { useState as
|
|
10229
|
+
import React78, { useState as useState53, useRef as useRef18 } from "react";
|
|
10480
10230
|
import Link4 from "next/link";
|
|
10481
10231
|
|
|
10482
10232
|
// src/components/BuisnessEntity/AddBusinessEntityModal.js
|
|
10483
|
-
import React77, { useState as
|
|
10233
|
+
import React77, { useState as useState52 } from "react";
|
|
10484
10234
|
import { jsx as jsx77, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
10485
10235
|
function AddBusinessEntityModal({ onClose }) {
|
|
10486
|
-
const [formData, setFormData] =
|
|
10236
|
+
const [formData, setFormData] = useState52({
|
|
10487
10237
|
entityType: "",
|
|
10488
10238
|
entityKey: "",
|
|
10489
10239
|
displayNumber: "",
|
|
@@ -10492,7 +10242,7 @@ function AddBusinessEntityModal({ onClose }) {
|
|
|
10492
10242
|
isVisible: true,
|
|
10493
10243
|
status: "Active"
|
|
10494
10244
|
});
|
|
10495
|
-
const [errors, setErrors] =
|
|
10245
|
+
const [errors, setErrors] = useState52({});
|
|
10496
10246
|
const handleChange = (field, value) => {
|
|
10497
10247
|
setFormData((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
10498
10248
|
[field]: value
|
|
@@ -10868,9 +10618,9 @@ function BusinessEntity() {
|
|
|
10868
10618
|
console.log("Download clicked");
|
|
10869
10619
|
};
|
|
10870
10620
|
const tableRef = useRef18(null);
|
|
10871
|
-
const [showModal, setShowModal] =
|
|
10872
|
-
const [pageSize, setPageSize] =
|
|
10873
|
-
const [sortConfig, setSortConfig] =
|
|
10621
|
+
const [showModal, setShowModal] = useState53(false);
|
|
10622
|
+
const [pageSize, setPageSize] = useState53(5);
|
|
10623
|
+
const [sortConfig, setSortConfig] = useState53({
|
|
10874
10624
|
key: "",
|
|
10875
10625
|
direction: "asc"
|
|
10876
10626
|
});
|
|
@@ -10948,14 +10698,14 @@ function BusinessEntity() {
|
|
|
10948
10698
|
}
|
|
10949
10699
|
|
|
10950
10700
|
// src/components/FileInstance/FileInstancemain.js
|
|
10951
|
-
import React80, { useState as
|
|
10701
|
+
import React80, { useState as useState55, useRef as useRef19 } from "react";
|
|
10952
10702
|
import Link5 from "next/link";
|
|
10953
10703
|
|
|
10954
10704
|
// src/components/FileInstance/AddWorkFlowFileInstanceModal.js
|
|
10955
|
-
import React79, { useState as
|
|
10705
|
+
import React79, { useState as useState54 } from "react";
|
|
10956
10706
|
import { jsx as jsx79, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
10957
10707
|
function AddFileInstanceModal({ onClose }) {
|
|
10958
|
-
const [formData, setFormData] =
|
|
10708
|
+
const [formData, setFormData] = useState54({
|
|
10959
10709
|
workflow: "",
|
|
10960
10710
|
businessEntityType: "",
|
|
10961
10711
|
businessEntity: "",
|
|
@@ -10965,7 +10715,7 @@ function AddFileInstanceModal({ onClose }) {
|
|
|
10965
10715
|
status: "Pending",
|
|
10966
10716
|
priority: "High"
|
|
10967
10717
|
});
|
|
10968
|
-
const [errors, setErrors] =
|
|
10718
|
+
const [errors, setErrors] = useState54({});
|
|
10969
10719
|
const validateForm = () => {
|
|
10970
10720
|
const newErrors = {};
|
|
10971
10721
|
if (!formData.workflow) newErrors.workflow = "Workflow is required.";
|
|
@@ -11377,9 +11127,9 @@ function FileInstance() {
|
|
|
11377
11127
|
console.log("Download clicked");
|
|
11378
11128
|
};
|
|
11379
11129
|
const tableRef = useRef19(null);
|
|
11380
|
-
const [showModal, setShowModal] =
|
|
11381
|
-
const [pageSize, setPageSize] =
|
|
11382
|
-
const [sortConfig, setSortConfig] =
|
|
11130
|
+
const [showModal, setShowModal] = useState55(false);
|
|
11131
|
+
const [pageSize, setPageSize] = useState55(5);
|
|
11132
|
+
const [sortConfig, setSortConfig] = useState55({
|
|
11383
11133
|
key: "",
|
|
11384
11134
|
direction: "asc"
|
|
11385
11135
|
});
|
|
@@ -11487,7 +11237,7 @@ function FileInstance() {
|
|
|
11487
11237
|
}
|
|
11488
11238
|
|
|
11489
11239
|
// src/components/assignment-rule/AssignmentRuleMain.jsx
|
|
11490
|
-
import React84, { useState as
|
|
11240
|
+
import React84, { useState as useState58, useRef as useRef20 } from "react";
|
|
11491
11241
|
|
|
11492
11242
|
// src/components/assignment-rule/SearchBar.js
|
|
11493
11243
|
import React81 from "react";
|
|
@@ -11510,7 +11260,7 @@ function SearchBar12({
|
|
|
11510
11260
|
}
|
|
11511
11261
|
|
|
11512
11262
|
// src/components/assignment-rule/Table.js
|
|
11513
|
-
import React82, { useState as
|
|
11263
|
+
import React82, { useState as useState56, useEffect as useEffect25 } from "react";
|
|
11514
11264
|
import { jsx as jsx82, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
11515
11265
|
function Table4({
|
|
11516
11266
|
pageSize,
|
|
@@ -11618,12 +11368,12 @@ function Table4({
|
|
|
11618
11368
|
dynamicFunctionId: "4",
|
|
11619
11369
|
isPoolEnabled: true
|
|
11620
11370
|
}];
|
|
11621
|
-
const [data, setData] =
|
|
11622
|
-
const [sortOrder, setSortOrder] =
|
|
11623
|
-
const [sortKey, setSortKey] =
|
|
11624
|
-
const [selectedItem, setSelectedItem] =
|
|
11625
|
-
const [isEditModalOpen, setIsEditModalOpen] =
|
|
11626
|
-
const [isDeleteModalOpen, setIsDeleteModalOpen] =
|
|
11371
|
+
const [data, setData] = useState56(initialData);
|
|
11372
|
+
const [sortOrder, setSortOrder] = useState56("asc");
|
|
11373
|
+
const [sortKey, setSortKey] = useState56("workflowStepId");
|
|
11374
|
+
const [selectedItem, setSelectedItem] = useState56(null);
|
|
11375
|
+
const [isEditModalOpen, setIsEditModalOpen] = useState56(false);
|
|
11376
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState56(false);
|
|
11627
11377
|
const handleEdit = (item) => {
|
|
11628
11378
|
setSelectedItem(item);
|
|
11629
11379
|
setIsEditModalOpen(true);
|
|
@@ -11676,7 +11426,7 @@ function Table4({
|
|
|
11676
11426
|
const query = searchQuery.toLowerCase().trim();
|
|
11677
11427
|
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);
|
|
11678
11428
|
});
|
|
11679
|
-
|
|
11429
|
+
useEffect25(() => {
|
|
11680
11430
|
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
11681
11431
|
}, [filteredData.length, setTotalEntries]);
|
|
11682
11432
|
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
@@ -11802,7 +11552,7 @@ function Table4({
|
|
|
11802
11552
|
}
|
|
11803
11553
|
|
|
11804
11554
|
// src/components/assignment-rule/Popup.js
|
|
11805
|
-
import React83, { useState as
|
|
11555
|
+
import React83, { useState as useState57 } from "react";
|
|
11806
11556
|
import { jsx as jsx83, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
11807
11557
|
function Popup4({
|
|
11808
11558
|
isOpen,
|
|
@@ -11810,11 +11560,11 @@ function Popup4({
|
|
|
11810
11560
|
onSave
|
|
11811
11561
|
}) {
|
|
11812
11562
|
if (!isOpen) return null;
|
|
11813
|
-
const [workflowStepId, setWorkflowStepId] =
|
|
11814
|
-
const [assignmentType, setAssignmentType] =
|
|
11815
|
-
const [hierarchyNodeType, setHierarchyNodeType] =
|
|
11816
|
-
const [dynamicFunctionId, setDynamicFunctionId] =
|
|
11817
|
-
const [isPoolEnabled, setIsPoolEnabled] =
|
|
11563
|
+
const [workflowStepId, setWorkflowStepId] = useState57("");
|
|
11564
|
+
const [assignmentType, setAssignmentType] = useState57("");
|
|
11565
|
+
const [hierarchyNodeType, setHierarchyNodeType] = useState57("");
|
|
11566
|
+
const [dynamicFunctionId, setDynamicFunctionId] = useState57("");
|
|
11567
|
+
const [isPoolEnabled, setIsPoolEnabled] = useState57(false);
|
|
11818
11568
|
const handleSubmit = (e) => {
|
|
11819
11569
|
e.preventDefault();
|
|
11820
11570
|
if (!workflowStepId || !assignmentType || !hierarchyNodeType) {
|
|
@@ -11891,17 +11641,17 @@ function Popup4({
|
|
|
11891
11641
|
// src/components/assignment-rule/AssignmentRuleMain.jsx
|
|
11892
11642
|
import { jsx as jsx84, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
11893
11643
|
function AssignmentRuleMain() {
|
|
11894
|
-
const [refreshkey, setRefreshKey] =
|
|
11644
|
+
const [refreshkey, setRefreshKey] = useState58(0);
|
|
11895
11645
|
const handleRefresh = () => {
|
|
11896
11646
|
console.log("Table data refreshed!");
|
|
11897
11647
|
setRefreshKey((prev) => prev + 1);
|
|
11898
11648
|
};
|
|
11899
11649
|
const tableRef = useRef20(null);
|
|
11900
|
-
const [showModal, setShowModal] =
|
|
11901
|
-
const [pageSize, setPageSize] =
|
|
11902
|
-
const [searchQuery, setSearchQuery] =
|
|
11903
|
-
const [currentPage, setCurrentPage] =
|
|
11904
|
-
const [totalEntries, setTotalEntries] =
|
|
11650
|
+
const [showModal, setShowModal] = useState58(false);
|
|
11651
|
+
const [pageSize, setPageSize] = useState58(10);
|
|
11652
|
+
const [searchQuery, setSearchQuery] = useState58("");
|
|
11653
|
+
const [currentPage, setCurrentPage] = useState58(1);
|
|
11654
|
+
const [totalEntries, setTotalEntries] = useState58(0);
|
|
11905
11655
|
const handlePageSizeChange = (e) => {
|
|
11906
11656
|
setPageSize(Number(e.target.value));
|
|
11907
11657
|
setCurrentPage(1);
|
|
@@ -12043,15 +11793,15 @@ function Sidebar({
|
|
|
12043
11793
|
childrens
|
|
12044
11794
|
}) {
|
|
12045
11795
|
const router = useRouter();
|
|
12046
|
-
const [workflowOpen, setWorkflowOpen] =
|
|
12047
|
-
const [permissionOpen, setPermissionOpen] =
|
|
12048
|
-
const [hierarchyOpen, setHierarchyOpen] =
|
|
12049
|
-
const [documentOpen, setDocumentOpen] =
|
|
12050
|
-
const [filesOpen, setFilesOpen] =
|
|
12051
|
-
const [tasksOpen, setTasksOpen] =
|
|
12052
|
-
const [trackingOpen, setTrackingOpen] =
|
|
12053
|
-
const [communicationOpen, setCommunicationOpen] =
|
|
12054
|
-
const [activeComponent, setActiveComponent] =
|
|
11796
|
+
const [workflowOpen, setWorkflowOpen] = useState59(false);
|
|
11797
|
+
const [permissionOpen, setPermissionOpen] = useState59(false);
|
|
11798
|
+
const [hierarchyOpen, setHierarchyOpen] = useState59(false);
|
|
11799
|
+
const [documentOpen, setDocumentOpen] = useState59(false);
|
|
11800
|
+
const [filesOpen, setFilesOpen] = useState59(false);
|
|
11801
|
+
const [tasksOpen, setTasksOpen] = useState59(false);
|
|
11802
|
+
const [trackingOpen, setTrackingOpen] = useState59(false);
|
|
11803
|
+
const [communicationOpen, setCommunicationOpen] = useState59(false);
|
|
11804
|
+
const [activeComponent, setActiveComponent] = useState59("workflowType");
|
|
12055
11805
|
const renderMenuItemold = (item) => {
|
|
12056
11806
|
const Icon = item.icon;
|
|
12057
11807
|
return /* @__PURE__ */ jsxs84("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: [
|
|
@@ -12063,7 +11813,7 @@ function Sidebar({
|
|
|
12063
11813
|
const Icon = item.icon;
|
|
12064
11814
|
const handleClick = () => {
|
|
12065
11815
|
if (item.component) {
|
|
12066
|
-
router.push("/
|
|
11816
|
+
router.push("/", void 0, {
|
|
12067
11817
|
shallow: true
|
|
12068
11818
|
});
|
|
12069
11819
|
setActiveComponent(item.component);
|
|
@@ -12177,10 +11927,10 @@ function Sidebar({
|
|
|
12177
11927
|
}
|
|
12178
11928
|
|
|
12179
11929
|
// src/components/Layout.jsx
|
|
12180
|
-
import { useState as
|
|
11930
|
+
import { useState as useState60 } from "react";
|
|
12181
11931
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
12182
11932
|
var Layout = ({ children }) => {
|
|
12183
|
-
const [isOpen, setIsOpen] =
|
|
11933
|
+
const [isOpen, setIsOpen] = useState60(true);
|
|
12184
11934
|
return /* @__PURE__ */ jsx86("div", { className: "flowcore fc:flex fc:min-h-screen", children: /* @__PURE__ */ jsx86(
|
|
12185
11935
|
Sidebar,
|
|
12186
11936
|
{
|