flowcore-fn 2.9.5 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pkg-index.css +3 -0
- package/dist/pkg-index.js +509 -520
- package/dist/pkg-index.mjs +534 -545
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -48,7 +48,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
48
48
|
var pkg_index_exports = {};
|
|
49
49
|
__export(pkg_index_exports, {
|
|
50
50
|
Layout: () => Layout_default,
|
|
51
|
-
Sidebar: () =>
|
|
51
|
+
Sidebar: () => Sidebar,
|
|
52
52
|
WorkflowPage: () => WorkflowPage
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(pkg_index_exports);
|
|
@@ -495,9 +495,6 @@ function WorkflowPage() {
|
|
|
495
495
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WorkflowStep, {});
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
// src/components/Layout.jsx
|
|
499
|
-
var import_react16 = require("react");
|
|
500
|
-
|
|
501
498
|
// src/components/Sidebar.jsx
|
|
502
499
|
var import_react14 = require("react");
|
|
503
500
|
var import_react15 = require("@remixicon/react");
|
|
@@ -1068,32 +1065,172 @@ function WorkflowMasterMain() {
|
|
|
1068
1065
|
] });
|
|
1069
1066
|
}
|
|
1070
1067
|
|
|
1071
|
-
// src/components/
|
|
1072
|
-
var
|
|
1073
|
-
var import_link3 = __toESM(require("next/link"));
|
|
1068
|
+
// src/components/WorkflowType/WorkflowTypeMains.js
|
|
1069
|
+
var import_react10 = __toESM(require("react"));
|
|
1074
1070
|
|
|
1075
|
-
// src/components/
|
|
1071
|
+
// src/components/WorkflowType/SearchBar.jsx
|
|
1076
1072
|
var import_react6 = __toESM(require("react"));
|
|
1077
1073
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1078
|
-
function
|
|
1079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "
|
|
1074
|
+
function SearchBar() {
|
|
1075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative max-w-sm w-full", children: [
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { className: "w-4.5 h-4.5 text-slate-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
1080
1077
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1078
|
+
"input",
|
|
1079
|
+
{
|
|
1080
|
+
type: "text",
|
|
1081
|
+
placeholder: "Search workflow name or code...",
|
|
1082
|
+
className: "w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-xl text-sm bg-slate-50/50 focus:outline-none focus:ring-4 focus:ring-blue-500/10 focus:border-blue-500 text-slate-700 placeholder-slate-400 transition-all shadow-sm"
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
] });
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
// src/components/WorkflowType/WorkflowTypeTable.jsx
|
|
1089
|
+
var import_react7 = __toESM(require("react"));
|
|
1090
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1091
|
+
function WorkflowTypeTable({ pageSize }) {
|
|
1092
|
+
const initialData = [
|
|
1093
|
+
{ id: "1", name: "Citizen Petition Workflow", code: "PET-001", type: "Petition", version: "1", published: true, status: true },
|
|
1094
|
+
{ id: "2", name: "Building Permission Workflow", code: "BLD-001", type: "Building Permission", version: "1", published: true, status: true },
|
|
1095
|
+
{ id: "3", name: "Leave Application Workflow", code: "LEV-001", type: "Leave", version: "1", published: false, status: true },
|
|
1096
|
+
{ id: "4", name: "Grievance Redressal Workflow", code: "GRV-001", type: "Grievance", version: "2", published: true, status: true },
|
|
1097
|
+
{ id: "5", name: "Trade License Workflow", code: "TRD-001", type: "Trade License", version: "1", published: true, status: true },
|
|
1098
|
+
{ id: "6", name: "Document Verification", code: "DOC-001", type: "Verification", version: "1", published: true, status: true }
|
|
1099
|
+
];
|
|
1100
|
+
const [data, setData] = (0, import_react7.useState)(initialData);
|
|
1101
|
+
const [sortOrder, setSortOrder] = (0, import_react7.useState)("asc");
|
|
1102
|
+
const [currentPage, setCurrentPage] = (0, import_react7.useState)(1);
|
|
1103
|
+
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
1104
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
1105
|
+
const visibleData = data.slice(startIndex, startIndex + pageSize);
|
|
1106
|
+
const handleSort = (columnKey) => {
|
|
1107
|
+
const isAsc = sortOrder === "asc";
|
|
1108
|
+
setSortOrder(isAsc ? "desc" : "asc");
|
|
1109
|
+
const sortedData = [...data].sort((a, b) => {
|
|
1110
|
+
if (a[columnKey] < b[columnKey]) return isAsc ? -1 : 1;
|
|
1111
|
+
if (a[columnKey] > b[columnKey]) return isAsc ? 1 : -1;
|
|
1112
|
+
return 0;
|
|
1113
|
+
});
|
|
1114
|
+
setData(sortedData);
|
|
1115
|
+
};
|
|
1116
|
+
const toggleSwitch = (id) => {
|
|
1117
|
+
const updatedData = data.map(
|
|
1118
|
+
(item) => item.id === id ? __spreadProps(__spreadValues({}, item), { status: !item.status }) : item
|
|
1119
|
+
);
|
|
1120
|
+
setData(updatedData);
|
|
1121
|
+
};
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-5", children: [
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full overflow-x-auto border border-slate-200 rounded-2xl shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("table", { className: "w-full text-left border-collapse bg-white", children: [
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
1125
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("th", { className: "py-4.5 px-5 w-20 text-center", children: "S.No" }),
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("th", { onClick: () => handleSort("name"), className: "py-4.5 px-5 text-sm cursor-pointer select-none hover:text-slate-900", children: [
|
|
1127
|
+
"Workflow Name ",
|
|
1128
|
+
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1129
|
+
] }),
|
|
1130
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("th", { onClick: () => handleSort("code"), className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900", children: [
|
|
1131
|
+
"Workflow Code ",
|
|
1132
|
+
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1133
|
+
] }),
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("th", { onClick: () => handleSort("type"), className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900", children: [
|
|
1135
|
+
"Workflow Type ",
|
|
1136
|
+
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1137
|
+
] }),
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Version" }),
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Published" }),
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Status" })
|
|
1141
|
+
] }) }),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("tbody", { className: "divide-y divide-slate-100 text-sm text-slate-600", children: visibleData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("tr", { className: "hover:bg-slate-50/50 transition-colors", children: [
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-center font-medium text-slate-400", children: startIndex + index + 1 }),
|
|
1144
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 font-bold text-slate-900 text-[14px]", children: item.name }),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.code }),
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.type }),
|
|
1147
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-center font-semibold text-slate-700", children: item.version }),
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `px-2.5 py-1 rounded-md text-xs font-medium ${item.published ? "bg-green-50 text-green-700 border border-green-200" : "bg-red-50 text-red-700 border border-red-200"}`, children: item.published ? "\u2713 Yes" : "\u2715 No" }) }),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1150
|
+
"button",
|
|
1151
|
+
{
|
|
1152
|
+
type: "button",
|
|
1153
|
+
onClick: () => toggleSwitch(item.id),
|
|
1154
|
+
className: `relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out outline-none ${item.status ? "bg-blue-600" : "bg-slate-200"}`,
|
|
1155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1156
|
+
"span",
|
|
1157
|
+
{
|
|
1158
|
+
className: `pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${item.status ? "translate-x-5" : "translate-x-0"}`
|
|
1159
|
+
}
|
|
1160
|
+
)
|
|
1161
|
+
}
|
|
1162
|
+
) }) })
|
|
1163
|
+
] }, item.id)) })
|
|
1164
|
+
] }) }),
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-end gap-1 text-[13px] text-slate-700 font-normal mt-4 bg-slate-50/50 p-3 rounded-xl border border-slate-100", children: [
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1167
|
+
"button",
|
|
1168
|
+
{
|
|
1169
|
+
onClick: () => setCurrentPage(1),
|
|
1170
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors",
|
|
1171
|
+
children: "First"
|
|
1172
|
+
}
|
|
1173
|
+
),
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1175
|
+
"button",
|
|
1176
|
+
{
|
|
1177
|
+
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
1178
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors mr-2",
|
|
1179
|
+
children: "\u2039 Prev"
|
|
1180
|
+
}
|
|
1181
|
+
),
|
|
1182
|
+
[1, 2, 3, 4].map((pageNumber) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1183
|
+
"button",
|
|
1184
|
+
{
|
|
1185
|
+
onClick: () => setCurrentPage(pageNumber),
|
|
1186
|
+
className: `px-3 py-1 text-center rounded transition-all min-w-[28px] ${currentPage === pageNumber ? "bg-blue-600 text-white font-medium shadow-sm" : "text-slate-600 hover:bg-slate-100"}`,
|
|
1187
|
+
children: pageNumber
|
|
1188
|
+
},
|
|
1189
|
+
pageNumber
|
|
1190
|
+
)),
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1192
|
+
"button",
|
|
1193
|
+
{
|
|
1194
|
+
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, 7)),
|
|
1195
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors ml-2",
|
|
1196
|
+
children: "Next \u203A"
|
|
1197
|
+
}
|
|
1198
|
+
),
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1200
|
+
"button",
|
|
1201
|
+
{
|
|
1202
|
+
onClick: () => setCurrentPage(7),
|
|
1203
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors",
|
|
1204
|
+
children: "Last"
|
|
1205
|
+
}
|
|
1206
|
+
)
|
|
1207
|
+
] })
|
|
1208
|
+
] });
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
// src/components/WorkflowType/AddWorkflowTypeModal.jsx
|
|
1212
|
+
var import_react8 = __toESM(require("react"));
|
|
1213
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1214
|
+
function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
1215
|
+
if (!isOpen) return null;
|
|
1216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1081
1218
|
"div",
|
|
1082
1219
|
{
|
|
1083
1220
|
className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm transition-opacity duration-200",
|
|
1084
1221
|
onClick: onClose
|
|
1085
1222
|
}
|
|
1086
1223
|
),
|
|
1087
|
-
/* @__PURE__ */ (0,
|
|
1088
|
-
/* @__PURE__ */ (0,
|
|
1089
|
-
/* @__PURE__ */ (0,
|
|
1090
|
-
/* @__PURE__ */ (0,
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1092
|
-
/* @__PURE__ */ (0,
|
|
1093
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative w-full max-w-4xl bg-white rounded-3xl shadow-2xl flex flex-col z-10 max-h-[92vh] overflow-hidden animate-in fade-in zoom-in-95 duration-200", children: [
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between items-center px-8 py-6 border-b border-slate-100", children: [
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-12 h-12 bg-indigo-50 text-indigo-600 rounded-xl flex items-center justify-center shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" }) }) }),
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
|
|
1230
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflow and configure its details" })
|
|
1094
1231
|
] })
|
|
1095
1232
|
] }),
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1097
1234
|
"button",
|
|
1098
1235
|
{
|
|
1099
1236
|
onClick: onClose,
|
|
@@ -1102,32 +1239,32 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1102
1239
|
}
|
|
1103
1240
|
)
|
|
1104
1241
|
] }),
|
|
1105
|
-
/* @__PURE__ */ (0,
|
|
1106
|
-
/* @__PURE__ */ (0,
|
|
1107
|
-
/* @__PURE__ */ (0,
|
|
1108
|
-
/* @__PURE__ */ (0,
|
|
1109
|
-
/* @__PURE__ */ (0,
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "p-8 space-y-8 overflow-y-auto max-h-[calc(92vh-170px)] bg-slate-50/30", children: [
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "\u{1F4CB}" }),
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Workflow Information" })
|
|
1110
1247
|
] }),
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1112
|
-
/* @__PURE__ */ (0,
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1114
|
-
"Workflow
|
|
1115
|
-
/* @__PURE__ */ (0,
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1251
|
+
"Workflow Type ",
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1116
1253
|
] }),
|
|
1117
|
-
/* @__PURE__ */ (0,
|
|
1118
|
-
/* @__PURE__ */ (0,
|
|
1119
|
-
/* @__PURE__ */ (0,
|
|
1120
|
-
/* @__PURE__ */ (0,
|
|
1121
|
-
/* @__PURE__ */ (0,
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("select", { className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "", children: "Select workflow type" }),
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "petition", children: "Petition" }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "building", children: "Building Permission" }),
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "leave", children: "Leave" })
|
|
1122
1259
|
] }),
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflow belongs to" })
|
|
1124
1261
|
] }),
|
|
1125
|
-
/* @__PURE__ */ (0,
|
|
1126
|
-
/* @__PURE__ */ (0,
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1127
1264
|
"Workflow Code ",
|
|
1128
|
-
/* @__PURE__ */ (0,
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1129
1266
|
] }),
|
|
1130
|
-
/* @__PURE__ */ (0,
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1131
1268
|
"input",
|
|
1132
1269
|
{
|
|
1133
1270
|
type: "text",
|
|
@@ -1135,15 +1272,15 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1135
1272
|
className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500"
|
|
1136
1273
|
}
|
|
1137
1274
|
),
|
|
1138
|
-
/* @__PURE__ */ (0,
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflow (e.g., PET-001)" })
|
|
1139
1276
|
] })
|
|
1140
1277
|
] }),
|
|
1141
|
-
/* @__PURE__ */ (0,
|
|
1142
|
-
/* @__PURE__ */ (0,
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1279
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1143
1280
|
"Workflow Name ",
|
|
1144
|
-
/* @__PURE__ */ (0,
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1145
1282
|
] }),
|
|
1146
|
-
/* @__PURE__ */ (0,
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1147
1284
|
"input",
|
|
1148
1285
|
{
|
|
1149
1286
|
type: "text",
|
|
@@ -1151,15 +1288,15 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1151
1288
|
className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500"
|
|
1152
1289
|
}
|
|
1153
1290
|
),
|
|
1154
|
-
/* @__PURE__ */ (0,
|
|
1291
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
|
|
1155
1292
|
] }),
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1158
|
-
/* @__PURE__ */ (0,
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1294
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1159
1296
|
"Version ",
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1161
1298
|
] }),
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1163
1300
|
"input",
|
|
1164
1301
|
{
|
|
1165
1302
|
type: "text",
|
|
@@ -1167,27 +1304,27 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1167
1304
|
className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500"
|
|
1168
1305
|
}
|
|
1169
1306
|
),
|
|
1170
|
-
/* @__PURE__ */ (0,
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
|
|
1171
1308
|
] }),
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1173
|
-
/* @__PURE__ */ (0,
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1174
1311
|
"Published ",
|
|
1175
|
-
/* @__PURE__ */ (0,
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1176
1313
|
] }),
|
|
1177
|
-
/* @__PURE__ */ (0,
|
|
1178
|
-
/* @__PURE__ */ (0,
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("select", { className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "false", children: "No" }),
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "true", children: "Yes" })
|
|
1180
1317
|
] }),
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1318
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
|
|
1182
1319
|
] })
|
|
1183
1320
|
] })
|
|
1184
1321
|
] }),
|
|
1185
|
-
/* @__PURE__ */ (0,
|
|
1186
|
-
/* @__PURE__ */ (0,
|
|
1187
|
-
/* @__PURE__ */ (0,
|
|
1188
|
-
/* @__PURE__ */ (0,
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
|
|
1189
1326
|
] }),
|
|
1190
|
-
/* @__PURE__ */ (0,
|
|
1327
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1191
1328
|
"textarea",
|
|
1192
1329
|
{
|
|
1193
1330
|
rows: 3,
|
|
@@ -1195,86 +1332,86 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1195
1332
|
className: "w-full p-3 border border-slate-200 rounded-xl text-xs resize-none focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500"
|
|
1196
1333
|
}
|
|
1197
1334
|
),
|
|
1198
|
-
/* @__PURE__ */ (0,
|
|
1335
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
|
|
1199
1336
|
] }),
|
|
1200
|
-
/* @__PURE__ */ (0,
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1202
|
-
/* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1338
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "\u2699\uFE0F" }),
|
|
1340
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Status & Settings" })
|
|
1204
1341
|
] }),
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1208
1345
|
"Status ",
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1210
1347
|
] }),
|
|
1211
|
-
/* @__PURE__ */ (0,
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1213
|
-
/* @__PURE__ */ (0,
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("select", { className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "active", children: "Active" }),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "inactive", children: "Inactive" })
|
|
1214
1351
|
] }),
|
|
1215
|
-
/* @__PURE__ */ (0,
|
|
1352
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
|
|
1216
1353
|
] }),
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1218
|
-
/* @__PURE__ */ (0,
|
|
1219
|
-
/* @__PURE__ */ (0,
|
|
1220
|
-
/* @__PURE__ */ (0,
|
|
1221
|
-
/* @__PURE__ */ (0,
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1354
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("select", { className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "medium", children: "Medium" }),
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "high", children: "High" }),
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: "low", children: "Low" })
|
|
1223
1360
|
] }),
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
|
|
1225
1362
|
] })
|
|
1226
1363
|
] })
|
|
1227
1364
|
] }),
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1229
|
-
/* @__PURE__ */ (0,
|
|
1230
|
-
/* @__PURE__ */ (0,
|
|
1231
|
-
/* @__PURE__ */ (0,
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "\u{1F6E0}\uFE0F" }),
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Additional Settings" })
|
|
1232
1369
|
] }),
|
|
1233
|
-
/* @__PURE__ */ (0,
|
|
1234
|
-
/* @__PURE__ */ (0,
|
|
1235
|
-
/* @__PURE__ */ (0,
|
|
1236
|
-
/* @__PURE__ */ (0,
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1238
|
-
/* @__PURE__ */ (0,
|
|
1239
|
-
/* @__PURE__ */ (0,
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u23F1\uFE0F" }),
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
|
|
1240
1377
|
] })
|
|
1241
1378
|
] }),
|
|
1242
|
-
/* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-4.5 bg-slate-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-3.5 after:w-3.5 after:transition-all peer-checked:bg-indigo-600" })
|
|
1245
1382
|
] })
|
|
1246
1383
|
] }),
|
|
1247
|
-
/* @__PURE__ */ (0,
|
|
1248
|
-
/* @__PURE__ */ (0,
|
|
1249
|
-
/* @__PURE__ */ (0,
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1251
|
-
/* @__PURE__ */ (0,
|
|
1252
|
-
/* @__PURE__ */ (0,
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u{1F504}" }),
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
|
|
1253
1390
|
] })
|
|
1254
1391
|
] }),
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-4.5 bg-slate-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-3.5 after:w-3.5 after:transition-all peer-checked:bg-indigo-600" })
|
|
1258
1395
|
] })
|
|
1259
1396
|
] }),
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1399
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u{1F465}" }),
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
|
|
1266
1403
|
] })
|
|
1267
1404
|
] }),
|
|
1268
|
-
/* @__PURE__ */ (0,
|
|
1269
|
-
/* @__PURE__ */ (0,
|
|
1270
|
-
/* @__PURE__ */ (0,
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8 h-4.5 bg-slate-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-3.5 after:w-3.5 after:transition-all peer-checked:bg-indigo-600" })
|
|
1271
1408
|
] })
|
|
1272
1409
|
] })
|
|
1273
1410
|
] })
|
|
1274
1411
|
] })
|
|
1275
1412
|
] }),
|
|
1276
|
-
/* @__PURE__ */ (0,
|
|
1277
|
-
/* @__PURE__ */ (0,
|
|
1413
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
|
|
1414
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1278
1415
|
"button",
|
|
1279
1416
|
{
|
|
1280
1417
|
onClick: onClose,
|
|
@@ -1282,7 +1419,7 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1282
1419
|
children: "\u2715 Cancel"
|
|
1283
1420
|
}
|
|
1284
1421
|
),
|
|
1285
|
-
/* @__PURE__ */ (0,
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1286
1423
|
"button",
|
|
1287
1424
|
{
|
|
1288
1425
|
type: "button",
|
|
@@ -1295,329 +1432,79 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1295
1432
|
] });
|
|
1296
1433
|
}
|
|
1297
1434
|
|
|
1298
|
-
// src/components/
|
|
1299
|
-
var
|
|
1300
|
-
var
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1435
|
+
// src/components/WorkflowType/AddButton.jsx
|
|
1436
|
+
var import_react9 = __toESM(require("react"));
|
|
1437
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1438
|
+
function AddButton({ onOpen }) {
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1440
|
+
"button",
|
|
1441
|
+
{
|
|
1442
|
+
onClick: onOpen,
|
|
1443
|
+
className: "bg-blue-600 hover:bg-blue-700 text-white px-5 py-2.5 rounded-xl font-bold text-sm shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/30 transition-all active:scale-95 flex items-center gap-2",
|
|
1444
|
+
children: [
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: "w-4 h-4 stroke-[2.5]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }),
|
|
1446
|
+
"Add Workflow Type"
|
|
1447
|
+
]
|
|
1448
|
+
}
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
// src/components/WorkflowType/WorkflowTypeMains.js
|
|
1453
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1454
|
+
function WorkflowTypeMains() {
|
|
1455
|
+
const [modalOpen, setModalOpen] = (0, import_react10.useState)(false);
|
|
1456
|
+
const [pageSize, setPageSize] = (0, import_react10.useState)(10);
|
|
1457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "min-h-screen bg-slate-50 p-4 md:p-6", children: [
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-full space-y-5", children: [
|
|
1459
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between bg-white p-6 rounded-2xl border border-slate-200/80 shadow-sm gap-4", children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
|
|
1461
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: "text-2xl font-extrabold text-slate-900 tracking-tight", children: "Workflow Type" }),
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "text-xs text-slate-400 mt-1", children: [
|
|
1463
|
+
"Dashboard > Types > ",
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-blue-600 font-semibold", children: "Workflow Type" })
|
|
1465
|
+
] })
|
|
1466
|
+
] }),
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AddButton, { onOpen: () => setModalOpen(true) })
|
|
1468
|
+
] }),
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-200/80 shadow-sm space-y-5", children: [
|
|
1470
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-between items-center w-full", children: [
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SearchBar, {}) }),
|
|
1472
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1473
|
+
"select",
|
|
1474
|
+
{
|
|
1475
|
+
value: pageSize,
|
|
1476
|
+
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
1477
|
+
className: "border border-slate-200 rounded-lg px-3 py-2 text-sm bg-white cursor-pointer outline-none shadow-sm text-slate-700",
|
|
1478
|
+
children: [
|
|
1479
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: 2, children: "2 Rows (Testing)" }),
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: 10, children: "10 Rows" }),
|
|
1481
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: 20, children: "20 Rows" }),
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: 50, children: "50 Rows" })
|
|
1483
|
+
]
|
|
1484
|
+
}
|
|
1485
|
+
) })
|
|
1486
|
+
] }),
|
|
1487
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(WorkflowTypeTable, { pageSize })
|
|
1488
|
+
] })
|
|
1489
|
+
] }),
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1491
|
+
AddWorkflowTypeModal,
|
|
1492
|
+
{
|
|
1493
|
+
isOpen: modalOpen,
|
|
1494
|
+
onClose: () => setModalOpen(false)
|
|
1495
|
+
}
|
|
1496
|
+
)
|
|
1314
1497
|
] });
|
|
1315
1498
|
}
|
|
1316
1499
|
|
|
1317
1500
|
// src/components/WorkFlowTransition/Transitiontable.js
|
|
1318
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1319
|
-
var WorkflowTransition = [
|
|
1320
|
-
{
|
|
1321
|
-
TransitionId: 1,
|
|
1322
|
-
workflowId: 1,
|
|
1323
|
-
FromStepId: 2,
|
|
1324
|
-
ToStepId: 1,
|
|
1325
|
-
ActionCode: "APPROVE",
|
|
1326
|
-
ActionName: "APPROVE"
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
TransitionId: 1,
|
|
1330
|
-
workflowId: 1,
|
|
1331
|
-
FromStepId: 2,
|
|
1332
|
-
ToStepId: 1,
|
|
1333
|
-
ActionCode: "APPROVE",
|
|
1334
|
-
ActionName: "APPROVE"
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
TransitionId: 1,
|
|
1338
|
-
workflowId: 1,
|
|
1339
|
-
FromStepId: 2,
|
|
1340
|
-
ToStepId: 1,
|
|
1341
|
-
ActionCode: "APPROVE",
|
|
1342
|
-
ActionName: "APPROVE"
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
TransitionId: 1,
|
|
1346
|
-
workflowId: 1,
|
|
1347
|
-
FromStepId: 2,
|
|
1348
|
-
ToStepId: 1,
|
|
1349
|
-
ActionCode: "RETURN",
|
|
1350
|
-
ActionName: "APPROVE"
|
|
1351
|
-
},
|
|
1352
|
-
{
|
|
1353
|
-
TransitionId: 1,
|
|
1354
|
-
workflowId: 1,
|
|
1355
|
-
FromStepId: 2,
|
|
1356
|
-
ToStepId: 1,
|
|
1357
|
-
ActionCode: "APPROVE",
|
|
1358
|
-
ActionName: "RETURN"
|
|
1359
|
-
}
|
|
1360
|
-
];
|
|
1361
|
-
function WorkFlowTransition() {
|
|
1362
|
-
const [showModal, setShowModal] = (0, import_react8.useState)(false);
|
|
1363
|
-
const [pageSize, setPageSize] = (0, import_react8.useState)(5);
|
|
1364
|
-
const [sortConfig, setSortConfig] = (0, import_react8.useState)({
|
|
1365
|
-
key: "",
|
|
1366
|
-
direction: "asc"
|
|
1367
|
-
});
|
|
1368
|
-
const handleSort = (key) => {
|
|
1369
|
-
let direction = "asc";
|
|
1370
|
-
if (sortConfig.key === key && sortConfig.direction === "asc") {
|
|
1371
|
-
direction = "desc";
|
|
1372
|
-
}
|
|
1373
|
-
setSortConfig({
|
|
1374
|
-
key,
|
|
1375
|
-
direction
|
|
1376
|
-
});
|
|
1377
|
-
};
|
|
1378
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "p-6 bg-[#f5f7fb] min-h-screen font-sans text-slate-700", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "bg-white rounded-2xl shadow-md overflow-hidden", children: [
|
|
1379
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Header, {}),
|
|
1380
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-6 py-5 border-b border-gray-200 ", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
|
|
1381
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1382
|
-
"input",
|
|
1383
|
-
{
|
|
1384
|
-
type: "text",
|
|
1385
|
-
placeholder: "Search workflow Transition...",
|
|
1386
|
-
className: "w-[300px] px-4 py-2.5 border border-slate-200/80 rounded-lg text-[13px] text-slate-600 focus:outline-none bg-slate-50"
|
|
1387
|
-
}
|
|
1388
|
-
),
|
|
1389
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: [
|
|
1390
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Show" }),
|
|
1391
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1392
|
-
"select",
|
|
1393
|
-
{
|
|
1394
|
-
value: pageSize,
|
|
1395
|
-
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
1396
|
-
className: "inline-flex item-center px-3 py-1 rounded-md bg-[#f1f5f9] text-[#334155] text-xs font-semibold border border-[#e2e8f0]",
|
|
1397
|
-
children: [
|
|
1398
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: 5, children: "5" }),
|
|
1399
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: 10, children: "10" }),
|
|
1400
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("option", { value: 25, children: "25" })
|
|
1401
|
-
]
|
|
1402
|
-
}
|
|
1403
|
-
),
|
|
1404
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "entries" })
|
|
1405
|
-
] }),
|
|
1406
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1407
|
-
"button",
|
|
1408
|
-
{
|
|
1409
|
-
onClick: () => setShowModal(true),
|
|
1410
|
-
className: "px-5 py-2.5 bg-blue-600 text-white rounded-lg text-[13px] font-semibold hover:bg-blue-700 transition-colors",
|
|
1411
|
-
children: "+ Add Workflow Transition"
|
|
1412
|
-
}
|
|
1413
|
-
)
|
|
1414
|
-
] }) }),
|
|
1415
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "overflow-x-auto", children: [
|
|
1416
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("table", { className: "w-full border-collapse", children: [
|
|
1417
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
1418
|
-
{ label: "TransitionId", key: "TransitionId" },
|
|
1419
|
-
{ label: "WorkflowId", key: "workflowId" },
|
|
1420
|
-
{ label: "FromStepId", key: "FromStepId" },
|
|
1421
|
-
{ label: "ToStepId", key: "ToStepId" },
|
|
1422
|
-
{ label: "ActionCode", key: "ActionCode" },
|
|
1423
|
-
{ label: "ActionName", key: "ActionName" }
|
|
1424
|
-
].map((column) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1425
|
-
"th",
|
|
1426
|
-
{
|
|
1427
|
-
onClick: () => handleSort(column.key),
|
|
1428
|
-
className: "px-6 py-4 text-left border-b border-gray-200 text-[11px] font-bold uppercase tracking-wider text-slate-500",
|
|
1429
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1430
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: column.label }),
|
|
1431
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-gray-400 text-xs", children: sortConfig.key === column.key ? sortConfig.direction === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
1432
|
-
] })
|
|
1433
|
-
},
|
|
1434
|
-
column.key
|
|
1435
|
-
)) }) }),
|
|
1436
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("tbody", { children: WorkflowTransition.slice(0, pageSize).map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1437
|
-
"tr",
|
|
1438
|
-
{
|
|
1439
|
-
className: "hover:bg-slate-50 transition-colors",
|
|
1440
|
-
children: [
|
|
1441
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 p-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.TransitionId }),
|
|
1442
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowId }),
|
|
1443
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.FromStepId }),
|
|
1444
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-align center text-[13px] text-slate-500 font-bold", children: item.ToStepId }),
|
|
1445
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 py-4 border-b border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1446
|
-
"span",
|
|
1447
|
-
{
|
|
1448
|
-
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1449
|
-
${item.ActionCode === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1450
|
-
children: item.ActionCode
|
|
1451
|
-
}
|
|
1452
|
-
) }),
|
|
1453
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { className: "px-6 py-4 border-b border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1454
|
-
"span",
|
|
1455
|
-
{
|
|
1456
|
-
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1457
|
-
${item.ActionName === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1458
|
-
children: item.ActionName
|
|
1459
|
-
}
|
|
1460
|
-
) })
|
|
1461
|
-
]
|
|
1462
|
-
},
|
|
1463
|
-
item.TransitionId
|
|
1464
|
-
)) })
|
|
1465
|
-
] }),
|
|
1466
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-5" }),
|
|
1467
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Footer, {}),
|
|
1468
|
-
showModal && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AddWorkTransitionStepModal, { onClose: () => setShowModal(false) })
|
|
1469
|
-
] })
|
|
1470
|
-
] }) });
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
// src/components/WorkflowType/WorkFlowTypeMain.js
|
|
1474
1501
|
var import_react13 = __toESM(require("react"));
|
|
1502
|
+
var import_link3 = __toESM(require("next/link"));
|
|
1475
1503
|
|
|
1476
|
-
// src/components/
|
|
1477
|
-
var import_react9 = __toESM(require("react"));
|
|
1478
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1479
|
-
function SearchBar() {
|
|
1480
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative max-w-sm w-full", children: [
|
|
1481
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { className: "w-4.5 h-4.5 text-slate-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
1482
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1483
|
-
"input",
|
|
1484
|
-
{
|
|
1485
|
-
type: "text",
|
|
1486
|
-
placeholder: "Search workflow name or code...",
|
|
1487
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-xl text-sm bg-slate-50/50 focus:outline-none focus:ring-4 focus:ring-blue-500/10 focus:border-blue-500 text-slate-700 placeholder-slate-400 transition-all shadow-sm"
|
|
1488
|
-
}
|
|
1489
|
-
)
|
|
1490
|
-
] });
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
// src/components/WorkflowType/WorkflowTypeTable.jsx
|
|
1494
|
-
var import_react10 = __toESM(require("react"));
|
|
1495
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1496
|
-
function WorkflowTypeTable({ pageSize }) {
|
|
1497
|
-
const initialData = [
|
|
1498
|
-
{ id: "1", name: "Citizen Petition Workflow", code: "PET-001", type: "Petition", version: "1", published: true, status: true },
|
|
1499
|
-
{ id: "2", name: "Building Permission Workflow", code: "BLD-001", type: "Building Permission", version: "1", published: true, status: true },
|
|
1500
|
-
{ id: "3", name: "Leave Application Workflow", code: "LEV-001", type: "Leave", version: "1", published: false, status: true },
|
|
1501
|
-
{ id: "4", name: "Grievance Redressal Workflow", code: "GRV-001", type: "Grievance", version: "2", published: true, status: true },
|
|
1502
|
-
{ id: "5", name: "Trade License Workflow", code: "TRD-001", type: "Trade License", version: "1", published: true, status: true },
|
|
1503
|
-
{ id: "6", name: "Document Verification", code: "DOC-001", type: "Verification", version: "1", published: true, status: true }
|
|
1504
|
-
];
|
|
1505
|
-
const [data, setData] = (0, import_react10.useState)(initialData);
|
|
1506
|
-
const [sortOrder, setSortOrder] = (0, import_react10.useState)("asc");
|
|
1507
|
-
const [currentPage, setCurrentPage] = (0, import_react10.useState)(1);
|
|
1508
|
-
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
1509
|
-
const startIndex = (currentPage - 1) * pageSize;
|
|
1510
|
-
const visibleData = data.slice(startIndex, startIndex + pageSize);
|
|
1511
|
-
const handleSort = (columnKey) => {
|
|
1512
|
-
const isAsc = sortOrder === "asc";
|
|
1513
|
-
setSortOrder(isAsc ? "desc" : "asc");
|
|
1514
|
-
const sortedData = [...data].sort((a, b) => {
|
|
1515
|
-
if (a[columnKey] < b[columnKey]) return isAsc ? -1 : 1;
|
|
1516
|
-
if (a[columnKey] > b[columnKey]) return isAsc ? 1 : -1;
|
|
1517
|
-
return 0;
|
|
1518
|
-
});
|
|
1519
|
-
setData(sortedData);
|
|
1520
|
-
};
|
|
1521
|
-
const toggleSwitch = (id) => {
|
|
1522
|
-
const updatedData = data.map(
|
|
1523
|
-
(item) => item.id === id ? __spreadProps(__spreadValues({}, item), { status: !item.status }) : item
|
|
1524
|
-
);
|
|
1525
|
-
setData(updatedData);
|
|
1526
|
-
};
|
|
1527
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-5", children: [
|
|
1528
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-full overflow-x-auto border border-slate-200 rounded-2xl shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("table", { className: "w-full text-left border-collapse bg-white", children: [
|
|
1529
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
1530
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("th", { className: "py-4.5 px-5 w-20 text-center", children: "S.No" }),
|
|
1531
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("th", { onClick: () => handleSort("name"), className: "py-4.5 px-5 text-sm cursor-pointer select-none hover:text-slate-900", children: [
|
|
1532
|
-
"Workflow Name ",
|
|
1533
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1534
|
-
] }),
|
|
1535
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("th", { onClick: () => handleSort("code"), className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900", children: [
|
|
1536
|
-
"Workflow Code ",
|
|
1537
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1538
|
-
] }),
|
|
1539
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("th", { onClick: () => handleSort("type"), className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900", children: [
|
|
1540
|
-
"Workflow Type ",
|
|
1541
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
1542
|
-
] }),
|
|
1543
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Version" }),
|
|
1544
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Published" }),
|
|
1545
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("th", { className: "py-4.5 px-5 text-center", children: "Status" })
|
|
1546
|
-
] }) }),
|
|
1547
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("tbody", { className: "divide-y divide-slate-100 text-sm text-slate-600", children: visibleData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("tr", { className: "hover:bg-slate-50/50 transition-colors", children: [
|
|
1548
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-center font-medium text-slate-400", children: startIndex + index + 1 }),
|
|
1549
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 font-bold text-slate-900 text-[14px]", children: item.name }),
|
|
1550
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.code }),
|
|
1551
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.type }),
|
|
1552
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-center font-semibold text-slate-700", children: item.version }),
|
|
1553
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: `px-2.5 py-1 rounded-md text-xs font-medium ${item.published ? "bg-green-50 text-green-700 border border-green-200" : "bg-red-50 text-red-700 border border-red-200"}`, children: item.published ? "\u2713 Yes" : "\u2715 No" }) }),
|
|
1554
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1555
|
-
"button",
|
|
1556
|
-
{
|
|
1557
|
-
type: "button",
|
|
1558
|
-
onClick: () => toggleSwitch(item.id),
|
|
1559
|
-
className: `relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out outline-none ${item.status ? "bg-blue-600" : "bg-slate-200"}`,
|
|
1560
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1561
|
-
"span",
|
|
1562
|
-
{
|
|
1563
|
-
className: `pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${item.status ? "translate-x-5" : "translate-x-0"}`
|
|
1564
|
-
}
|
|
1565
|
-
)
|
|
1566
|
-
}
|
|
1567
|
-
) }) })
|
|
1568
|
-
] }, item.id)) })
|
|
1569
|
-
] }) }),
|
|
1570
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-end gap-1 text-[13px] text-slate-700 font-normal mt-4 bg-slate-50/50 p-3 rounded-xl border border-slate-100", children: [
|
|
1571
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1572
|
-
"button",
|
|
1573
|
-
{
|
|
1574
|
-
onClick: () => setCurrentPage(1),
|
|
1575
|
-
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors",
|
|
1576
|
-
children: "First"
|
|
1577
|
-
}
|
|
1578
|
-
),
|
|
1579
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1580
|
-
"button",
|
|
1581
|
-
{
|
|
1582
|
-
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
1583
|
-
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors mr-2",
|
|
1584
|
-
children: "\u2039 Prev"
|
|
1585
|
-
}
|
|
1586
|
-
),
|
|
1587
|
-
[1, 2, 3, 4].map((pageNumber) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1588
|
-
"button",
|
|
1589
|
-
{
|
|
1590
|
-
onClick: () => setCurrentPage(pageNumber),
|
|
1591
|
-
className: `px-3 py-1 text-center rounded transition-all min-w-[28px] ${currentPage === pageNumber ? "bg-blue-600 text-white font-medium shadow-sm" : "text-slate-600 hover:bg-slate-100"}`,
|
|
1592
|
-
children: pageNumber
|
|
1593
|
-
},
|
|
1594
|
-
pageNumber
|
|
1595
|
-
)),
|
|
1596
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1597
|
-
"button",
|
|
1598
|
-
{
|
|
1599
|
-
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, 7)),
|
|
1600
|
-
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors ml-2",
|
|
1601
|
-
children: "Next \u203A"
|
|
1602
|
-
}
|
|
1603
|
-
),
|
|
1604
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1605
|
-
"button",
|
|
1606
|
-
{
|
|
1607
|
-
onClick: () => setCurrentPage(7),
|
|
1608
|
-
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors",
|
|
1609
|
-
children: "Last"
|
|
1610
|
-
}
|
|
1611
|
-
)
|
|
1612
|
-
] })
|
|
1613
|
-
] });
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
// src/components/WorkflowType/AddWorkflowTypeModal.jsx
|
|
1504
|
+
// src/components/WorkFlowTransition/AddWorkFlowTransitionModal.js
|
|
1617
1505
|
var import_react11 = __toESM(require("react"));
|
|
1618
1506
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1619
|
-
function
|
|
1620
|
-
if (!isOpen) return null;
|
|
1507
|
+
function AddWorkTransitionStepModal({ onClose }) {
|
|
1621
1508
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
1622
1509
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1623
1510
|
"div",
|
|
@@ -1653,7 +1540,7 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1653
1540
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1654
1541
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1655
1542
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1656
|
-
"Workflow
|
|
1543
|
+
"Workflow Transition",
|
|
1657
1544
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1658
1545
|
] }),
|
|
1659
1546
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("select", { className: "w-full p-2.5 border border-slate-200 rounded-xl text-xs bg-white text-slate-700 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
@@ -1837,69 +1724,179 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1837
1724
|
] });
|
|
1838
1725
|
}
|
|
1839
1726
|
|
|
1840
|
-
// src/components/
|
|
1727
|
+
// src/components/WorkFlowTransition/Transitionheader.js
|
|
1841
1728
|
var import_react12 = __toESM(require("react"));
|
|
1729
|
+
var import_link2 = __toESM(require("next/link"));
|
|
1842
1730
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1843
|
-
function
|
|
1844
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1845
|
-
"
|
|
1846
|
-
{
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
children:
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1731
|
+
function Header() {
|
|
1732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "px-6 py-5 border-b border-gray-200", children: [
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h1", { className: "m-0 text-[30px] leading-tight font-semibold text-[#1E293B] tracking-tight", children: "Workflow" }),
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "mt-2 text-[13px] font-medium", children: [
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: "/dashboard", className: "text-blue-600 hover:underline", children: "Dashboard" }),
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: "/masters", className: "text-blue-600 hover:underline", children: "Masters" }),
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: "/workflowTransition", className: "text-blue-600 hover:underline", children: "Workflow Transition" }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-slate-500", children: "Workflow Step" })
|
|
1742
|
+
] })
|
|
1743
|
+
] });
|
|
1855
1744
|
}
|
|
1856
1745
|
|
|
1857
|
-
// src/components/
|
|
1746
|
+
// src/components/WorkFlowTransition/Transitiontable.js
|
|
1858
1747
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1748
|
+
var WorkflowTransition = [
|
|
1749
|
+
{
|
|
1750
|
+
TransitionId: 1,
|
|
1751
|
+
workflowId: 1,
|
|
1752
|
+
FromStepId: 2,
|
|
1753
|
+
ToStepId: 1,
|
|
1754
|
+
ActionCode: "APPROVE",
|
|
1755
|
+
ActionName: "APPROVE"
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
TransitionId: 1,
|
|
1759
|
+
workflowId: 1,
|
|
1760
|
+
FromStepId: 2,
|
|
1761
|
+
ToStepId: 1,
|
|
1762
|
+
ActionCode: "APPROVE",
|
|
1763
|
+
ActionName: "APPROVE"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
TransitionId: 1,
|
|
1767
|
+
workflowId: 1,
|
|
1768
|
+
FromStepId: 2,
|
|
1769
|
+
ToStepId: 1,
|
|
1770
|
+
ActionCode: "APPROVE",
|
|
1771
|
+
ActionName: "APPROVE"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
TransitionId: 1,
|
|
1775
|
+
workflowId: 1,
|
|
1776
|
+
FromStepId: 2,
|
|
1777
|
+
ToStepId: 1,
|
|
1778
|
+
ActionCode: "RETURN",
|
|
1779
|
+
ActionName: "APPROVE"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
TransitionId: 1,
|
|
1783
|
+
workflowId: 1,
|
|
1784
|
+
FromStepId: 2,
|
|
1785
|
+
ToStepId: 1,
|
|
1786
|
+
ActionCode: "APPROVE",
|
|
1787
|
+
ActionName: "RETURN"
|
|
1788
|
+
}
|
|
1789
|
+
];
|
|
1790
|
+
function WorkFlowTransition() {
|
|
1791
|
+
const [showModal, setShowModal] = (0, import_react13.useState)(false);
|
|
1792
|
+
const [pageSize, setPageSize] = (0, import_react13.useState)(5);
|
|
1793
|
+
const [sortConfig, setSortConfig] = (0, import_react13.useState)({
|
|
1794
|
+
key: "",
|
|
1795
|
+
direction: "asc"
|
|
1796
|
+
});
|
|
1797
|
+
const handleSort = (key) => {
|
|
1798
|
+
let direction = "asc";
|
|
1799
|
+
if (sortConfig.key === key && sortConfig.direction === "asc") {
|
|
1800
|
+
direction = "desc";
|
|
1801
|
+
}
|
|
1802
|
+
setSortConfig({
|
|
1803
|
+
key,
|
|
1804
|
+
direction
|
|
1805
|
+
});
|
|
1806
|
+
};
|
|
1807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "p-6 bg-[#f5f7fb] min-h-screen font-sans text-slate-700", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "bg-white rounded-2xl shadow-md overflow-hidden", children: [
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Header, {}),
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-6 py-5 border-b border-gray-200 ", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1811
|
+
"input",
|
|
1812
|
+
{
|
|
1813
|
+
type: "text",
|
|
1814
|
+
placeholder: "Search workflow Transition...",
|
|
1815
|
+
className: "w-[300px] px-4 py-2.5 border border-slate-200/80 rounded-lg text-[13px] text-slate-600 focus:outline-none bg-slate-50"
|
|
1816
|
+
}
|
|
1817
|
+
),
|
|
1818
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: [
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Show" }),
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1821
|
+
"select",
|
|
1822
|
+
{
|
|
1823
|
+
value: pageSize,
|
|
1824
|
+
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
1825
|
+
className: "inline-flex item-center px-3 py-1 rounded-md bg-[#f1f5f9] text-[#334155] text-xs font-semibold border border-[#e2e8f0]",
|
|
1826
|
+
children: [
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 5, children: "5" }),
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 10, children: "10" }),
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 25, children: "25" })
|
|
1830
|
+
]
|
|
1831
|
+
}
|
|
1832
|
+
),
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "entries" })
|
|
1873
1834
|
] }),
|
|
1874
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1836
|
+
"button",
|
|
1837
|
+
{
|
|
1838
|
+
onClick: () => setShowModal(true),
|
|
1839
|
+
className: "px-5 py-2.5 bg-blue-600 text-white rounded-lg text-[13px] font-semibold hover:bg-blue-700 transition-colors",
|
|
1840
|
+
children: "+ Add Workflow Transition"
|
|
1841
|
+
}
|
|
1842
|
+
)
|
|
1843
|
+
] }) }),
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "overflow-x-auto", children: [
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "w-full border-collapse", children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
1847
|
+
{ label: "TransitionId", key: "TransitionId" },
|
|
1848
|
+
{ label: "WorkflowId", key: "workflowId" },
|
|
1849
|
+
{ label: "FromStepId", key: "FromStepId" },
|
|
1850
|
+
{ label: "ToStepId", key: "ToStepId" },
|
|
1851
|
+
{ label: "ActionCode", key: "ActionCode" },
|
|
1852
|
+
{ label: "ActionName", key: "ActionName" }
|
|
1853
|
+
].map((column) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1854
|
+
"th",
|
|
1855
|
+
{
|
|
1856
|
+
onClick: () => handleSort(column.key),
|
|
1857
|
+
className: "px-6 py-4 text-left border-b border-gray-200 text-[11px] font-bold uppercase tracking-wider text-slate-500",
|
|
1858
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: column.label }),
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-gray-400 text-xs", children: sortConfig.key === column.key ? sortConfig.direction === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
1861
|
+
] })
|
|
1862
|
+
},
|
|
1863
|
+
column.key
|
|
1864
|
+
)) }) }),
|
|
1865
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { children: WorkflowTransition.slice(0, pageSize).map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1866
|
+
"tr",
|
|
1867
|
+
{
|
|
1868
|
+
className: "hover:bg-slate-50 transition-colors",
|
|
1869
|
+
children: [
|
|
1870
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 p-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.TransitionId }),
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowId }),
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.FromStepId }),
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 border-b border-slate-200 text-align center text-[13px] text-slate-500 font-bold", children: item.ToStepId }),
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 border-b border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1875
|
+
"span",
|
|
1876
|
+
{
|
|
1877
|
+
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1878
|
+
${item.ActionCode === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1879
|
+
children: item.ActionCode
|
|
1880
|
+
}
|
|
1881
|
+
) }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 border-b border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1883
|
+
"span",
|
|
1884
|
+
{
|
|
1885
|
+
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1886
|
+
${item.ActionName === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1887
|
+
children: item.ActionName
|
|
1888
|
+
}
|
|
1889
|
+
) })
|
|
1890
|
+
]
|
|
1891
|
+
},
|
|
1892
|
+
item.TransitionId
|
|
1893
|
+
)) })
|
|
1894
|
+
] }),
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-5" }),
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Footer, {}),
|
|
1897
|
+
showModal && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AddWorkTransitionStepModal, { onClose: () => setShowModal(false) })
|
|
1898
|
+
] })
|
|
1899
|
+
] }) });
|
|
1903
1900
|
}
|
|
1904
1901
|
|
|
1905
1902
|
// src/components/Sidebar.jsx
|
|
@@ -1938,40 +1935,17 @@ var trackingItems = [
|
|
|
1938
1935
|
{ name: "Audit Log", path: "/WorkflowType", icon: import_react15.RiShieldCheckLine },
|
|
1939
1936
|
{ name: "Movement History", path: "/WorkflowType", icon: import_react15.RiHistoryLine }
|
|
1940
1937
|
];
|
|
1941
|
-
function Sidebar({ isOpen, onToggle,
|
|
1938
|
+
function Sidebar({ isOpen, onToggle, childrens }) {
|
|
1942
1939
|
const router = (0, import_router.useRouter)();
|
|
1943
1940
|
const [workflowOpen, setWorkflowOpen] = (0, import_react14.useState)(false);
|
|
1944
1941
|
const [permissionOpen, setPermissionOpen] = (0, import_react14.useState)(false);
|
|
1945
1942
|
const [hierarchyOpen, setHierarchyOpen] = (0, import_react14.useState)(false);
|
|
1946
1943
|
const [documentOpen, setDocumentOpen] = (0, import_react14.useState)(false);
|
|
1947
|
-
const [activeComponent, setActiveComponent] = (0, import_react14.useState)(null);
|
|
1948
1944
|
const [filesOpen, setFilesOpen] = (0, import_react14.useState)(false);
|
|
1949
1945
|
const [tasksOpen, setTasksOpen] = (0, import_react14.useState)(false);
|
|
1950
1946
|
const [trackingOpen, setTrackingOpen] = (0, import_react14.useState)(false);
|
|
1951
1947
|
const [communicationOpen, setCommunicationOpen] = (0, import_react14.useState)(false);
|
|
1952
|
-
(0, import_react14.
|
|
1953
|
-
const handleRouteChange = () => {
|
|
1954
|
-
setActiveComponent(null);
|
|
1955
|
-
};
|
|
1956
|
-
router.events.on("routeChangeStart", handleRouteChange);
|
|
1957
|
-
return () => {
|
|
1958
|
-
router.events.off("routeChangeStart", handleRouteChange);
|
|
1959
|
-
};
|
|
1960
|
-
}, []);
|
|
1961
|
-
const renderContent = () => {
|
|
1962
|
-
switch (activeComponent) {
|
|
1963
|
-
case "workflowType":
|
|
1964
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowTypeMain, {});
|
|
1965
|
-
case "workflow":
|
|
1966
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowMasterMain, {});
|
|
1967
|
-
case "workflowStep":
|
|
1968
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowStep, {});
|
|
1969
|
-
case "workflowTransition":
|
|
1970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkFlowTransition, {});
|
|
1971
|
-
default:
|
|
1972
|
-
return children;
|
|
1973
|
-
}
|
|
1974
|
-
};
|
|
1948
|
+
const [activeComponent, setActiveComponent] = (0, import_react14.useState)("workflowType");
|
|
1975
1949
|
const renderMenuItemold = (item) => {
|
|
1976
1950
|
const Icon = item.icon;
|
|
1977
1951
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -2001,11 +1975,11 @@ function Sidebar({ isOpen, onToggle, children }) {
|
|
|
2001
1975
|
};
|
|
2002
1976
|
const renderMenuItem = (item) => {
|
|
2003
1977
|
const Icon = item.icon;
|
|
2004
|
-
const handleClick =
|
|
1978
|
+
const handleClick = () => {
|
|
2005
1979
|
if (item.component) {
|
|
2006
|
-
|
|
1980
|
+
router.push("/", void 0, { shallow: true });
|
|
2007
1981
|
setActiveComponent(item.component);
|
|
2008
|
-
} else {
|
|
1982
|
+
} else if (item.path) {
|
|
2009
1983
|
setActiveComponent(null);
|
|
2010
1984
|
router.push(item.path);
|
|
2011
1985
|
}
|
|
@@ -2027,6 +2001,20 @@ function Sidebar({ isOpen, onToggle, children }) {
|
|
|
2027
2001
|
item.name
|
|
2028
2002
|
);
|
|
2029
2003
|
};
|
|
2004
|
+
const renderContent = () => {
|
|
2005
|
+
switch (activeComponent) {
|
|
2006
|
+
case "workflowType":
|
|
2007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowTypeMains, {});
|
|
2008
|
+
case "workflow":
|
|
2009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowMasterMain, {});
|
|
2010
|
+
case "workflowStep":
|
|
2011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkflowStep, {});
|
|
2012
|
+
case "workflowTransition":
|
|
2013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WorkFlowTransition, {});
|
|
2014
|
+
default:
|
|
2015
|
+
return childrens;
|
|
2016
|
+
}
|
|
2017
|
+
};
|
|
2030
2018
|
const renderDropdown = (title, open, setOpen, items) => {
|
|
2031
2019
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mb-2", children: [
|
|
2032
2020
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -2227,15 +2215,16 @@ function Sidebar({ isOpen, onToggle, children }) {
|
|
|
2227
2215
|
}
|
|
2228
2216
|
|
|
2229
2217
|
// src/components/Layout.jsx
|
|
2218
|
+
var import_react16 = require("react");
|
|
2230
2219
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2231
2220
|
var Layout = ({ children }) => {
|
|
2232
2221
|
const [isOpen, setIsOpen] = (0, import_react16.useState)(true);
|
|
2233
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2234
2223
|
Sidebar,
|
|
2235
2224
|
{
|
|
2236
2225
|
isOpen,
|
|
2237
2226
|
onToggle: () => setIsOpen(!isOpen),
|
|
2238
|
-
children
|
|
2227
|
+
childrens: children
|
|
2239
2228
|
}
|
|
2240
2229
|
) });
|
|
2241
2230
|
};
|