flowcore-fn 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pkg-index.css +452 -389
- package/dist/pkg-index.js +1339 -1436
- package/dist/pkg-index.mjs +1465 -1558
- package/package.json +1 -1
package/dist/pkg-index.js
CHANGED
|
@@ -47,59 +47,225 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
47
47
|
// src/pkg-index.jsx
|
|
48
48
|
var pkg_index_exports = {};
|
|
49
49
|
__export(pkg_index_exports, {
|
|
50
|
+
ApiEndpointsProvider: () => ApiEndpointsProvider_default,
|
|
50
51
|
Layout: () => Layout_default,
|
|
51
52
|
Sidebar: () => Sidebar,
|
|
52
53
|
WorkflowPage: () => WorkflowPage
|
|
53
54
|
});
|
|
54
55
|
module.exports = __toCommonJS(pkg_index_exports);
|
|
55
56
|
|
|
56
|
-
// src/
|
|
57
|
-
var
|
|
57
|
+
// src/pages/WorkflowPage.js
|
|
58
|
+
var import_react5 = __toESM(require("react"));
|
|
58
59
|
|
|
59
|
-
// src/components/
|
|
60
|
+
// src/components/Workflow/SearchBar.jsx
|
|
60
61
|
var import_react = __toESM(require("react"));
|
|
61
62
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "px-3 py-1.5 border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "Last" })
|
|
74
|
-
] })
|
|
63
|
+
function SearchBar() {
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative max-w-sm w-full", children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime.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_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
"input",
|
|
68
|
+
{
|
|
69
|
+
type: "text",
|
|
70
|
+
placeholder: "Search workflow name or code...",
|
|
71
|
+
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"
|
|
72
|
+
}
|
|
73
|
+
)
|
|
75
74
|
] });
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
// src/components/
|
|
79
|
-
var import_link = __toESM(require("next/link"));
|
|
80
|
-
|
|
81
|
-
// src/components/WorkflowStep/AddWorkflowStepModal.js
|
|
77
|
+
// src/components/Workflow/WorkflowTable.jsx
|
|
82
78
|
var import_react2 = __toESM(require("react"));
|
|
83
79
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
function WorkflowTable({ pageSize }) {
|
|
81
|
+
const initialData = [
|
|
82
|
+
{ id: "1", name: "Citizen Petition Workflow", code: "PET-001", type: "Petition", version: "1", published: true, status: true },
|
|
83
|
+
{ id: "2", name: "Building Permission Workflow", code: "BLD-001", type: "Building Permission", version: "1", published: true, status: true },
|
|
84
|
+
{ id: "3", name: "Leave Application Workflow", code: "LEV-001", type: "Leave", version: "1", published: false, status: true },
|
|
85
|
+
{ id: "4", name: "Grievance Redressal Workflow", code: "GRV-001", type: "Grievance", version: "2", published: true, status: true },
|
|
86
|
+
{ id: "5", name: "Trade License Workflow", code: "TRD-001", type: "Trade License", version: "1", published: true, status: true },
|
|
87
|
+
{ id: "6", name: "Document Verification", code: "DOC-001", type: "Verification", version: "1", published: true, status: true },
|
|
88
|
+
{ id: "7", name: "Citizen Petition Workflow", code: "PET-001", type: "Petition", version: "1", published: true, status: true },
|
|
89
|
+
{ id: "8", name: "Building Permission Workflow", code: "BLD-001", type: "Building Permission", version: "1", published: true, status: true },
|
|
90
|
+
{ id: "9", name: "Leave Application Workflow", code: "LEV-001", type: "Leave", version: "1", published: false, status: true },
|
|
91
|
+
{ id: "10", name: "Grievance Redressal Workflow", code: "GRV-001", type: "Grievance", version: "2", published: true, status: true },
|
|
92
|
+
{ id: "11", name: "Trade License Workflow", code: "TRD-001", type: "Trade License", version: "1", published: true, status: true },
|
|
93
|
+
{ id: "12", name: "Document Verification", code: "DOC-001", type: "Verification", version: "1", published: true, status: true }
|
|
94
|
+
];
|
|
95
|
+
const [data, setData] = (0, import_react2.useState)(initialData);
|
|
96
|
+
const [sortColumn, setSortColumn] = (0, import_react2.useState)("");
|
|
97
|
+
const [sortDirection, setSortDirection] = (0, import_react2.useState)("asc");
|
|
98
|
+
const [currentPage, setCurrentPage] = (0, import_react2.useState)(1);
|
|
99
|
+
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
100
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
101
|
+
const visibleData = data.slice(startIndex, startIndex + pageSize);
|
|
102
|
+
const handleSort = (column) => {
|
|
103
|
+
const direction = sortColumn === column && sortDirection === "asc" ? "desc" : "asc";
|
|
104
|
+
setSortColumn(column);
|
|
105
|
+
setSortDirection(direction);
|
|
106
|
+
const sorted = [...data].sort((a, b) => {
|
|
107
|
+
const valueA = a[column];
|
|
108
|
+
const valueB = b[column];
|
|
109
|
+
if (typeof valueA === "string") {
|
|
110
|
+
return direction === "asc" ? valueA.localeCompare(valueB) : valueB.localeCompare(valueA);
|
|
111
|
+
}
|
|
112
|
+
if (typeof valueA === "boolean") {
|
|
113
|
+
return direction === "asc" ? Number(valueA) - Number(valueB) : Number(valueB) - Number(valueA);
|
|
114
|
+
}
|
|
115
|
+
return direction === "asc" ? valueA - valueB : valueB - valueA;
|
|
116
|
+
});
|
|
117
|
+
setData(sorted);
|
|
118
|
+
};
|
|
119
|
+
const getSortIcon = (column) => {
|
|
120
|
+
if (sortColumn !== column) {
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-slate-300 ml-1", children: "\u25B2" });
|
|
122
|
+
}
|
|
123
|
+
return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-blue-600 ml-1", children: "\u25B2" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-blue-600 ml-1", children: "\u25BC" });
|
|
124
|
+
};
|
|
125
|
+
const toggleSwitch = (id) => {
|
|
126
|
+
const updatedData = data.map(
|
|
127
|
+
(item) => item.id === id ? __spreadProps(__spreadValues({}, item), { status: !item.status }) : item
|
|
128
|
+
);
|
|
129
|
+
setData(updatedData);
|
|
130
|
+
};
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "space-y-5", children: [
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full border border-slate-200 rounded-2xl overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "max-h-[420px] overflow-y-auto overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("table", { className: "w-full text-left border-collapse bg-white", children: [
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { className: "sticky top-0 z-30 bg-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500 shadow-sm", children: [
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: "bg-slate-50 py-4.5 px-5 w-20 text-center", children: "S.No" }),
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
136
|
+
"th",
|
|
137
|
+
{
|
|
138
|
+
onClick: () => handleSort("name"),
|
|
139
|
+
className: "bg-slate-50 py-4.5 px-5 text-sm cursor-pointer select-none hover:text-slate-900",
|
|
140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
141
|
+
"Workflow Name",
|
|
142
|
+
getSortIcon("name")
|
|
143
|
+
] })
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
147
|
+
"th",
|
|
148
|
+
{
|
|
149
|
+
"bg-slate-50": true,
|
|
150
|
+
onClick: () => handleSort("code"),
|
|
151
|
+
className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900",
|
|
152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
153
|
+
"Workflow Code",
|
|
154
|
+
getSortIcon("code")
|
|
155
|
+
] })
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
159
|
+
"th",
|
|
160
|
+
{
|
|
161
|
+
"bg-slate-50": true,
|
|
162
|
+
onClick: () => handleSort("type"),
|
|
163
|
+
className: "py-4.5 px-5 cursor-pointer select-none hover:text-slate-900",
|
|
164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
165
|
+
"Workflow Type",
|
|
166
|
+
getSortIcon("type")
|
|
167
|
+
] })
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
171
|
+
"th",
|
|
172
|
+
{
|
|
173
|
+
"bg-slate-50": true,
|
|
174
|
+
onClick: () => handleSort("version"),
|
|
175
|
+
className: "py-4.5 px-5 text-center cursor-pointer select-none hover:text-slate-900",
|
|
176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-center items-center gap-1", children: [
|
|
177
|
+
"Version",
|
|
178
|
+
getSortIcon("version")
|
|
179
|
+
] })
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { "bg-slate-50": true, className: "py-4.5 px-5 text-center", children: "Published" }),
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { "bg-slate-50": true, className: "py-4.5 px-5 text-center", children: "Status" })
|
|
184
|
+
] }) }),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { className: "divide-y divide-slate-100 text-sm text-slate-600", children: visibleData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { className: "hover:bg-slate-50/50 transition-colors", children: [
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-center font-medium text-slate-400", children: startIndex + index + 1 }),
|
|
187
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 font-bold text-slate-900 text-[14px]", children: item.name }),
|
|
188
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.code }),
|
|
189
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-slate-500", children: item.type }),
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-center font-semibold text-slate-700", children: item.version }),
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.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" }) }),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "py-4 px-5 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
193
|
+
"button",
|
|
194
|
+
{
|
|
195
|
+
type: "button",
|
|
196
|
+
onClick: () => toggleSwitch(item.id),
|
|
197
|
+
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"}`,
|
|
198
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
199
|
+
"span",
|
|
200
|
+
{
|
|
201
|
+
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"}`
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
) }) })
|
|
206
|
+
] }, item.id)) })
|
|
207
|
+
] }) }) }),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.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: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
213
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors mr-2",
|
|
214
|
+
children: "\u2039 Prev"
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
[1, 2, 3, 4].map((pageNumber) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
onClick: () => setCurrentPage(pageNumber),
|
|
221
|
+
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"}`,
|
|
222
|
+
children: pageNumber
|
|
223
|
+
},
|
|
224
|
+
pageNumber
|
|
225
|
+
)),
|
|
226
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
227
|
+
"button",
|
|
228
|
+
{
|
|
229
|
+
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, 7)),
|
|
230
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors ml-2",
|
|
231
|
+
children: "Next \u203A"
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
235
|
+
"button",
|
|
236
|
+
{
|
|
237
|
+
onClick: () => setCurrentPage(7),
|
|
238
|
+
className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 transition-colors",
|
|
239
|
+
children: "Last"
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
] })
|
|
243
|
+
] });
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// src/components/Workflow/AddWorkflowModal.jsx
|
|
247
|
+
var import_react3 = __toESM(require("react"));
|
|
248
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
249
|
+
function AddWorkflowModal({ isOpen, onClose }) {
|
|
250
|
+
if (!isOpen) return null;
|
|
251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
252
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
87
253
|
"div",
|
|
88
254
|
{
|
|
89
255
|
className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm transition-opacity duration-200",
|
|
90
256
|
onClick: onClose
|
|
91
257
|
}
|
|
92
258
|
),
|
|
93
|
-
/* @__PURE__ */ (0,
|
|
94
|
-
/* @__PURE__ */ (0,
|
|
95
|
-
/* @__PURE__ */ (0,
|
|
96
|
-
/* @__PURE__ */ (0,
|
|
97
|
-
/* @__PURE__ */ (0,
|
|
98
|
-
/* @__PURE__ */ (0,
|
|
99
|
-
/* @__PURE__ */ (0,
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-between items-center px-8 py-6 border-b border-slate-100", children: [
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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_runtime3.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.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" }) }) }),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
264
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflow and configure its details" })
|
|
100
266
|
] })
|
|
101
267
|
] }),
|
|
102
|
-
/* @__PURE__ */ (0,
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
103
269
|
"button",
|
|
104
270
|
{
|
|
105
271
|
onClick: onClose,
|
|
@@ -108,32 +274,32 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
108
274
|
}
|
|
109
275
|
)
|
|
110
276
|
] }),
|
|
111
|
-
/* @__PURE__ */ (0,
|
|
112
|
-
/* @__PURE__ */ (0,
|
|
113
|
-
/* @__PURE__ */ (0,
|
|
114
|
-
/* @__PURE__ */ (0,
|
|
115
|
-
/* @__PURE__ */ (0,
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-8 space-y-8 overflow-y-auto max-h-[calc(92vh-170px)] bg-slate-50/30", children: [
|
|
278
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
280
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u{1F4CB}" }),
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Workflow Information" })
|
|
116
282
|
] }),
|
|
117
|
-
/* @__PURE__ */ (0,
|
|
118
|
-
/* @__PURE__ */ (0,
|
|
119
|
-
/* @__PURE__ */ (0,
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
284
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
120
286
|
"Workflow Type ",
|
|
121
|
-
/* @__PURE__ */ (0,
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
122
288
|
] }),
|
|
123
|
-
/* @__PURE__ */ (0,
|
|
124
|
-
/* @__PURE__ */ (0,
|
|
125
|
-
/* @__PURE__ */ (0,
|
|
126
|
-
/* @__PURE__ */ (0,
|
|
127
|
-
/* @__PURE__ */ (0,
|
|
289
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
290
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "", children: "Select workflow type" }),
|
|
291
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "petition", children: "Petition" }),
|
|
292
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "building", children: "Building Permission" }),
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "leave", children: "Leave" })
|
|
128
294
|
] }),
|
|
129
|
-
/* @__PURE__ */ (0,
|
|
295
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflow belongs to" })
|
|
130
296
|
] }),
|
|
131
|
-
/* @__PURE__ */ (0,
|
|
132
|
-
/* @__PURE__ */ (0,
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
133
299
|
"Workflow Code ",
|
|
134
|
-
/* @__PURE__ */ (0,
|
|
300
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
135
301
|
] }),
|
|
136
|
-
/* @__PURE__ */ (0,
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
137
303
|
"input",
|
|
138
304
|
{
|
|
139
305
|
type: "text",
|
|
@@ -141,15 +307,15 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
141
307
|
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"
|
|
142
308
|
}
|
|
143
309
|
),
|
|
144
|
-
/* @__PURE__ */ (0,
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflow (e.g., PET-001)" })
|
|
145
311
|
] })
|
|
146
312
|
] }),
|
|
147
|
-
/* @__PURE__ */ (0,
|
|
148
|
-
/* @__PURE__ */ (0,
|
|
313
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
314
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
149
315
|
"Workflow Name ",
|
|
150
|
-
/* @__PURE__ */ (0,
|
|
316
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
151
317
|
] }),
|
|
152
|
-
/* @__PURE__ */ (0,
|
|
318
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
153
319
|
"input",
|
|
154
320
|
{
|
|
155
321
|
type: "text",
|
|
@@ -157,15 +323,15 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
157
323
|
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"
|
|
158
324
|
}
|
|
159
325
|
),
|
|
160
|
-
/* @__PURE__ */ (0,
|
|
326
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
|
|
161
327
|
] }),
|
|
162
|
-
/* @__PURE__ */ (0,
|
|
163
|
-
/* @__PURE__ */ (0,
|
|
164
|
-
/* @__PURE__ */ (0,
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
165
331
|
"Version ",
|
|
166
|
-
/* @__PURE__ */ (0,
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
167
333
|
] }),
|
|
168
|
-
/* @__PURE__ */ (0,
|
|
334
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
169
335
|
"input",
|
|
170
336
|
{
|
|
171
337
|
type: "text",
|
|
@@ -173,27 +339,27 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
173
339
|
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"
|
|
174
340
|
}
|
|
175
341
|
),
|
|
176
|
-
/* @__PURE__ */ (0,
|
|
342
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
|
|
177
343
|
] }),
|
|
178
|
-
/* @__PURE__ */ (0,
|
|
179
|
-
/* @__PURE__ */ (0,
|
|
344
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
180
346
|
"Published ",
|
|
181
|
-
/* @__PURE__ */ (0,
|
|
347
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
182
348
|
] }),
|
|
183
|
-
/* @__PURE__ */ (0,
|
|
184
|
-
/* @__PURE__ */ (0,
|
|
185
|
-
/* @__PURE__ */ (0,
|
|
349
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
350
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "false", children: "No" }),
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "true", children: "Yes" })
|
|
186
352
|
] }),
|
|
187
|
-
/* @__PURE__ */ (0,
|
|
353
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
|
|
188
354
|
] })
|
|
189
355
|
] })
|
|
190
356
|
] }),
|
|
191
|
-
/* @__PURE__ */ (0,
|
|
192
|
-
/* @__PURE__ */ (0,
|
|
193
|
-
/* @__PURE__ */ (0,
|
|
194
|
-
/* @__PURE__ */ (0,
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
|
|
360
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
|
|
195
361
|
] }),
|
|
196
|
-
/* @__PURE__ */ (0,
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
197
363
|
"textarea",
|
|
198
364
|
{
|
|
199
365
|
rows: 3,
|
|
@@ -201,86 +367,86 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
201
367
|
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"
|
|
202
368
|
}
|
|
203
369
|
),
|
|
204
|
-
/* @__PURE__ */ (0,
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
|
|
205
371
|
] }),
|
|
206
|
-
/* @__PURE__ */ (0,
|
|
207
|
-
/* @__PURE__ */ (0,
|
|
208
|
-
/* @__PURE__ */ (0,
|
|
209
|
-
/* @__PURE__ */ (0,
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
374
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u2699\uFE0F" }),
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Status & Settings" })
|
|
210
376
|
] }),
|
|
211
|
-
/* @__PURE__ */ (0,
|
|
212
|
-
/* @__PURE__ */ (0,
|
|
213
|
-
/* @__PURE__ */ (0,
|
|
377
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
378
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
214
380
|
"Status ",
|
|
215
|
-
/* @__PURE__ */ (0,
|
|
381
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-500", children: "*" })
|
|
216
382
|
] }),
|
|
217
|
-
/* @__PURE__ */ (0,
|
|
218
|
-
/* @__PURE__ */ (0,
|
|
219
|
-
/* @__PURE__ */ (0,
|
|
383
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "active", children: "Active" }),
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "inactive", children: "Inactive" })
|
|
220
386
|
] }),
|
|
221
|
-
/* @__PURE__ */ (0,
|
|
387
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
|
|
222
388
|
] }),
|
|
223
|
-
/* @__PURE__ */ (0,
|
|
224
|
-
/* @__PURE__ */ (0,
|
|
225
|
-
/* @__PURE__ */ (0,
|
|
226
|
-
/* @__PURE__ */ (0,
|
|
227
|
-
/* @__PURE__ */ (0,
|
|
228
|
-
/* @__PURE__ */ (0,
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
390
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
|
|
391
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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: [
|
|
392
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "medium", children: "Medium" }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "high", children: "High" }),
|
|
394
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "low", children: "Low" })
|
|
229
395
|
] }),
|
|
230
|
-
/* @__PURE__ */ (0,
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
|
|
231
397
|
] })
|
|
232
398
|
] })
|
|
233
399
|
] }),
|
|
234
|
-
/* @__PURE__ */ (0,
|
|
235
|
-
/* @__PURE__ */ (0,
|
|
236
|
-
/* @__PURE__ */ (0,
|
|
237
|
-
/* @__PURE__ */ (0,
|
|
400
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
402
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "\u{1F6E0}\uFE0F" }),
|
|
403
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Additional Settings" })
|
|
238
404
|
] }),
|
|
239
|
-
/* @__PURE__ */ (0,
|
|
240
|
-
/* @__PURE__ */ (0,
|
|
241
|
-
/* @__PURE__ */ (0,
|
|
242
|
-
/* @__PURE__ */ (0,
|
|
243
|
-
/* @__PURE__ */ (0,
|
|
244
|
-
/* @__PURE__ */ (0,
|
|
245
|
-
/* @__PURE__ */ (0,
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" }),
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
|
|
246
412
|
] })
|
|
247
413
|
] }),
|
|
248
|
-
/* @__PURE__ */ (0,
|
|
249
|
-
/* @__PURE__ */ (0,
|
|
250
|
-
/* @__PURE__ */ (0,
|
|
414
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
416
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" })
|
|
251
417
|
] })
|
|
252
418
|
] }),
|
|
253
|
-
/* @__PURE__ */ (0,
|
|
254
|
-
/* @__PURE__ */ (0,
|
|
255
|
-
/* @__PURE__ */ (0,
|
|
256
|
-
/* @__PURE__ */ (0,
|
|
257
|
-
/* @__PURE__ */ (0,
|
|
258
|
-
/* @__PURE__ */ (0,
|
|
419
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
421
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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}" }),
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
|
|
424
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
|
|
259
425
|
] })
|
|
260
426
|
] }),
|
|
261
|
-
/* @__PURE__ */ (0,
|
|
262
|
-
/* @__PURE__ */ (0,
|
|
263
|
-
/* @__PURE__ */ (0,
|
|
427
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
428
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
429
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" })
|
|
264
430
|
] })
|
|
265
431
|
] }),
|
|
266
|
-
/* @__PURE__ */ (0,
|
|
267
|
-
/* @__PURE__ */ (0,
|
|
268
|
-
/* @__PURE__ */ (0,
|
|
269
|
-
/* @__PURE__ */ (0,
|
|
270
|
-
/* @__PURE__ */ (0,
|
|
271
|
-
/* @__PURE__ */ (0,
|
|
432
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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}" }),
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
|
|
272
438
|
] })
|
|
273
439
|
] }),
|
|
274
|
-
/* @__PURE__ */ (0,
|
|
275
|
-
/* @__PURE__ */ (0,
|
|
276
|
-
/* @__PURE__ */ (0,
|
|
440
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
|
|
442
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.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" })
|
|
277
443
|
] })
|
|
278
444
|
] })
|
|
279
445
|
] })
|
|
280
446
|
] })
|
|
281
447
|
] }),
|
|
282
|
-
/* @__PURE__ */ (0,
|
|
283
|
-
/* @__PURE__ */ (0,
|
|
448
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
284
450
|
"button",
|
|
285
451
|
{
|
|
286
452
|
onClick: onClose,
|
|
@@ -288,7 +454,7 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
288
454
|
children: "\u2715 Cancel"
|
|
289
455
|
}
|
|
290
456
|
),
|
|
291
|
-
/* @__PURE__ */ (0,
|
|
457
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
292
458
|
"button",
|
|
293
459
|
{
|
|
294
460
|
type: "button",
|
|
@@ -301,785 +467,112 @@ function AddWorkflowStepModal({ onClose }) {
|
|
|
301
467
|
] });
|
|
302
468
|
}
|
|
303
469
|
|
|
304
|
-
// src/components/
|
|
305
|
-
var
|
|
306
|
-
var workflowSteps = [
|
|
307
|
-
{
|
|
308
|
-
workflowStepId: 1,
|
|
309
|
-
workflowId: 1,
|
|
310
|
-
stepCode: "SCR",
|
|
311
|
-
stepName: "Scrutiny",
|
|
312
|
-
sequenceNo: 1,
|
|
313
|
-
slaType: "Hours",
|
|
314
|
-
slaValue: 48,
|
|
315
|
-
reminderBefore: 4,
|
|
316
|
-
escalationAfter: 48,
|
|
317
|
-
workingHoursOnly: 1,
|
|
318
|
-
excludeHolidays: 1
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
workflowStepId: 2,
|
|
322
|
-
workflowId: 1,
|
|
323
|
-
stepCode: "APR",
|
|
324
|
-
stepName: "Approval",
|
|
325
|
-
sequenceNo: 2,
|
|
326
|
-
slaType: "Days",
|
|
327
|
-
slaValue: 2,
|
|
328
|
-
reminderBefore: 1,
|
|
329
|
-
escalationAfter: 2,
|
|
330
|
-
workingHoursOnly: 1,
|
|
331
|
-
excludeHolidays: 1
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
workflowStepId: 3,
|
|
335
|
-
workflowId: 1,
|
|
336
|
-
stepCode: "APR",
|
|
337
|
-
stepName: "Approval",
|
|
338
|
-
sequenceNo: 3,
|
|
339
|
-
slaType: "Days",
|
|
340
|
-
slaValue: 2,
|
|
341
|
-
reminderBefore: 1,
|
|
342
|
-
escalationAfter: 2,
|
|
343
|
-
workingHoursOnly: 1,
|
|
344
|
-
excludeHolidays: 1
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
workflowStepId: 4,
|
|
348
|
-
workflowId: 1,
|
|
349
|
-
stepCode: "APR",
|
|
350
|
-
stepName: "Approval",
|
|
351
|
-
sequenceNo: 4,
|
|
352
|
-
slaType: "Days",
|
|
353
|
-
slaValue: 2,
|
|
354
|
-
reminderBefore: 1,
|
|
355
|
-
escalationAfter: 2,
|
|
356
|
-
workingHoursOnly: 1,
|
|
357
|
-
excludeHolidays: 1
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
workflowStepId: 5,
|
|
361
|
-
workflowId: 1,
|
|
362
|
-
stepCode: "APR",
|
|
363
|
-
stepName: "Approval",
|
|
364
|
-
sequenceNo: 5,
|
|
365
|
-
slaType: "Days",
|
|
366
|
-
slaValue: 2,
|
|
367
|
-
reminderBefore: 1,
|
|
368
|
-
escalationAfter: 2,
|
|
369
|
-
workingHoursOnly: 1,
|
|
370
|
-
excludeHolidays: 1
|
|
371
|
-
}
|
|
372
|
-
];
|
|
373
|
-
function WorkflowStep() {
|
|
374
|
-
const [showModal, setShowModal] = (0, import_react3.useState)(false);
|
|
375
|
-
const [pageSize, setPageSize] = (0, import_react3.useState)(5);
|
|
376
|
-
const [sortConfig, setSortConfig] = (0, import_react3.useState)({
|
|
377
|
-
key: "",
|
|
378
|
-
direction: "asc"
|
|
379
|
-
});
|
|
380
|
-
const handleSort = (key) => {
|
|
381
|
-
let direction = "asc";
|
|
382
|
-
if (sortConfig.key === key && sortConfig.direction === "asc") {
|
|
383
|
-
direction = "desc";
|
|
384
|
-
}
|
|
385
|
-
setSortConfig({
|
|
386
|
-
key,
|
|
387
|
-
direction
|
|
388
|
-
});
|
|
389
|
-
};
|
|
390
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "p-6 bg-[#f5f7fb] min-h-screen font-sans text-slate-700", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "bg-white rounded-2xl shadow-md overflow-hidden", children: [
|
|
391
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-6 py-5 border-b border-gray-200", children: [
|
|
392
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "m-0 text-[30px] leading-tight font-semibold text-[#1E293B] tracking-tight", children: "Workflow Step" }),
|
|
393
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mt-2 text-[13px] font-medium", children: [
|
|
394
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/dashboard", className: "text-blue-600 hover:underline", children: "Dashboard" }),
|
|
395
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
396
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/masters", className: "text-blue-600 hover:underline", children: "Masters" }),
|
|
397
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
398
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/workflow", className: "text-blue-600 hover:underline", children: "Workflow" }),
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
|
|
400
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-slate-500", children: "Workflow Step" })
|
|
401
|
-
] })
|
|
402
|
-
] }),
|
|
403
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-6 py-5 border-b border-gray-200 ", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
|
|
404
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
405
|
-
"input",
|
|
406
|
-
{
|
|
407
|
-
type: "text",
|
|
408
|
-
placeholder: "Search workflow step...",
|
|
409
|
-
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"
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: [
|
|
413
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Show" }),
|
|
414
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
415
|
-
"select",
|
|
416
|
-
{
|
|
417
|
-
value: pageSize,
|
|
418
|
-
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
419
|
-
className: "inline-flex item-center px-3 py-1 rounded-md bg-[#f1f5f9] text-[#334155] text-xs font-semibold border border-[#e2e8f0]",
|
|
420
|
-
children: [
|
|
421
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: 5, children: "5" }),
|
|
422
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: 10, children: "10" }),
|
|
423
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: 25, children: "25" })
|
|
424
|
-
]
|
|
425
|
-
}
|
|
426
|
-
),
|
|
427
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "entries" })
|
|
428
|
-
] }),
|
|
429
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
430
|
-
"button",
|
|
431
|
-
{
|
|
432
|
-
onClick: () => setShowModal(true),
|
|
433
|
-
className: "px-5 py-2.5 bg-blue-600 text-white rounded-lg text-[13px] font-semibold hover:bg-blue-700 transition-colors",
|
|
434
|
-
children: "+ Add Workflow Step"
|
|
435
|
-
}
|
|
436
|
-
)
|
|
437
|
-
] }) }),
|
|
438
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "overflow-x-auto", children: [
|
|
439
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("table", { className: "w-full border-collapse", children: [
|
|
440
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
441
|
-
{ label: "WorkflowStepId", key: "workflowStepId" },
|
|
442
|
-
{ label: "WorkflowId", key: "workflowId" },
|
|
443
|
-
{ label: "StepCode", key: "stepCode" },
|
|
444
|
-
{ label: "StepName", key: "stepName" },
|
|
445
|
-
{ label: "SequenceNo", key: "sequenceNo" },
|
|
446
|
-
{ label: "SLA Type", key: "slaType" },
|
|
447
|
-
{ label: "SLA Value", key: "slaValue" },
|
|
448
|
-
{ label: "Reminder Before", key: "reminderBefore" },
|
|
449
|
-
{ label: "Escalation After", key: "escalationAfter" },
|
|
450
|
-
{ label: "Working Hours Only", key: "workingHoursOnly" },
|
|
451
|
-
{ label: "Exclude Holidays", key: "excludeHolidays" }
|
|
452
|
-
].map((column) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
453
|
-
"th",
|
|
454
|
-
{
|
|
455
|
-
onClick: () => handleSort(column.key),
|
|
456
|
-
className: "px-4 py-3 text-left border-b border-gray-200 text-[11px] font-bold uppercase tracking-wider text-slate-500",
|
|
457
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
458
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: column.label }),
|
|
459
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-gray-400 text-xs", children: sortConfig.key === column.key ? sortConfig.direction === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
460
|
-
] })
|
|
461
|
-
},
|
|
462
|
-
column.key
|
|
463
|
-
)) }) }),
|
|
464
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: workflowSteps.slice(0, pageSize).map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
465
|
-
"tr",
|
|
466
|
-
{
|
|
467
|
-
className: "hover:bg-slate-50 transition-colors",
|
|
468
|
-
children: [
|
|
469
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowStepId }),
|
|
470
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowId }),
|
|
471
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "inline-flex item-center px-3 py-1 rounded-md bg-[#f1f5f9] text-[#334155] text-xs font-semibold border border-[#e2e8f0]", children: item.stepCode }) }),
|
|
472
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.stepName }),
|
|
473
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.sequenceNo }),
|
|
474
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.slaType }),
|
|
475
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.slaValue }),
|
|
476
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.reminderBefore }),
|
|
477
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.escalationAfter }),
|
|
478
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workingHoursOnly }),
|
|
479
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.excludeHolidays })
|
|
480
|
-
]
|
|
481
|
-
},
|
|
482
|
-
item.workflowStepId
|
|
483
|
-
)) })
|
|
484
|
-
] }),
|
|
485
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-5" }),
|
|
486
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Footer, {}),
|
|
487
|
-
showModal && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AddWorkflowStepModal, { onClose: () => setShowModal(false) })
|
|
488
|
-
] })
|
|
489
|
-
] }) });
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
// src/pages/workflow.js
|
|
470
|
+
// src/components/Workflow/AddButton.jsx
|
|
471
|
+
var import_react4 = __toESM(require("react"));
|
|
493
472
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
494
|
-
function
|
|
495
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
473
|
+
function AddButton({ onOpen }) {
|
|
474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
475
|
+
"button",
|
|
476
|
+
{
|
|
477
|
+
onClick: onOpen,
|
|
478
|
+
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",
|
|
479
|
+
children: [
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { className: "w-4 h-4 stroke-[2.5]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }),
|
|
481
|
+
"Add New Workflow"
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
);
|
|
496
485
|
}
|
|
497
486
|
|
|
498
|
-
// src/
|
|
499
|
-
var import_react14 = require("react");
|
|
500
|
-
var import_react15 = require("@remixicon/react");
|
|
501
|
-
var import_router = require("next/router");
|
|
502
|
-
|
|
503
|
-
// src/components/workflowMaster/workFlowMasterMain.js
|
|
504
|
-
var import_react5 = require("react");
|
|
505
|
-
|
|
506
|
-
// src/components/workflowMaster/workflowTable.jsx
|
|
507
|
-
var import_react4 = require("react");
|
|
487
|
+
// src/pages/WorkflowPage.js
|
|
508
488
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
const handleSort = (field) => {
|
|
523
|
-
if (sortField === field) {
|
|
524
|
-
setSortDirection(sortDirection === "asc" ? "desc" : "asc");
|
|
525
|
-
} else {
|
|
526
|
-
setSortField(field);
|
|
527
|
-
setSortDirection("asc");
|
|
528
|
-
}
|
|
529
|
-
};
|
|
530
|
-
const filteredworkflows = workflows.filter(
|
|
531
|
-
(workflow) => {
|
|
532
|
-
var _a, _b;
|
|
533
|
-
return ((_a = workflow == null ? void 0 : workflow.name) == null ? void 0 : _a.toLowerCase().includes(search.toLowerCase())) || ((_b = workflow == null ? void 0 : workflow.workflowcode) == null ? void 0 : _b.toLowerCase().includes(search.toLowerCase()));
|
|
534
|
-
}
|
|
535
|
-
);
|
|
536
|
-
const sortedWorkflows = [...filteredworkflows].sort((a, b) => {
|
|
537
|
-
if (!sortField) return 0;
|
|
538
|
-
let valA = a[sortField] !== void 0 && a[sortField] !== null ? a[sortField].toString().toLowerCase() : "";
|
|
539
|
-
let valB = b[sortField] !== void 0 && b[sortField] !== null ? b[sortField].toString().toLowerCase() : "";
|
|
540
|
-
if (sortField === "version") {
|
|
541
|
-
valA = Number(a[sortField]) || 0;
|
|
542
|
-
valB = Number(b[sortField]) || 0;
|
|
543
|
-
}
|
|
544
|
-
if (valA < valB) return sortDirection === "asc" ? -1 : 1;
|
|
545
|
-
if (valA > valB) return sortDirection === "asc" ? 1 : -1;
|
|
546
|
-
return 0;
|
|
547
|
-
});
|
|
548
|
-
const totalEntries = sortedWorkflows.length;
|
|
549
|
-
const totalPages = Math.ceil(totalEntries / (entriesPerPage || 10)) || 1;
|
|
550
|
-
const activePage = currentPage > totalPages ? 1 : currentPage;
|
|
551
|
-
const indexOfLastEntry = activePage * (entriesPerPage || 10);
|
|
552
|
-
const indexOfFirstEntry = indexOfLastEntry - (entriesPerPage || 10);
|
|
553
|
-
const currentDisplayedWorkflows = sortedWorkflows.slice(indexOfFirstEntry, indexOfLastEntry);
|
|
554
|
-
const renderSortIcon = (field) => {
|
|
555
|
-
if (sortField !== field) {
|
|
556
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: "w-3.5 h-3.5 text-slate-300", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 3.25a.75.75 0 01.53.22l3.25 3.25a.75.75 0 11-1.06 1.06L12.75 5.81v12.38l1.97-1.97a.75.75 0 111.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0l-3.25-3.25a.75.75 0 111.06-1.06l1.97 1.97V5.81L9.28 7.78a.75.75 0 01-1.06-1.06l3.25-3.25a.75.75 0 01.53-.22z" }) });
|
|
557
|
-
}
|
|
558
|
-
return sortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: "w-3.5 h-3.5 text-blue-600", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12.53 3.47a.75.75 0 00-1.06 0l-4 4a.75.75 0 001.06 1.06L11 5.81V19a.75.75 0 001.5 0V5.81l2.47 2.47a.75.75 0 001.06-1.06l-4-4z" }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: "w-3.5 h-3.5 text-blue-600", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M11.47 20.53a.75.75 0 001.06 0l4-4a.75.75 0 00-1.06-1.06L13 18.19V5a.75.75 0 00-1.5 0v13.19l-2.47-2.47a.75.75 0 00-1.06 1.06l4 4z" }) });
|
|
559
|
-
};
|
|
560
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-6", children: [
|
|
561
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "border border-slate-100 rounded-2xl overflow-hidden bg-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("table", { className: "w-full border-collapse", children: [
|
|
562
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("thead", { className: "bg-[#f8fafc]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tr", { children: [
|
|
563
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider w-20", children: "S.No" }),
|
|
564
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
565
|
-
"th",
|
|
566
|
-
{
|
|
567
|
-
onClick: () => handleSort("name"),
|
|
568
|
-
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors",
|
|
569
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
570
|
-
"Workflow Name ",
|
|
571
|
-
renderSortIcon("name")
|
|
572
|
-
] })
|
|
573
|
-
}
|
|
574
|
-
),
|
|
575
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
576
|
-
"th",
|
|
577
|
-
{
|
|
578
|
-
onClick: () => handleSort("workflowcode"),
|
|
579
|
-
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors",
|
|
580
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
581
|
-
"Workflow Code ",
|
|
582
|
-
renderSortIcon("workflowcode")
|
|
583
|
-
] })
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
587
|
-
"th",
|
|
588
|
-
{
|
|
589
|
-
onClick: () => handleSort("workflowtype"),
|
|
590
|
-
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors",
|
|
591
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
592
|
-
"Workflow Type ",
|
|
593
|
-
renderSortIcon("workflowtype")
|
|
594
|
-
] })
|
|
595
|
-
}
|
|
596
|
-
),
|
|
597
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
598
|
-
"th",
|
|
599
|
-
{
|
|
600
|
-
onClick: () => handleSort("version"),
|
|
601
|
-
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors w-24",
|
|
602
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
603
|
-
"Version ",
|
|
604
|
-
renderSortIcon("version")
|
|
489
|
+
function WorkflowPage() {
|
|
490
|
+
const [modalOpen, setModalOpen] = (0, import_react5.useState)(false);
|
|
491
|
+
const [pageSize, setPageSize] = (0, import_react5.useState)(10);
|
|
492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "h-screen bg-slate-50 p-6 flex flex-col", children: [
|
|
493
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col flex-1 gap-5 overflow-hidden", children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "bg-white rounded-2xl shadow-sm p-6", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
|
|
496
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "text-2xl font-extrabold text-slate-900", children: "Workflow" }),
|
|
497
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-xs text-slate-400 mt-1", children: [
|
|
498
|
+
"Dashboard > Workflow >",
|
|
499
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-blue-600 font-semibold", children: [
|
|
500
|
+
" ",
|
|
501
|
+
"Manage Workflows"
|
|
605
502
|
] })
|
|
606
|
-
}
|
|
607
|
-
),
|
|
608
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-center text-xs font-bold text-slate-500 uppercase tracking-wider w-32", children: "Published" }),
|
|
609
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-center text-xs font-bold text-slate-500 uppercase tracking-wider w-32", children: "Status" })
|
|
610
|
-
] }) }),
|
|
611
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("tbody", { className: "divide-y divide-slate-100", children: currentDisplayedWorkflows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { colSpan: 7, className: "px-6 py-12 text-center text-sm font-medium text-slate-400 bg-white", children: "No workflows found matching your criteria." }) }) : currentDisplayedWorkflows.map((workflow, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tr", { className: "hover:bg-slate-50/50 transition", children: [
|
|
612
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-sm text-slate-400 font-medium", children: indexOfFirstEntry + index + 1 }),
|
|
613
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-sm font-semibold text-slate-800", children: workflow.name }),
|
|
614
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-sm text-slate-500 font-medium", children: workflow.workflowcode }),
|
|
615
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-sm text-slate-500 font-medium", children: workflow.workflowtype }),
|
|
616
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-sm text-slate-800 font-bold", children: workflow.version }),
|
|
617
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-center", children: (() => {
|
|
618
|
-
var _a;
|
|
619
|
-
const isPublished = ((_a = workflow == null ? void 0 : workflow.published) == null ? void 0 : _a.toString().toLowerCase()) === "yes" || (workflow == null ? void 0 : workflow.published) === true;
|
|
620
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: `inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-semibold ${isPublished ? "bg-emerald-50 text-emerald-600 border border-emerald-200/50" : "bg-rose-50 text-rose-600 border border-rose-200/50"}`, children: isPublished ? "\u2713 Yes" : "\u2715 No" });
|
|
621
|
-
})() }),
|
|
622
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer group", children: [
|
|
623
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
624
|
-
"input",
|
|
625
|
-
{
|
|
626
|
-
type: "checkbox",
|
|
627
|
-
checked: workflow.status || false,
|
|
628
|
-
onChange: () => workflowtoggle && workflowtoggle(workflow.id),
|
|
629
|
-
className: "sr-only peer"
|
|
630
|
-
}
|
|
631
|
-
),
|
|
632
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-10 h-6 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-[4px] after:start-[4px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-600 group-hover:scale-105 transition-transform" })
|
|
633
|
-
] }) }) })
|
|
634
|
-
] }, workflow.id)) })
|
|
635
|
-
] }) }),
|
|
636
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "bg-[#fcfdfe] border border-slate-100 rounded-2xl px-6 py-4 flex items-center justify-end gap-6 shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
637
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
638
|
-
"button",
|
|
639
|
-
{
|
|
640
|
-
onClick: () => setCurrentPage(1),
|
|
641
|
-
disabled: activePage === 1,
|
|
642
|
-
className: `px-3 py-1.5 text-xs font-semibold rounded-lg transition ${activePage === 1 ? "text-slate-300 cursor-not-allowed" : "text-slate-500 hover:bg-slate-50 cursor-pointer"}`,
|
|
643
|
-
children: "First"
|
|
644
|
-
}
|
|
645
|
-
),
|
|
646
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
647
|
-
"button",
|
|
648
|
-
{
|
|
649
|
-
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
650
|
-
disabled: activePage === 1,
|
|
651
|
-
className: `px-3 py-1.5 text-xs font-semibold rounded-lg transition flex items-center gap-1 ${activePage === 1 ? "text-slate-300 cursor-not-allowed" : "text-slate-500 hover:bg-slate-50 cursor-pointer"}`,
|
|
652
|
-
children: "\u2039 Prev"
|
|
653
|
-
}
|
|
654
|
-
),
|
|
655
|
-
Array.from({ length: totalPages }, (_, index) => {
|
|
656
|
-
const pageNum = index + 1;
|
|
657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
658
|
-
"button",
|
|
659
|
-
{
|
|
660
|
-
onClick: () => setCurrentPage(pageNum),
|
|
661
|
-
className: `w-8 h-8 text-xs font-bold rounded-lg transition ${activePage === pageNum ? "bg-[#1e60ff] text-white shadow-sm shadow-blue-500/20" : "text-slate-500 hover:bg-slate-50 cursor-pointer"}`,
|
|
662
|
-
children: pageNum
|
|
663
|
-
},
|
|
664
|
-
pageNum
|
|
665
|
-
);
|
|
666
|
-
}),
|
|
667
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
668
|
-
"button",
|
|
669
|
-
{
|
|
670
|
-
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, totalPages)),
|
|
671
|
-
disabled: activePage === totalPages,
|
|
672
|
-
className: `px-3 py-1.5 text-xs font-semibold rounded-lg transition flex items-center gap-1 ${activePage === totalPages ? "text-slate-300 cursor-not-allowed" : "text-slate-500 hover:bg-slate-50 cursor-pointer"}`,
|
|
673
|
-
children: "Next \u203A"
|
|
674
|
-
}
|
|
675
|
-
),
|
|
676
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
677
|
-
"button",
|
|
678
|
-
{
|
|
679
|
-
onClick: () => setCurrentPage(totalPages),
|
|
680
|
-
disabled: activePage === totalPages,
|
|
681
|
-
className: `px-3 py-1.5 text-xs font-semibold rounded-lg transition ${activePage === totalPages ? "text-slate-300 cursor-not-allowed" : "text-slate-500 hover:bg-slate-50 cursor-pointer"}`,
|
|
682
|
-
children: "Last"
|
|
683
|
-
}
|
|
684
|
-
)
|
|
685
|
-
] }) })
|
|
686
|
-
] });
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
// src/components/workflowMaster/workFlowMasterMain.js
|
|
690
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
691
|
-
function WorkflowMasterMain() {
|
|
692
|
-
const [search, setSearch] = (0, import_react5.useState)("");
|
|
693
|
-
const [entriesPerPage, setEntriesPerPage] = (0, import_react5.useState)(10);
|
|
694
|
-
const [isModalOpen, setIsModalOpen] = (0, import_react5.useState)(false);
|
|
695
|
-
const [newWorkflow, setNewWorkflow] = (0, import_react5.useState)({
|
|
696
|
-
name: "",
|
|
697
|
-
workflowcode: "",
|
|
698
|
-
workflowtype: "",
|
|
699
|
-
version: "1",
|
|
700
|
-
published: "No",
|
|
701
|
-
description: ""
|
|
702
|
-
});
|
|
703
|
-
const [workflows, setWorkflows] = (0, import_react5.useState)([
|
|
704
|
-
{
|
|
705
|
-
id: 1,
|
|
706
|
-
name: "Trade License Workflow",
|
|
707
|
-
workflowcode: "TRD-001",
|
|
708
|
-
workflowtype: "Trade License",
|
|
709
|
-
version: "1",
|
|
710
|
-
published: "Yes",
|
|
711
|
-
status: true
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
id: 2,
|
|
715
|
-
name: "Citizen Petition Workflow",
|
|
716
|
-
workflowcode: "PET-001",
|
|
717
|
-
workflowtype: "Petition",
|
|
718
|
-
version: "1",
|
|
719
|
-
published: "Yes",
|
|
720
|
-
status: true
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
id: 3,
|
|
724
|
-
name: "Leave Application Workflow",
|
|
725
|
-
workflowcode: "LEV-001",
|
|
726
|
-
workflowtype: "Leave",
|
|
727
|
-
version: "1",
|
|
728
|
-
published: "No",
|
|
729
|
-
status: true
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
id: 4,
|
|
733
|
-
name: "Grievance Redressal Workflow",
|
|
734
|
-
workflowcode: "GRV-001",
|
|
735
|
-
workflowtype: "Grievance",
|
|
736
|
-
version: "2",
|
|
737
|
-
published: "Yes",
|
|
738
|
-
status: true
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
id: 5,
|
|
742
|
-
name: "Document Verification",
|
|
743
|
-
workflowcode: "DOC-001",
|
|
744
|
-
workflowtype: "Verification",
|
|
745
|
-
version: "1",
|
|
746
|
-
published: "Yes",
|
|
747
|
-
status: true
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
id: 6,
|
|
751
|
-
name: "Building Permission Workflow",
|
|
752
|
-
workflowcode: "BLD-001",
|
|
753
|
-
workflowtype: "Building Permission",
|
|
754
|
-
version: "1",
|
|
755
|
-
published: "Yes",
|
|
756
|
-
status: true
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
id: 7,
|
|
760
|
-
name: "Property Tax Assessment",
|
|
761
|
-
workflowcode: "PTX-001",
|
|
762
|
-
workflowtype: "Property Tax",
|
|
763
|
-
version: 1,
|
|
764
|
-
published: true,
|
|
765
|
-
status: true
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
id: 8,
|
|
769
|
-
name: "Water Connection Request",
|
|
770
|
-
workflowcode: "WTR-001",
|
|
771
|
-
workflowtype: "Utility Services",
|
|
772
|
-
version: 1,
|
|
773
|
-
published: true,
|
|
774
|
-
status: true
|
|
775
|
-
},
|
|
776
|
-
{
|
|
777
|
-
id: 9,
|
|
778
|
-
name: "Vendor Registration",
|
|
779
|
-
workflowcode: "VND-001",
|
|
780
|
-
workflowtype: "Procurement",
|
|
781
|
-
version: 2,
|
|
782
|
-
published: true,
|
|
783
|
-
status: false
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
id: 10,
|
|
787
|
-
name: "No Objection Certificate",
|
|
788
|
-
workflowcode: "NOC-001",
|
|
789
|
-
workflowtype: "Certification",
|
|
790
|
-
version: 1,
|
|
791
|
-
published: false,
|
|
792
|
-
status: true
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
id: 11,
|
|
796
|
-
name: "Birth Certificate Application",
|
|
797
|
-
workflowcode: "BRT-001",
|
|
798
|
-
workflowtype: "Registry",
|
|
799
|
-
version: 1,
|
|
800
|
-
published: true,
|
|
801
|
-
isActive: true
|
|
802
|
-
}
|
|
803
|
-
]);
|
|
804
|
-
const handleToggle = (id) => {
|
|
805
|
-
setWorkflows((prev) => prev.map((w) => w.id === id ? __spreadProps(__spreadValues({}, w), { status: !w.status }) : w));
|
|
806
|
-
};
|
|
807
|
-
const handleAddWorkflow = (e) => {
|
|
808
|
-
e.preventDefault();
|
|
809
|
-
if (!newWorkflow.name || !newWorkflow.workflowcode || !newWorkflow.workflowtype) {
|
|
810
|
-
alert("Please fill out all fields.");
|
|
811
|
-
return;
|
|
812
|
-
}
|
|
813
|
-
const newId = workflows.length > 0 ? Math.max(...workflows.map((w) => w.id)) + 1 : 1;
|
|
814
|
-
const addedItem = {
|
|
815
|
-
id: newId,
|
|
816
|
-
name: newWorkflow.name,
|
|
817
|
-
workflowcode: newWorkflow.workflowcode,
|
|
818
|
-
workflowtype: newWorkflow.workflowtype,
|
|
819
|
-
version: newWorkflow.version || "1",
|
|
820
|
-
published: newWorkflow.published,
|
|
821
|
-
status: true
|
|
822
|
-
};
|
|
823
|
-
setWorkflows([addedItem, ...workflows]);
|
|
824
|
-
setNewWorkflow({ name: "", workflowcode: "", workflowtype: "", version: "1", published: "No", description: "" });
|
|
825
|
-
setIsModalOpen(false);
|
|
826
|
-
};
|
|
827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-h-screen bg-[#f3f4f6] p-6 font-sans relative", children: [
|
|
828
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "max-w-full mx-auto space-y-5", children: [
|
|
829
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "bg-white rounded-2xl border border-gray-100 shadow-sm p-6 flex justify-between items-center", children: [
|
|
830
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
831
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "text-2xl font-bold text-slate-800", children: "Workflow Master" }),
|
|
832
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("nav", { className: "text-xs text-slate-400 mt-1", children: [
|
|
833
|
-
"Dashboard > Types > ",
|
|
834
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-blue-600 font-semibold", children: "Workflow" })
|
|
835
503
|
] })
|
|
836
504
|
] }),
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-base font-bold", children: "+" }),
|
|
844
|
-
" Add New Workflow"
|
|
845
|
-
]
|
|
846
|
-
}
|
|
847
|
-
)
|
|
848
|
-
] }),
|
|
849
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "bg-white rounded-2xl border border-gray-100 shadow-sm p-6 space-y-5", children: [
|
|
850
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
851
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative w-80", children: [
|
|
852
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
853
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
854
|
-
"input",
|
|
855
|
-
{
|
|
856
|
-
type: "text",
|
|
857
|
-
placeholder: "Search workflow name or code...",
|
|
858
|
-
value: search,
|
|
859
|
-
onChange: (e) => setSearch(e.target.value),
|
|
860
|
-
className: "w-full pl-10 pr-4 py-2 text-sm bg-[#fcfdfe] border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-slate-700 transition"
|
|
861
|
-
}
|
|
862
|
-
)
|
|
863
|
-
] }),
|
|
864
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AddButton, { onOpen: () => setModalOpen(true) })
|
|
506
|
+
] }) }),
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "bg-white border border-slate-200 rounded-2xl shadow-sm p-6 flex flex-col flex-1 overflow-hidden", children: [
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center mb-5", children: [
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "w-full max-w-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SearchBar, {}) }),
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
865
511
|
"select",
|
|
866
512
|
{
|
|
867
|
-
value:
|
|
868
|
-
onChange: (e) =>
|
|
869
|
-
className: "
|
|
513
|
+
value: pageSize,
|
|
514
|
+
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
515
|
+
className: "border border-slate-200 rounded-xl px-4 py-2 text-sm outline-none bg-white",
|
|
870
516
|
children: [
|
|
871
|
-
/* @__PURE__ */ (0,
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
874
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: 50, children: "50 Rows" })
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: 5, children: "5 Rows" }),
|
|
518
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: 10, children: "10 Rows" }),
|
|
519
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: 20, children: "20 Rows" })
|
|
875
520
|
]
|
|
876
521
|
}
|
|
877
|
-
) })
|
|
878
|
-
] }),
|
|
879
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
880
|
-
WorkflowTable,
|
|
881
|
-
{
|
|
882
|
-
search,
|
|
883
|
-
workflows,
|
|
884
|
-
workflowtoggle: handleToggle,
|
|
885
|
-
entriesPerPage,
|
|
886
|
-
setEntriesPerPage
|
|
887
|
-
}
|
|
888
|
-
)
|
|
889
|
-
] })
|
|
890
|
-
] }),
|
|
891
|
-
isModalOpen && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "fixed inset-0 bg-slate-900/40 backdrop-blur-sm flex justify-center items-center z-50 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "bg-white rounded-[24px] w-full max-w-4xl shadow-2xl border border-slate-100 flex flex-col max-h-[90vh] overflow-hidden animate-in fade-in zoom-in-95 duration-150", children: [
|
|
892
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "px-8 py-5 border-b border-slate-100 flex justify-between items-center", children: [
|
|
893
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
894
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-11 h-11 bg-indigo-50 border border-indigo-100 rounded-xl flex items-center justify-center text-indigo-600", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { className: "w-6 h-6 text-[#5c59eb]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", 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" }) }) }),
|
|
895
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
896
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
|
|
897
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-[11px] text-slate-400 font-medium tracking-wide", children: "Create a new workflow and configure its details" })
|
|
898
|
-
] })
|
|
899
|
-
] }),
|
|
900
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
901
|
-
"button",
|
|
902
|
-
{
|
|
903
|
-
onClick: () => setIsModalOpen(false),
|
|
904
|
-
className: "text-slate-300 hover:text-slate-500 transition cursor-pointer",
|
|
905
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
906
|
-
}
|
|
907
|
-
)
|
|
908
|
-
] }),
|
|
909
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("form", { onSubmit: handleAddWorkflow, className: "flex-1 overflow-y-auto p-8 space-y-6", children: [
|
|
910
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "border border-slate-100 rounded-2xl p-6 bg-white space-y-5", children: [
|
|
911
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 pb-1 border-b border-slate-50", children: [
|
|
912
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm", children: "\u{1F4CB}" }),
|
|
913
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-xs font-bold text-[#5c59eb] uppercase tracking-wider", children: "Workflow Information" })
|
|
914
|
-
] }),
|
|
915
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
916
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
917
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
918
|
-
"Workflow Type ",
|
|
919
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
|
|
920
|
-
] }),
|
|
921
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
922
|
-
"select",
|
|
923
|
-
{
|
|
924
|
-
required: true,
|
|
925
|
-
value: newWorkflow.workflowtype,
|
|
926
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { workflowtype: e.target.value })),
|
|
927
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm bg-white text-slate-600 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition appearance-none cursor-pointer",
|
|
928
|
-
children: [
|
|
929
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "", children: "Select workflow type" }),
|
|
930
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Trade License", children: "Trade License" }),
|
|
931
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Petition", children: "Petition" }),
|
|
932
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Leave", children: "Leave" }),
|
|
933
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Grievance", children: "Grievance" }),
|
|
934
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Verification", children: "Verification" })
|
|
935
|
-
]
|
|
936
|
-
}
|
|
937
|
-
),
|
|
938
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-slate-400 mt-1 block", children: "Choose the category this workflow belongs to" })
|
|
939
|
-
] }),
|
|
940
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
941
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
942
|
-
"Workflow Code ",
|
|
943
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
|
|
944
|
-
] }),
|
|
945
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
946
|
-
"input",
|
|
947
|
-
{
|
|
948
|
-
type: "text",
|
|
949
|
-
required: true,
|
|
950
|
-
placeholder: "Enter workflow code",
|
|
951
|
-
value: newWorkflow.workflowcode,
|
|
952
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { workflowcode: e.target.value })),
|
|
953
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm placeholder-slate-300 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition"
|
|
954
|
-
}
|
|
955
|
-
),
|
|
956
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-slate-400 mt-1 block", children: "Unique code for this workflow (e.g., PET-001)" })
|
|
957
|
-
] })
|
|
958
|
-
] }),
|
|
959
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
960
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
961
|
-
"Workflow Name ",
|
|
962
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
|
|
963
|
-
] }),
|
|
964
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
965
|
-
"input",
|
|
966
|
-
{
|
|
967
|
-
type: "text",
|
|
968
|
-
required: true,
|
|
969
|
-
placeholder: "Enter workflow name",
|
|
970
|
-
value: newWorkflow.name,
|
|
971
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { name: e.target.value })),
|
|
972
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm placeholder-slate-300 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition"
|
|
973
|
-
}
|
|
974
|
-
),
|
|
975
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-slate-400 mt-1 block", children: "Enter a descriptive name for this workflow" })
|
|
976
|
-
] }),
|
|
977
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
|
|
978
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
979
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
980
|
-
"Version ",
|
|
981
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
|
|
982
|
-
] }),
|
|
983
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
984
|
-
"input",
|
|
985
|
-
{
|
|
986
|
-
type: "number",
|
|
987
|
-
required: true,
|
|
988
|
-
placeholder: "1",
|
|
989
|
-
value: newWorkflow.version,
|
|
990
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { version: e.target.value })),
|
|
991
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm placeholder-slate-300 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition"
|
|
992
|
-
}
|
|
993
|
-
),
|
|
994
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-slate-400 mt-1 block", children: "Workflow version number" })
|
|
995
|
-
] }),
|
|
996
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
997
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
998
|
-
"Published ",
|
|
999
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
|
|
1000
|
-
] }),
|
|
1001
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1002
|
-
"select",
|
|
1003
|
-
{
|
|
1004
|
-
required: true,
|
|
1005
|
-
value: newWorkflow.published,
|
|
1006
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { published: e.target.value })),
|
|
1007
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm bg-white text-slate-600 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition appearance-none cursor-pointer",
|
|
1008
|
-
children: [
|
|
1009
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "No", children: "No" }),
|
|
1010
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: "Yes", children: "Yes" })
|
|
1011
|
-
]
|
|
1012
|
-
}
|
|
1013
|
-
),
|
|
1014
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-slate-400 mt-1 block", children: "Make workflow active for use" })
|
|
1015
|
-
] })
|
|
1016
|
-
] })
|
|
1017
|
-
] }),
|
|
1018
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "border border-slate-100 rounded-2xl p-6 bg-white space-y-3", children: [
|
|
1019
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
1020
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-xs font-bold text-slate-700", children: "Description" }),
|
|
1021
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[10px] text-slate-400", children: [
|
|
1022
|
-
newWorkflow.description.length,
|
|
1023
|
-
" / 500"
|
|
1024
|
-
] })
|
|
1025
|
-
] }),
|
|
1026
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1027
|
-
"textarea",
|
|
1028
|
-
{
|
|
1029
|
-
rows: "3",
|
|
1030
|
-
maxLength: "500",
|
|
1031
|
-
placeholder: "Enter description here...",
|
|
1032
|
-
value: newWorkflow.description,
|
|
1033
|
-
onChange: (e) => setNewWorkflow(__spreadProps(__spreadValues({}, newWorkflow), { description: e.target.value })),
|
|
1034
|
-
className: "w-full px-4 py-2.5 border border-slate-200 rounded-xl text-sm placeholder-slate-300 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 focus:outline-none transition resize-none"
|
|
1035
|
-
}
|
|
1036
522
|
)
|
|
1037
523
|
] }),
|
|
1038
|
-
/* @__PURE__ */ (0,
|
|
1039
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1040
|
-
"button",
|
|
1041
|
-
{
|
|
1042
|
-
type: "button",
|
|
1043
|
-
onClick: () => setIsModalOpen(false),
|
|
1044
|
-
className: "px-6 py-2.5 text-xs font-bold text-slate-500 hover:bg-slate-50 border border-slate-200 rounded-xl transition flex items-center gap-1.5 cursor-pointer",
|
|
1045
|
-
children: [
|
|
1046
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "\u2715" }),
|
|
1047
|
-
" Cancel"
|
|
1048
|
-
]
|
|
1049
|
-
}
|
|
1050
|
-
),
|
|
1051
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1052
|
-
"button",
|
|
1053
|
-
{
|
|
1054
|
-
type: "submit",
|
|
1055
|
-
className: "px-6 py-2.5 text-xs font-bold text-white bg-[#5c59eb] hover:bg-indigo-700 rounded-xl transition flex items-center gap-1.5 shadow-sm cursor-pointer",
|
|
1056
|
-
children: [
|
|
1057
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "\u{1F4BE}" }),
|
|
1058
|
-
" Save Workflow"
|
|
1059
|
-
]
|
|
1060
|
-
}
|
|
1061
|
-
)
|
|
1062
|
-
] })
|
|
524
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WorkflowTable, { pageSize }) })
|
|
1063
525
|
] })
|
|
1064
|
-
] })
|
|
526
|
+
] }),
|
|
527
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
528
|
+
AddWorkflowModal,
|
|
529
|
+
{
|
|
530
|
+
isOpen: modalOpen,
|
|
531
|
+
onClose: () => setModalOpen(false)
|
|
532
|
+
}
|
|
533
|
+
)
|
|
1065
534
|
] });
|
|
1066
535
|
}
|
|
1067
536
|
|
|
537
|
+
// src/components/Sidebar.jsx
|
|
538
|
+
var import_react17 = require("react");
|
|
539
|
+
var import_react18 = require("@remixicon/react");
|
|
540
|
+
var import_router = require("next/router");
|
|
541
|
+
|
|
1068
542
|
// src/components/WorkflowType/WorkflowTypeMains.js
|
|
1069
543
|
var import_react10 = __toESM(require("react"));
|
|
1070
544
|
|
|
1071
545
|
// src/components/WorkflowType/SearchBar.jsx
|
|
1072
546
|
var import_react6 = __toESM(require("react"));
|
|
1073
|
-
var
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
547
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
548
|
+
function SearchBar2({ searchQuery, setSearchQuery, setCurrentPage }) {
|
|
549
|
+
const handleChange = (e) => {
|
|
550
|
+
setSearchQuery(e.target.value);
|
|
551
|
+
if (setCurrentPage) {
|
|
552
|
+
setCurrentPage(1);
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative w-full", children: [
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-slate-400", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1078
558
|
"input",
|
|
1079
559
|
{
|
|
1080
560
|
type: "text",
|
|
561
|
+
value: searchQuery || "",
|
|
562
|
+
onChange: handleChange,
|
|
1081
563
|
placeholder: "Search workflow name or code...",
|
|
1082
|
-
className: "w-full pl-
|
|
564
|
+
className: "w-full pl-9 pr-4 py-2 bg-white border border-slate-200 rounded-xl text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 transition-all shadow-sm"
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
searchQuery && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
568
|
+
"button",
|
|
569
|
+
{
|
|
570
|
+
onClick: () => {
|
|
571
|
+
setSearchQuery("");
|
|
572
|
+
if (setCurrentPage) setCurrentPage(1);
|
|
573
|
+
},
|
|
574
|
+
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-slate-400 hover:text-slate-600",
|
|
575
|
+
children: "\u2715"
|
|
1083
576
|
}
|
|
1084
577
|
)
|
|
1085
578
|
] });
|
|
@@ -1087,25 +580,42 @@ function SearchBar() {
|
|
|
1087
580
|
|
|
1088
581
|
// src/components/WorkflowType/WorkflowTypeTable.jsx
|
|
1089
582
|
var import_react7 = __toESM(require("react"));
|
|
1090
|
-
var
|
|
1091
|
-
function WorkflowTypeTable({ pageSize }) {
|
|
583
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
584
|
+
function WorkflowTypeTable({ pageSize, searchQuery = "", currentPage, setCurrentPage, setTotalEntries }) {
|
|
1092
585
|
const initialData = [
|
|
1093
|
-
{ id:
|
|
1094
|
-
{ id:
|
|
1095
|
-
{ id:
|
|
1096
|
-
{ id:
|
|
1097
|
-
{ id:
|
|
1098
|
-
{ id:
|
|
586
|
+
{ id: 1, workflowName: "Citizen Petition Workflow", workflowCode: "PET-001", workflowType: "Petition", version: 1, published: true, status: true },
|
|
587
|
+
{ id: 2, workflowName: "Building Permission Workflow", workflowCode: "BLD-001", workflowType: "Building Permission", version: 1, published: true, status: true },
|
|
588
|
+
{ id: 3, workflowName: "Leave Application Workflow", workflowCode: "LEV-001", workflowType: "Leave", version: 1, published: false, status: true },
|
|
589
|
+
{ id: 4, workflowName: "Grievance Redressal Workflow", workflowCode: "GRV-001", workflowType: "Grievance", version: 2, published: true, status: true },
|
|
590
|
+
{ id: 5, workflowName: "Trade License Workflow", workflowCode: "TRD-001", workflowType: "Trade License", version: 1, published: true, status: true },
|
|
591
|
+
{ id: 6, workflowName: "Document Verification", workflowCode: "DOC-001", workflowType: "Verification", version: 1, published: true, status: true },
|
|
592
|
+
{ id: 7, workflowName: "Water Connection Approval", workflowCode: "WTR-002", workflowType: "Utility", version: 2, published: true, status: true },
|
|
593
|
+
{ id: 8, workflowName: "Property Tax Assessment", workflowCode: "TAX-001", workflowType: "Revenue", version: 3, published: true, status: false },
|
|
594
|
+
{ id: 9, workflowName: "Vendor Registration", workflowCode: "VND-005", workflowType: "Procurement", version: 1, published: false, status: true },
|
|
595
|
+
{ id: 10, workflowName: "Birth Certificate Request", workflowCode: "CRT-001", workflowType: "Vital Stats", version: 1, published: true, status: true },
|
|
596
|
+
{ id: 11, workflowName: "Death Certificate Request", workflowCode: "CRT-002", workflowType: "Vital Stats", version: 1, published: true, status: true },
|
|
597
|
+
{ id: 12, workflowName: "Road Repair Request", workflowCode: "PWD-003", workflowType: "Public Works", version: 2, published: true, status: true },
|
|
598
|
+
{ id: 13, workflowName: "Waste Collection Issue", workflowCode: "SAN-001", workflowType: "Sanitation", version: 1, published: false, status: false },
|
|
599
|
+
{ id: 14, workflowName: "Fire NOC Approval", workflowCode: "FIR-001", workflowType: "Safety", version: 4, published: true, status: true },
|
|
600
|
+
{ id: 15, workflowName: "Health License Approval", workflowCode: "HLT-002", workflowType: "Health", version: 1, published: true, status: true },
|
|
601
|
+
{ id: 16, workflowName: "Advertisement Board Perm", workflowCode: "ADV-001", workflowType: "License", version: 2, published: true, status: true },
|
|
602
|
+
{ id: 17, workflowName: "Marriage Registration", workflowCode: "REG-004", workflowType: "Vital Stats", version: 1, published: true, status: true },
|
|
603
|
+
{ id: 18, workflowName: "RTI Application Flow", workflowCode: "RTI-001", workflowType: "Information", version: 1, published: true, status: true },
|
|
604
|
+
{ id: 19, workflowName: "Contractor Empanelment", workflowCode: "CNT-002", workflowType: "Procurement", version: 2, published: false, status: true },
|
|
605
|
+
{ id: 20, workflowName: "Streetlight Maintenance", workflowCode: "ELE-001", workflowType: "Public Works", version: 1, published: true, status: true },
|
|
606
|
+
{ id: 21, workflowName: "Park Booking Approval", workflowCode: "PRK-001", workflowType: "Services", version: 1, published: true, status: false },
|
|
607
|
+
{ id: 22, workflowName: "Drainage Issue Escalation", workflowCode: "SAN-002", workflowType: "Sanitation", version: 3, published: true, status: true },
|
|
608
|
+
{ id: 23, workflowName: "Community Hall Booking", workflowCode: "CHB-001", workflowType: "Services", version: 1, published: true, status: true },
|
|
609
|
+
{ id: 24, workflowName: "Seismic Clearance Flow", workflowCode: "ENV-001", workflowType: "Environment", version: 1, published: false, status: false },
|
|
610
|
+
{ id: 25, workflowName: "Tree Cutting Permission", workflowCode: "ENV-002", workflowType: "Environment", version: 2, published: true, status: true }
|
|
1099
611
|
];
|
|
1100
612
|
const [data, setData] = (0, import_react7.useState)(initialData);
|
|
1101
613
|
const [sortOrder, setSortOrder] = (0, import_react7.useState)("asc");
|
|
1102
|
-
const [
|
|
1103
|
-
const totalPages = Math.ceil(data.length / pageSize) || 1;
|
|
1104
|
-
const startIndex = (currentPage - 1) * pageSize;
|
|
1105
|
-
const visibleData = data.slice(startIndex, startIndex + pageSize);
|
|
614
|
+
const [sortKey, setSortKey] = (0, import_react7.useState)("workflowName");
|
|
1106
615
|
const handleSort = (columnKey) => {
|
|
1107
|
-
const isAsc = sortOrder === "asc";
|
|
616
|
+
const isAsc = sortKey === columnKey && sortOrder === "asc";
|
|
1108
617
|
setSortOrder(isAsc ? "desc" : "asc");
|
|
618
|
+
setSortKey(columnKey);
|
|
1109
619
|
const sortedData = [...data].sort((a, b) => {
|
|
1110
620
|
if (a[columnKey] < b[columnKey]) return isAsc ? -1 : 1;
|
|
1111
621
|
if (a[columnKey] > b[columnKey]) return isAsc ? 1 : -1;
|
|
@@ -1113,73 +623,60 @@ function WorkflowTypeTable({ pageSize }) {
|
|
|
1113
623
|
});
|
|
1114
624
|
setData(sortedData);
|
|
1115
625
|
};
|
|
1116
|
-
const
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
626
|
+
const filteredData = data.filter((item) => {
|
|
627
|
+
const query = (searchQuery || "").toLowerCase();
|
|
628
|
+
return item.workflowName.toLowerCase().includes(query) || item.workflowCode.toLowerCase().includes(query) || item.workflowType.toLowerCase().includes(query);
|
|
629
|
+
});
|
|
630
|
+
(0, import_react7.useEffect)(() => {
|
|
631
|
+
if (setTotalEntries) setTotalEntries(filteredData.length);
|
|
632
|
+
}, [filteredData.length, setTotalEntries]);
|
|
633
|
+
const totalPages = Math.ceil(filteredData.length / pageSize) || 1;
|
|
634
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
635
|
+
const visibleData = filteredData.slice(startIndex, startIndex + pageSize);
|
|
636
|
+
const pageNumbers = Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
637
|
+
const toggleStatus = (id) => {
|
|
638
|
+
setData((prev) => prev.map((item) => item.id === id ? __spreadProps(__spreadValues({}, item), { status: !item.status }) : item));
|
|
1121
639
|
};
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1124
|
-
/* @__PURE__ */ (0,
|
|
1125
|
-
/* @__PURE__ */ (0,
|
|
1126
|
-
/* @__PURE__ */ (0,
|
|
1127
|
-
"
|
|
1128
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-5", children: [
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-full overflow-x-auto border border-slate-200 rounded-2xl shadow-sm max-h-[420px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("table", { className: "w-full text-left border-collapse bg-white table-auto", children: [
|
|
642
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("thead", { className: "sticky top-0 z-10 bg-slate-50 shadow-[0_1px_0_0_rgba(226,232,240,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("tr", { className: "text-xs font-bold uppercase tracking-wider text-slate-500", children: [
|
|
643
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { className: "py-4 px-4 w-16 text-center bg-slate-50", children: "S.NO" }),
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("th", { onClick: () => handleSort("workflowName"), className: "py-4 px-5 text-sm cursor-pointer select-none hover:text-slate-900 bg-slate-50 whitespace-nowrap", children: [
|
|
645
|
+
"WORKFLOW NAME ",
|
|
646
|
+
sortKey === "workflowName" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
|
|
1129
647
|
] }),
|
|
1130
|
-
/* @__PURE__ */ (0,
|
|
1131
|
-
"
|
|
1132
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("th", { onClick: () => handleSort("workflowCode"), className: "py-4 px-5 text-sm cursor-pointer select-none hover:text-slate-900 bg-slate-50 whitespace-nowrap", children: [
|
|
649
|
+
"WORKFLOW CODE ",
|
|
650
|
+
sortKey === "workflowCode" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
|
|
1133
651
|
] }),
|
|
1134
|
-
/* @__PURE__ */ (0,
|
|
1135
|
-
"
|
|
1136
|
-
sortOrder === "asc" ? "\u25B2" : "\u25BC"
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("th", { onClick: () => handleSort("workflowType"), className: "py-4 px-5 text-sm cursor-pointer select-none hover:text-slate-900 bg-slate-50 whitespace-nowrap", children: [
|
|
653
|
+
"WORKFLOW TYPE ",
|
|
654
|
+
sortKey === "workflowType" ? sortOrder === "asc" ? "\u25B2" : "\u25BC" : "\u25B2"
|
|
1137
655
|
] }),
|
|
1138
|
-
/* @__PURE__ */ (0,
|
|
1139
|
-
/* @__PURE__ */ (0,
|
|
1140
|
-
/* @__PURE__ */ (0,
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { className: "py-4 px-5 text-sm bg-slate-50 whitespace-nowrap text-center", children: "VERSION" }),
|
|
657
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { className: "py-4 px-5 text-sm bg-slate-50 whitespace-nowrap text-center", children: "PUBLISHED" }),
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("th", { className: "py-4 px-5 text-sm bg-slate-50 text-center whitespace-nowrap", children: "STATUS" })
|
|
1141
659
|
] }) }),
|
|
1142
|
-
/* @__PURE__ */ (0,
|
|
1143
|
-
/* @__PURE__ */ (0,
|
|
1144
|
-
/* @__PURE__ */ (0,
|
|
1145
|
-
/* @__PURE__ */ (0,
|
|
1146
|
-
/* @__PURE__ */ (0,
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1148
|
-
/* @__PURE__ */ (0,
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
660
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("tbody", { className: "divide-y divide-slate-100 text-sm text-slate-600", children: visibleData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("tr", { className: "hover:bg-slate-50/50 transition-colors", children: [
|
|
661
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-4 text-center font-medium text-slate-400", children: startIndex + index + 1 }),
|
|
662
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 font-bold text-slate-900 text-[14px] whitespace-nowrap", children: item.workflowName }),
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 text-slate-500 font-mono text-xs whitespace-nowrap", children: item.workflowCode }),
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 text-slate-600 font-medium whitespace-nowrap", children: item.workflowType }),
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 font-bold text-slate-800 text-center whitespace-nowrap", children: item.version }),
|
|
666
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 text-center whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `px-2 py-0.5 text-xs font-semibold rounded ${item.published ? "bg-emerald-50 text-emerald-600 border border-emerald-200" : "bg-rose-50 text-rose-600 border border-rose-200"}`, children: item.published ? "\u2713 Yes" : "\u2715 No" }) }),
|
|
667
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("td", { className: "py-4 px-5 text-center whitespace-nowrap", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1150
668
|
"button",
|
|
1151
669
|
{
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
className: `
|
|
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
|
-
)
|
|
670
|
+
onClick: () => toggleStatus(item.id),
|
|
671
|
+
className: `relative inline-flex h-5.5 w-10 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"}`,
|
|
672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `pointer-events-none inline-block h-4.5 w-4.5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${item.status ? "translate-x-4.5" : "translate-x-0"}` })
|
|
1161
673
|
}
|
|
1162
|
-
) })
|
|
674
|
+
) })
|
|
1163
675
|
] }, item.id)) })
|
|
1164
676
|
] }) }),
|
|
1165
|
-
/* @__PURE__ */ (0,
|
|
1166
|
-
/* @__PURE__ */ (0,
|
|
1167
|
-
|
|
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)(
|
|
677
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.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: [
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)), disabled: currentPage === 1, className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 mr-2 disabled:opacity-40", children: "\u2039 Prev" }),
|
|
679
|
+
pageNumbers.map((pageNumber) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1183
680
|
"button",
|
|
1184
681
|
{
|
|
1185
682
|
onClick: () => setCurrentPage(pageNumber),
|
|
@@ -1188,49 +685,34 @@ function WorkflowTypeTable({ pageSize }) {
|
|
|
1188
685
|
},
|
|
1189
686
|
pageNumber
|
|
1190
687
|
)),
|
|
1191
|
-
/* @__PURE__ */ (0,
|
|
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
|
-
)
|
|
688
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { onClick: () => setCurrentPage((prev) => Math.min(prev + 1, totalPages)), disabled: currentPage === totalPages, className: "px-2.5 py-1 text-slate-500 hover:text-slate-900 ml-2 disabled:opacity-40", children: "Next \u203A" })
|
|
1207
689
|
] })
|
|
1208
690
|
] });
|
|
1209
691
|
}
|
|
1210
692
|
|
|
1211
693
|
// src/components/WorkflowType/AddWorkflowTypeModal.jsx
|
|
1212
694
|
var import_react8 = __toESM(require("react"));
|
|
1213
|
-
var
|
|
695
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1214
696
|
function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
1215
697
|
if (!isOpen) return null;
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1218
700
|
"div",
|
|
1219
701
|
{
|
|
1220
702
|
className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm transition-opacity duration-200",
|
|
1221
703
|
onClick: onClose
|
|
1222
704
|
}
|
|
1223
705
|
),
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1226
|
-
/* @__PURE__ */ (0,
|
|
1227
|
-
/* @__PURE__ */ (0,
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1229
|
-
/* @__PURE__ */ (0,
|
|
1230
|
-
/* @__PURE__ */ (0,
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-between items-center px-8 py-6 border-b border-slate-100", children: [
|
|
708
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
709
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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_runtime8.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.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" }) }) }),
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflow and configure its details" })
|
|
1231
713
|
] })
|
|
1232
714
|
] }),
|
|
1233
|
-
/* @__PURE__ */ (0,
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1234
716
|
"button",
|
|
1235
717
|
{
|
|
1236
718
|
onClick: onClose,
|
|
@@ -1239,32 +721,32 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1239
721
|
}
|
|
1240
722
|
)
|
|
1241
723
|
] }),
|
|
1242
|
-
/* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1245
|
-
/* @__PURE__ */ (0,
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-8 space-y-8 overflow-y-auto max-h-[calc(92vh-170px)] bg-slate-50/30", children: [
|
|
725
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
726
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
727
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\u{1F4CB}" }),
|
|
728
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Workflow Information" })
|
|
1247
729
|
] }),
|
|
1248
|
-
/* @__PURE__ */ (0,
|
|
1249
|
-
/* @__PURE__ */ (0,
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1251
733
|
"Workflow Type ",
|
|
1252
|
-
/* @__PURE__ */ (0,
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1253
735
|
] }),
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1255
|
-
/* @__PURE__ */ (0,
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1257
|
-
/* @__PURE__ */ (0,
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
736
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "", children: "Select workflow type" }),
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "petition", children: "Petition" }),
|
|
739
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "building", children: "Building Permission" }),
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "leave", children: "Leave" })
|
|
1259
741
|
] }),
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflow belongs to" })
|
|
1261
743
|
] }),
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
744
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
745
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1264
746
|
"Workflow Code ",
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1266
748
|
] }),
|
|
1267
|
-
/* @__PURE__ */ (0,
|
|
749
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1268
750
|
"input",
|
|
1269
751
|
{
|
|
1270
752
|
type: "text",
|
|
@@ -1272,15 +754,15 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1272
754
|
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"
|
|
1273
755
|
}
|
|
1274
756
|
),
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflow (e.g., PET-001)" })
|
|
1276
758
|
] })
|
|
1277
759
|
] }),
|
|
1278
|
-
/* @__PURE__ */ (0,
|
|
1279
|
-
/* @__PURE__ */ (0,
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1280
762
|
"Workflow Name ",
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
763
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1282
764
|
] }),
|
|
1283
|
-
/* @__PURE__ */ (0,
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1284
766
|
"input",
|
|
1285
767
|
{
|
|
1286
768
|
type: "text",
|
|
@@ -1288,15 +770,15 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1288
770
|
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"
|
|
1289
771
|
}
|
|
1290
772
|
),
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
773
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
|
|
1292
774
|
] }),
|
|
1293
|
-
/* @__PURE__ */ (0,
|
|
1294
|
-
/* @__PURE__ */ (0,
|
|
1295
|
-
/* @__PURE__ */ (0,
|
|
775
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
777
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1296
778
|
"Version ",
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1298
780
|
] }),
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1300
782
|
"input",
|
|
1301
783
|
{
|
|
1302
784
|
type: "text",
|
|
@@ -1304,27 +786,27 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1304
786
|
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"
|
|
1305
787
|
}
|
|
1306
788
|
),
|
|
1307
|
-
/* @__PURE__ */ (0,
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
|
|
1308
790
|
] }),
|
|
1309
|
-
/* @__PURE__ */ (0,
|
|
1310
|
-
/* @__PURE__ */ (0,
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1311
793
|
"Published ",
|
|
1312
|
-
/* @__PURE__ */ (0,
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1313
795
|
] }),
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "false", children: "No" }),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "true", children: "Yes" })
|
|
1317
799
|
] }),
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
|
|
1319
801
|
] })
|
|
1320
802
|
] })
|
|
1321
803
|
] }),
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1324
|
-
/* @__PURE__ */ (0,
|
|
1325
|
-
/* @__PURE__ */ (0,
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
|
|
1326
808
|
] }),
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1328
810
|
"textarea",
|
|
1329
811
|
{
|
|
1330
812
|
rows: 3,
|
|
@@ -1332,86 +814,86 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1332
814
|
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"
|
|
1333
815
|
}
|
|
1334
816
|
),
|
|
1335
|
-
/* @__PURE__ */ (0,
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
|
|
1336
818
|
] }),
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1338
|
-
/* @__PURE__ */ (0,
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1340
|
-
/* @__PURE__ */ (0,
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\u2699\uFE0F" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Status & Settings" })
|
|
1341
823
|
] }),
|
|
1342
|
-
/* @__PURE__ */ (0,
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1345
827
|
"Status ",
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1347
829
|
] }),
|
|
1348
|
-
/* @__PURE__ */ (0,
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "active", children: "Active" }),
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "inactive", children: "Inactive" })
|
|
1351
833
|
] }),
|
|
1352
|
-
/* @__PURE__ */ (0,
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
|
|
1353
835
|
] }),
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
/* @__PURE__ */ (0,
|
|
1356
|
-
/* @__PURE__ */ (0,
|
|
1357
|
-
/* @__PURE__ */ (0,
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
|
|
838
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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: [
|
|
839
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "medium", children: "Medium" }),
|
|
840
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "high", children: "High" }),
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: "low", children: "Low" })
|
|
1360
842
|
] }),
|
|
1361
|
-
/* @__PURE__ */ (0,
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
|
|
1362
844
|
] })
|
|
1363
845
|
] })
|
|
1364
846
|
] }),
|
|
1365
|
-
/* @__PURE__ */ (0,
|
|
1366
|
-
/* @__PURE__ */ (0,
|
|
1367
|
-
/* @__PURE__ */ (0,
|
|
1368
|
-
/* @__PURE__ */ (0,
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\u{1F6E0}\uFE0F" }),
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Additional Settings" })
|
|
1369
851
|
] }),
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1376
|
-
/* @__PURE__ */ (0,
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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" }),
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
|
|
858
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
|
|
1377
859
|
] })
|
|
1378
860
|
] }),
|
|
1379
|
-
/* @__PURE__ */ (0,
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
861
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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" })
|
|
1382
864
|
] })
|
|
1383
865
|
] }),
|
|
1384
|
-
/* @__PURE__ */ (0,
|
|
1385
|
-
/* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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}" }),
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
|
|
871
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
|
|
1390
872
|
] })
|
|
1391
873
|
] }),
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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" })
|
|
1395
877
|
] })
|
|
1396
878
|
] }),
|
|
1397
|
-
/* @__PURE__ */ (0,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1400
|
-
/* @__PURE__ */ (0,
|
|
1401
|
-
/* @__PURE__ */ (0,
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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}" }),
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
|
|
1403
885
|
] })
|
|
1404
886
|
] }),
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
887
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
888
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
|
|
889
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.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" })
|
|
1408
890
|
] })
|
|
1409
891
|
] })
|
|
1410
892
|
] })
|
|
1411
893
|
] })
|
|
1412
894
|
] }),
|
|
1413
|
-
/* @__PURE__ */ (0,
|
|
1414
|
-
/* @__PURE__ */ (0,
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1415
897
|
"button",
|
|
1416
898
|
{
|
|
1417
899
|
onClick: onClose,
|
|
@@ -1419,7 +901,7 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1419
901
|
children: "\u2715 Cancel"
|
|
1420
902
|
}
|
|
1421
903
|
),
|
|
1422
|
-
/* @__PURE__ */ (0,
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1423
905
|
"button",
|
|
1424
906
|
{
|
|
1425
907
|
type: "button",
|
|
@@ -1434,15 +916,15 @@ function AddWorkflowTypeModal({ isOpen, onClose }) {
|
|
|
1434
916
|
|
|
1435
917
|
// src/components/WorkflowType/AddButton.jsx
|
|
1436
918
|
var import_react9 = __toESM(require("react"));
|
|
1437
|
-
var
|
|
1438
|
-
function
|
|
1439
|
-
return /* @__PURE__ */ (0,
|
|
919
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
920
|
+
function AddButton2({ onOpen }) {
|
|
921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1440
922
|
"button",
|
|
1441
923
|
{
|
|
1442
924
|
onClick: onOpen,
|
|
1443
925
|
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
926
|
children: [
|
|
1445
|
-
/* @__PURE__ */ (0,
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { className: "w-4 h-4 stroke-[2.5]", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }),
|
|
1446
928
|
"Add Workflow Type"
|
|
1447
929
|
]
|
|
1448
930
|
}
|
|
@@ -1450,44 +932,60 @@ function AddButton({ onOpen }) {
|
|
|
1450
932
|
}
|
|
1451
933
|
|
|
1452
934
|
// src/components/WorkflowType/WorkflowTypeMains.js
|
|
1453
|
-
var
|
|
935
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1454
936
|
function WorkflowTypeMains() {
|
|
1455
937
|
const [modalOpen, setModalOpen] = (0, import_react10.useState)(false);
|
|
1456
938
|
const [pageSize, setPageSize] = (0, import_react10.useState)(10);
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
939
|
+
const [searchQuery, setSearchQuery] = (0, import_react10.useState)("");
|
|
940
|
+
const [currentPage, setCurrentPage] = (0, import_react10.useState)(1);
|
|
941
|
+
const [totalEntries, setTotalEntries] = (0, import_react10.useState)(0);
|
|
942
|
+
const handlePageSizeChange = (e) => {
|
|
943
|
+
setPageSize(Number(e.target.value));
|
|
944
|
+
setCurrentPage(1);
|
|
945
|
+
};
|
|
946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "min-h-screen bg-slate-50 p-4 md:p-6", children: [
|
|
947
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w-full space-y-5", children: [
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.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: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { children: [
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h1", { className: "text-2xl font-extrabold text-slate-900 tracking-tight", children: "Workflow Type" }),
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "text-xs text-slate-400 mt-1", children: [
|
|
1463
952
|
"Dashboard > Types > ",
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-blue-600 font-semibold", children: "Workflow Type" })
|
|
1465
954
|
] })
|
|
1466
955
|
] }),
|
|
1467
|
-
/* @__PURE__ */ (0,
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AddButton2, { onOpen: () => setModalOpen(true) })
|
|
1468
957
|
] }),
|
|
1469
|
-
/* @__PURE__ */ (0,
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
958
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-200/80 shadow-sm space-y-5", children: [
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
960
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SearchBar2, { searchQuery, setSearchQuery, setCurrentPage }) }),
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1473
962
|
"select",
|
|
1474
963
|
{
|
|
1475
964
|
value: pageSize,
|
|
1476
|
-
onChange:
|
|
965
|
+
onChange: handlePageSizeChange,
|
|
1477
966
|
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
967
|
children: [
|
|
1479
|
-
/* @__PURE__ */ (0,
|
|
1480
|
-
/* @__PURE__ */ (0,
|
|
1481
|
-
/* @__PURE__ */ (0,
|
|
1482
|
-
/* @__PURE__ */ (0,
|
|
968
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: 5, children: "5 Rows" }),
|
|
969
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: 10, children: "10 Rows" }),
|
|
970
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: 20, children: "20 Rows" }),
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("option", { value: 25, children: "25 Rows" })
|
|
1483
972
|
]
|
|
1484
973
|
}
|
|
1485
974
|
) })
|
|
1486
975
|
] }),
|
|
1487
|
-
/* @__PURE__ */ (0,
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
977
|
+
WorkflowTypeTable,
|
|
978
|
+
{
|
|
979
|
+
pageSize,
|
|
980
|
+
searchQuery,
|
|
981
|
+
currentPage,
|
|
982
|
+
setCurrentPage,
|
|
983
|
+
setTotalEntries
|
|
984
|
+
}
|
|
985
|
+
)
|
|
1488
986
|
] })
|
|
1489
987
|
] }),
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1491
989
|
AddWorkflowTypeModal,
|
|
1492
990
|
{
|
|
1493
991
|
isOpen: modalOpen,
|
|
@@ -1497,14 +995,33 @@ function WorkflowTypeMains() {
|
|
|
1497
995
|
] });
|
|
1498
996
|
}
|
|
1499
997
|
|
|
1500
|
-
// src/components/
|
|
1501
|
-
var
|
|
1502
|
-
var import_link3 = __toESM(require("next/link"));
|
|
998
|
+
// src/components/WorkflowStep/main.js
|
|
999
|
+
var import_react14 = __toESM(require("react"));
|
|
1503
1000
|
|
|
1504
|
-
// src/components/
|
|
1001
|
+
// src/components/Common/footer.js
|
|
1505
1002
|
var import_react11 = __toESM(require("react"));
|
|
1506
|
-
var
|
|
1507
|
-
function
|
|
1003
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1004
|
+
function Footer() {
|
|
1005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-between items-center px-6 py-4 sticky bottom-0 z-10 border-t border-gray-200 rounded-xl bg-slate-50/50 shadow-md", children: [
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-sm text-slate-500", children: "Showing 1 to 5 entries" }),
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "px-2 py-1 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "\u2039 Prev" }),
|
|
1009
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "w-7 h-7 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "1" }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "w-7 h-7 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "2" }),
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "w-7 h-7 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "3" }),
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "w-7 h-7 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "4" }),
|
|
1013
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "px-2 py-1 text-[15px] border border-slate-200 rounded-lg bg-white text-slate-600 shadow-sm transition-all duration-200 hover:bg-blue-600 hover:text-white hover:border-blue-600", children: "Next \u203A" })
|
|
1014
|
+
] })
|
|
1015
|
+
] });
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
// src/components/WorkflowStep/main.js
|
|
1019
|
+
var import_link2 = __toESM(require("next/link"));
|
|
1020
|
+
|
|
1021
|
+
// src/components/WorkflowStep/AddWorkflowStepModal.js
|
|
1022
|
+
var import_react12 = __toESM(require("react"));
|
|
1023
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1024
|
+
function AddWorkflowStepModal({ onClose }) {
|
|
1508
1025
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
1509
1026
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1510
1027
|
"div",
|
|
@@ -1518,8 +1035,8 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1518
1035
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
1519
1036
|
/* @__PURE__ */ (0, import_jsx_runtime12.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_runtime12.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime12.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" }) }) }),
|
|
1520
1037
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1521
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add
|
|
1522
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add WorkflowStep" }),
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflowStep and configure its details" })
|
|
1523
1040
|
] })
|
|
1524
1041
|
] }),
|
|
1525
1042
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -1535,217 +1052,571 @@ function AddWorkTransitionStepModal({ onClose }) {
|
|
|
1535
1052
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1536
1053
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1537
1054
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u{1F4CB}" }),
|
|
1538
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "WorkflowStep Information" })
|
|
1539
1056
|
] }),
|
|
1540
1057
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1541
1058
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1542
1059
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1543
|
-
"
|
|
1060
|
+
"SLA Type ",
|
|
1544
1061
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1545
1062
|
] }),
|
|
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-
|
|
1547
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "Select
|
|
1548
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "petition", children: "
|
|
1549
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "building", children: "
|
|
1550
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "leave", children: "Leave" })
|
|
1063
|
+
/* @__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-400 focus:outline-none focus:ring-2 focus:ring-indigo-500/10 focus:border-indigo-500", children: [
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "", children: "Select SLA type" }),
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "petition", children: "Hours" }),
|
|
1066
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "building", children: "Days" })
|
|
1551
1067
|
] }),
|
|
1552
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflowStep belongs to" })
|
|
1553
1069
|
] }),
|
|
1554
1070
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1555
1071
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1556
|
-
"
|
|
1072
|
+
"Step Code ",
|
|
1557
1073
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1558
1074
|
] }),
|
|
1559
1075
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1560
1076
|
"input",
|
|
1561
1077
|
{
|
|
1562
1078
|
type: "text",
|
|
1563
|
-
placeholder: "Enter
|
|
1079
|
+
placeholder: "Enter StepCode",
|
|
1564
1080
|
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"
|
|
1565
1081
|
}
|
|
1566
1082
|
),
|
|
1567
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflowStep (e.g., APR,SCR)" })
|
|
1568
1084
|
] })
|
|
1569
1085
|
] }),
|
|
1570
1086
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1571
1087
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1572
|
-
"
|
|
1088
|
+
"StepName ",
|
|
1573
1089
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1574
1090
|
] }),
|
|
1575
1091
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1576
1092
|
"input",
|
|
1577
1093
|
{
|
|
1578
1094
|
type: "text",
|
|
1579
|
-
placeholder: "Enter
|
|
1580
|
-
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"
|
|
1095
|
+
placeholder: "Enter StepName",
|
|
1096
|
+
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"
|
|
1097
|
+
}
|
|
1098
|
+
),
|
|
1099
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflowStep" })
|
|
1100
|
+
] }),
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1104
|
+
"ReminderBefore",
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1106
|
+
] }),
|
|
1107
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1108
|
+
"input",
|
|
1109
|
+
{
|
|
1110
|
+
type: "text",
|
|
1111
|
+
defaultValue: "1",
|
|
1112
|
+
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"
|
|
1113
|
+
}
|
|
1114
|
+
),
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "WorkflowStep Reminder" })
|
|
1116
|
+
] }),
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1119
|
+
"EscalationAfter",
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1121
|
+
] }),
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1123
|
+
"input",
|
|
1124
|
+
{
|
|
1125
|
+
type: "text",
|
|
1126
|
+
defaultValue: "1",
|
|
1127
|
+
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"
|
|
1128
|
+
}
|
|
1129
|
+
),
|
|
1130
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "WorkflowStep Escalation" })
|
|
1131
|
+
] }),
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1134
|
+
"Working Hours Only",
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1136
|
+
] }),
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1138
|
+
"input",
|
|
1139
|
+
{
|
|
1140
|
+
type: "text",
|
|
1141
|
+
defaultValue: "1",
|
|
1142
|
+
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"
|
|
1143
|
+
}
|
|
1144
|
+
),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter Working Hours" })
|
|
1146
|
+
] }),
|
|
1147
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1149
|
+
"Exclude Holidays",
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1151
|
+
] }),
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1153
|
+
"input",
|
|
1154
|
+
{
|
|
1155
|
+
type: "text",
|
|
1156
|
+
defaultValue: "1",
|
|
1157
|
+
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"
|
|
1158
|
+
}
|
|
1159
|
+
),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter Holidays" })
|
|
1161
|
+
] })
|
|
1162
|
+
] })
|
|
1163
|
+
] }),
|
|
1164
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
|
|
1168
|
+
] }),
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1170
|
+
"textarea",
|
|
1171
|
+
{
|
|
1172
|
+
rows: 3,
|
|
1173
|
+
placeholder: "Enter workflow description (optional)",
|
|
1174
|
+
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"
|
|
1175
|
+
}
|
|
1176
|
+
),
|
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this WorkflowStep" })
|
|
1178
|
+
] }),
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1181
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u2699\uFE0F" }),
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Status & Settings" })
|
|
1183
|
+
] }),
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
|
|
1186
|
+
/* @__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: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "medium", children: "Medium" }),
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "high", children: "High" }),
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "low", children: "Low" })
|
|
1190
|
+
] }),
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this WorkflowStep" })
|
|
1192
|
+
] }) })
|
|
1193
|
+
] }),
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1195
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u{1F6E0}\uFE0F" }),
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Additional Settings" })
|
|
1198
|
+
] }),
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1202
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" }),
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
|
|
1206
|
+
] })
|
|
1207
|
+
] }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
1210
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" })
|
|
1211
|
+
] })
|
|
1212
|
+
] }),
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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}" }),
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
|
|
1219
|
+
] })
|
|
1220
|
+
] }),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" })
|
|
1224
|
+
] })
|
|
1225
|
+
] }),
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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}" }),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1230
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
|
|
1232
|
+
] })
|
|
1233
|
+
] }),
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" })
|
|
1237
|
+
] })
|
|
1238
|
+
] })
|
|
1239
|
+
] })
|
|
1240
|
+
] })
|
|
1241
|
+
] }),
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1244
|
+
"button",
|
|
1245
|
+
{
|
|
1246
|
+
onClick: onClose,
|
|
1247
|
+
className: "px-6 py-2.5 border border-slate-200 text-slate-600 text-xs font-bold rounded-xl hover:bg-slate-50 transition-all flex items-center gap-1.5",
|
|
1248
|
+
children: "\u2715 Cancel"
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1252
|
+
"button",
|
|
1253
|
+
{
|
|
1254
|
+
type: "button",
|
|
1255
|
+
className: "px-6 py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white text-xs font-bold rounded-xl shadow-md shadow-indigo-500/10 transition-all flex items-center gap-1.5",
|
|
1256
|
+
children: "\u{1F4BE} Save WorkflowStep"
|
|
1257
|
+
}
|
|
1258
|
+
)
|
|
1259
|
+
] })
|
|
1260
|
+
] })
|
|
1261
|
+
] });
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
// src/components/Common/commonheader.js
|
|
1265
|
+
var import_react13 = __toESM(require("react"));
|
|
1266
|
+
var import_link = __toESM(require("next/link"));
|
|
1267
|
+
var import_lucide_react = require("lucide-react");
|
|
1268
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1269
|
+
function CommonHeader({
|
|
1270
|
+
title,
|
|
1271
|
+
breadcrumbs = [],
|
|
1272
|
+
buttonText,
|
|
1273
|
+
onButtonClick
|
|
1274
|
+
}) {
|
|
1275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative overflow-hidden rounded-2xl border border-slate-200 bg-white/90 backdrop-blur-xl shadow-lg mb-6", children: [
|
|
1276
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute inset-x-0 top-0 h-1 bg-gradient-to-r from-blue-500 via-cyan-400 to-indigo-500" }),
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute -top-12 -right-12 h-40 w-40 rounded-full bg-blue-200/20 blur-3xl" }),
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute -bottom-10 -left-10 h-32 w-32 rounded-full bg-cyan-200/20 blur-3xl" }),
|
|
1279
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative flex items-center justify-between px-6 py-4", children: [
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 text-white shadow-lg transition-all duration-300 hover:scale-110 hover:rotate-6", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react.FolderKanban, { size: 22 }) }),
|
|
1282
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h1", { className: "text-2xl font-bold text-slate-800 tracking-tight", children: title }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "mt-2 flex items-center gap-2 flex-wrap", children: [
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-1 rounded-full bg-slate-100 px-3 py-1 text-xs font-medium text-slate-600 transition-all duration-300 hover:bg-blue-50 hover:text-blue-600", children: [
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react.Home, { size: 13 }),
|
|
1287
|
+
"Home"
|
|
1288
|
+
] }),
|
|
1289
|
+
breadcrumbs.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react13.default.Fragment, { children: [
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1291
|
+
import_lucide_react.ChevronRight,
|
|
1292
|
+
{
|
|
1293
|
+
size: 15,
|
|
1294
|
+
className: "text-slate-300"
|
|
1295
|
+
}
|
|
1296
|
+
),
|
|
1297
|
+
index === breadcrumbs.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "rounded-full bg-blue-600 px-3 py-1 text-xs font-semibold text-white shadow-md", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1298
|
+
import_link.default,
|
|
1299
|
+
{
|
|
1300
|
+
href: item.href,
|
|
1301
|
+
className: "rounded-full bg-slate-100 px-3 py-1 text-xs font-medium text-slate-600 transition-all duration-300 hover:-translate-y-0.5 hover:bg-blue-50 hover:text-blue-600",
|
|
1302
|
+
children: item.label
|
|
1303
|
+
}
|
|
1304
|
+
)
|
|
1305
|
+
] }, index))
|
|
1306
|
+
] })
|
|
1307
|
+
] })
|
|
1308
|
+
] }),
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1310
|
+
"button",
|
|
1311
|
+
{
|
|
1312
|
+
onClick: onButtonClick,
|
|
1313
|
+
className: "group relative overflow-hidden rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 px-5 py-2.5 text-sm font-semibold text-white shadow-lg transition-all duration-300 hover:-translate-y-0.5 hover:shadow-xl hover:shadow-blue-500/30 active:scale-95",
|
|
1314
|
+
children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "absolute inset-0 -translate-x-full skew-x-12 bg-white/20 transition-transform duration-1000 group-hover:translate-x-[250%]" }),
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "relative flex items-center gap-2", children: [
|
|
1317
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1318
|
+
import_lucide_react.Plus,
|
|
1319
|
+
{
|
|
1320
|
+
size: 18,
|
|
1321
|
+
className: "transition-transform duration-300 group-hover:rotate-90"
|
|
1322
|
+
}
|
|
1323
|
+
),
|
|
1324
|
+
buttonText
|
|
1325
|
+
] })
|
|
1326
|
+
]
|
|
1327
|
+
}
|
|
1328
|
+
)
|
|
1329
|
+
] })
|
|
1330
|
+
] });
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
// src/components/WorkflowStep/main.js
|
|
1334
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1335
|
+
var workflowSteps = [
|
|
1336
|
+
{
|
|
1337
|
+
workflowStepId: 1,
|
|
1338
|
+
workflowId: 1,
|
|
1339
|
+
stepCode: "SCR",
|
|
1340
|
+
stepName: "Scrutiny",
|
|
1341
|
+
sequenceNo: 1,
|
|
1342
|
+
slaType: "Hours",
|
|
1343
|
+
slaValue: 48,
|
|
1344
|
+
reminderBefore: 4,
|
|
1345
|
+
escalationAfter: 48,
|
|
1346
|
+
workingHoursOnly: 1,
|
|
1347
|
+
excludeHolidays: 1
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
workflowStepId: 1,
|
|
1351
|
+
workflowId: 1,
|
|
1352
|
+
stepCode: "SCR",
|
|
1353
|
+
stepName: "Scrutiny",
|
|
1354
|
+
sequenceNo: 1,
|
|
1355
|
+
slaType: "Hours",
|
|
1356
|
+
slaValue: 48,
|
|
1357
|
+
reminderBefore: 4,
|
|
1358
|
+
escalationAfter: 48,
|
|
1359
|
+
workingHoursOnly: 1,
|
|
1360
|
+
excludeHolidays: 1
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
workflowStepId: 1,
|
|
1364
|
+
workflowId: 1,
|
|
1365
|
+
stepCode: "SCR",
|
|
1366
|
+
stepName: "Scrutiny",
|
|
1367
|
+
sequenceNo: 1,
|
|
1368
|
+
slaType: "Hours",
|
|
1369
|
+
slaValue: 48,
|
|
1370
|
+
reminderBefore: 4,
|
|
1371
|
+
escalationAfter: 48,
|
|
1372
|
+
workingHoursOnly: 1,
|
|
1373
|
+
excludeHolidays: 1
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
workflowStepId: 1,
|
|
1377
|
+
workflowId: 1,
|
|
1378
|
+
stepCode: "SCR",
|
|
1379
|
+
stepName: "Scrutiny",
|
|
1380
|
+
sequenceNo: 1,
|
|
1381
|
+
slaType: "Hours",
|
|
1382
|
+
slaValue: 48,
|
|
1383
|
+
reminderBefore: 4,
|
|
1384
|
+
escalationAfter: 48,
|
|
1385
|
+
workingHoursOnly: 1,
|
|
1386
|
+
excludeHolidays: 1
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
workflowStepId: 1,
|
|
1390
|
+
workflowId: 1,
|
|
1391
|
+
stepCode: "SCR",
|
|
1392
|
+
stepName: "Scrutiny",
|
|
1393
|
+
sequenceNo: 1,
|
|
1394
|
+
slaType: "Hours",
|
|
1395
|
+
slaValue: 48,
|
|
1396
|
+
reminderBefore: 4,
|
|
1397
|
+
escalationAfter: 48,
|
|
1398
|
+
workingHoursOnly: 1,
|
|
1399
|
+
excludeHolidays: 1
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
workflowStepId: 1,
|
|
1403
|
+
workflowId: 1,
|
|
1404
|
+
stepCode: "SCR",
|
|
1405
|
+
stepName: "Scrutiny",
|
|
1406
|
+
sequenceNo: 1,
|
|
1407
|
+
slaType: "Hours",
|
|
1408
|
+
slaValue: 48,
|
|
1409
|
+
reminderBefore: 4,
|
|
1410
|
+
escalationAfter: 48,
|
|
1411
|
+
workingHoursOnly: 1,
|
|
1412
|
+
excludeHolidays: 1
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
workflowStepId: 2,
|
|
1416
|
+
workflowId: 1,
|
|
1417
|
+
stepCode: "APR",
|
|
1418
|
+
stepName: "Approval",
|
|
1419
|
+
sequenceNo: 2,
|
|
1420
|
+
slaType: "Days",
|
|
1421
|
+
slaValue: 2,
|
|
1422
|
+
reminderBefore: 1,
|
|
1423
|
+
escalationAfter: 2,
|
|
1424
|
+
workingHoursOnly: 1,
|
|
1425
|
+
excludeHolidays: 1
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
workflowStepId: 3,
|
|
1429
|
+
workflowId: 1,
|
|
1430
|
+
stepCode: "APR",
|
|
1431
|
+
stepName: "Approval",
|
|
1432
|
+
sequenceNo: 3,
|
|
1433
|
+
slaType: "Days",
|
|
1434
|
+
slaValue: 2,
|
|
1435
|
+
reminderBefore: 1,
|
|
1436
|
+
escalationAfter: 2,
|
|
1437
|
+
workingHoursOnly: 1,
|
|
1438
|
+
excludeHolidays: 1
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
workflowStepId: 4,
|
|
1442
|
+
workflowId: 1,
|
|
1443
|
+
stepCode: "APR",
|
|
1444
|
+
stepName: "Approval",
|
|
1445
|
+
sequenceNo: 4,
|
|
1446
|
+
slaType: "Days",
|
|
1447
|
+
slaValue: 2,
|
|
1448
|
+
reminderBefore: 1,
|
|
1449
|
+
escalationAfter: 2,
|
|
1450
|
+
workingHoursOnly: 1,
|
|
1451
|
+
excludeHolidays: 1
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
workflowStepId: 5,
|
|
1455
|
+
workflowId: 1,
|
|
1456
|
+
stepCode: "APR",
|
|
1457
|
+
stepName: "Approval",
|
|
1458
|
+
sequenceNo: 5,
|
|
1459
|
+
slaType: "Days",
|
|
1460
|
+
slaValue: 2,
|
|
1461
|
+
reminderBefore: 1,
|
|
1462
|
+
escalationAfter: 2,
|
|
1463
|
+
workingHoursOnly: 1,
|
|
1464
|
+
excludeHolidays: 1
|
|
1465
|
+
}
|
|
1466
|
+
];
|
|
1467
|
+
function WorkflowStep() {
|
|
1468
|
+
const [showModal, setShowModal] = (0, import_react14.useState)(false);
|
|
1469
|
+
const [pageSize, setPageSize] = (0, import_react14.useState)(5);
|
|
1470
|
+
const [sortConfig, setSortConfig] = (0, import_react14.useState)({
|
|
1471
|
+
key: "",
|
|
1472
|
+
direction: "asc"
|
|
1473
|
+
});
|
|
1474
|
+
const handleSort = (key) => {
|
|
1475
|
+
let direction = "asc";
|
|
1476
|
+
if (sortConfig.key === key && sortConfig.direction === "asc") {
|
|
1477
|
+
direction = "desc";
|
|
1478
|
+
}
|
|
1479
|
+
setSortConfig({ key, direction });
|
|
1480
|
+
};
|
|
1481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "p-5 bg-[#f5f7fb] min-h-screen font-sans text-slate-700 flex flex-col ", children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1484
|
+
CommonHeader,
|
|
1485
|
+
{
|
|
1486
|
+
title: "Workflow",
|
|
1487
|
+
breadcrumbs: [
|
|
1488
|
+
{ label: "Dashboard", href: "/dashboard" },
|
|
1489
|
+
{ label: "Masters", href: "/masters" },
|
|
1490
|
+
{ label: "Workflow Step", href: "/workflowStep" }
|
|
1491
|
+
],
|
|
1492
|
+
buttonText: "Add Workflow Step",
|
|
1493
|
+
onButtonClick: () => setShowModal(true)
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "bg-white rounded-3xl shadow-sm border border-slate-100 p-6 flex flex-col gap-6", children: [
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative max-w-xs w-full", children: [
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("svg", { className: "w-4 h-5 text-slate-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
1500
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1501
|
+
"input",
|
|
1502
|
+
{
|
|
1503
|
+
type: "text",
|
|
1504
|
+
placeholder: "Search workflow name or code...",
|
|
1505
|
+
className: "w-full pl-10 pr-4 py-2.5 border border-slate-200 rounded-xl text-xs 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-md"
|
|
1581
1506
|
}
|
|
1582
|
-
)
|
|
1583
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
|
|
1584
|
-
] }),
|
|
1585
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1586
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1587
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1588
|
-
"Version ",
|
|
1589
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1590
|
-
] }),
|
|
1591
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1592
|
-
"input",
|
|
1593
|
-
{
|
|
1594
|
-
type: "text",
|
|
1595
|
-
defaultValue: "1",
|
|
1596
|
-
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"
|
|
1597
|
-
}
|
|
1598
|
-
),
|
|
1599
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
|
|
1600
|
-
] }),
|
|
1601
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1602
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1603
|
-
"Published ",
|
|
1604
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1605
|
-
] }),
|
|
1606
|
-
/* @__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: [
|
|
1607
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "false", children: "No" }),
|
|
1608
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "true", children: "Yes" })
|
|
1609
|
-
] }),
|
|
1610
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
|
|
1611
|
-
] })
|
|
1612
|
-
] })
|
|
1613
|
-
] }),
|
|
1614
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
|
|
1615
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between items-center", children: [
|
|
1616
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
|
|
1617
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
|
|
1507
|
+
)
|
|
1618
1508
|
] }),
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1620
|
-
"
|
|
1509
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center gap-2 text-xs text-slate-500 font-semibold", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1510
|
+
"select",
|
|
1621
1511
|
{
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
className: "
|
|
1512
|
+
value: pageSize,
|
|
1513
|
+
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
1514
|
+
className: "inline-flex items-center px-4 py-2 rounded-xl bg-white text-slate-700 text-[14px] font-semibold border border-slate-200 focus:outline-none cursor-pointer shadow-md",
|
|
1515
|
+
children: [
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 5, children: "5 Rows" }),
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 10, children: "10 Rows" }),
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: 25, children: "25 Rows" })
|
|
1519
|
+
]
|
|
1625
1520
|
}
|
|
1626
|
-
)
|
|
1627
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
|
|
1628
|
-
] }),
|
|
1629
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
|
|
1630
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
|
|
1631
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "\u2699\uFE0F" }),
|
|
1632
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: "Status & Settings" })
|
|
1633
|
-
] }),
|
|
1634
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
|
|
1635
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1636
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
|
|
1637
|
-
"Status ",
|
|
1638
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1639
|
-
] }),
|
|
1640
|
-
/* @__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: [
|
|
1641
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "active", children: "Active" }),
|
|
1642
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "inactive", children: "Inactive" })
|
|
1643
|
-
] }),
|
|
1644
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
|
|
1645
|
-
] }),
|
|
1646
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1647
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
|
|
1648
|
-
/* @__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: [
|
|
1649
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "medium", children: "Medium" }),
|
|
1650
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "high", children: "High" }),
|
|
1651
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: "low", children: "Low" })
|
|
1652
|
-
] }),
|
|
1653
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
|
|
1654
|
-
] })
|
|
1655
|
-
] })
|
|
1521
|
+
) })
|
|
1656
1522
|
] }),
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.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}" }),
|
|
1679
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1680
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
|
|
1681
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
|
|
1682
|
-
] })
|
|
1683
|
-
] }),
|
|
1684
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1685
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
|
|
1686
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.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" })
|
|
1687
|
-
] })
|
|
1688
|
-
] }),
|
|
1689
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
|
|
1690
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1691
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.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}" }),
|
|
1692
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1693
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
|
|
1694
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
|
|
1695
|
-
] })
|
|
1696
|
-
] }),
|
|
1697
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
|
|
1698
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
|
|
1699
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.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" })
|
|
1523
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "border border-slate-200 rounded-2xl overflow-hidden bg-white shadow-md", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "max-h-[350px] overflow-y-auto overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "min-w-max w-full border-collapse", children: [
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { className: "bg-slate-50 sticky top-0 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tr", { className: "text-[11px] font-bold uppercase tracking-wider text-slate-400", children: [
|
|
1525
|
+
{ label: "WorkflowStepId", key: "workflowStepId" },
|
|
1526
|
+
{ label: "WorkflowId", key: "workflowId" },
|
|
1527
|
+
{ label: "StepCode", key: "stepCode" },
|
|
1528
|
+
{ label: "StepName", key: "stepName" },
|
|
1529
|
+
{ label: "SequenceNo", key: "sequenceNo" },
|
|
1530
|
+
{ label: "SLA Type", key: "slaType" },
|
|
1531
|
+
{ label: "SLA Value", key: "slaValue" },
|
|
1532
|
+
{ label: "Reminder Before", key: "reminderBefore" },
|
|
1533
|
+
{ label: "Escalation After", key: "escalationAfter" },
|
|
1534
|
+
{ label: "Working Hours Only", key: "workingHoursOnly" },
|
|
1535
|
+
{ label: "Exclude Holidays", key: "excludeHolidays" }
|
|
1536
|
+
].map((column) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1537
|
+
"th",
|
|
1538
|
+
{
|
|
1539
|
+
onClick: () => handleSort(column.key),
|
|
1540
|
+
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors",
|
|
1541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-center gap-1.5", children: [
|
|
1542
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "truncate", children: column.label }),
|
|
1543
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-slate-300 text-[10px]", children: sortConfig.key === column.key ? sortConfig.direction === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
1700
1544
|
] })
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
className: "px-6 py-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
children: "\u{1F4BE} Save Workflow"
|
|
1720
|
-
}
|
|
1721
|
-
)
|
|
1545
|
+
},
|
|
1546
|
+
column.key
|
|
1547
|
+
)) }) }),
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { children: workflowSteps.slice(0, pageSize).map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { className: "hover:bg-slate-50/80 transition-colors border-b border-slate-100 last:border-0", children: [
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.workflowStepId }),
|
|
1550
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.workflowId }),
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-2 py-4 text-center text-[14px]", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "inline-flex items-center px-2 py-0.5 rounded-md bg-slate-100 text-slate-600 text-xs font-bold border border-slate-200 truncate", children: item.stepCode }) }),
|
|
1552
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-500 font-semibold ", children: item.stepName }),
|
|
1553
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.sequenceNo }),
|
|
1554
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-500 font-semibold", children: item.slaType }),
|
|
1555
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.slaValue }),
|
|
1556
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.reminderBefore }),
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.escalationAfter }),
|
|
1558
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.workingHoursOnly }),
|
|
1559
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.excludeHolidays })
|
|
1560
|
+
] }, item.workflowStepId)) })
|
|
1561
|
+
] }) }) }),
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rounded-xl bg-slate-50/50", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Footer, {}) })
|
|
1722
1563
|
] })
|
|
1723
|
-
] })
|
|
1564
|
+
] }),
|
|
1565
|
+
showModal && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AddWorkflowStepModal, { onClose: () => setShowModal(false) })
|
|
1724
1566
|
] });
|
|
1725
1567
|
}
|
|
1726
1568
|
|
|
1727
|
-
// src/components/WorkFlowTransition/
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
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
|
-
] });
|
|
1744
|
-
}
|
|
1569
|
+
// src/components/WorkFlowTransition/Transitiontable.js
|
|
1570
|
+
var import_react16 = __toESM(require("react"));
|
|
1571
|
+
var import_link3 = __toESM(require("next/link"));
|
|
1572
|
+
|
|
1573
|
+
// src/components/WorkFlowTransition/AddWorkFlowTransitionModal.js
|
|
1574
|
+
var import_react15 = __toESM(require("react"));
|
|
1575
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1745
1576
|
|
|
1746
1577
|
// src/components/WorkFlowTransition/Transitiontable.js
|
|
1747
|
-
var
|
|
1578
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1748
1579
|
var WorkflowTransition = [
|
|
1580
|
+
{
|
|
1581
|
+
TransitionId: 1,
|
|
1582
|
+
workflowId: 1,
|
|
1583
|
+
FromStepId: 2,
|
|
1584
|
+
ToStepId: 1,
|
|
1585
|
+
ActionCode: "APPROVE",
|
|
1586
|
+
ActionName: "APPROVE"
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
TransitionId: 1,
|
|
1590
|
+
workflowId: 1,
|
|
1591
|
+
FromStepId: 2,
|
|
1592
|
+
ToStepId: 1,
|
|
1593
|
+
ActionCode: "APPROVE",
|
|
1594
|
+
ActionName: "APPROVE"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
TransitionId: 1,
|
|
1598
|
+
workflowId: 1,
|
|
1599
|
+
FromStepId: 2,
|
|
1600
|
+
ToStepId: 1,
|
|
1601
|
+
ActionCode: "APPROVE",
|
|
1602
|
+
ActionName: "APPROVE"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
TransitionId: 1,
|
|
1606
|
+
workflowId: 1,
|
|
1607
|
+
FromStepId: 2,
|
|
1608
|
+
ToStepId: 1,
|
|
1609
|
+
ActionCode: "APPROVE",
|
|
1610
|
+
ActionName: "APPROVE"
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
TransitionId: 1,
|
|
1614
|
+
workflowId: 1,
|
|
1615
|
+
FromStepId: 2,
|
|
1616
|
+
ToStepId: 1,
|
|
1617
|
+
ActionCode: "APPROVE",
|
|
1618
|
+
ActionName: "APPROVE"
|
|
1619
|
+
},
|
|
1749
1620
|
{
|
|
1750
1621
|
TransitionId: 1,
|
|
1751
1622
|
workflowId: 1,
|
|
@@ -1788,9 +1659,9 @@ var WorkflowTransition = [
|
|
|
1788
1659
|
}
|
|
1789
1660
|
];
|
|
1790
1661
|
function WorkFlowTransition() {
|
|
1791
|
-
const [showModal, setShowModal] = (0,
|
|
1792
|
-
const [pageSize, setPageSize] = (0,
|
|
1793
|
-
const [sortConfig, setSortConfig] = (0,
|
|
1662
|
+
const [showModal, setShowModal] = (0, import_react16.useState)(false);
|
|
1663
|
+
const [pageSize, setPageSize] = (0, import_react16.useState)(5);
|
|
1664
|
+
const [sortConfig, setSortConfig] = (0, import_react16.useState)({
|
|
1794
1665
|
key: "",
|
|
1795
1666
|
direction: "asc"
|
|
1796
1667
|
});
|
|
@@ -1804,151 +1675,167 @@ function WorkFlowTransition() {
|
|
|
1804
1675
|
direction
|
|
1805
1676
|
});
|
|
1806
1677
|
};
|
|
1807
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
"
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "p-5 bg-[#f5f7fb] min-h-screen font-sans text-slate-700 flex flex-col ", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "p-6", children: [
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1680
|
+
CommonHeader,
|
|
1681
|
+
{
|
|
1682
|
+
title: "WorkFlow Transition",
|
|
1683
|
+
breadcrumbs: [
|
|
1684
|
+
{
|
|
1685
|
+
label: "Dashboard",
|
|
1686
|
+
href: "/dashboard"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
label: "Masters",
|
|
1690
|
+
href: "/masters"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
label: "Workflow Step",
|
|
1694
|
+
href: "/workflowTransition"
|
|
1695
|
+
}
|
|
1696
|
+
],
|
|
1697
|
+
buttonText: "Add Workflow Transition",
|
|
1698
|
+
onButtonClick: () => setShowModal(true)
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "bg-white rounded-3xl shadow-sm border border-slate-100 p-6 flex flex-col gap-6", children: [
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative max-w-xs w-full", children: [
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3.5 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { className: "w-4 h-5 text-slate-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }),
|
|
1705
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1706
|
+
"input",
|
|
1707
|
+
{
|
|
1708
|
+
type: "text",
|
|
1709
|
+
placeholder: "Search workflow name or code...",
|
|
1710
|
+
className: "w-full pl-10 pr-4 py-2.5 shadow-md border border-slate-200 rounded-xl text-xs 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"
|
|
1711
|
+
}
|
|
1712
|
+
)
|
|
1713
|
+
] }),
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center gap-2 text-xs text-slate-500 font-semibold", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1821
1715
|
"select",
|
|
1822
1716
|
{
|
|
1823
1717
|
value: pageSize,
|
|
1824
1718
|
onChange: (e) => setPageSize(Number(e.target.value)),
|
|
1825
|
-
className: "inline-flex
|
|
1719
|
+
className: "inline-flex items-center px-4 py-2 rounded-xl bg-white text-slate-700 text-[14px] font-semibold border border-slate-200 focus:outline-none cursor-pointer shadow-md",
|
|
1826
1720
|
children: [
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: 5, children: "5 Rows" }),
|
|
1722
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: 10, children: "10 Rows" }),
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: 25, children: "25 Rows" })
|
|
1830
1724
|
]
|
|
1831
1725
|
}
|
|
1832
|
-
)
|
|
1833
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "entries" })
|
|
1726
|
+
) })
|
|
1834
1727
|
] }),
|
|
1835
|
-
/* @__PURE__ */ (0,
|
|
1836
|
-
"
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
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
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border border-slate-200 rounded-2xl overflow-hidden bg-white shadow-md", children: [
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "max-h-[350px] overflow-y-auto overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("table", { className: "min-w-max w-full border-collapse", children: [
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: "bg-slate-50 sticky top-0 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: "text-[11px] font-bold uppercase tracking-wider text-slate-400", children: [
|
|
1731
|
+
{ label: "TransitionId", key: "TransitionId" },
|
|
1732
|
+
{ label: "WorkflowId", key: "workflowId" },
|
|
1733
|
+
{ label: "FromStepId", key: "FromStepId" },
|
|
1734
|
+
{ label: "ToStepId", key: "ToStepId" },
|
|
1735
|
+
{ label: "ActionCode", key: "ActionCode" },
|
|
1736
|
+
{ label: "ActionName", key: "ActionName" }
|
|
1737
|
+
].map((column) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1738
|
+
"th",
|
|
1739
|
+
{
|
|
1740
|
+
onClick: () => handleSort(column.key),
|
|
1741
|
+
className: "px-6 py-4 text-left text-xs font-bold text-slate-500 uppercase tracking-wider cursor-pointer select-none hover:bg-slate-100 transition-colors",
|
|
1742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-center gap-2", children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: column.label }),
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-gray-400 text-xs", children: sortConfig.key === column.key ? sortConfig.direction === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
|
|
1745
|
+
] })
|
|
1746
|
+
},
|
|
1747
|
+
column.key
|
|
1748
|
+
)) }) }),
|
|
1749
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { children: WorkflowTransition.slice(0, pageSize).map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1750
|
+
"tr",
|
|
1751
|
+
{
|
|
1752
|
+
className: "hover:bg-slate-50/80 transition-colors border-b border-slate-100 last:border-0",
|
|
1753
|
+
children: [
|
|
1754
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 p-4 text-center text-[14px] text-slate-600 font-bold", children: item.TransitionId }),
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 py-4 text-center text-[14px] text-slate-600 font-bold", children: item.workflowId }),
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 py-4 text-center text-[14px] text-slate-600 font-bold", children: item.FromStepId }),
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 py-4 text-center text-align center text-[14px] text-slate-600 font-bold", children: item.ToStepId }),
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 py-4 text-center ", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1759
|
+
"span",
|
|
1760
|
+
{
|
|
1761
|
+
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1878
1762
|
${item.ActionCode === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1763
|
+
children: item.ActionCode
|
|
1764
|
+
}
|
|
1765
|
+
) }),
|
|
1766
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: "px-6 py-4 text-center ", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1767
|
+
"span",
|
|
1768
|
+
{
|
|
1769
|
+
className: `inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold
|
|
1886
1770
|
${item.ActionName === "APPROVE" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"}`,
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1771
|
+
children: item.ActionName
|
|
1772
|
+
}
|
|
1773
|
+
) })
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
item.TransitionId
|
|
1777
|
+
)) })
|
|
1778
|
+
] }) }),
|
|
1779
|
+
" "
|
|
1894
1780
|
] }),
|
|
1895
|
-
/* @__PURE__ */ (0,
|
|
1896
|
-
|
|
1897
|
-
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "p-5 sticky bottom-0 bg-white z-10", children: [
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Footer, {}),
|
|
1783
|
+
" "
|
|
1784
|
+
] })
|
|
1898
1785
|
] })
|
|
1899
1786
|
] }) });
|
|
1900
1787
|
}
|
|
1901
1788
|
|
|
1902
1789
|
// src/components/Sidebar.jsx
|
|
1903
|
-
var
|
|
1790
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1904
1791
|
var workflowItems = [
|
|
1905
|
-
{ name: "Workflow Type", component: "workflowType", icon:
|
|
1906
|
-
{ name: "Workflow", component: "workflow", icon:
|
|
1907
|
-
{ name: "Workflow Step", component: "workflowStep", icon:
|
|
1908
|
-
{ name: "Workflow Transition", component: "workflowTransition", icon:
|
|
1792
|
+
{ name: "Workflow Type", component: "workflowType", icon: import_react18.RiGitMergeLine },
|
|
1793
|
+
{ name: "Workflow", component: "workflow", icon: import_react18.RiNodeTree },
|
|
1794
|
+
{ name: "Workflow Step", component: "workflowStep", icon: import_react18.RiGitBranchLine },
|
|
1795
|
+
{ name: "Workflow Transition", component: "workflowTransition", icon: import_react18.RiCornerDownRightLine }
|
|
1909
1796
|
];
|
|
1910
1797
|
var permissionItems = [
|
|
1911
|
-
{ name: "Task Permission", path: "/TaskPermissionPage", icon:
|
|
1912
|
-
{ name: "Assignment Rule", path: "/AssignmentRulePage", icon:
|
|
1798
|
+
{ name: "Task Permission", path: "/TaskPermissionPage", icon: import_react18.RiUserSettingsLine },
|
|
1799
|
+
{ name: "Assignment Rule", path: "/AssignmentRulePage", icon: import_react18.RiFileShieldLine }
|
|
1913
1800
|
];
|
|
1914
1801
|
var hierarchyItems = [
|
|
1915
|
-
{ name: "Hierarchy Node", path: "/
|
|
1916
|
-
{ name: "User Hierarchy Mapping", path: "/WorkflowType", icon:
|
|
1917
|
-
{ name: "Workflow Settings", path: "/
|
|
1802
|
+
{ name: "Hierarchy Node", path: "/HierarchyNodePage", icon: import_react18.RiNodeTree },
|
|
1803
|
+
{ name: "User Hierarchy Mapping", path: "/WorkflowType", icon: import_react18.RiUserSharedLine },
|
|
1804
|
+
{ name: "Workflow Settings", path: "/WorkflowSettingPage", icon: import_react18.RiSettings4Line }
|
|
1918
1805
|
];
|
|
1919
1806
|
var documentItems = [
|
|
1920
|
-
{ name: "Document Configuration", path: "/
|
|
1807
|
+
{ name: "Document Configuration", path: "/DocumentConfiguration", icon: import_react18.RiFileSettingsLine }
|
|
1921
1808
|
];
|
|
1922
1809
|
var fileItems = [
|
|
1923
|
-
{ name: "File Instance", path: "/WorkflowType", icon:
|
|
1924
|
-
{ name: "File Pool", path: "/
|
|
1925
|
-
{ name: "Uploaded Document", path: "/
|
|
1810
|
+
{ name: "File Instance", path: "/WorkflowType", icon: import_react18.RiFileList3Line },
|
|
1811
|
+
{ name: "File Pool", path: "/FilePoolPage", icon: import_react18.RiDatabase2Line },
|
|
1812
|
+
{ name: "Uploaded Document", path: "/UploadedDocumentPage", icon: import_react18.RiFileUploadLine }
|
|
1926
1813
|
];
|
|
1927
1814
|
var communicationItems = [
|
|
1928
|
-
{ name: "Notification", path: "/
|
|
1929
|
-
{ name: "Comment", path: "/WorkflowType", icon:
|
|
1815
|
+
{ name: "Notification", path: "/NotificationPage", icon: import_react18.RiNotification4Line },
|
|
1816
|
+
{ name: "Comment", path: "/WorkflowType", icon: import_react18.RiChat3Line }
|
|
1930
1817
|
];
|
|
1931
1818
|
var taskItems = [
|
|
1932
|
-
{ name: "Task Instance", path: "
|
|
1819
|
+
{ name: "Task Instance", path: "taskinstance", icon: import_react18.RiCheckboxMultipleLine }
|
|
1933
1820
|
];
|
|
1934
1821
|
var trackingItems = [
|
|
1935
|
-
{ name: "Audit Log", path: "/
|
|
1936
|
-
{ name: "Movement History", path: "/
|
|
1822
|
+
{ name: "Audit Log", path: "/AuditLog", icon: import_react18.RiShieldCheckLine },
|
|
1823
|
+
{ name: "Movement History", path: "/MovementHistory", icon: import_react18.RiHistoryLine }
|
|
1937
1824
|
];
|
|
1938
1825
|
function Sidebar({ isOpen, onToggle, childrens }) {
|
|
1939
1826
|
const router = (0, import_router.useRouter)();
|
|
1940
|
-
const [workflowOpen, setWorkflowOpen] = (0,
|
|
1941
|
-
const [permissionOpen, setPermissionOpen] = (0,
|
|
1942
|
-
const [hierarchyOpen, setHierarchyOpen] = (0,
|
|
1943
|
-
const [documentOpen, setDocumentOpen] = (0,
|
|
1944
|
-
const [filesOpen, setFilesOpen] = (0,
|
|
1945
|
-
const [tasksOpen, setTasksOpen] = (0,
|
|
1946
|
-
const [trackingOpen, setTrackingOpen] = (0,
|
|
1947
|
-
const [communicationOpen, setCommunicationOpen] = (0,
|
|
1948
|
-
const [activeComponent, setActiveComponent] = (0,
|
|
1827
|
+
const [workflowOpen, setWorkflowOpen] = (0, import_react17.useState)(false);
|
|
1828
|
+
const [permissionOpen, setPermissionOpen] = (0, import_react17.useState)(false);
|
|
1829
|
+
const [hierarchyOpen, setHierarchyOpen] = (0, import_react17.useState)(false);
|
|
1830
|
+
const [documentOpen, setDocumentOpen] = (0, import_react17.useState)(false);
|
|
1831
|
+
const [filesOpen, setFilesOpen] = (0, import_react17.useState)(false);
|
|
1832
|
+
const [tasksOpen, setTasksOpen] = (0, import_react17.useState)(false);
|
|
1833
|
+
const [trackingOpen, setTrackingOpen] = (0, import_react17.useState)(false);
|
|
1834
|
+
const [communicationOpen, setCommunicationOpen] = (0, import_react17.useState)(false);
|
|
1835
|
+
const [activeComponent, setActiveComponent] = (0, import_react17.useState)("workflowType");
|
|
1949
1836
|
const renderMenuItemold = (item) => {
|
|
1950
1837
|
const Icon = item.icon;
|
|
1951
|
-
return /* @__PURE__ */ (0,
|
|
1838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1952
1839
|
"button",
|
|
1953
1840
|
{
|
|
1954
1841
|
type: "button",
|
|
@@ -1960,14 +1847,14 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
1960
1847
|
`,
|
|
1961
1848
|
onClick: () => router.push(item.path),
|
|
1962
1849
|
children: [
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1964
1851
|
"span",
|
|
1965
1852
|
{
|
|
1966
1853
|
className: "\r\n flex h-[20px] w-[20px] shrink-0\r\n items-center justify-center\r\n rounded-[6px] text-[#405170]\r\n ",
|
|
1967
|
-
children: /* @__PURE__ */ (0,
|
|
1854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { size: 17 })
|
|
1968
1855
|
}
|
|
1969
1856
|
),
|
|
1970
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "whitespace-nowrap text-[14px] font-medium leading-[22px]", children: item.name })
|
|
1971
1858
|
]
|
|
1972
1859
|
},
|
|
1973
1860
|
item.name
|
|
@@ -1977,14 +1864,14 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
1977
1864
|
const Icon = item.icon;
|
|
1978
1865
|
const handleClick = () => {
|
|
1979
1866
|
if (item.component) {
|
|
1980
|
-
router.push("/", void 0, { shallow: true });
|
|
1867
|
+
router.push("/flowCore", void 0, { shallow: true });
|
|
1981
1868
|
setActiveComponent(item.component);
|
|
1982
1869
|
} else if (item.path) {
|
|
1983
1870
|
setActiveComponent(null);
|
|
1984
1871
|
router.push(item.path);
|
|
1985
1872
|
}
|
|
1986
1873
|
};
|
|
1987
|
-
return /* @__PURE__ */ (0,
|
|
1874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1988
1875
|
"button",
|
|
1989
1876
|
{
|
|
1990
1877
|
onClick: handleClick,
|
|
@@ -1994,8 +1881,8 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
1994
1881
|
${item.component ? activeComponent === item.component ? "bg-blue-50 text-blue-600" : "text-[#344261] hover:bg-[#F6F8FC]" : router.pathname === item.path ? "bg-blue-50 text-blue-600" : "text-[#344261] hover:bg-[#F6F8FC]"}
|
|
1995
1882
|
`,
|
|
1996
1883
|
children: [
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { size: 17 }),
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: item.name })
|
|
1999
1886
|
]
|
|
2000
1887
|
},
|
|
2001
1888
|
item.name
|
|
@@ -2004,36 +1891,36 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2004
1891
|
const renderContent = () => {
|
|
2005
1892
|
switch (activeComponent) {
|
|
2006
1893
|
case "workflowType":
|
|
2007
|
-
return /* @__PURE__ */ (0,
|
|
1894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(WorkflowTypeMains, {});
|
|
2008
1895
|
case "workflow":
|
|
2009
|
-
return /* @__PURE__ */ (0,
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(WorkflowPage, {});
|
|
2010
1897
|
case "workflowStep":
|
|
2011
|
-
return /* @__PURE__ */ (0,
|
|
1898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(WorkflowStep, {});
|
|
2012
1899
|
case "workflowTransition":
|
|
2013
|
-
return /* @__PURE__ */ (0,
|
|
1900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(WorkFlowTransition, {});
|
|
2014
1901
|
default:
|
|
2015
1902
|
return childrens;
|
|
2016
1903
|
}
|
|
2017
1904
|
};
|
|
2018
1905
|
const renderDropdown = (title, open, setOpen, items) => {
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
1906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mb-2", children: [
|
|
1907
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2021
1908
|
"button",
|
|
2022
1909
|
{
|
|
2023
1910
|
type: "button",
|
|
2024
1911
|
onClick: () => setOpen(!open),
|
|
2025
1912
|
className: "\r\n flex h-[50px] w-full items-center justify-between\r\n rounded-[9px] px-[17px]\r\n text-left text-[#344261]\r\n transition-colors duration-150\r\n hover:bg-[#F6F8FC]\r\n ",
|
|
2026
1913
|
children: [
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2028
|
-
open ? /* @__PURE__ */ (0,
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-[16px] font-semibold", children: title }),
|
|
1915
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react18.RiArrowDownSLine, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react18.RiArrowRightSLine, { size: 18 })
|
|
2029
1916
|
]
|
|
2030
1917
|
}
|
|
2031
1918
|
),
|
|
2032
|
-
open && /* @__PURE__ */ (0,
|
|
1919
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ml-[8px] border-l border-[#E5E9F1] pl-[4px]", children: items.map(renderMenuItem) })
|
|
2033
1920
|
] });
|
|
2034
1921
|
};
|
|
2035
|
-
return /* @__PURE__ */ (0,
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2037
1924
|
"aside",
|
|
2038
1925
|
{
|
|
2039
1926
|
className: `
|
|
@@ -2041,16 +1928,16 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2041
1928
|
border-r border-[#E5E9F1] bg-white
|
|
2042
1929
|
font-sans text-[#273657]
|
|
2043
1930
|
transition-all duration-300 ease-in-out
|
|
2044
|
-
${isOpen ? "w-[
|
|
1931
|
+
${isOpen ? "w-[310px] min-w-[310px] translate-x-0 opacity-100" : "w-0 min-w-0 -translate-x-full opacity-0"}
|
|
2045
1932
|
`,
|
|
2046
1933
|
children: [
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2048
1935
|
"header",
|
|
2049
1936
|
{
|
|
2050
1937
|
className: "\r\n flex h-[84px] items-center justify-between\r\n border-b border-[#EDF0F5]\r\n px-[14px]\r\n ",
|
|
2051
1938
|
children: [
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2054
1941
|
"svg",
|
|
2055
1942
|
{
|
|
2056
1943
|
width: "36",
|
|
@@ -2058,28 +1945,28 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2058
1945
|
viewBox: "0 0 48 56",
|
|
2059
1946
|
fill: "none",
|
|
2060
1947
|
children: [
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
1948
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2062
1949
|
"path",
|
|
2063
1950
|
{
|
|
2064
1951
|
d: "M24 2L45 12.5L24 23L3 12.5L24 2Z",
|
|
2065
1952
|
fill: "#356AF3"
|
|
2066
1953
|
}
|
|
2067
1954
|
),
|
|
2068
|
-
/* @__PURE__ */ (0,
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2069
1956
|
"path",
|
|
2070
1957
|
{
|
|
2071
1958
|
d: "M24 8L34 13L24 18L14 13L24 8Z",
|
|
2072
1959
|
fill: "white"
|
|
2073
1960
|
}
|
|
2074
1961
|
),
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2076
1963
|
"path",
|
|
2077
1964
|
{
|
|
2078
1965
|
d: "M3 20L24 30.5L45 20V27L24 37.5L3 27V20Z",
|
|
2079
1966
|
fill: "#356AF3"
|
|
2080
1967
|
}
|
|
2081
1968
|
),
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2083
1970
|
"path",
|
|
2084
1971
|
{
|
|
2085
1972
|
d: "M3 33L24 43.5L45 33V40L24 50.5L3 40V33Z",
|
|
@@ -2089,36 +1976,36 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2089
1976
|
]
|
|
2090
1977
|
}
|
|
2091
1978
|
),
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2093
|
-
/* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { className: "text-[18px] font-extrabold text-[#101318]", children: "FLOWCORE" }),
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-[12px] text-[#344261]", children: "Workflow Engine" })
|
|
2095
1982
|
] })
|
|
2096
1983
|
] }),
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2098
1985
|
"button",
|
|
2099
1986
|
{
|
|
2100
1987
|
type: "button",
|
|
2101
1988
|
onClick: onToggle,
|
|
2102
1989
|
className: "\r\n flex h-8 w-8\r\n items-center justify-center\r\n rounded-lg\r\n hover:bg-gray-100\r\n ",
|
|
2103
|
-
children: /* @__PURE__ */ (0,
|
|
1990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react18.RiMenuLine, { size: 18 })
|
|
2104
1991
|
}
|
|
2105
1992
|
)
|
|
2106
1993
|
]
|
|
2107
1994
|
}
|
|
2108
1995
|
),
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
1996
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2110
1997
|
"div",
|
|
2111
1998
|
{
|
|
2112
1999
|
className: "\r\n min-h-0 flex-1\r\n overflow-y-auto overflow-x-hidden\r\n px-[27px] pb-[30px] pt-[31px]\r\n ",
|
|
2113
2000
|
children: [
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2001
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2115
2002
|
"p",
|
|
2116
2003
|
{
|
|
2117
2004
|
className: "\r\n mb-[19px] ml-[15px]\r\n text-[14px] font-bold uppercase\r\n leading-[20px] tracking-[0.2px]\r\n text-[#3C4D74]\r\n ",
|
|
2118
2005
|
children: "Configuration Masters"
|
|
2119
2006
|
}
|
|
2120
2007
|
),
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-[3px]", children: [
|
|
2122
2009
|
renderDropdown(
|
|
2123
2010
|
"Workflow",
|
|
2124
2011
|
workflowOpen,
|
|
@@ -2144,14 +2031,14 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2144
2031
|
hierarchyItems
|
|
2145
2032
|
)
|
|
2146
2033
|
] }),
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2148
2035
|
"p",
|
|
2149
2036
|
{
|
|
2150
2037
|
className: "\r\n mb-[19px] ml-[15px] mt-[39px]\r\n text-[14px] font-bold uppercase\r\n leading-[20px] tracking-[0.2px]\r\n text-[#3C4D74]\r\n ",
|
|
2151
2038
|
children: "Runtime"
|
|
2152
2039
|
}
|
|
2153
2040
|
),
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-[3px]", children: [
|
|
2155
2042
|
renderDropdown(
|
|
2156
2043
|
"Files",
|
|
2157
2044
|
filesOpen,
|
|
@@ -2180,18 +2067,18 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2180
2067
|
]
|
|
2181
2068
|
}
|
|
2182
2069
|
),
|
|
2183
|
-
/* @__PURE__ */ (0,
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2184
2071
|
"div",
|
|
2185
2072
|
{
|
|
2186
2073
|
className: "\r\n shrink-0\r\n bg-white\r\n px-[27px]\r\n pb-[34px]\r\n pt-[18px]\r\n ",
|
|
2187
|
-
children: /* @__PURE__ */ (0,
|
|
2074
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2188
2075
|
"button",
|
|
2189
2076
|
{
|
|
2190
2077
|
type: "button",
|
|
2191
2078
|
className: "\r\n flex h-[66px] w-full\r\n items-center gap-[18px]\r\n rounded-[10px]\r\n border border-[#E1E5ED]\r\n bg-white\r\n px-[23px]\r\n text-left\r\n text-[16px]\r\n font-semibold\r\n text-[#2D3A58]\r\n shadow-sm\r\n hover:bg-[#F7F8FC]\r\n transition\r\n ",
|
|
2192
2079
|
children: [
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2194
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react18.RiSettings4Line, { size: 20 }),
|
|
2081
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Settings" })
|
|
2195
2082
|
]
|
|
2196
2083
|
}
|
|
2197
2084
|
)
|
|
@@ -2200,26 +2087,41 @@ function Sidebar({ isOpen, onToggle, childrens }) {
|
|
|
2200
2087
|
]
|
|
2201
2088
|
}
|
|
2202
2089
|
),
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2204
|
-
!isOpen && /* @__PURE__ */ (0,
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex-1 overflow-auto bg-[#F5F7FB]", children: renderContent() }),
|
|
2091
|
+
!isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2205
2092
|
"button",
|
|
2206
2093
|
{
|
|
2207
2094
|
type: "button",
|
|
2208
2095
|
onClick: onToggle,
|
|
2209
2096
|
"aria-label": "Open sidebar",
|
|
2210
2097
|
className: "\r\n fixed left-[20px] top-[30px] z-[100]\r\n flex h-[46px] w-[46px]\r\n items-center justify-center\r\n rounded-[9px]\r\n border border-[#E1E5ED]\r\n bg-white text-[#344261]\r\n shadow-[0_2px_8px_rgba(0,0,0,0.08)]\r\n transition-colors\r\n hover:bg-[#F3F5F9]\r\n ",
|
|
2211
|
-
children: /* @__PURE__ */ (0,
|
|
2098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react18.RiMenuLine, { size: 18 })
|
|
2212
2099
|
}
|
|
2213
2100
|
)
|
|
2214
2101
|
] });
|
|
2215
2102
|
}
|
|
2216
2103
|
|
|
2104
|
+
// src/components/Service/ApiEndpointsProvider.js
|
|
2105
|
+
var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
|
|
2106
|
+
var apiEndpoints = null;
|
|
2107
|
+
var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
|
|
2108
|
+
if (typeof window !== "undefined" && endpoints) {
|
|
2109
|
+
apiEndpoints = endpoints;
|
|
2110
|
+
sessionStorage.setItem(
|
|
2111
|
+
STORAGE_KEY,
|
|
2112
|
+
JSON.stringify(endpoints)
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
return null;
|
|
2116
|
+
};
|
|
2117
|
+
var ApiEndpointsProvider_default = ApiEndpointsProvider;
|
|
2118
|
+
|
|
2217
2119
|
// src/components/Layout.jsx
|
|
2218
|
-
var
|
|
2219
|
-
var
|
|
2120
|
+
var import_react19 = require("react");
|
|
2121
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2220
2122
|
var Layout = ({ children }) => {
|
|
2221
|
-
const [isOpen, setIsOpen] = (0,
|
|
2222
|
-
return /* @__PURE__ */ (0,
|
|
2123
|
+
const [isOpen, setIsOpen] = (0, import_react19.useState)(true);
|
|
2124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2223
2125
|
Sidebar,
|
|
2224
2126
|
{
|
|
2225
2127
|
isOpen,
|
|
@@ -2231,6 +2133,7 @@ var Layout = ({ children }) => {
|
|
|
2231
2133
|
var Layout_default = Layout;
|
|
2232
2134
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2233
2135
|
0 && (module.exports = {
|
|
2136
|
+
ApiEndpointsProvider,
|
|
2234
2137
|
Layout,
|
|
2235
2138
|
Sidebar,
|
|
2236
2139
|
WorkflowPage
|