@feedmepos/mf-hrm-portal 2.4.1 → 2.4.2-dev.2

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.
Files changed (112) hide show
  1. package/dist/{ApprovalCodeList-BgnhS8P1.js → ApprovalCodeList-b8usXKo8.js} +14 -15
  2. package/dist/{AuditLogList-BMEw3z3C.js → AuditLogList-DqbgzFAs.js} +12 -12
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-WeFI9muF.js +459 -0
  4. package/dist/EmployeeList-NM0guUbU.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BCNKeDZY.js +90 -0
  6. package/dist/{GrantUserList-DePGsJq1.js → GrantUserList-B-p8Qghu.js} +15 -16
  7. package/dist/Main-BrhCJsik.js +101 -0
  8. package/dist/{Main-hUOeiddV.js → Main-D_EXStcl.js} +2274 -2280
  9. package/dist/{Main-BX2dD-ti.js → Main-x6An4Vlq.js} +5 -5
  10. package/dist/MyPosProfile-CG1PZ5p4.js +360 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList-BHOjAjHj.js → PermissionSetList-D4Vdbk10.js} +107 -108
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFyGZpKr.js +4212 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CTxqUf16.js +1797 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DUhqZaQv.js +547 -0
  16. package/dist/RoleList-DFcy90mE.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B8dH021B.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DiWJzXvb.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-WJu4dwH_.js → ScheduleGeneralPage-O7ohVH-K.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DvcZjDJA.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DOkdX3vt.js} +187 -186
  20. package/dist/{SchedulePage-BOiSyw9s.js → SchedulePage-WT_Ttars.js} +16 -16
  21. package/dist/{SchedulePositionPage-NR8GaPxx.js → SchedulePositionPage-13qwxMn2.js} +3 -3
  22. package/dist/{SelectFilter-xIFxmOuf.js → SelectFilter-DbE6YV-6.js} +1 -1
  23. package/dist/TeamMemberList-CWfXQcO3.js +2082 -0
  24. package/dist/TimesheetList-Bp2hRf7V.js +408 -0
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-fDOF4GYa.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-_tXql6vR.js} +7 -7
  26. package/dist/{app-DJOt_dse.js → app-D-6Rxcbg.js} +7690 -3886
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-D3J-F40I.js → approval-code-Ba9JpPf4.js} +1 -1
  29. package/dist/{dayjs.min-YpmHqmB1.js → dayjs.min-dCnie4oC.js} +24 -24
  30. package/dist/employee-B5qCkaCi.js +237 -0
  31. package/dist/{grant-user-kU9gjiVw.js → grant-user-Dpla60s_.js} +1 -1
  32. package/dist/{iteration-RLqokZ_t.js → index-D8G0ElDc.js} +573 -558
  33. package/dist/{lodash-C6YpC6VN.js → lodash-CucBZWOa.js} +1 -1
  34. package/dist/member-grant-CZILo1nC.js +54 -0
  35. package/dist/restaurant-CD6RZ8XG.js +49 -0
  36. package/dist/role-54DbS-Cy.js +91 -0
  37. package/dist/rule-DzTp1Kjh.js +845 -0
  38. package/dist/src/api/my-pos-profile/index.d.ts +3 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/helpers/employee-merge.d.ts +33 -0
  47. package/dist/src/helpers/iteration.d.ts +9 -2
  48. package/dist/src/helpers/member-grant.d.ts +36 -0
  49. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  50. package/dist/src/helpers/permission-set.d.ts +1 -102
  51. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  52. package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
  53. package/dist/src/helpers/role-merge.d.ts +11 -0
  54. package/dist/src/helpers/rule.d.ts +2 -2
  55. package/dist/src/helpers/staff-invite.d.ts +54 -0
  56. package/dist/src/helpers/string.d.ts +10 -1
  57. package/dist/src/router/menu-access-guard.d.ts +17 -0
  58. package/dist/src/router/shared.d.ts +3 -1
  59. package/dist/src/stores/restaurant.d.ts +7 -7
  60. package/dist/src/stores/team.d.ts +30 -0
  61. package/dist/src/types/my-pos-profile.d.ts +24 -0
  62. package/dist/src/types/sso-provider.d.ts +10 -0
  63. package/dist/src/types/staff-invite.d.ts +100 -0
  64. package/dist/src/types/team.d.ts +17 -1
  65. package/dist/src/views/audit-log/locales/index.d.ts +12 -0
  66. package/dist/src/views/hr/locales/index.d.ts +20 -0
  67. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  68. package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
  69. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  70. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  71. package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
  72. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  73. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  74. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  75. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  76. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  77. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  78. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  79. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  80. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  81. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  82. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  83. package/dist/src/views/team/locales/index.d.ts +720 -0
  84. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  85. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  86. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  87. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  88. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  89. package/dist/string-DZQ1uNjn.js +22 -0
  90. package/dist/style.css +1 -1
  91. package/dist/tsconfig.app.tsbuildinfo +1 -1
  92. package/dist/{useAppStore-HpBmohxh.js → useAppStore-C_LStOtj.js} +1 -1
  93. package/dist/{useLoading-WAX5d520.js → useLoading-CJ-DUrnR.js} +1 -1
  94. package/dist/{useReportPermissions-C2eS3P4D.js → useReportPermissions-C7TLMKuR.js} +22 -22
  95. package/dist/useSsoProviders-DhmUc7LW.js +41 -0
  96. package/package.json +2 -2
  97. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DNA8eHc4.js +0 -438
  98. package/dist/EmployeeList-BXO4vI9g.js +0 -776
  99. package/dist/FormItem.vue_vue_type_script_setup_true_lang-D69N78Sp.js +0 -45
  100. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  101. package/dist/Main-DNViVR_m.js +0 -96
  102. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  103. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bu7YDHSf.js +0 -4181
  104. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-e6wGaXo3.js +0 -35
  105. package/dist/RoleList-Dx7Bstb_.js +0 -740
  106. package/dist/TeamMemberList-Dro66DME.js +0 -1150
  107. package/dist/TimesheetList-DO3uT60w.js +0 -402
  108. package/dist/employee-DfoS6h1_.js +0 -209
  109. package/dist/restaurant-D30tjUi3.js +0 -2685
  110. package/dist/role-DzH4jGCM.js +0 -91
  111. package/dist/rule-8KZ8d8qL.js +0 -780
  112. package/dist/string-VNuQNweN.js +0 -15
