@devalok/shilp-sutra-karm 0.1.0 → 0.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/admin/break/break-admin.d.ts.map +1 -1
- package/dist/admin/break/break-admin.js +205 -179
- package/dist/admin/break/delete-break.d.ts +2 -4
- package/dist/admin/break/delete-break.d.ts.map +1 -1
- package/dist/admin/break/delete-break.js +20 -19
- package/dist/admin/break/edit-break-balance.d.ts +2 -4
- package/dist/admin/break/edit-break-balance.d.ts.map +1 -1
- package/dist/admin/break/edit-break-balance.js +20 -19
- package/dist/admin/break/edit-break.d.ts +2 -4
- package/dist/admin/break/edit-break.d.ts.map +1 -1
- package/dist/admin/break/edit-break.js +114 -147
- package/dist/admin/break/header.d.ts.map +1 -1
- package/dist/admin/break/header.js +52 -50
- package/dist/admin/break/leave-request.d.ts +4 -6
- package/dist/admin/break/leave-request.d.ts.map +1 -1
- package/dist/admin/break/leave-request.js +57 -58
- package/dist/admin/dashboard/admin-dashboard.js +2 -2
- package/dist/admin/dashboard/associate-detail.d.ts.map +1 -1
- package/dist/admin/dashboard/associate-detail.js +46 -57
- package/dist/admin/dashboard/attendance-overview.d.ts.map +1 -1
- package/dist/admin/dashboard/attendance-overview.js +2 -4
- package/dist/admin/dashboard/break-request.d.ts.map +1 -1
- package/dist/admin/dashboard/break-request.js +31 -30
- package/dist/admin/dashboard/calendar.js +1 -1
- package/dist/admin/dashboard/correction-list.d.ts.map +1 -1
- package/dist/admin/dashboard/correction-list.js +49 -47
- package/dist/admin/dashboard/dashboard-header.d.ts.map +1 -1
- package/dist/admin/dashboard/dashboard-header.js +7 -6
- package/dist/admin/dashboard/dashboard-skeleton.d.ts.map +1 -1
- package/dist/admin/dashboard/dashboard-skeleton.js +11 -13
- package/dist/admin/dashboard/leave-requests.d.ts.map +1 -1
- package/dist/admin/dashboard/leave-requests.js +78 -75
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +8 -8
- package/dist/admin/utils/render-adjustment-type.d.ts +1 -1
- package/dist/admin/utils/render-adjustment-type.d.ts.map +1 -1
- package/dist/admin/utils/render-adjustment-type.js +1 -1
- package/dist/board/task-card.js +1 -1
- package/dist/chat/markdown-components.d.ts +30 -0
- package/dist/chat/markdown-components.d.ts.map +1 -0
- package/dist/chat/markdown-components.js +16 -0
- package/dist/chat/message-list.d.ts.map +1 -1
- package/dist/chat/message-list.js +37 -47
- package/dist/chat/streaming-text.d.ts.map +1 -1
- package/dist/chat/streaming-text.js +10 -23
- package/dist/client/client-portal-header.js +5 -5
- package/dist/client/project-card.d.ts.map +1 -1
- package/dist/dashboard/attendance-cta.d.ts +1 -1
- package/dist/dashboard/attendance-cta.d.ts.map +1 -1
- package/dist/dashboard/attendance-cta.js +25 -38
- package/dist/dashboard/daily-brief.d.ts +1 -1
- package/dist/dashboard/daily-brief.d.ts.map +1 -1
- package/dist/dashboard/daily-brief.js +2 -1
- package/dist/dashboard/index.d.ts +2 -2
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +4 -4
- package/dist/index.js +11 -11
- package/dist/page-skeletons.d.ts.map +1 -1
- package/dist/tasks/review-tab.js +3 -3
- package/dist/tasks/task-detail-panel.d.ts +1 -4
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/dist/tasks/task-detail-panel.js +96 -96
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as i, Fragment as y } from "react/jsx-runtime";
|
|
2
2
|
import * as H from "react";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Dialog as q, DialogTrigger as z, DialogContent as G, DialogHeader as
|
|
3
|
+
import { useState as E } from "react";
|
|
4
|
+
import { Dialog as q, DialogTrigger as z, DialogContent as G, DialogHeader as $, DialogFooter as V, DialogClose as W } from "@devalok/shilp-sutra/ui";
|
|
5
5
|
import { Button as _ } from "@devalok/shilp-sutra/ui";
|
|
6
6
|
import { IconButton as L } from "@devalok/shilp-sutra/ui";
|
|
7
7
|
import { cn as O } from "@devalok/shilp-sutra/ui";
|
|
@@ -13,25 +13,15 @@ function ii({
|
|
|
13
13
|
selectedUserAttendance: s
|
|
14
14
|
}) {
|
|
15
15
|
const m = (s == null ? void 0 : s.status) || "ABSENT", o = m === "Not_Marked" ? "ABSENT" : m, r = o.charAt(0).toUpperCase() + o.slice(1).toLowerCase(), u = s != null && s.timeIn ? new Date(s.timeIn).toLocaleTimeString() : null;
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center px-ds-05 py-ds-07 sm:px-ds-05 sm:py-ds-06 md:px-ds-06 md:py-ds-05 md:pr-0", children: [
|
|
17
17
|
/* @__PURE__ */ i("p", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-06 text-text-tertiary", children: "Attendance status" }),
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ l("div", { className: "mb-ds-04 flex w-full items-center justify-center gap-ds-03 rounded-ds-3xl border border-border-subtle px-ds-05 py-ds-04 text-center", children: [
|
|
19
19
|
/* @__PURE__ */ i("span", { className: "font-semibold text-interactive", children: r }),
|
|
20
|
-
r === "Absent" && /* @__PURE__ */ i(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
style: {
|
|
24
|
-
width: "1px",
|
|
25
|
-
height: "20px",
|
|
26
|
-
opacity: 0.5,
|
|
27
|
-
background: "var(--color-border-strong)"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
),
|
|
20
|
+
r === "Absent" && /* @__PURE__ */ i("div", { className: "w-px h-5 opacity-[0.5] bg-border-strong" }),
|
|
31
21
|
!u && m !== "HOLIDAY" && m !== "WEEKEND" && /* @__PURE__ */ i("span", { className: "text-ds-md text-text-tertiary", children: "Not marked" }),
|
|
32
22
|
!!u && m === "ABSENT" && /* @__PURE__ */ i("span", { className: "text-ds-md text-text-tertiary", children: "Removed" })
|
|
33
23
|
] }),
|
|
34
|
-
u && /* @__PURE__ */
|
|
24
|
+
u && /* @__PURE__ */ l("p", { className: "text-ds-md m-0 text-center text-text-disabled", children: [
|
|
35
25
|
"Marked at ",
|
|
36
26
|
u
|
|
37
27
|
] })
|
|
@@ -43,17 +33,17 @@ function ri({
|
|
|
43
33
|
selectedUserAttendance: o,
|
|
44
34
|
onUpdateAttendanceStatus: r
|
|
45
35
|
}) {
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ i(
|
|
36
|
+
return /* @__PURE__ */ l(G, { className: "sm:max-w-md", children: [
|
|
37
|
+
/* @__PURE__ */ i($, { children: /* @__PURE__ */ l("div", { className: "text-ds-md text-text-tertiary", children: [
|
|
48
38
|
"Edit attendance of",
|
|
49
39
|
" ",
|
|
50
|
-
/* @__PURE__ */ i("span", { className: "text-ds-md font-
|
|
40
|
+
/* @__PURE__ */ i("span", { className: "text-ds-md font-semibold text-interactive", children: s.name })
|
|
51
41
|
] }) }),
|
|
52
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-start", children: [
|
|
53
43
|
/* @__PURE__ */ i("div", { className: "text-ds-lg mb-ds-05 text-interactive", children: Q(new Date(m), "dd MMMM ''yy") }),
|
|
54
|
-
/* @__PURE__ */ i("div", { className: "mb-ds-04 flex w-full items-center justify-center gap-ds-03 rounded-3xl border border-border-subtle px-ds-05 py-ds-04 text-center font-semibold text-interactive", children: (o == null ? void 0 : o.status) === "PRESENT" ? "PRESENT " : "ABSENT" })
|
|
44
|
+
/* @__PURE__ */ i("div", { className: "mb-ds-04 flex w-full items-center justify-center gap-ds-03 rounded-ds-3xl border border-border-subtle px-ds-05 py-ds-04 text-center font-semibold text-interactive", children: (o == null ? void 0 : o.status) === "PRESENT" ? "PRESENT " : "ABSENT" })
|
|
55
45
|
] }),
|
|
56
|
-
/* @__PURE__ */ i(
|
|
46
|
+
/* @__PURE__ */ i(V, { className: "sm:justify-start", children: /* @__PURE__ */ i(W, { asChild: !0, children: /* @__PURE__ */ i(
|
|
57
47
|
_,
|
|
58
48
|
{
|
|
59
49
|
variant: "primary",
|
|
@@ -77,30 +67,30 @@ const ai = H.forwardRef(
|
|
|
77
67
|
selectedDate: o,
|
|
78
68
|
selectedUserAttendance: r,
|
|
79
69
|
userTasks: u,
|
|
80
|
-
selectedBreakRequest:
|
|
81
|
-
isFutureDate:
|
|
70
|
+
selectedBreakRequest: v,
|
|
71
|
+
isFutureDate: n,
|
|
82
72
|
assetsBaseUrl: w,
|
|
83
73
|
onUpdateAttendanceStatus: x,
|
|
84
|
-
onToggleTaskStatus:
|
|
74
|
+
onToggleTaskStatus: h,
|
|
85
75
|
onAddTask: d,
|
|
86
76
|
onReorderTasks: g,
|
|
87
77
|
onCancelBreak: D,
|
|
88
78
|
onRefreshSelectedUserAttendance: c,
|
|
89
79
|
onRefreshAttendanceData: I
|
|
90
|
-
},
|
|
91
|
-
const [b, M] =
|
|
80
|
+
}, j) {
|
|
81
|
+
const [b, M] = E(""), [p, C] = E(null), [B, N] = E(null), P = async (a) => {
|
|
92
82
|
a.preventDefault(), !(!b.trim() || !m) && (await (d == null ? void 0 : d(b, m.id)), M(""));
|
|
93
|
-
},
|
|
94
|
-
C(
|
|
95
|
-
},
|
|
96
|
-
if (a.preventDefault(), p !== null && p !==
|
|
97
|
-
const f = u[p], K = u[
|
|
83
|
+
}, S = (a, t) => {
|
|
84
|
+
C(t), a.target.classList.add("dragging");
|
|
85
|
+
}, k = async (a, t) => {
|
|
86
|
+
if (a.preventDefault(), p !== null && p !== t) {
|
|
87
|
+
const f = u[p], K = u[t];
|
|
98
88
|
await (g == null ? void 0 : g(f.id, K.id));
|
|
99
89
|
}
|
|
100
90
|
C(null), N(null);
|
|
101
91
|
};
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
!
|
|
92
|
+
return /* @__PURE__ */ l("div", { ref: j, className: "relative flex items-center justify-between md:items-stretch", children: [
|
|
93
|
+
!n && (r == null ? void 0 : r.status) !== "BREAK" && /* @__PURE__ */ l(q, { children: [
|
|
104
94
|
/* @__PURE__ */ i(z, { asChild: !0, children: /* @__PURE__ */ i(
|
|
105
95
|
L,
|
|
106
96
|
{
|
|
@@ -120,12 +110,12 @@ const ai = H.forwardRef(
|
|
|
120
110
|
}
|
|
121
111
|
)
|
|
122
112
|
] }),
|
|
123
|
-
|
|
113
|
+
n ? /* @__PURE__ */ i(y, { children: (r == null ? void 0 : r.status) === "BREAK" ? /* @__PURE__ */ i(
|
|
124
114
|
R,
|
|
125
115
|
{
|
|
126
116
|
selectedDate: o,
|
|
127
117
|
userId: m.id,
|
|
128
|
-
breakRequest:
|
|
118
|
+
breakRequest: v,
|
|
129
119
|
assetsBaseUrl: w,
|
|
130
120
|
onCancelBreak: D,
|
|
131
121
|
onRefreshAttendance: c,
|
|
@@ -136,7 +126,7 @@ const ai = H.forwardRef(
|
|
|
136
126
|
{
|
|
137
127
|
selectedDate: o,
|
|
138
128
|
userId: m.id,
|
|
139
|
-
breakRequest:
|
|
129
|
+
breakRequest: v,
|
|
140
130
|
assetsBaseUrl: w,
|
|
141
131
|
onCancelBreak: D,
|
|
142
132
|
onRefreshAttendance: c,
|
|
@@ -145,9 +135,9 @@ const ai = H.forwardRef(
|
|
|
145
135
|
) : (r == null ? void 0 : r.status) === "ABSENT" || (r == null ? void 0 : r.status) === "Not_Marked" && F(
|
|
146
136
|
new Date(o),
|
|
147
137
|
J(/* @__PURE__ */ new Date())
|
|
148
|
-
) ? /* @__PURE__ */
|
|
138
|
+
) ? /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center p-ds-06", children: [
|
|
149
139
|
/* @__PURE__ */ i("p", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-05 text-text-tertiary", children: "COMMENT" }),
|
|
150
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between rounded-ds-lg border border-border bg-layer-01 px-ds-05 max-md:h-ds-lg", children: [
|
|
151
141
|
/* @__PURE__ */ i(
|
|
152
142
|
"input",
|
|
153
143
|
{
|
|
@@ -172,33 +162,33 @@ const ai = H.forwardRef(
|
|
|
172
162
|
}
|
|
173
163
|
)
|
|
174
164
|
] })
|
|
175
|
-
] }) : /* @__PURE__ */
|
|
165
|
+
] }) : /* @__PURE__ */ l("div", { className: "mb-auto flex w-full flex-col md:pr-ds-06", children: [
|
|
176
166
|
/* @__PURE__ */ i("p", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-06 text-interactive", children: "Tasks for the day" }),
|
|
177
|
-
u && /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ i("div", { className: "no-scrollbar mb-ds-03 flex max-h-[250px] flex-col gap-ds-03 overflow-y-auto", children: u.map((a,
|
|
167
|
+
u && /* @__PURE__ */ l(y, { children: [
|
|
168
|
+
/* @__PURE__ */ i("div", { className: "no-scrollbar mb-ds-03 flex max-h-[250px] flex-col gap-ds-03 overflow-y-auto", children: u.map((a, t) => (
|
|
179
169
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
180
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ l(
|
|
181
171
|
"div",
|
|
182
172
|
{
|
|
183
|
-
className: O("task-item mb-ds-03 flex items-center gap-ds-02", p ===
|
|
173
|
+
className: O("task-item mb-ds-03 flex items-center gap-ds-02", p === t ? "dragging" : ""),
|
|
184
174
|
draggable: !0,
|
|
185
|
-
onDragStart: (f) =>
|
|
175
|
+
onDragStart: (f) => S(f, t),
|
|
186
176
|
onDragOver: (f) => f.preventDefault(),
|
|
187
|
-
onDrop: (f) =>
|
|
188
|
-
onDragEnter: () => N(
|
|
177
|
+
onDrop: (f) => k(f, t),
|
|
178
|
+
onDragEnter: () => N(t),
|
|
189
179
|
onDragLeave: () => N(null),
|
|
190
180
|
onDragEnd: (f) => {
|
|
191
181
|
f.target instanceof HTMLElement && f.target.classList.remove("dragging");
|
|
192
182
|
},
|
|
193
183
|
children: [
|
|
194
|
-
|
|
184
|
+
B === t && /* @__PURE__ */ i("div", { className: "drop-indicator" }),
|
|
195
185
|
a.status === "COMPLETED" ? /* @__PURE__ */ i(T, { className: "" }) : /* @__PURE__ */ i(T, {}),
|
|
196
186
|
/* @__PURE__ */ i(
|
|
197
187
|
"button",
|
|
198
188
|
{
|
|
199
189
|
type: "button",
|
|
200
190
|
onClick: () => {
|
|
201
|
-
|
|
191
|
+
h == null || h(
|
|
202
192
|
a.id,
|
|
203
193
|
a.status === "COMPLETED" ? "TODO" : "COMPLETED"
|
|
204
194
|
);
|
|
@@ -211,8 +201,7 @@ const ai = H.forwardRef(
|
|
|
211
201
|
/* @__PURE__ */ i(
|
|
212
202
|
"p",
|
|
213
203
|
{
|
|
214
|
-
className: O("text-ds-md flex-1 overflow-hidden hyphens-auto break-all pr-ds-05", a.status === "COMPLETED" ? "text-text-disabled line-through" : "text-text-secondary"),
|
|
215
|
-
style: { wordBreak: "break-word", minWidth: 0 },
|
|
204
|
+
className: O("text-ds-md flex-1 overflow-hidden hyphens-auto break-all pr-ds-05 break-words min-w-0", a.status === "COMPLETED" ? "text-text-disabled line-through" : "text-text-secondary"),
|
|
216
205
|
children: a.title
|
|
217
206
|
}
|
|
218
207
|
)
|
|
@@ -221,7 +210,7 @@ const ai = H.forwardRef(
|
|
|
221
210
|
a.id
|
|
222
211
|
)
|
|
223
212
|
)) }),
|
|
224
|
-
Y(new Date(o), /* @__PURE__ */ new Date()) && /* @__PURE__ */
|
|
213
|
+
Y(new Date(o), /* @__PURE__ */ new Date()) && /* @__PURE__ */ l(
|
|
225
214
|
"form",
|
|
226
215
|
{
|
|
227
216
|
className: "flex items-center gap-ds-02 pb-ds-05",
|
|
@@ -246,8 +235,8 @@ const ai = H.forwardRef(
|
|
|
246
235
|
overflow: "hidden"
|
|
247
236
|
},
|
|
248
237
|
onInput: (a) => {
|
|
249
|
-
const
|
|
250
|
-
|
|
238
|
+
const t = a.target;
|
|
239
|
+
t.style.height = "auto", t.style.height = t.scrollHeight + "px";
|
|
251
240
|
}
|
|
252
241
|
}
|
|
253
242
|
)
|
|
@@ -256,8 +245,8 @@ const ai = H.forwardRef(
|
|
|
256
245
|
)
|
|
257
246
|
] })
|
|
258
247
|
] }),
|
|
259
|
-
!
|
|
260
|
-
/* @__PURE__ */ i("div", { className: "block h-
|
|
248
|
+
!n && (r == null ? void 0 : r.status) !== "BREAK" && /* @__PURE__ */ l(y, { children: [
|
|
249
|
+
/* @__PURE__ */ i("div", { className: "block h-full w-[2px] bg-border-subtle" }),
|
|
261
250
|
/* @__PURE__ */ i(ii, { selectedUserAttendance: r })
|
|
262
251
|
] })
|
|
263
252
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendance-overview.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/attendance-overview.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EACV,SAAS,EAGT,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAMjB,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,YAAY,EAAE,MAAM,CAAA;CACrB;AAyCD,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"attendance-overview.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/attendance-overview.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EACV,SAAS,EAGT,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAMjB,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,OAAO,CAAA;IACrB,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,YAAY,EAAE,MAAM,CAAA;CACrB;AAyCD,eAAO,MAAM,kBAAkB,gGAmI9B,CAAA"}
|
|
@@ -61,8 +61,7 @@ const B = k.forwardRef(
|
|
|
61
61
|
children: /* @__PURE__ */ s(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
className: "items-
|
|
65
|
-
style: { minWidth: "max-content" },
|
|
64
|
+
className: "flex items-start justify-start gap-ds-04 px-0 pt-ds-03 md:gap-0 md:px-ds-06 min-w-max",
|
|
66
65
|
children: u ? /* @__PURE__ */ s("div", { className: "min-h-28", children: m && ((v = Object.entries(
|
|
67
66
|
A(
|
|
68
67
|
m,
|
|
@@ -96,8 +95,7 @@ const B = k.forwardRef(
|
|
|
96
95
|
([t, o]) => /* @__PURE__ */ x(
|
|
97
96
|
"div",
|
|
98
97
|
{
|
|
99
|
-
className: j("flex w-full flex-col gap-ds-04 rounded-ds-md bg-layer-02 p-ds-06 md:rounded-ds-lg md:p-ds-05", t !== "yetToMark" ? "border-r border-border" : "", "max-md:border-0 max-md:p-ds-05"),
|
|
100
|
-
style: { minWidth: "200px" },
|
|
98
|
+
className: j("flex w-full flex-col gap-ds-04 rounded-ds-md bg-layer-02 p-ds-06 md:rounded-ds-lg md:p-ds-05", t !== "yetToMark" ? "border-r border-border" : "", "max-md:border-0 max-md:p-ds-05", "min-w-[200px]"),
|
|
101
99
|
children: [
|
|
102
100
|
/* @__PURE__ */ x("h2", { className: "text-ds-sm font-semibold uppercase tracking-wider capitalize text-text-tertiary", children: [
|
|
103
101
|
t === "yetToMark" ? "Yet to Mark" : t.replace(/([A-Z])/g, " $1").toLowerCase(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"break-request.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/break-request.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuB9B,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAMhE,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACtC,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE;QACvB,SAAS,EAAE,MAAM,CAAA;QACjB,eAAe,EAAE,OAAO,CAAA;QACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,MAAM,EAAE,MAAM,CAAA;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,2FAA2F;IAC3F,mBAAmB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChD,oFAAoF;IACpF,0BAA0B,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD;AAMD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"break-request.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/break-request.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuB9B,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAMhE,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACtC,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE;QACvB,SAAS,EAAE,MAAM,CAAA;QACjB,eAAe,EAAE,OAAO,CAAA;QACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,MAAM,EAAE,MAAM,CAAA;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,2FAA2F;IAC3F,mBAAmB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChD,oFAAoF;IACpF,0BAA0B,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD;AAMD,eAAO,MAAM,gBAAgB,0FAsP5B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import * as F from "react";
|
|
3
3
|
import { useState as v, useEffect as M } from "react";
|
|
4
4
|
import { Button as h } from "@devalok/shilp-sutra/ui";
|
|
@@ -26,8 +26,8 @@ const z = F.forwardRef(
|
|
|
26
26
|
}, [i]);
|
|
27
27
|
const g = t && t.numberOfDays === 1, m = () => {
|
|
28
28
|
if (!t) return !1;
|
|
29
|
-
const
|
|
30
|
-
return J(N,
|
|
29
|
+
const s = O(/* @__PURE__ */ new Date()), N = O(new Date(t.endDate));
|
|
30
|
+
return J(N, s) || L(N, s);
|
|
31
31
|
}, x = async () => {
|
|
32
32
|
!t || !a || (await a({
|
|
33
33
|
requestId: t.id,
|
|
@@ -35,8 +35,8 @@ const z = F.forwardRef(
|
|
|
35
35
|
dateToCancel: i,
|
|
36
36
|
userId: P
|
|
37
37
|
}), d(!1), n == null || n(), c == null || c());
|
|
38
|
-
}, b = (
|
|
39
|
-
return !t || t.status === "CANCELLED" ? null : /* @__PURE__ */
|
|
38
|
+
}, b = (s) => I(new Date(s), "dd/MM/yyyy");
|
|
39
|
+
return !t || t.status === "CANCELLED" ? null : /* @__PURE__ */ l("div", { ref: Y, className: "relative flex w-full flex-col gap-ds-06 rounded-ds-lg bg-layer-accent-subtle", children: [
|
|
40
40
|
u && /* @__PURE__ */ e(
|
|
41
41
|
"img",
|
|
42
42
|
{
|
|
@@ -45,11 +45,11 @@ const z = F.forwardRef(
|
|
|
45
45
|
className: "absolute bottom-0 z-0 h-full min-h-[236px] rounded-ds-lg object-cover"
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
r && g ? /* @__PURE__ */ e("div", { className: "flex h-full w-full flex-col items-center justify-center px-ds-04 pt-[17px]", children: /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ l("div", { className: "relative flex min-h-[236px] flex-col items-center justify-between rounded-ds-lg md:flex-row", children: [
|
|
49
|
+
r && g ? /* @__PURE__ */ e("div", { className: "flex h-full w-full flex-col items-center justify-center px-ds-04 pt-[17px]", children: /* @__PURE__ */ l("div", { className: "w-full gap-ds-05 rounded-ds-md bg-layer-01 shadow-01 px-ds-06 py-ds-07 md:hidden", children: [
|
|
50
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-ds-04", children: [
|
|
51
51
|
/* @__PURE__ */ e("div", { className: "text-ds-lg font-semibold text-center text-text-primary", children: "Cancel this break?" }),
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ l("div", { className: "text-ds-base max-w-[240px] text-center text-text-tertiary max-md:leading-[100%]", children: [
|
|
53
53
|
"You're about to cancel the break scheduled for",
|
|
54
54
|
" ",
|
|
55
55
|
/* @__PURE__ */ e("span", { className: "font-semibold text-text-secondary", children: b(t.startDate) })
|
|
@@ -59,22 +59,23 @@ const z = F.forwardRef(
|
|
|
59
59
|
/* @__PURE__ */ e(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
|
+
"aria-label": "Close cancel form",
|
|
62
63
|
className: "absolute right-ds-05 top-ds-05 rounded-ds-sm p-ds-04 text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:pointer-events-none",
|
|
63
64
|
onClick: () => d(!1),
|
|
64
65
|
children: /* @__PURE__ */ e(V, { className: "h-ico-lg w-ico-lg" })
|
|
65
66
|
}
|
|
66
67
|
)
|
|
67
|
-
] }) }) : /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
] }) }) : /* @__PURE__ */ l("div", { className: "flex h-full w-full flex-col items-center justify-center gap-ds-06 p-ds-06 px-ds-06 py-ds-07 md:w-1/2 md:p-ds-07", children: [
|
|
69
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-end gap-ds-05", children: [
|
|
69
70
|
/* @__PURE__ */ e("div", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-tertiary", children: "Reason" }),
|
|
70
71
|
/* @__PURE__ */ e("div", { className: "text-ds-lg font-semibold text-text-primary", children: W((t == null ? void 0 : t.reason) || " ") })
|
|
71
72
|
] }),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-end gap-ds-05", children: [
|
|
73
74
|
/* @__PURE__ */ e("div", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-tertiary", children: "Break Period" }),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ l("div", { className: "text-ds-lg font-semibold text-text-primary", children: [
|
|
75
76
|
B(new Date(t.startDate)),
|
|
76
77
|
" ",
|
|
77
|
-
t.numberOfDays > 1 && /* @__PURE__ */
|
|
78
|
+
t.numberOfDays > 1 && /* @__PURE__ */ l(f, { children: [
|
|
78
79
|
"- ",
|
|
79
80
|
B(new Date(t.endDate)),
|
|
80
81
|
" "
|
|
@@ -83,22 +84,22 @@ const z = F.forwardRef(
|
|
|
83
84
|
] })
|
|
84
85
|
] })
|
|
85
86
|
] }),
|
|
86
|
-
!r && /* @__PURE__ */
|
|
87
|
+
!r && /* @__PURE__ */ l(f, { children: [
|
|
87
88
|
/* @__PURE__ */ e("div", { className: "h-[1px] w-[329px] bg-border-subtle md:hidden max-md:w-[90%]" }),
|
|
88
89
|
/* @__PURE__ */ e("div", { className: "hidden h-[170px] w-[2px] bg-border-subtle md:block" })
|
|
89
90
|
] }),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ l(
|
|
91
92
|
"div",
|
|
92
93
|
{
|
|
93
94
|
className: T("flex w-full flex-col items-center justify-center px-ds-05", r || t.status === "APPROVED" || t.status === "REJECTED" ? "pb-ds-06 pt-[9px]" : "py-ds-06", "md:w-1/2 md:px-ds-06 md:py-ds-05 max-md:pt-[34px]"),
|
|
94
95
|
children: [
|
|
95
96
|
/* @__PURE__ */ e("p", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-06 text-text-tertiary max-md:mb-ds-05", children: "Break Status" }),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ l("div", { className: "mb-ds-04 flex w-full flex-col items-center justify-start gap-ds-04 rounded-ds-2xl border border-border-subtle bg-layer-01 shadow-01 px-ds-05 py-ds-04 text-center font-semibold text-text-primary", children: [
|
|
97
98
|
$(t.status, !1),
|
|
98
99
|
t.status === "APPROVED" && t.adminComment,
|
|
99
100
|
t.status === "REJECTED" && t.adminComment
|
|
100
101
|
] }),
|
|
101
|
-
g ? /* @__PURE__ */
|
|
102
|
+
g ? /* @__PURE__ */ l(f, { children: [
|
|
102
103
|
m() && a && /* @__PURE__ */ e(
|
|
103
104
|
"button",
|
|
104
105
|
{
|
|
@@ -107,11 +108,11 @@ const z = F.forwardRef(
|
|
|
107
108
|
children: "Want to cancel this break?"
|
|
108
109
|
}
|
|
109
110
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ l(w, { children: [
|
|
111
112
|
m() && a && /* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ e("button", { className: "text-ds-sm hidden cursor-pointer border-none bg-transparent text-interactive-hover underline md:block", children: "Want to cancel this break?" }) }),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ l(j, { className: "max-w-[329px] gap-ds-04 rounded-ds-xl", children: [
|
|
113
114
|
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e("div", { className: "text-ds-lg font-semibold text-center text-text-primary", children: "Cancel this break?" }) }),
|
|
114
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-start", children: /* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-start", children: /* @__PURE__ */ l("div", { className: "text-ds-base max-w-[241px] text-center text-text-tertiary", children: [
|
|
115
116
|
"You're about to cancel the break scheduled for",
|
|
116
117
|
" ",
|
|
117
118
|
/* @__PURE__ */ e("span", { className: "font-semibold text-text-secondary", children: b(t.startDate) })
|
|
@@ -119,33 +120,33 @@ const z = F.forwardRef(
|
|
|
119
120
|
/* @__PURE__ */ e(k, { className: "mt-ds-04 sm:justify-start", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ e(h, { variant: "primary", className: "w-full rounded-ds-full", onClick: x, children: "Yes, cancel" }) }) })
|
|
120
121
|
] })
|
|
121
122
|
] })
|
|
122
|
-
] }) : /* @__PURE__ */
|
|
123
|
+
] }) : /* @__PURE__ */ l(w, { children: [
|
|
123
124
|
m() && a && /* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ e("button", { className: "text-ds-sm cursor-pointer border-none bg-transparent text-interactive-hover underline", children: "Want to cancel this break?" }) }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ l(j, { className: "max-w-[329px] gap-ds-04 rounded-ds-xl", children: [
|
|
125
126
|
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e("div", { className: "text-ds-lg font-semibold flex text-center text-text-primary", children: "Cancel your break" }) }),
|
|
126
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-start", children: /* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-start", children: /* @__PURE__ */ l("div", { className: "flex w-full flex-col items-start", children: [
|
|
128
|
+
/* @__PURE__ */ l("label", { className: "breakRequest-checkbox flex items-center space-x-ds-03", children: [
|
|
128
129
|
/* @__PURE__ */ e(
|
|
129
130
|
D,
|
|
130
131
|
{
|
|
131
132
|
checked: o,
|
|
132
|
-
onCheckedChange: (
|
|
133
|
+
onCheckedChange: (s) => y(s === !0)
|
|
133
134
|
}
|
|
134
135
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ l("span", { className: "text-text-secondary", children: [
|
|
136
137
|
p(new Date(i).getDate()),
|
|
137
138
|
" break only"
|
|
138
139
|
] })
|
|
139
140
|
] }),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ l("label", { className: "breakRequest-checkbox mt-ds-03 flex items-center space-x-ds-03", children: [
|
|
141
142
|
/* @__PURE__ */ e(
|
|
142
143
|
D,
|
|
143
144
|
{
|
|
144
145
|
checked: !o,
|
|
145
|
-
onCheckedChange: (
|
|
146
|
+
onCheckedChange: (s) => y(s !== !0)
|
|
146
147
|
}
|
|
147
148
|
),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ l("span", { className: "text-text-secondary", children: [
|
|
149
150
|
p(
|
|
150
151
|
new Date(t.startDate).getDate()
|
|
151
152
|
),
|
|
@@ -95,7 +95,7 @@ const F = v.forwardRef(
|
|
|
95
95
|
t.activeTimeFrame === "weekly" ? "w-full rounded-t-ds-lg pb-ds-04 pt-ds-05" : "pb-0 pt-0",
|
|
96
96
|
"flex cursor-pointer flex-col items-center text-center",
|
|
97
97
|
t.activeTimeFrame === "weekly" && t.activeIndex === l && "bg-layer-02",
|
|
98
|
-
e.isPadding && "opacity-
|
|
98
|
+
e.isPadding && "opacity-[0.5]"
|
|
99
99
|
),
|
|
100
100
|
onClick: () => h(l, e.fullDate),
|
|
101
101
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"correction-list.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/correction-list.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAM3D,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,oBAAoB,EAAE,CAAA;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpE,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpE;AAMD,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"correction-list.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/correction-list.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAM3D,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,oBAAoB,EAAE,CAAA;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpE,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpE;AAMD,eAAO,MAAM,cAAc,4FAwI1B,CAAA"}
|
|
@@ -1,90 +1,92 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Avatar as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { formatDateWithWeekday as
|
|
8
|
-
import { IconX as
|
|
9
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import * as A from "react";
|
|
3
|
+
import { Fragment as C } from "react";
|
|
4
|
+
import { Avatar as L, AvatarImage as q, AvatarFallback as O } from "@devalok/shilp-sutra/ui";
|
|
5
|
+
import { Tooltip as k, TooltipTrigger as E, TooltipContent as F } from "@devalok/shilp-sutra/ui";
|
|
6
|
+
import { cn as P } from "@devalok/shilp-sutra/ui";
|
|
7
|
+
import { formatDateWithWeekday as R } from "../utils/date-utils.js";
|
|
8
|
+
import { IconX as V, IconCheck as W } from "@tabler/icons-react";
|
|
9
|
+
const Y = A.forwardRef(
|
|
10
10
|
function({
|
|
11
11
|
corrections: p,
|
|
12
12
|
currentUserId: l,
|
|
13
|
-
userImages:
|
|
14
|
-
assetsBaseUrl:
|
|
13
|
+
userImages: j,
|
|
14
|
+
assetsBaseUrl: J,
|
|
15
15
|
activeTimeFrame: X,
|
|
16
16
|
onApproveCorrection: x,
|
|
17
17
|
onRejectCorrection: h
|
|
18
|
-
},
|
|
19
|
-
const
|
|
18
|
+
}, u) {
|
|
19
|
+
const f = async (a, e) => {
|
|
20
20
|
e === "APPROVED" ? await (x == null ? void 0 : x(a.id)) : await (h == null ? void 0 : h(a.id));
|
|
21
21
|
};
|
|
22
|
-
return p.length === 0 ? /* @__PURE__ */
|
|
22
|
+
return p.length === 0 ? /* @__PURE__ */ s("div", { ref: u, className: "p-ds-05 text-center", children: "No pending corrections" }) : /* @__PURE__ */ s(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
ref:
|
|
25
|
+
ref: u,
|
|
26
26
|
className: "flex max-h-[200px] w-full flex-col overflow-y-auto bg-layer-01 px-ds-06 max-md:flex-1 max-md:max-h-none max-md:min-h-[372px] max-md:p-0",
|
|
27
27
|
children: p.map((a) => {
|
|
28
|
-
var e, i, y, N,
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
28
|
+
var e, t, i, y, N, b, g, w, v, D, T;
|
|
29
|
+
return /* @__PURE__ */ s(C, { children: /* @__PURE__ */ d("div", { className: "max-md:border flex items-center justify-between px-ds-03 py-ds-04 max-md:rounded-ds-lg max-md:border-border", children: [
|
|
30
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-ds-04", children: [
|
|
31
|
+
/* @__PURE__ */ d(L, { className: "h-ds-md w-ds-md border-2 max-md:mb-[auto]", children: [
|
|
32
|
+
/* @__PURE__ */ s(
|
|
33
|
+
q,
|
|
34
34
|
{
|
|
35
|
-
src:
|
|
36
|
-
alt: `${(
|
|
35
|
+
src: j[((e = a == null ? void 0 : a.user) == null ? void 0 : e.id) || ""] || "",
|
|
36
|
+
alt: `${(t = a == null ? void 0 : a.user) == null ? void 0 : t.name}'s Icon`
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ s(O, { children: ((y = (i = a == null ? void 0 : a.user) == null ? void 0 : i.name) == null ? void 0 : y[0]) || "U" })
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
a != null && a.reason ? /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ d("div", { className: "flex flex-col gap-ds-02", children: [
|
|
42
|
+
/* @__PURE__ */ s("p", { className: "text-ds-sm text-text-secondary", children: (N = a == null ? void 0 : a.user) == null ? void 0 : N.name }),
|
|
43
|
+
/* @__PURE__ */ d("div", { className: "flex w-full flex-wrap items-center gap-ds-03", children: [
|
|
44
|
+
/* @__PURE__ */ s("p", { className: "text-ds-base font-semibold text-text-primary", children: a == null ? void 0 : a.reason }),
|
|
45
|
+
a != null && a.reason ? /* @__PURE__ */ s("p", { className: "text-ds-base font-semibold text-text-tertiary", children: "•" }) : null,
|
|
46
|
+
/* @__PURE__ */ s("p", { className: "text-ds-base text-text-tertiary", children: R(
|
|
47
47
|
new Date(a == null ? void 0 : a.date)
|
|
48
48
|
) })
|
|
49
49
|
] })
|
|
50
50
|
] })
|
|
51
51
|
] }),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ d("div", { className: "ml-auto flex items-center gap-ds-04 max-md:flex-col max-md:justify-center max-md:gap-0", children: [
|
|
53
|
+
/* @__PURE__ */ s("div", { className: "p-ds-02", children: /* @__PURE__ */ d(k, { delayDuration: 0, children: [
|
|
54
|
+
/* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(
|
|
55
55
|
"button",
|
|
56
56
|
{
|
|
57
|
-
|
|
57
|
+
"aria-label": "Reject correction",
|
|
58
|
+
className: P("rounded-ds-full p-ds-03 text-text-tertiary hover:text-text-secondary", ((b = a == null ? void 0 : a.user) == null ? void 0 : b.id) === l ? "cursor-not-allowed opacity-[0.38]" : ""),
|
|
58
59
|
onClick: () => {
|
|
59
60
|
var m;
|
|
60
|
-
return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l &&
|
|
61
|
+
return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l && f(
|
|
61
62
|
a,
|
|
62
63
|
"REJECTED"
|
|
63
64
|
);
|
|
64
65
|
},
|
|
65
|
-
disabled: ((
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
disabled: ((g = a == null ? void 0 : a.user) == null ? void 0 : g.id) === l,
|
|
67
|
+
children: /* @__PURE__ */ s(V, { className: "h-ico-lg w-ico-lg" })
|
|
67
68
|
}
|
|
68
69
|
) }),
|
|
69
|
-
((
|
|
70
|
+
((w = a == null ? void 0 : a.user) == null ? void 0 : w.id) === l && /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s("p", { children: "You cannot approve/reject your own correction request" }) })
|
|
70
71
|
] }) }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ s("div", { className: "p-ds-02", children: /* @__PURE__ */ d(k, { delayDuration: 0, children: [
|
|
73
|
+
/* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(
|
|
73
74
|
"button",
|
|
74
75
|
{
|
|
75
|
-
|
|
76
|
+
"aria-label": "Approve correction",
|
|
77
|
+
className: P("rounded-ds-full p-ds-03", ((v = a == null ? void 0 : a.user) == null ? void 0 : v.id) === l ? "cursor-not-allowed opacity-[0.38]" : ""),
|
|
76
78
|
onClick: () => {
|
|
77
79
|
var m;
|
|
78
|
-
return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l &&
|
|
80
|
+
return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l && f(
|
|
79
81
|
a,
|
|
80
82
|
"APPROVED"
|
|
81
83
|
);
|
|
82
84
|
},
|
|
83
|
-
disabled: ((
|
|
84
|
-
children: /* @__PURE__ */
|
|
85
|
+
disabled: ((D = a == null ? void 0 : a.user) == null ? void 0 : D.id) === l,
|
|
86
|
+
children: /* @__PURE__ */ s(W, { className: "h-ico-lg w-ico-lg text-text-success" })
|
|
85
87
|
}
|
|
86
88
|
) }),
|
|
87
|
-
((
|
|
89
|
+
((T = a == null ? void 0 : a.user) == null ? void 0 : T.id) === l && /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s("p", { children: "You cannot approve/reject your own correction request" }) })
|
|
88
90
|
] }) })
|
|
89
91
|
] })
|
|
90
92
|
] }) }, a.id);
|
|
@@ -93,7 +95,7 @@ const J = j.forwardRef(
|
|
|
93
95
|
);
|
|
94
96
|
}
|
|
95
97
|
);
|
|
96
|
-
|
|
98
|
+
Y.displayName = "CorrectionList";
|
|
97
99
|
export {
|
|
98
|
-
|
|
100
|
+
Y as CorrectionList
|
|
99
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-header.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/dashboard-header.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAMzC,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAA;IACnC,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;CACnD;AAMD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"dashboard-header.d.ts","sourceRoot":"","sources":["../../../src/admin/dashboard/dashboard-header.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAMzC,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAA;IACnC,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;CACnD;AAMD,eAAO,MAAM,eAAe,6FAkK3B,CAAA"}
|