flowcore-fn 2.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/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # FlowCore_FN
2
+ NPM Package
@@ -0,0 +1,440 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/pkg-index.jsx
31
+ var pkg_index_exports = {};
32
+ __export(pkg_index_exports, {
33
+ WorkflowPage: () => WorkflowPage
34
+ });
35
+ module.exports = __toCommonJS(pkg_index_exports);
36
+
37
+ // src/components/WorkflowStep/main.js
38
+ var import_react3 = __toESM(require("react"));
39
+
40
+ // src/components/WorkflowStep/footer.js
41
+ var import_react = __toESM(require("react"));
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ function Footer() {
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between items-center px-6 py-4 border-t border-gray-200 bg-white", children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-sm text-slate-500", children: "Showing 1 to 5 of 5 entries" }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5", children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "px-3 py-1.5 border border-slate-200 rounded-lg bg-white text-slate-600 hover:bg-slate-50 shadow-sm", children: "\u2039" }),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "px-3.5 py-1.5 bg-blue-600 text-white rounded-lg font-bold shadow-md shadow-blue-500/20", children: "1" }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: "px-3 py-1.5 border border-slate-200 rounded-lg bg-white text-slate-600 hover:bg-slate-50 shadow-sm", children: "\u203A" })
50
+ ] })
51
+ ] });
52
+ }
53
+
54
+ // src/components/WorkflowStep/main.js
55
+ var import_link = __toESM(require("next/link"));
56
+
57
+ // src/components/AddWorkflowStepModal.js
58
+ var import_react2 = __toESM(require("react"));
59
+ var import_jsx_runtime2 = require("react/jsx-runtime");
60
+ function AddWorkflowStepModal({ onClose }) {
61
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
63
+ "div",
64
+ {
65
+ className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm transition-opacity duration-200",
66
+ onClick: onClose
67
+ }
68
+ ),
69
+ /* @__PURE__ */ (0, import_jsx_runtime2.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: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-between items-center px-8 py-6 border-b border-slate-100", children: [
71
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-4", children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime2.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_runtime2.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.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" }) }) }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
74
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflow and configure its details" })
76
+ ] })
77
+ ] }),
78
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
79
+ "button",
80
+ {
81
+ onClick: onClose,
82
+ className: "text-slate-400 hover:text-slate-600 hover:bg-slate-100 p-2 rounded-full transition-all text-sm font-semibold",
83
+ children: "\u2715"
84
+ }
85
+ )
86
+ ] }),
87
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "p-8 space-y-8 overflow-y-auto max-h-[calc(92vh-170px)] bg-slate-50/30", children: [
88
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
90
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u{1F4CB}" }),
91
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Workflow Information" })
92
+ ] }),
93
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
95
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
96
+ "Workflow Type ",
97
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
98
+ ] }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime2.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: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "", children: "Select workflow type" }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "petition", children: "Petition" }),
102
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "building", children: "Building Permission" }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "leave", children: "Leave" })
104
+ ] }),
105
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflow belongs to" })
106
+ ] }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
108
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
109
+ "Workflow Code ",
110
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
111
+ ] }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
113
+ "input",
114
+ {
115
+ type: "text",
116
+ placeholder: "Enter workflow code",
117
+ 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"
118
+ }
119
+ ),
120
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflow (e.g., PET-001)" })
121
+ ] })
122
+ ] }),
123
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
124
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
125
+ "Workflow Name ",
126
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
127
+ ] }),
128
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
129
+ "input",
130
+ {
131
+ type: "text",
132
+ placeholder: "Enter workflow name",
133
+ 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"
134
+ }
135
+ ),
136
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
137
+ ] }),
138
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
140
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
141
+ "Version ",
142
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
143
+ ] }),
144
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
145
+ "input",
146
+ {
147
+ type: "text",
148
+ defaultValue: "1",
149
+ 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"
150
+ }
151
+ ),
152
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
153
+ ] }),
154
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
155
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
156
+ "Published ",
157
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
158
+ ] }),
159
+ /* @__PURE__ */ (0, import_jsx_runtime2.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: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "false", children: "No" }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "true", children: "Yes" })
162
+ ] }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
164
+ ] })
165
+ ] })
166
+ ] }),
167
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
168
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-between items-center", children: [
169
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
170
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
171
+ ] }),
172
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
173
+ "textarea",
174
+ {
175
+ rows: 3,
176
+ placeholder: "Enter workflow description (optional)",
177
+ 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"
178
+ }
179
+ ),
180
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
181
+ ] }),
182
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
183
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
184
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u2699\uFE0F" }),
185
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Status & Settings" })
186
+ ] }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
188
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
189
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
190
+ "Status ",
191
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-red-500", children: "*" })
192
+ ] }),
193
+ /* @__PURE__ */ (0, import_jsx_runtime2.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: [
194
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "active", children: "Active" }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "inactive", children: "Inactive" })
196
+ ] }),
197
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
198
+ ] }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
200
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
201
+ /* @__PURE__ */ (0, import_jsx_runtime2.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: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "medium", children: "Medium" }),
203
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "high", children: "High" }),
204
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "low", children: "Low" })
205
+ ] }),
206
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
207
+ ] })
208
+ ] })
209
+ ] }),
210
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
211
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
212
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "\u{1F6E0}\uFE0F" }),
213
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Additional Settings" })
214
+ ] }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
216
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
217
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3", children: [
218
+ /* @__PURE__ */ (0, import_jsx_runtime2.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" }),
219
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
220
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
221
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
222
+ ] })
223
+ ] }),
224
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
225
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
226
+ /* @__PURE__ */ (0, import_jsx_runtime2.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" })
227
+ ] })
228
+ ] }),
229
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
230
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3", children: [
231
+ /* @__PURE__ */ (0, import_jsx_runtime2.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}" }),
232
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
233
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
234
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
235
+ ] })
236
+ ] }),
237
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
238
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
239
+ /* @__PURE__ */ (0, import_jsx_runtime2.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" })
240
+ ] })
241
+ ] }),
242
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-3", children: [
244
+ /* @__PURE__ */ (0, import_jsx_runtime2.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}" }),
245
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
246
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
247
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
248
+ ] })
249
+ ] }),
250
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { className: "relative inline-flex items-center cursor-pointer", children: [
251
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("input", { type: "checkbox", className: "sr-only peer" }),
252
+ /* @__PURE__ */ (0, import_jsx_runtime2.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" })
253
+ ] })
254
+ ] })
255
+ ] })
256
+ ] })
257
+ ] }),
258
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
259
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
260
+ "button",
261
+ {
262
+ onClick: onClose,
263
+ 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",
264
+ children: "\u2715 Cancel"
265
+ }
266
+ ),
267
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
268
+ "button",
269
+ {
270
+ type: "button",
271
+ 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",
272
+ children: "\u{1F4BE} Save Workflow"
273
+ }
274
+ )
275
+ ] })
276
+ ] })
277
+ ] });
278
+ }
279
+
280
+ // src/components/WorkflowStep/main.js
281
+ var import_jsx_runtime3 = require("react/jsx-runtime");
282
+ var workflowSteps = [
283
+ {
284
+ workflowStepId: 1,
285
+ workflowId: 1,
286
+ stepCode: "SCR",
287
+ stepName: "Scrutiny",
288
+ sequenceNo: 1,
289
+ slaType: "Hours",
290
+ slaValue: 48,
291
+ reminderBefore: 4,
292
+ escalationAfter: 48,
293
+ workingHoursOnly: 1,
294
+ excludeHolidays: 1
295
+ },
296
+ {
297
+ workflowStepId: 2,
298
+ workflowId: 1,
299
+ stepCode: "APR",
300
+ stepName: "Approval",
301
+ sequenceNo: 2,
302
+ slaType: "Days",
303
+ slaValue: 2,
304
+ reminderBefore: 1,
305
+ escalationAfter: 2,
306
+ workingHoursOnly: 1,
307
+ excludeHolidays: 1
308
+ },
309
+ {
310
+ workflowStepId: 3,
311
+ workflowId: 1,
312
+ stepCode: "APR",
313
+ stepName: "Approval",
314
+ sequenceNo: 3,
315
+ slaType: "Days",
316
+ slaValue: 2,
317
+ reminderBefore: 1,
318
+ escalationAfter: 2,
319
+ workingHoursOnly: 1,
320
+ excludeHolidays: 1
321
+ },
322
+ {
323
+ workflowStepId: 4,
324
+ workflowId: 1,
325
+ stepCode: "APR",
326
+ stepName: "Approval",
327
+ sequenceNo: 4,
328
+ slaType: "Days",
329
+ slaValue: 2,
330
+ reminderBefore: 1,
331
+ escalationAfter: 2,
332
+ workingHoursOnly: 1,
333
+ excludeHolidays: 1
334
+ },
335
+ {
336
+ workflowStepId: 5,
337
+ workflowId: 1,
338
+ stepCode: "APR",
339
+ stepName: "Approval",
340
+ sequenceNo: 5,
341
+ slaType: "Days",
342
+ slaValue: 2,
343
+ reminderBefore: 1,
344
+ escalationAfter: 2,
345
+ workingHoursOnly: 1,
346
+ excludeHolidays: 1
347
+ }
348
+ ];
349
+ function WorkflowStep() {
350
+ const [showModal, setShowModal] = (0, import_react3.useState)(false);
351
+ 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: [
352
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-6 py-5 border-b border-gray-200", children: [
353
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "m-0 text-[30px] leading-tight font-semibold text-[#1E293B] tracking-tight", children: "Workflow Step" }),
354
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "mt-2 text-[13px] font-medium", children: [
355
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/dashboard", className: "text-blue-600 hover:underline", children: "Dashboard" }),
356
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
357
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/masters", className: "text-blue-600 hover:underline", children: "Masters" }),
358
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
359
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "/workflow", className: "text-blue-600 hover:underline", children: "Workflow" }),
360
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-slate-400", children: ">" }),
361
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-slate-500", children: "Workflow Step" })
362
+ ] })
363
+ ] }),
364
+ /* @__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: [
365
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
366
+ "input",
367
+ {
368
+ type: "text",
369
+ placeholder: "Search workflow step...",
370
+ 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"
371
+ }
372
+ ),
373
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
374
+ "button",
375
+ {
376
+ onClick: () => setShowModal(true),
377
+ className: "px-5 py-2.5 bg-blue-600 text-white rounded-lg text-[13px] font-semibold hover:bg-blue-700 transition-colors",
378
+ children: "+ Add Workflow Type"
379
+ }
380
+ )
381
+ ] }) }),
382
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "overflow-x-auto", children: [
383
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("table", { className: "w-full border-collapse", children: [
384
+ /* @__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-[11px] font-bold uppercase tracking-wider text-slate-500", children: [
385
+ "WorkflowStepId",
386
+ "WorkflowId",
387
+ "StepCode",
388
+ "StepName",
389
+ "SequenceNo",
390
+ "SLA Type",
391
+ "SLA Value",
392
+ "Reminder Before",
393
+ "Escalation After",
394
+ "Working Hours Only",
395
+ "Exclude Holidays"
396
+ ].map((heading) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
397
+ "th",
398
+ {
399
+ className: "px-4 py-3 text-left border-b border-gray-200 text-[11px] font-bold uppercase tracking-wider text-slate-500",
400
+ children: heading
401
+ },
402
+ heading
403
+ )) }) }),
404
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: workflowSteps.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
405
+ "tr",
406
+ {
407
+ className: "hover:bg-slate-50 transition-colors",
408
+ children: [
409
+ /* @__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 }),
410
+ /* @__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 }),
411
+ /* @__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 }) }),
412
+ /* @__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 }),
413
+ /* @__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 }),
414
+ /* @__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 }),
415
+ /* @__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 }),
416
+ /* @__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 }),
417
+ /* @__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 }),
418
+ /* @__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 }),
419
+ /* @__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 })
420
+ ]
421
+ },
422
+ item.workflowStepId
423
+ )) })
424
+ ] }),
425
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-5" }),
426
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Footer, {}),
427
+ showModal && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AddWorkflowStepModal, { onClose: () => setShowModal(false) })
428
+ ] })
429
+ ] }) });
430
+ }
431
+
432
+ // src/pages/workflow.js
433
+ var import_jsx_runtime4 = require("react/jsx-runtime");
434
+ function WorkflowPage() {
435
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WorkflowStep, {});
436
+ }
437
+ // Annotate the CommonJS export names for ESM import in node:
438
+ 0 && (module.exports = {
439
+ WorkflowPage
440
+ });
@@ -0,0 +1,403 @@
1
+ // src/components/WorkflowStep/main.js
2
+ import React3, { useState } from "react";
3
+
4
+ // src/components/WorkflowStep/footer.js
5
+ import React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function Footer() {
8
+ return /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center px-6 py-4 border-t border-gray-200 bg-white", children: [
9
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-slate-500", children: "Showing 1 to 5 of 5 entries" }),
10
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
11
+ /* @__PURE__ */ jsx("button", { className: "px-3 py-1.5 border border-slate-200 rounded-lg bg-white text-slate-600 hover:bg-slate-50 shadow-sm", children: "\u2039" }),
12
+ /* @__PURE__ */ jsx("button", { className: "px-3.5 py-1.5 bg-blue-600 text-white rounded-lg font-bold shadow-md shadow-blue-500/20", children: "1" }),
13
+ /* @__PURE__ */ jsx("button", { className: "px-3 py-1.5 border border-slate-200 rounded-lg bg-white text-slate-600 hover:bg-slate-50 shadow-sm", children: "\u203A" })
14
+ ] })
15
+ ] });
16
+ }
17
+
18
+ // src/components/WorkflowStep/main.js
19
+ import Link from "next/link";
20
+
21
+ // src/components/AddWorkflowStepModal.js
22
+ import React2 from "react";
23
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
24
+ function AddWorkflowStepModal({ onClose }) {
25
+ return /* @__PURE__ */ jsxs2("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
26
+ /* @__PURE__ */ jsx2(
27
+ "div",
28
+ {
29
+ className: "fixed inset-0 bg-slate-900/50 backdrop-blur-sm transition-opacity duration-200",
30
+ onClick: onClose
31
+ }
32
+ ),
33
+ /* @__PURE__ */ jsxs2("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: [
34
+ /* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-center px-8 py-6 border-b border-slate-100", children: [
35
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-4", children: [
36
+ /* @__PURE__ */ jsx2("div", { className: "w-12 h-12 bg-indigo-50 text-indigo-600 rounded-xl flex items-center justify-center shadow-sm", children: /* @__PURE__ */ jsx2("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx2("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" }) }) }),
37
+ /* @__PURE__ */ jsxs2("div", { children: [
38
+ /* @__PURE__ */ jsx2("h2", { className: "text-xl font-extrabold text-slate-800", children: "Add Workflow" }),
39
+ /* @__PURE__ */ jsx2("p", { className: "text-xs text-slate-400 mt-0.5", children: "Create a new workflow and configure its details" })
40
+ ] })
41
+ ] }),
42
+ /* @__PURE__ */ jsx2(
43
+ "button",
44
+ {
45
+ onClick: onClose,
46
+ className: "text-slate-400 hover:text-slate-600 hover:bg-slate-100 p-2 rounded-full transition-all text-sm font-semibold",
47
+ children: "\u2715"
48
+ }
49
+ )
50
+ ] }),
51
+ /* @__PURE__ */ jsxs2("div", { className: "p-8 space-y-8 overflow-y-auto max-h-[calc(92vh-170px)] bg-slate-50/30", children: [
52
+ /* @__PURE__ */ jsxs2("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
53
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
54
+ /* @__PURE__ */ jsx2("span", { children: "\u{1F4CB}" }),
55
+ /* @__PURE__ */ jsx2("span", { children: "Workflow Information" })
56
+ ] }),
57
+ /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
58
+ /* @__PURE__ */ jsxs2("div", { children: [
59
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
60
+ "Workflow Type ",
61
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
62
+ ] }),
63
+ /* @__PURE__ */ jsxs2("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: [
64
+ /* @__PURE__ */ jsx2("option", { value: "", children: "Select workflow type" }),
65
+ /* @__PURE__ */ jsx2("option", { value: "petition", children: "Petition" }),
66
+ /* @__PURE__ */ jsx2("option", { value: "building", children: "Building Permission" }),
67
+ /* @__PURE__ */ jsx2("option", { value: "leave", children: "Leave" })
68
+ ] }),
69
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Choose the category this workflow belongs to" })
70
+ ] }),
71
+ /* @__PURE__ */ jsxs2("div", { children: [
72
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
73
+ "Workflow Code ",
74
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
75
+ ] }),
76
+ /* @__PURE__ */ jsx2(
77
+ "input",
78
+ {
79
+ type: "text",
80
+ placeholder: "Enter workflow code",
81
+ 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"
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Unique code for this workflow (e.g., PET-001)" })
85
+ ] })
86
+ ] }),
87
+ /* @__PURE__ */ jsxs2("div", { children: [
88
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
89
+ "Workflow Name ",
90
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
91
+ ] }),
92
+ /* @__PURE__ */ jsx2(
93
+ "input",
94
+ {
95
+ type: "text",
96
+ placeholder: "Enter workflow name",
97
+ 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"
98
+ }
99
+ ),
100
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Enter a descriptive name for this workflow" })
101
+ ] }),
102
+ /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
103
+ /* @__PURE__ */ jsxs2("div", { children: [
104
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
105
+ "Version ",
106
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
107
+ ] }),
108
+ /* @__PURE__ */ jsx2(
109
+ "input",
110
+ {
111
+ type: "text",
112
+ defaultValue: "1",
113
+ 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"
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Workflow version number" })
117
+ ] }),
118
+ /* @__PURE__ */ jsxs2("div", { children: [
119
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
120
+ "Published ",
121
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
122
+ ] }),
123
+ /* @__PURE__ */ jsxs2("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: [
124
+ /* @__PURE__ */ jsx2("option", { value: "false", children: "No" }),
125
+ /* @__PURE__ */ jsx2("option", { value: "true", children: "Yes" })
126
+ ] }),
127
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Make workflow active for use" })
128
+ ] })
129
+ ] })
130
+ ] }),
131
+ /* @__PURE__ */ jsxs2("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-3", children: [
132
+ /* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-center", children: [
133
+ /* @__PURE__ */ jsx2("label", { className: "block text-xs font-bold text-slate-700", children: "Description" }),
134
+ /* @__PURE__ */ jsx2("span", { className: "text-[10px] text-slate-400", children: "0 / 500" })
135
+ ] }),
136
+ /* @__PURE__ */ jsx2(
137
+ "textarea",
138
+ {
139
+ rows: 3,
140
+ placeholder: "Enter workflow description (optional)",
141
+ 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"
142
+ }
143
+ ),
144
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400", children: "Provide additional information about this workflow" })
145
+ ] }),
146
+ /* @__PURE__ */ jsxs2("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
147
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
148
+ /* @__PURE__ */ jsx2("span", { children: "\u2699\uFE0F" }),
149
+ /* @__PURE__ */ jsx2("span", { children: "Status & Settings" })
150
+ ] }),
151
+ /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: [
152
+ /* @__PURE__ */ jsxs2("div", { children: [
153
+ /* @__PURE__ */ jsxs2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: [
154
+ "Status ",
155
+ /* @__PURE__ */ jsx2("span", { className: "text-red-500", children: "*" })
156
+ ] }),
157
+ /* @__PURE__ */ jsxs2("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: [
158
+ /* @__PURE__ */ jsx2("option", { value: "active", children: "Active" }),
159
+ /* @__PURE__ */ jsx2("option", { value: "inactive", children: "Inactive" })
160
+ ] }),
161
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Set the initial status of this workflow" })
162
+ ] }),
163
+ /* @__PURE__ */ jsxs2("div", { children: [
164
+ /* @__PURE__ */ jsx2("label", { className: "block text-xs font-bold text-slate-700 mb-1.5", children: "Default Priority" }),
165
+ /* @__PURE__ */ jsxs2("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: [
166
+ /* @__PURE__ */ jsx2("option", { value: "medium", children: "Medium" }),
167
+ /* @__PURE__ */ jsx2("option", { value: "high", children: "High" }),
168
+ /* @__PURE__ */ jsx2("option", { value: "low", children: "Low" })
169
+ ] }),
170
+ /* @__PURE__ */ jsx2("p", { className: "text-[10px] text-slate-400 mt-1", children: "Default priority for tasks in this workflow" })
171
+ ] })
172
+ ] })
173
+ ] }),
174
+ /* @__PURE__ */ jsxs2("div", { className: "bg-white p-6 rounded-2xl border border-slate-100/80 shadow-sm space-y-5", children: [
175
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-indigo-600 text-sm font-bold border-b border-slate-50 pb-3", children: [
176
+ /* @__PURE__ */ jsx2("span", { children: "\u{1F6E0}\uFE0F" }),
177
+ /* @__PURE__ */ jsx2("span", { children: "Additional Settings" })
178
+ ] }),
179
+ /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
180
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
181
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
182
+ /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u23F1\uFE0F" }),
183
+ /* @__PURE__ */ jsxs2("div", { children: [
184
+ /* @__PURE__ */ jsx2("p", { className: "text-xs font-bold text-slate-700", children: "Enable SLA" }),
185
+ /* @__PURE__ */ jsx2("p", { className: "text-[9px] text-slate-400", children: "Enable SLA for workflow" })
186
+ ] })
187
+ ] }),
188
+ /* @__PURE__ */ jsxs2("label", { className: "relative inline-flex items-center cursor-pointer", children: [
189
+ /* @__PURE__ */ jsx2("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
190
+ /* @__PURE__ */ jsx2("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" })
191
+ ] })
192
+ ] }),
193
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
194
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
195
+ /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u{1F504}" }),
196
+ /* @__PURE__ */ jsxs2("div", { children: [
197
+ /* @__PURE__ */ jsx2("p", { className: "text-xs font-bold text-slate-700", children: "Allow Rework" }),
198
+ /* @__PURE__ */ jsx2("p", { className: "text-[9px] text-slate-400", children: "Allow files to be sent back" })
199
+ ] })
200
+ ] }),
201
+ /* @__PURE__ */ jsxs2("label", { className: "relative inline-flex items-center cursor-pointer", children: [
202
+ /* @__PURE__ */ jsx2("input", { type: "checkbox", defaultChecked: true, className: "sr-only peer" }),
203
+ /* @__PURE__ */ jsx2("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" })
204
+ ] })
205
+ ] }),
206
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between p-4 bg-slate-50/50 border border-slate-100 rounded-2xl", children: [
207
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
208
+ /* @__PURE__ */ jsx2("div", { className: "w-8 h-8 rounded-lg bg-indigo-50 text-indigo-600 flex items-center justify-center text-sm", children: "\u{1F465}" }),
209
+ /* @__PURE__ */ jsxs2("div", { children: [
210
+ /* @__PURE__ */ jsx2("p", { className: "text-xs font-bold text-slate-700", children: "Allow File Delegation" }),
211
+ /* @__PURE__ */ jsx2("p", { className: "text-[9px] text-slate-400", children: "Allow users to delegate tasks" })
212
+ ] })
213
+ ] }),
214
+ /* @__PURE__ */ jsxs2("label", { className: "relative inline-flex items-center cursor-pointer", children: [
215
+ /* @__PURE__ */ jsx2("input", { type: "checkbox", className: "sr-only peer" }),
216
+ /* @__PURE__ */ jsx2("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" })
217
+ ] })
218
+ ] })
219
+ ] })
220
+ ] })
221
+ ] }),
222
+ /* @__PURE__ */ jsxs2("div", { className: "p-5 bg-white border-t border-slate-100 flex items-center justify-end gap-3 px-8", children: [
223
+ /* @__PURE__ */ jsx2(
224
+ "button",
225
+ {
226
+ onClick: onClose,
227
+ 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",
228
+ children: "\u2715 Cancel"
229
+ }
230
+ ),
231
+ /* @__PURE__ */ jsx2(
232
+ "button",
233
+ {
234
+ type: "button",
235
+ 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",
236
+ children: "\u{1F4BE} Save Workflow"
237
+ }
238
+ )
239
+ ] })
240
+ ] })
241
+ ] });
242
+ }
243
+
244
+ // src/components/WorkflowStep/main.js
245
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
246
+ var workflowSteps = [
247
+ {
248
+ workflowStepId: 1,
249
+ workflowId: 1,
250
+ stepCode: "SCR",
251
+ stepName: "Scrutiny",
252
+ sequenceNo: 1,
253
+ slaType: "Hours",
254
+ slaValue: 48,
255
+ reminderBefore: 4,
256
+ escalationAfter: 48,
257
+ workingHoursOnly: 1,
258
+ excludeHolidays: 1
259
+ },
260
+ {
261
+ workflowStepId: 2,
262
+ workflowId: 1,
263
+ stepCode: "APR",
264
+ stepName: "Approval",
265
+ sequenceNo: 2,
266
+ slaType: "Days",
267
+ slaValue: 2,
268
+ reminderBefore: 1,
269
+ escalationAfter: 2,
270
+ workingHoursOnly: 1,
271
+ excludeHolidays: 1
272
+ },
273
+ {
274
+ workflowStepId: 3,
275
+ workflowId: 1,
276
+ stepCode: "APR",
277
+ stepName: "Approval",
278
+ sequenceNo: 3,
279
+ slaType: "Days",
280
+ slaValue: 2,
281
+ reminderBefore: 1,
282
+ escalationAfter: 2,
283
+ workingHoursOnly: 1,
284
+ excludeHolidays: 1
285
+ },
286
+ {
287
+ workflowStepId: 4,
288
+ workflowId: 1,
289
+ stepCode: "APR",
290
+ stepName: "Approval",
291
+ sequenceNo: 4,
292
+ slaType: "Days",
293
+ slaValue: 2,
294
+ reminderBefore: 1,
295
+ escalationAfter: 2,
296
+ workingHoursOnly: 1,
297
+ excludeHolidays: 1
298
+ },
299
+ {
300
+ workflowStepId: 5,
301
+ workflowId: 1,
302
+ stepCode: "APR",
303
+ stepName: "Approval",
304
+ sequenceNo: 5,
305
+ slaType: "Days",
306
+ slaValue: 2,
307
+ reminderBefore: 1,
308
+ escalationAfter: 2,
309
+ workingHoursOnly: 1,
310
+ excludeHolidays: 1
311
+ }
312
+ ];
313
+ function WorkflowStep() {
314
+ const [showModal, setShowModal] = useState(false);
315
+ return /* @__PURE__ */ jsx3("div", { className: "p-6 bg-[#f5f7fb] min-h-screen font-sans text-slate-700", children: /* @__PURE__ */ jsxs3("div", { className: "bg-white rounded-2xl shadow-md overflow-hidden", children: [
316
+ /* @__PURE__ */ jsxs3("div", { className: "px-6 py-5 border-b border-gray-200", children: [
317
+ /* @__PURE__ */ jsx3("h1", { className: "m-0 text-[30px] leading-tight font-semibold text-[#1E293B] tracking-tight", children: "Workflow Step" }),
318
+ /* @__PURE__ */ jsxs3("div", { className: "mt-2 text-[13px] font-medium", children: [
319
+ /* @__PURE__ */ jsx3("a", { href: "/dashboard", className: "text-blue-600 hover:underline", children: "Dashboard" }),
320
+ /* @__PURE__ */ jsx3("span", { className: "mx-2 text-slate-400", children: ">" }),
321
+ /* @__PURE__ */ jsx3("a", { href: "/masters", className: "text-blue-600 hover:underline", children: "Masters" }),
322
+ /* @__PURE__ */ jsx3("span", { className: "mx-2 text-slate-400", children: ">" }),
323
+ /* @__PURE__ */ jsx3("a", { href: "/workflow", className: "text-blue-600 hover:underline", children: "Workflow" }),
324
+ /* @__PURE__ */ jsx3("span", { className: "mx-2 text-slate-400", children: ">" }),
325
+ /* @__PURE__ */ jsx3("span", { className: "text-slate-500", children: "Workflow Step" })
326
+ ] })
327
+ ] }),
328
+ /* @__PURE__ */ jsx3("div", { className: "px-6 py-5 border-b border-gray-200 ", children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-between items-center flex-wrap gap-3", children: [
329
+ /* @__PURE__ */ jsx3(
330
+ "input",
331
+ {
332
+ type: "text",
333
+ placeholder: "Search workflow step...",
334
+ 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"
335
+ }
336
+ ),
337
+ /* @__PURE__ */ jsx3(
338
+ "button",
339
+ {
340
+ onClick: () => setShowModal(true),
341
+ className: "px-5 py-2.5 bg-blue-600 text-white rounded-lg text-[13px] font-semibold hover:bg-blue-700 transition-colors",
342
+ children: "+ Add Workflow Type"
343
+ }
344
+ )
345
+ ] }) }),
346
+ /* @__PURE__ */ jsxs3("div", { className: "overflow-x-auto", children: [
347
+ /* @__PURE__ */ jsxs3("table", { className: "w-full border-collapse", children: [
348
+ /* @__PURE__ */ jsx3("thead", { children: /* @__PURE__ */ jsx3("tr", { className: "bg-slate-50/70 border-b border-slate-200 text-[11px] font-bold uppercase tracking-wider text-slate-500", children: [
349
+ "WorkflowStepId",
350
+ "WorkflowId",
351
+ "StepCode",
352
+ "StepName",
353
+ "SequenceNo",
354
+ "SLA Type",
355
+ "SLA Value",
356
+ "Reminder Before",
357
+ "Escalation After",
358
+ "Working Hours Only",
359
+ "Exclude Holidays"
360
+ ].map((heading) => /* @__PURE__ */ jsx3(
361
+ "th",
362
+ {
363
+ className: "px-4 py-3 text-left border-b border-gray-200 text-[11px] font-bold uppercase tracking-wider text-slate-500",
364
+ children: heading
365
+ },
366
+ heading
367
+ )) }) }),
368
+ /* @__PURE__ */ jsx3("tbody", { children: workflowSteps.map((item) => /* @__PURE__ */ jsxs3(
369
+ "tr",
370
+ {
371
+ className: "hover:bg-slate-50 transition-colors",
372
+ children: [
373
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowStepId }),
374
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workflowId }),
375
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: /* @__PURE__ */ jsx3("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 }) }),
376
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.stepName }),
377
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.sequenceNo }),
378
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.slaType }),
379
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.slaValue }),
380
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.reminderBefore }),
381
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.escalationAfter }),
382
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.workingHoursOnly }),
383
+ /* @__PURE__ */ jsx3("td", { className: "px-4 py-3 border-b border-slate-200 text-[13px] text-slate-500 font-bold", children: item.excludeHolidays })
384
+ ]
385
+ },
386
+ item.workflowStepId
387
+ )) })
388
+ ] }),
389
+ /* @__PURE__ */ jsx3("div", { className: "h-5" }),
390
+ /* @__PURE__ */ jsx3(Footer, {}),
391
+ showModal && /* @__PURE__ */ jsx3(AddWorkflowStepModal, { onClose: () => setShowModal(false) })
392
+ ] })
393
+ ] }) });
394
+ }
395
+
396
+ // src/pages/workflow.js
397
+ import { jsx as jsx4 } from "react/jsx-runtime";
398
+ function WorkflowPage() {
399
+ return /* @__PURE__ */ jsx4(WorkflowStep, {});
400
+ }
401
+ export {
402
+ WorkflowPage
403
+ };
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "flowcore-fn",
3
+ "version": "2.2.0",
4
+
5
+ "main": "dist/pkg-index.js",
6
+ "module": "dist/pkg-index.mjs",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "dev": "next dev",
12
+ "build": "next build",
13
+ "build:pkg": "tsup"
14
+ },
15
+ "peerDependencies": {
16
+ "next": ">=14.0.0",
17
+ "react": ">=18.0.0",
18
+ "react-dom": ">=18.0.0"
19
+ },
20
+ "devDependencies": {
21
+ "@tailwindcss/postcss": "^4",
22
+ "@types/node": "^20",
23
+ "@types/react": "^19",
24
+ "@types/react-dom": "^19",
25
+ "eslint": "^9",
26
+ "eslint-config-next": "16.2.10",
27
+ "next": "^16.2.10",
28
+ "react": "^19.2.4",
29
+ "react-dom": "^19.2.4",
30
+ "tailwindcss": "^4",
31
+ "tsup": "^8.5.1",
32
+ "typescript": "^5"
33
+ },
34
+ "dependencies": {
35
+ "@remixicon/react": "^4.9.0",
36
+ "remixicon-react": "^1.0.0"
37
+ }
38
+ }