@@ -0,0 +1,408 @@
1
+ import { ref as f, computed as _, toRaw as E, defineComponent as ve, onMounted as he, watch as ee, resolveComponent as p, createElementBlock as N, openBlock as I, Fragment as te, createVNode as s, createElementVNode as i, unref as n, withCtx as D, createCommentVNode as ge, toDisplayString as R, createTextVNode as ye, isRef as we, renderList as be, createBlock as ae, nextTick as _e } from "vue";
2
+ import { d as b } from "./dayjs.min-dCnie4oC.js";
3
+ import { useI18n as xe } from "@feedmepos/mf-common";
4
+ import { useSnackbar as De, components as Se } from "@feedmepos/ui-library";
5
+ import { S as Ve } from "./SelectFilter-DbE6YV-6.js";
6
+ import { _ as ke, a as Ce } from "./app-D-6Rxcbg.js";
7
+ import { _ as Fe } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
+ import { u as Ye } from "./useLoading-CJ-DUrnR.js";
9
+ import { n as Me } from "./string-DZQ1uNjn.js";
10
+ import { u as Te } from "./employee-B5qCkaCi.js";
11
+ import { u as Le } from "./restaurant-CD6RZ8XG.js";
12
+ import { u as Ie } from "./TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-_tXql6vR.js";
13
+ import { g as Re, s as $e } from "./index-D8G0ElDc.js";
14
+ import { f as Be } from "./utils-BZkjJbju.js";
15
+ function Ee(v, a) {
16
+ return ["years", "months"].find((g) => {
17
+ const h = v.startOf(g), r = v.endOf(g);
18
+ return v.isSame(h, "day") && a.isSame(r, "day");
19
+ }) || "days";
20
+ }
21
+ function Oe() {
22
+ const v = {
23
+ startDate: b().format("YYYY-MM-DD"),
24
+ endDate: b().format("YYYY-MM-DD")
25
+ }, a = f(v), u = _(() => {
26
+ if (!a.value) return "No dates selected.";
27
+ const r = a.value.startDate ?? "Start", d = a.value.endDate ?? "End";
28
+ return `${r} - ${d}`;
29
+ }), g = _(() => ({
30
+ startDate: new Date(a.value.startDate),
31
+ endDate: new Date(a.value.endDate)
32
+ }));
33
+ function h(r) {
34
+ const d = b(a.value.startDate), l = b(a.value.endDate), c = Ee(d, l), y = c === "days" ? l.diff(d, "days") + 1 : 1, S = r === "subtract" ? (V) => V.subtract(y, c) : (V) => V.add(y, c);
35
+ a.value = {
36
+ startDate: S(d).startOf(c).format("YYYY-MM-DD"),
37
+ endDate: S(l).endOf(c).format("YYYY-MM-DD")
38
+ };
39
+ }
40
+ return { dateRange: a, parsedDateRange: g, dateRangeLabel: u, setRange: h };
41
+ }
42
+ function P(v) {
43
+ const a = /* @__PURE__ */ new Map();
44
+ for (const u of v)
45
+ a.has(u._id) || a.set(u._id, u);
46
+ return a;
47
+ }
48
+ function Ae(v, a, u, g) {
49
+ const h = P(E(a)), r = P(E(u)), d = g ? new Set(g) : null;
50
+ return E(v).filter((l) => !d || d.has(l.restaurantId)).map((l) => {
51
+ var y;
52
+ const c = r.get(l.user.id);
53
+ return {
54
+ ...l,
55
+ restaurantCode: (y = h.get(l.restaurantId)) == null ? void 0 : y.profile.code,
56
+ user: { ...l.user, code: c ? c.code : "" }
57
+ };
58
+ });
59
+ }
60
+ function Ke(v, a) {
61
+ const u = P(E(a)), g = Object.entries(Re([...v], (h) => h.user.name)).map(([h, r]) => {
62
+ const d = r[0], l = u.get(d.user.id);
63
+ return {
64
+ key: h,
65
+ user: d.user.name,
66
+ code: l ? l.code : d.user.code || "",
67
+ timesheets: r,
68
+ total: Be(r.reduce((c, y) => c + y.totalMin, 0))
69
+ };
70
+ });
71
+ return $e(g, { selector: "user" });
72
+ }
73
+ const Ue = {
74
+ class: "my-16 flex w-[350px] flex-col gap-40"
75
+ }, ze = {
76
+ class: "flex gap-16"
77
+ }, Ne = {
78
+ class: "flex flex-col gap-4"
79
+ }, Pe = {
80
+ class: "fm-typo-body-md-400 text-fm-color-typo-secondary"
81
+ }, je = {
82
+ class: "fm-typo-body-md-700 text-fm-color-typo-primary"
83
+ }, He = {
84
+ class: "flex flex-col gap-8"
85
+ }, Ge = {
86
+ class: "fm-typo-body-xl-700"
87
+ }, qe = {
88
+ class: "flex flex-col gap-24"
89
+ }, Je = {
90
+ class: "flex flex-col gap-8"
91
+ }, Qe = {
92
+ class: "fm-typo-body-xl-700"
93
+ }, We = {
94
+ class: "flex flex-col gap-24"
95
+ }, Xe = {
96
+ key: 0,
97
+ class: "fm-typo-body-sm-400 text-fm-color-typo-error mt-1 flex items-center gap-4"
98
+ }, Ze = {
99
+ class: "flex items-center justify-start gap-8"
100
+ }, et = {
101
+ class: "space-y-8"
102
+ }, tt = {
103
+ class: "flex items-start gap-8 flex-wrap xs:px-16"
104
+ }, at = {
105
+ class: "flex items-center gap-8"
106
+ }, ot = {
107
+ class: "flex h-full flex-col overflow-auto"
108
+ }, st = /* @__PURE__ */ ve({
109
+ __name: "TimesheetList",
110
+ setup(v) {
111
+ const {
112
+ t: a
113
+ } = xe(), u = De(), g = Ye(u), h = [{
114
+ label: a("hr.timesheet.listView"),
115
+ value: "listView"
116
+ }, {
117
+ label: a("hr.timesheet.userView"),
118
+ value: "userView"
119
+ }], r = f("listView"), d = _(() => {
120
+ var t;
121
+ return (t = h.find((e) => e.value === r.value)) == null ? void 0 : t.label;
122
+ }), l = f(""), c = Ie(), y = Te(), S = Le(), V = _(() => y.employees.value), j = _(() => Ae(c.timesheets.value, S.restaurants.value, V.value, U.value)), O = _(() => j.value.filter((t) => {
123
+ var e, m;
124
+ return t.user.name.toLowerCase().includes(l.value.toLowerCase()) || t.restaurantName.toLowerCase().includes(l.value.toLowerCase()) || ((e = t.restaurantCode) == null ? void 0 : e.toLowerCase().includes(l.value.toLowerCase())) || ((m = t.user.code) == null ? void 0 : m.toLowerCase().includes(l.value.toLowerCase()));
125
+ })), H = _(() => Ke(j.value, V.value)), A = _(() => H.value.filter((t) => {
126
+ var e;
127
+ return t.user.toLowerCase().includes(l.value.toLowerCase()) || ((e = t.code) == null ? void 0 : e.toLowerCase().includes(l.value.toLowerCase()));
128
+ })), k = f(!1), K = async () => {
129
+ const {
130
+ startDate: t,
131
+ endDate: e
132
+ } = C.value;
133
+ k.value = !0;
134
+ try {
135
+ await c.readTimesheet(new Date(t), new Date(e)), await _e(), z.value = Object.fromEntries(Object.entries(new Array(H.value.length).fill(!0)));
136
+ } catch (m) {
137
+ u.open({
138
+ title: m instanceof Error ? m.message : `${m}`,
139
+ type: "error"
140
+ });
141
+ } finally {
142
+ k.value = !1;
143
+ }
144
+ };
145
+ he(async () => {
146
+ try {
147
+ await S.readRestaurants(), y.employees.value.length === 0 && await y.readEmployees();
148
+ } catch (t) {
149
+ console.error("Failed to load timesheet dependencies:", t), u.open({
150
+ message: t instanceof Error ? t.message : String(t),
151
+ type: "error"
152
+ });
153
+ }
154
+ K();
155
+ });
156
+ const U = f(), oe = _(() => S.restaurants.value.filter((t) => t.managable).map((t) => ({
157
+ label: `${t.profile.code ? `${t.profile.code} - ` : ""}${t.profile.name}`,
158
+ value: t._id
159
+ }))), {
160
+ dateRange: C,
161
+ dateRangeLabel: se,
162
+ setRange: G
163
+ } = Oe();
164
+ ee(C, async () => {
165
+ K();
166
+ });
167
+ const le = [{
168
+ accessorKey: "user.code",
169
+ size: 100,
170
+ header: () => a("hr.employee.columns.code"),
171
+ cell: (t) => t.row.original.user.code || "--",
172
+ enableSorting: !0
173
+ }, {
174
+ accessorKey: "user",
175
+ header: () => a("hr.timesheet.columns.name"),
176
+ cell: (t) => t.row.original.user.name,
177
+ enableSorting: !1
178
+ }, {
179
+ accessorKey: "restaurantName",
180
+ header: () => a("hr.timesheet.columns.restaurant"),
181
+ cell: (t) => {
182
+ const e = t.row.original.restaurantCode, m = t.row.original.restaurantName;
183
+ return `${e ? e + " - " : ""}${m}`;
184
+ },
185
+ enableSorting: !0
186
+ }, {
187
+ accessorKey: "start",
188
+ header: () => a("hr.timesheet.columns.start"),
189
+ cell: (t) => t.row.original.start || "--",
190
+ enableSorting: !0
191
+ }, {
192
+ accessorKey: "end",
193
+ header: () => a("hr.timesheet.columns.end"),
194
+ cell: (t) => t.row.original.end || "--",
195
+ enableSorting: !0
196
+ }, {
197
+ name: "duration",
198
+ accessorKey: "duration",
199
+ header: () => a("hr.timesheet.columns.duration"),
200
+ cell: (t) => t.row.original.duration || "--",
201
+ enableSorting: !0
202
+ }], z = f({}), ne = [{
203
+ accessorKey: "code",
204
+ size: 100,
205
+ header: () => a("hr.employee.columns.code"),
206
+ cell: (t) => t.row.original.code,
207
+ enableSorting: !1
208
+ }, {
209
+ accessorKey: "user",
210
+ header: () => a("hr.timesheet.columns.name"),
211
+ cell: (t) => {
212
+ const e = t.row.original;
213
+ if (typeof e.user == "string") {
214
+ const m = t.row.getIsExpanded();
215
+ return s("div", {
216
+ class: "flex items-center gap-8"
217
+ }, [s("div", {
218
+ onClick: (x) => {
219
+ x.stopPropagation(), t.row.getToggleExpandedHandler()(x);
220
+ }
221
+ }, [s(Se.FmButton, {
222
+ variant: "tertiary",
223
+ icon: m ? "keyboard_arrow_up" : "keyboard_arrow_down"
224
+ }, null)]), e.user]);
225
+ }
226
+ },
227
+ enableSorting: !1
228
+ }, {
229
+ accessorKey: "start",
230
+ header: () => a("hr.timesheet.columns.start"),
231
+ cell: (t) => {
232
+ const e = t.row.original;
233
+ return (e == null ? void 0 : e.start) || "--";
234
+ },
235
+ enableSorting: !1
236
+ }, {
237
+ accessorKey: "end",
238
+ header: () => a("hr.timesheet.columns.end"),
239
+ cell: (t) => {
240
+ const e = t.row.original;
241
+ return (e == null ? void 0 : e.end) || "--";
242
+ },
243
+ enableSorting: !1
244
+ }, {
245
+ name: "duration",
246
+ accessorKey: "duration",
247
+ header: () => a("hr.timesheet.columns.hourMinute"),
248
+ cell: (t) => {
249
+ const e = t.row.original;
250
+ return e.total ? `Total: ${e.total}` : e.duration;
251
+ },
252
+ enableSorting: !1
253
+ }], F = f(!1);
254
+ function q(t) {
255
+ w.value = t, Y.value = b(w.value.startedAt).format("YYYY-MM-DD"), T.value = b(w.value.endedAt || w.value.startedAt).format("YYYY-MM-DD"), M.value = b(w.value.startedAt).format("HH:mm"), L.value = b(w.value.endedAt || w.value.startedAt).format("HH:mm"), F.value = !0;
256
+ }
257
+ const Y = f(), M = f(), T = f(), L = f(), w = f(), $ = f("");
258
+ async function re() {
259
+ const t = J(Y.value, M.value), e = J(T.value, L.value);
260
+ if (b(t).isAfter(e)) {
261
+ $.value = a("hr.timesheet.checkOutMustBeforeCheckIn");
262
+ return;
263
+ }
264
+ g.minor(async () => {
265
+ await c.updateTimesheet(w.value, t, e);
266
+ }, {
267
+ successMessage: a("hr.timesheet.update.successMessage")
268
+ }), K(), F.value = !1;
269
+ }
270
+ const J = (t, e) => b(t).set("h", parseInt(e.split(":")[0])).set("m", parseInt(e.split(":")[1])).toISOString();
271
+ return ee([Y, T, M, L], ([t, e, m, x]) => {
272
+ (t || e || m || x) && ($.value = "");
273
+ }), (t, e) => {
274
+ const m = p("FmAvatar"), x = p("FmDatePicker"), Q = p("FmTimePicker"), ie = p("FmIcon"), B = p("FmButton"), ue = p("FmSideSheet"), W = p("FmChip"), de = p("FmDateRangePicker"), ce = p("FmMenuItem"), me = p("FmMenu"), pe = p("FmSpacer"), fe = p("FmSearch"), X = p("FmTable");
275
+ return I(), N(te, null, [s(ue, {
276
+ modelValue: F.value,
277
+ "onUpdate:modelValue": e[5] || (e[5] = (o) => F.value = o),
278
+ "dismiss-away": "",
279
+ header: n(a)("hr.timesheet.update.title")
280
+ }, {
281
+ "side-sheet-footer": D(() => [i("div", Ze, [s(B, {
282
+ label: n(a)("common.update"),
283
+ size: "md",
284
+ variant: "primary",
285
+ onClick: re
286
+ }, null, 8, ["label"]), s(B, {
287
+ label: n(a)("common.cancel"),
288
+ size: "md",
289
+ variant: "secondary",
290
+ onClick: e[4] || (e[4] = (o) => F.value = !1)
291
+ }, null, 8, ["label"])])]),
292
+ default: D(() => [i("div", Ue, [i("div", ze, [s(m, {
293
+ name: w.value.user.name,
294
+ initials: n(Me)(w.value.user.name),
295
+ size: "lg"
296
+ }, null, 8, ["name", "initials"]), i("div", Ne, [i("div", Pe, R(n(a)("hr.timesheet.employeeName")), 1), i("div", je, R(w.value.user.name), 1)])]), i("div", He, [i("div", Ge, R(n(a)("hr.timesheet.update.checkIn")), 1), i("div", qe, [s(x, {
297
+ modelValue: Y.value,
298
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => Y.value = o),
299
+ disabled: !1,
300
+ label: n(a)("hr.timesheet.update.date")
301
+ }, null, 8, ["modelValue", "label"]), s(Q, {
302
+ modelValue: M.value,
303
+ "onUpdate:modelValue": e[1] || (e[1] = (o) => M.value = o),
304
+ label: n(a)("hr.timesheet.update.time")
305
+ }, null, 8, ["modelValue", "label"])])]), i("div", Je, [i("div", Qe, R(n(a)("hr.timesheet.update.checkOut")), 1), i("div", We, [s(x, {
306
+ modelValue: T.value,
307
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => T.value = o),
308
+ disabled: !1,
309
+ label: n(a)("hr.timesheet.update.date")
310
+ }, null, 8, ["modelValue", "label"]), s(Q, {
311
+ modelValue: L.value,
312
+ "onUpdate:modelValue": e[3] || (e[3] = (o) => L.value = o),
313
+ label: n(a)("hr.timesheet.update.time")
314
+ }, null, 8, ["modelValue", "label"])])]), $.value ? (I(), N("div", Xe, [s(ie, {
315
+ color: "#FF3B30",
316
+ name: "error",
317
+ size: "sm"
318
+ }), ye(" " + R($.value), 1)])) : ge("", !0)])]),
319
+ _: 1
320
+ }, 8, ["modelValue", "header"]), i("div", et, [i("div", tt, [s(Ve, {
321
+ modelValue: U.value,
322
+ "onUpdate:modelValue": e[6] || (e[6] = (o) => U.value = o),
323
+ multiple: "",
324
+ items: oe.value,
325
+ variant: "dark",
326
+ "selected-prefix": n(a)("hr.role.columns.restaurants"),
327
+ placeholder: n(a)("hr.role.columns.restaurants"),
328
+ class: "!w-auto pt-[3px]"
329
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div", at, [s(de, {
330
+ modelValue: n(C),
331
+ "onUpdate:modelValue": e[7] || (e[7] = (o) => we(C) ? C.value = o : null),
332
+ "show-predefined-range": ""
333
+ }, {
334
+ "trigger-button": D(() => [s(W, {
335
+ label: n(se)
336
+ }, null, 8, ["label"])]),
337
+ _: 1
338
+ }, 8, ["modelValue"]), s(B, {
339
+ icon: "chevron_left",
340
+ variant: "tertiary",
341
+ onClick: e[8] || (e[8] = (o) => n(G)("subtract"))
342
+ }), s(B, {
343
+ icon: "chevron_right",
344
+ variant: "tertiary",
345
+ onClick: e[9] || (e[9] = (o) => n(G)("add"))
346
+ })]), s(me, {
347
+ class: "pt-[3px]"
348
+ }, {
349
+ "menu-button": D(() => [s(W, {
350
+ label: d.value,
351
+ "right-icon": "keyboard_arrow_down"
352
+ }, null, 8, ["label"])]),
353
+ default: D(() => [(I(), N(te, null, be(h, (o) => s(ce, {
354
+ key: o.value,
355
+ label: o.label,
356
+ onClick: (Z) => r.value = o.value
357
+ }, null, 8, ["label", "onClick"])), 64))]),
358
+ _: 1
359
+ }), s(pe), s(fe, {
360
+ modelValue: l.value,
361
+ "onUpdate:modelValue": e[10] || (e[10] = (o) => l.value = o),
362
+ class: "w-[320px]",
363
+ placeholder: n(a)("hr.timesheet.search.placeholder")
364
+ }, null, 8, ["modelValue", "placeholder"])]), s(ke, {
365
+ class: "w-full xs:px-16"
366
+ }, {
367
+ default: D(() => [i("div", ot, [s(Fe, {
368
+ "is-loading": k.value,
369
+ "is-empty": r.value === "listView" ? O.value.length === 0 : A.value.length === 0,
370
+ "collapse-at": !1,
371
+ title: n(a)("hr.timesheet.noData.title"),
372
+ subtitle: ""
373
+ }, {
374
+ default: D(() => [r.value === "listView" ? (I(), ae(X, {
375
+ key: 0,
376
+ class: "min-w-[640px]",
377
+ "column-defs": le,
378
+ "row-data": O.value,
379
+ "page-size": O.value.length,
380
+ loading: k.value,
381
+ "pin-header-row": "",
382
+ "hide-footer": "",
383
+ "shrink-at": !1,
384
+ onRowClick: e[11] || (e[11] = (o) => q(o.original))
385
+ }, null, 8, ["row-data", "page-size", "loading"])) : (I(), ae(X, {
386
+ key: 1,
387
+ class: "min-w-[640px] timesheet-user-view",
388
+ "column-defs": ne,
389
+ "row-data": A.value,
390
+ "page-size": A.value.reduce((o, Z) => o + 1 + Z.timesheets.length, 0),
391
+ loading: k.value,
392
+ "pin-header-row": "",
393
+ "shrink-at": !1,
394
+ "expanded-state": z.value,
395
+ "get-sub-row": (o) => o.timesheets,
396
+ "onUpdate:expandedState": e[12] || (e[12] = (o) => z.value = o),
397
+ onRowClick: e[13] || (e[13] = (o) => q(o.original))
398
+ }, null, 8, ["row-data", "page-size", "loading", "expanded-state", "get-sub-row"]))]),
399
+ _: 1
400
+ }, 8, ["is-loading", "is-empty", "title"])])]),
401
+ _: 1
402
+ })])], 64);
403
+ };
404
+ }
405
+ }), wt = /* @__PURE__ */ Ce(st, [["__scopeId", "data-v-ffd7f807"]]);
406
+ export {
407
+ wt as default
408
+ };
@@ -1,12 +1,12 @@
1
- import { d as i } from "./dayjs.min-YpmHqmB1.js";
1
+ import { d as i } from "./dayjs.min-dCnie4oC.js";
2
2
  import { defineStore as p, storeToRefs as T } from "pinia";
3
3
  import { ref as l } from "vue";
4
- import { b as c, g as y } from "./restaurant-D30tjUi3.js";
5
- import { s as S } from "./iteration-RLqokZ_t.js";
4
+ import { b as c, g as S } from "./app-D-6Rxcbg.js";
5
+ import { s as y } from "./index-D8G0ElDc.js";
6
6
  import { i as f, f as g } from "./utils-BZkjJbju.js";
7
7
  const u = {
8
8
  async readTimesheets(t, e) {
9
- return y(await c().get(`timesheet?start=${t}&end=${e}`));
9
+ return S(await c().get(`timesheet?start=${t}&end=${e}`));
10
10
  },
11
11
  async updateTimesheet(t, e) {
12
12
  await c().put(`timesheet/${t}`, e);
@@ -23,9 +23,9 @@ function A(t) {
23
23
  duration: h
24
24
  };
25
25
  });
26
- return S(e, { selector: "start" });
26
+ return y(e, { selector: "start" });
27
27
  }
28
- const D = p("hrm-timesheet", () => {
28
+ const w = p("hrm-timesheet", () => {
29
29
  const t = l([]);
30
30
  async function e(s, r) {
31
31
  const a = await u.readTimesheets(
@@ -47,7 +47,7 @@ const D = p("hrm-timesheet", () => {
47
47
  updateTimesheet: n
48
48
  };
49
49
  }), b = () => {
50
- const t = D();
50
+ const t = w();
51
51
  return {
52
52
  ...t,
53
53
  ...T(t)