@feedmepos/mf-hrm-portal 2.2.5-dev → 2.2.5-dev.10

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 (167) hide show
  1. package/dist/{ApprovalCodeList-DgcWZ3SZ.js → ApprovalCodeList-BsDMMSIz.js} +4 -4
  2. package/dist/{AuditLogList-vWKMMGvd.js → AuditLogList-CGNZdtmn.js} +18 -17
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DuhXogXK.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C6MoToqi.js} +2 -2
  4. package/dist/EmployeeList-B_OuDWWQ.js +787 -0
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js} +1 -1
  6. package/dist/{GrantUserList-BAW0C1bA.js → GrantUserList-Bd0lXmFo.js} +5 -5
  7. package/dist/{Main-NzpdRNB3.js → Main-B66lSeOv.js} +5 -5
  8. package/dist/{Main-Wr6cTqfM.js → Main-CzHSNHsH.js} +2 -2
  9. package/dist/{Main-B7Nn8CLQ.js → Main-njRQ1tFk.js} +9 -9
  10. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  11. package/dist/{PermissionSetList-D6AFOleD.js → PermissionSetList-GTI6Cwj5.js} +18 -18
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bzq2_BMn.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C-QEQ-js.js} +1052 -1052
  13. package/dist/{RoleList-BuqpmXn_.js → RoleList-CmHgtM0m.js} +7 -7
  14. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-SFqxftRx.js +426 -0
  15. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js +690 -0
  16. package/dist/ScheduleGeneralPage-DxFxJN5j.js +320 -0
  17. package/dist/SchedulePage-cJDI3-E7.js +14647 -0
  18. package/dist/SchedulePositionPage-n1wUShIM.js +293 -0
  19. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
  20. package/dist/SelectFilter-CG13h83-.js +264 -0
  21. package/dist/TeamMemberList-ByZt3VqN.js +1154 -0
  22. package/dist/{TimesheetList-B5FyVyCz.js → TimesheetList-Dv0-W--W.js} +54 -53
  23. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C99Jr6Ax.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIo6h5-a.js} +2 -2
  24. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  25. package/dist/{app-8samJY5z.js → app-SCXGJ95F.js} +3146 -2553
  26. package/dist/app.js +1 -1
  27. package/dist/{dayjs.min-Ba4X_9nY.js → dayjs.min-DqMLPYv-.js} +1 -1
  28. package/dist/{employee-BcFgm8Rt.js → employee-DT_xYQkz.js} +3 -3
  29. package/dist/{iteration-Dhdew1jW.js → iteration-B5dB9ecy.js} +1 -1
  30. package/dist/{lodash-CJ3mHku0.js → lodash-CRHFapxI.js} +1 -1
  31. package/dist/{role-BViYS7RK.js → role-CJm8pXaw.js} +1 -1
  32. package/dist/{rule-Dxt1ZSQS.js → rule-AJm-eVzJ.js} +276 -272
  33. package/dist/src/api/schedule/index.d.ts +41 -0
  34. package/dist/src/components/form/OutletRoleAssignment.vue.d.ts +16 -0
  35. package/dist/src/components/layout/AppSidebar.vue.d.ts +2 -0
  36. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  37. package/dist/src/components/layout/withShell.d.ts +14 -0
  38. package/dist/src/helpers/outlet-role-assignment.d.ts +40 -0
  39. package/dist/src/helpers/rule.d.ts +15 -0
  40. package/dist/src/router/shared.d.ts +4 -1
  41. package/dist/src/types/schedule.d.ts +232 -0
  42. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  43. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  44. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  45. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  46. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +10 -0
  47. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  48. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  49. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  50. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  51. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  52. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  53. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +22 -0
  54. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +34 -0
  55. package/dist/src/views/scheduling/components/ScheduleAssignEmployeePopover.vue.d.ts +6 -0
  56. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
  57. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  58. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  59. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +24 -0
  60. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  61. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  62. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  63. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +12 -0
  64. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  65. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  66. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  67. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  68. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  69. package/dist/src/views/scheduling/components/ScheduleEmployeeMenu.vue.d.ts +6 -0
  70. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  71. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  72. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  73. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  74. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +8 -0
  75. package/dist/src/views/scheduling/components/ScheduleLegendBar.vue.d.ts +6 -0
  76. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +12 -0
  77. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  78. package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +14 -0
  79. package/dist/src/views/scheduling/components/SchedulePdfPreview.vue.d.ts +6 -0
  80. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  81. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  82. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +54 -0
  83. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  84. package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +12 -0
  85. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  86. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  87. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  88. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +6 -0
  89. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  90. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  91. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  92. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  93. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +14 -0
  94. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +18 -0
  95. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +60 -0
  96. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  97. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  98. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  99. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  100. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +72 -0
  101. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +38 -0
  102. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +29 -0
  103. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  104. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  105. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +14 -0
  106. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +10 -0
  107. package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
  108. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  109. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +98 -0
  110. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +73 -0
  111. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +77 -0
  112. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  113. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +18 -0
  114. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +122 -0
  115. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +143 -0
  116. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +426 -0
  117. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  118. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +18 -0
  119. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +19 -0
  120. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +43 -0
  121. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +48 -0
  122. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +77 -0
  123. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +76 -0
  124. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +45 -0
  125. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +145 -0
  126. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +22 -0
  127. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +41 -0
  128. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
  129. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  130. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +26 -0
  131. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  132. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +82 -0
  133. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +70 -0
  134. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  135. package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +35 -0
  136. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1316 -0
  137. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +23 -0
  138. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +20 -0
  139. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
  140. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +32 -0
  141. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +93 -0
  142. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  143. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +189 -0
  144. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +54 -0
  145. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +18 -0
  146. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +163 -0
  147. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +181 -0
  148. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +23 -0
  149. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +25 -0
  150. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  151. package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +10 -0
  152. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  153. package/dist/src/views/scheduling/data.d.ts +110 -0
  154. package/dist/src/views/scheduling/locales/index.d.ts +496 -0
  155. package/dist/src/views/scheduling/schedule-store.d.ts +151 -0
  156. package/dist/src/views/scheduling/types.d.ts +324 -0
  157. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  158. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  159. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +12 -3
  160. package/dist/style.css +1 -1
  161. package/dist/tsconfig.app.tsbuildinfo +1 -1
  162. package/dist/{useReportPermissions-BiyAfGvZ.js → useReportPermissions-Cg3lV70m.js} +3 -3
  163. package/package.json +1 -1
  164. package/dist/EmployeeList-Cu4RxVQX.js +0 -889
  165. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-BUI0Xsgc.js +0 -85
  166. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  167. package/dist/TeamMemberList-M6HA9BWu.js +0 -1248
@@ -0,0 +1,787 @@
1
+ import { toRaw as Ke, defineComponent as Fe, ref as v, computed as h, watch as X, resolveComponent as E, createElementBlock as ee, openBlock as g, Fragment as Ie, renderSlot as Ge, createVNode as i, unref as l, withCtx as y, createElementVNode as f, createBlock as I, createCommentVNode as j, toDisplayString as q, onUnmounted as Be, isRef as we, normalizeClass as ke, createTextVNode as ge, withModifiers as je, resolveDynamicComponent as qe, h as ie } from "vue";
2
+ import { useI18n as Re, useCoreStore as He } from "@feedmepos/mf-common";
3
+ import { useSnackbar as Me, components as $e, useDialog as Je, useBreakpoints as We } from "@feedmepos/ui-library";
4
+ import { S as ue } from "./SelectFilter-CG13h83-.js";
5
+ import { _ as Qe, a as Ye } from "./app-SCXGJ95F.js";
6
+ import { _ as xe, u as Ze, H as Xe } from "./FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js";
7
+ import { u as ea, _ as aa } from "./useDiscardConfirm-DPhEV6v0.js";
8
+ import { _ as la } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
+ import { s as sa, _ as ta, a as oa, b as ra, c as Ee } from "./PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js";
10
+ import { u as na } from "./useDebounce-B8ZPVS5C.js";
11
+ import { n as ia } from "./string-VNuQNweN.js";
12
+ import { u as Le, E as ua } from "./employee-DT_xYQkz.js";
13
+ import { u as Pe } from "./restaurant-BTpBmfBV.js";
14
+ import { l as ca } from "./lodash-CRHFapxI.js";
15
+ import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
16
+ import { u as De } from "./useLoading-CXzTpIVv.js";
17
+ import { u as he } from "./role-CJm8pXaw.js";
18
+ /* empty css */
19
+ import { _ as ma } from "./_plugin-vue_export-helper-CHgC5LLL.js";
20
+ function Se($) {
21
+ return JSON.parse(JSON.stringify($));
22
+ }
23
+ function Ce($) {
24
+ if (typeof structuredClone > "u")
25
+ return Se($);
26
+ try {
27
+ return structuredClone(Ke($));
28
+ } catch {
29
+ return Se($);
30
+ }
31
+ }
32
+ const da = { class: "flex w-full items-center justify-between" }, pa = { class: "fm-typo-en-title-md-600" }, fa = { class: "space-y-40" }, va = { class: "flex flex-row gap-16" }, ya = { class: "space-y-16" }, ga = { class: "flex gap-8 items-center justify-start" }, Ue = 4, ha = /* @__PURE__ */ Fe({
33
+ __name: "EmployeeForm",
34
+ props: {
35
+ roleErrorMessage: {
36
+ type: String,
37
+ default: ""
38
+ }
39
+ },
40
+ emits: ["submitted"],
41
+ setup($, { expose: ce, emit: n }) {
42
+ const k = he(), d = Pe(), C = Le(), me = Me(), U = De(me), de = n, { t: c } = Re(), V = v(!1), R = v(!0);
43
+ function O() {
44
+ return {
45
+ restaurantId: "",
46
+ roleId: ""
47
+ };
48
+ }
49
+ function pe(u) {
50
+ if (!u) return _();
51
+ const o = Ce(u);
52
+ return {
53
+ code: o.code ?? "",
54
+ isMasterUser: o.isMasterUser ?? !1,
55
+ name: o.name ?? "",
56
+ passcode: o.passcode ?? "",
57
+ restaurants: o.restaurants.length > 0 ? o.restaurants.map(({ restaurantId: w, roleId: S }) => ({
58
+ restaurantId: w,
59
+ roleId: S
60
+ })) : [O()]
61
+ };
62
+ }
63
+ const ae = (u) => {
64
+ s.value = pe(u), b.value = Ce(s.value), J.value = u == null ? void 0 : u._id, F.value = [], s.value.passcode ? (F.value = s.value.passcode.split(""), P.value = !0) : P.value = !1, R.value = !u, V.value = !0;
65
+ };
66
+ function _() {
67
+ return {
68
+ code: "",
69
+ isMasterUser: !1,
70
+ name: "",
71
+ passcode: "",
72
+ restaurants: [O()]
73
+ };
74
+ }
75
+ const T = h(() => R.value ? c("hr.employee.form.add") : c("hr.employee.form.update")), H = h(() => R.value ? c("common.create") : c("common.update")), b = v(_()), s = v(_()), J = v(void 0), L = h(
76
+ () => sa(s.value.restaurants)
77
+ );
78
+ function le(u) {
79
+ var o;
80
+ return u ? !((o = d.restaurants.value.find((w) => w._id === u)) != null && o.managable) : !1;
81
+ }
82
+ function se(u) {
83
+ return u.isUsable;
84
+ }
85
+ const F = v([]), P = v(!1), z = v(!1), W = v(!1), te = h(() => L.value.length > 0);
86
+ async function D() {
87
+ if (te.value)
88
+ try {
89
+ const u = await U.custom(
90
+ () => ua.generateEmployeePasscode({
91
+ restaurantIds: L.value,
92
+ excludePosUserId: J.value
93
+ }),
94
+ { isLoading: W }
95
+ );
96
+ P.value = !1, F.value = u.split(""), s.value.passcode = u;
97
+ } catch {
98
+ }
99
+ }
100
+ const K = ea(
101
+ () => !ca.isEqual(s.value, b.value),
102
+ () => {
103
+ V.value = !1;
104
+ }
105
+ );
106
+ async function fe() {
107
+ const u = {
108
+ user: {
109
+ name: s.value.name,
110
+ passcode: s.value.passcode,
111
+ code: s.value.code
112
+ },
113
+ roles: s.value.restaurants
114
+ };
115
+ s.value.isMasterUser ? await C.createMasterEmployee(u) : (delete u.user.code, await C.createEmployee(u));
116
+ }
117
+ async function Q() {
118
+ var S, M;
119
+ const u = b.value, o = J.value, w = {
120
+ user: {
121
+ name: s.value.name,
122
+ passcode: s.value.passcode
123
+ },
124
+ roles: s.value.restaurants,
125
+ previousRoles: (S = u.restaurants) == null ? void 0 : S.map((x) => ({
126
+ restaurantId: x.restaurantId,
127
+ roleId: x.roleId
128
+ }))
129
+ };
130
+ if (!s.value.isMasterUser)
131
+ await C.updateEmployee(o, w);
132
+ else {
133
+ const x = {
134
+ user: {
135
+ name: s.value.name,
136
+ passcode: s.value.passcode,
137
+ code: s.value.code
138
+ },
139
+ roles: s.value.restaurants,
140
+ previousRoles: (M = u.restaurants) == null ? void 0 : M.map((N) => ({
141
+ restaurantId: N.restaurantId,
142
+ roleId: N.roleId
143
+ }))
144
+ };
145
+ b.value.isMasterUser ? await C.updateMasterEmployee(o, x) : await C.migrateToMasterUser(o, x);
146
+ }
147
+ }
148
+ async function G() {
149
+ R.value ? await U.minor(
150
+ async () => {
151
+ await fe();
152
+ },
153
+ {
154
+ successMessage: c("hr.employee.create.successMessage"),
155
+ isLoading: z
156
+ }
157
+ ) : await U.minor(
158
+ async () => {
159
+ await Q();
160
+ },
161
+ {
162
+ successMessage: c("hr.employee.update.successMessage"),
163
+ isLoading: z
164
+ }
165
+ ), de("submitted"), V.value = !1;
166
+ }
167
+ return X(
168
+ () => V.value,
169
+ (u) => {
170
+ }
171
+ ), ce({
172
+ show: V,
173
+ trigger: ae
174
+ }), (u, o) => {
175
+ const w = E("FmIcon"), S = E("FmSwitch"), M = E("FmTextField"), x = E("FmFormGroup"), N = E("fm-button"), oe = E("fm-side-sheet");
176
+ return g(), ee(Ie, null, [
177
+ Ge(u.$slots, "default", { trigger: ae }),
178
+ i(oe, {
179
+ id: "unit-form",
180
+ modelValue: V.value,
181
+ "onUpdate:modelValue": o[9] || (o[9] = (t) => V.value = t),
182
+ "is-container": l($e).FmForm,
183
+ "is-container-props": {
184
+ onValidationSuccess: G,
185
+ blameFormChildOnValidationFailed: !0
186
+ },
187
+ "max-width": 960,
188
+ "close-button": !1,
189
+ "onOn:clickedAway": l(K)
190
+ }, {
191
+ "side-sheet-header": y(() => [
192
+ f("div", da, [
193
+ f("p", pa, q(T.value), 1),
194
+ i(w, {
195
+ name: "close",
196
+ size: "md",
197
+ class: "cursor-pointer",
198
+ onClick: l(K)
199
+ }, null, 8, ["onClick"])
200
+ ])
201
+ ]),
202
+ "side-sheet-footer": y(() => [
203
+ f("div", ga, [
204
+ i(N, {
205
+ label: H.value,
206
+ size: "lg",
207
+ type: "submit",
208
+ variant: "primary",
209
+ disabled: z.value
210
+ }, null, 8, ["label", "disabled"]),
211
+ i(N, {
212
+ label: l(c)("common.cancel"),
213
+ size: "lg",
214
+ variant: "tertiary",
215
+ disabled: z.value,
216
+ onClick: l(K)
217
+ }, null, 8, ["label", "disabled", "onClick"])
218
+ ])
219
+ ]),
220
+ default: y(() => [
221
+ f("div", fa, [
222
+ i(Ve, {
223
+ title: l(c)("hr.employee.form.employeeSetting")
224
+ }, {
225
+ default: y(() => [
226
+ i(xe, {
227
+ label: l(c)("hr.employee.form.masterUserConfig")
228
+ }, {
229
+ default: y(() => [
230
+ i(S, {
231
+ modelValue: s.value.isMasterUser,
232
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.isMasterUser = t),
233
+ value: "masterUser",
234
+ label: l(c)("hr.employee.form.masterUser"),
235
+ sublabel: l(c)("hr.employee.form.masterUserSublabel"),
236
+ "label-placement": "right"
237
+ }, null, 8, ["modelValue", "label", "sublabel"])
238
+ ]),
239
+ _: 1
240
+ }, 8, ["label"]),
241
+ f("div", va, [
242
+ s.value.isMasterUser ? (g(), I(M, {
243
+ key: 0,
244
+ modelValue: s.value.code,
245
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.code = t),
246
+ label: l(c)("hr.employee.form.code")
247
+ }, null, 8, ["modelValue", "label"])) : j("", !0),
248
+ i(M, {
249
+ modelValue: s.value.name,
250
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.name = t),
251
+ class: "w-full",
252
+ label: l(c)("hr.employee.form.name"),
253
+ rules: [(t) => !!t || l(c)("hr.employee.form.required")]
254
+ }, null, 8, ["modelValue", "label", "rules"])
255
+ ]),
256
+ i(xe, {
257
+ label: l(c)("hr.employee.form.passcode")
258
+ }, {
259
+ default: y(() => [
260
+ f("div", ya, [
261
+ i(x, {
262
+ modelValue: F.value,
263
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => F.value = t),
264
+ rules: [
265
+ (t) => (t == null ? void 0 : t.filter((B) => !!B).length) !== Ue ? l(c)("hr.employee.form.passcodeRequired") : !0
266
+ ]
267
+ }, {
268
+ default: y(() => [
269
+ i(ta, {
270
+ modelValue: F.value,
271
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => F.value = t),
272
+ masked: P.value,
273
+ "onUpdate:masked": o[4] || (o[4] = (t) => P.value = t),
274
+ length: Ue,
275
+ "toggle-label": l(c)("hr.employee.form.passcodeToggleVisibility"),
276
+ onComplete: o[5] || (o[5] = (t) => s.value.passcode = t)
277
+ }, null, 8, ["modelValue", "masked", "toggle-label"])
278
+ ]),
279
+ _: 1
280
+ }, 8, ["modelValue", "rules"]),
281
+ i(oa, {
282
+ label: l(c)("hr.employee.form.passcodeGenerate"),
283
+ hint: l(c)("hr.employee.form.passcodeSelectOutletFirst"),
284
+ loading: W.value,
285
+ disabled: !te.value,
286
+ onClick: D
287
+ }, null, 8, ["label", "hint", "loading", "disabled"])
288
+ ])
289
+ ]),
290
+ _: 1
291
+ }, 8, ["label"])
292
+ ]),
293
+ _: 1
294
+ }, 8, ["title"]),
295
+ i(Ve, null, {
296
+ default: y(() => [
297
+ i(x, {
298
+ modelValue: s.value.restaurants,
299
+ "onUpdate:modelValue": o[8] || (o[8] = (t) => s.value.restaurants = t),
300
+ tag: "div",
301
+ rules: [
302
+ (t) => t.length > 0 || l(c)("hr.employee.form.atLeastOneRestaurant"),
303
+ (t) => t.every((B) => B.restaurantId && B.roleId) || l(c)("hr.employee.form.roleRequired")
304
+ ]
305
+ }, {
306
+ default: y(() => [
307
+ i(ra, {
308
+ modelValue: s.value.restaurants,
309
+ "onUpdate:modelValue": o[7] || (o[7] = (t) => s.value.restaurants = t),
310
+ restaurants: l(d).restaurants.value,
311
+ roles: l(k).roles.value,
312
+ "is-role-usable": se,
313
+ "is-restaurant-locked": le,
314
+ "create-row": O,
315
+ title: l(c)("hr.employee.form.assignmentSection"),
316
+ "restaurant-label": l(c)("hr.employee.columns.restaurants"),
317
+ "role-label": l(c)("hr.employee.form.role"),
318
+ "add-label": l(c)("hr.employee.form.addAnother"),
319
+ "remove-label": l(c)("common.remove")
320
+ }, null, 8, ["modelValue", "restaurants", "roles", "title", "restaurant-label", "role-label", "add-label", "remove-label"])
321
+ ]),
322
+ _: 1
323
+ }, 8, ["modelValue", "rules"])
324
+ ]),
325
+ _: 1
326
+ })
327
+ ])
328
+ ]),
329
+ _: 1
330
+ }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
331
+ ], 64);
332
+ };
333
+ }
334
+ }), _a = {
335
+ class: "space-y-8"
336
+ }, ba = {
337
+ key: 0,
338
+ class: "flex w-full items-start justify-between"
339
+ }, wa = {
340
+ class: "flex items-start gap-8"
341
+ }, ka = {
342
+ class: "flex"
343
+ }, xa = {
344
+ key: 1,
345
+ class: "space-y-4"
346
+ }, Ea = {
347
+ class: "px-16"
348
+ }, Va = {
349
+ class: "px-16 flex items-start gap-8"
350
+ }, Sa = {
351
+ class: "flex h-full flex-col overflow-auto"
352
+ }, Ca = {
353
+ class: "space-y-4"
354
+ }, Ua = {
355
+ class: "fm-typo-en-body-lg-600"
356
+ }, Fa = {
357
+ key: 0,
358
+ class: "mr-4"
359
+ }, Ia = {
360
+ class: "text-fm-color-typo-secondary"
361
+ }, Ra = {
362
+ class: "line-clamp-2"
363
+ }, Ma = {
364
+ class: "font-bold"
365
+ }, A = 200, $a = /* @__PURE__ */ Fe({
366
+ __name: "EmployeeList",
367
+ setup($, {
368
+ expose: ce
369
+ }) {
370
+ const {
371
+ t: n
372
+ } = Re(), k = v(), d = Le(), C = Pe(), me = He(), {
373
+ currentBusiness: U,
374
+ sessionUser: de
375
+ } = me, c = he(), V = h(() => C.isLoading.value), R = v(c.roles.value.length === 0);
376
+ X(C.restaurants, (e) => {
377
+ if (e.length > 0 && d.listEmployees.value.length > 0) {
378
+ const a = new Map(e.map((r) => [r._id, r]));
379
+ d.listEmployees.value = d.listEmployees.value.map((r) => ({
380
+ ...r,
381
+ restaurants: r.restaurants.map((p) => {
382
+ var Y, Z;
383
+ return {
384
+ ...p,
385
+ restaurantName: ((Y = a.get(p.restaurantId)) == null ? void 0 : Y.profile.name) || p.restaurantName,
386
+ restaurantCode: ((Z = a.get(p.restaurantId)) == null ? void 0 : Z.profile.code) ?? void 0
387
+ };
388
+ })
389
+ }));
390
+ }
391
+ });
392
+ const O = h(() => C.restaurants.value.map((e) => ({
393
+ label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
394
+ value: e._id
395
+ }))), pe = X(c.roles, (e) => {
396
+ if (e.length > 0) {
397
+ if (R.value = !1, d.listEmployees.value.length > 0) {
398
+ const a = new Map(e.map((r) => [r._id, r.name]));
399
+ d.listEmployees.value = d.listEmployees.value.map((r) => ({
400
+ ...r,
401
+ restaurants: r.restaurants.map((p) => ({
402
+ ...p,
403
+ roleName: a.get(p.roleId) || p.roleName
404
+ }))
405
+ }));
406
+ }
407
+ pe();
408
+ }
409
+ }), ae = h(() => d.listEmployees.value), {
410
+ searchKey: _
411
+ } = Ze(), T = v(""), H = h(() => ae.value), b = h(() => d.totalEmployees.value), s = v(1), J = h(() => d.isLoading.value), L = v(!1), le = h(() => {
412
+ var e;
413
+ return JSON.stringify({
414
+ businessId: ((e = U.value) == null ? void 0 : e._id) ?? "",
415
+ search: T.value.trim(),
416
+ restaurantIds: [...k.value ?? []].sort(),
417
+ roleIds: [...t.value ?? []].sort()
418
+ });
419
+ }), se = (e) => {
420
+ const a = e.restaurantCode, r = e.restaurantName;
421
+ return a ? `${a} - ${r}` : r;
422
+ }, F = (e) => e.roleName || "-";
423
+ function P(e) {
424
+ return [{
425
+ label: n("hr.employee.form.update"),
426
+ onClick: () => w(e)
427
+ }, {
428
+ label: n("hr.employee.remove.title"),
429
+ onClick: () => M(e),
430
+ itemClass: "text-fm-color-typo-error"
431
+ }];
432
+ }
433
+ const z = ({
434
+ employee: e,
435
+ className: a = ""
436
+ }) => i("div", {
437
+ class: a,
438
+ onClick: (r) => {
439
+ r.stopPropagation();
440
+ }
441
+ }, [i(aa, {
442
+ items: P(e)
443
+ }, null)]), W = [{
444
+ accessorKey: "code",
445
+ size: 100,
446
+ header: () => n("hr.employee.columns.code")
447
+ }, {
448
+ accessorKey: "name",
449
+ header: () => n("hr.employee.columns.name"),
450
+ enableSorting: !1,
451
+ cell(e) {
452
+ const a = e.row.original;
453
+ return i("div", {
454
+ class: "flex items-center gap-8"
455
+ }, [i($e.FmAvatar, {
456
+ name: a.name,
457
+ initials: ia(a.name),
458
+ size: "sm",
459
+ class: "shrink-0"
460
+ }, null), i("span", {
461
+ class: "truncate"
462
+ }, [a.name])]);
463
+ }
464
+ }, {
465
+ accessorKey: "restaurants",
466
+ align: "center",
467
+ header: () => n("hr.employee.columns.restaurants"),
468
+ enableSorting: !1,
469
+ cell(e) {
470
+ return V.value || R.value ? ie(Ee) : e.row.original.restaurants.map((a, r) => {
471
+ const p = se(a);
472
+ return ie("div", {
473
+ key: a.restaurantId || r
474
+ }, (r ? `
475
+ ` : "") + p);
476
+ });
477
+ }
478
+ }, {
479
+ accessorKey: "assignedRole",
480
+ align: "center",
481
+ header: () => n("hr.employee.columns.assignedRole"),
482
+ enableSorting: !1,
483
+ cell(e) {
484
+ return V.value || R.value ? ie(Ee, {
485
+ width: "120px"
486
+ }) : e.row.original.restaurants.map((a, r) => {
487
+ const p = F(a);
488
+ return ie("div", {
489
+ key: a.restaurantId || r
490
+ }, (r ? `
491
+ ` : "") + p);
492
+ });
493
+ }
494
+ }, {
495
+ accessorKey: "since",
496
+ header: () => n("hr.employee.columns.since"),
497
+ enableSorting: !1
498
+ }, {
499
+ id: "action",
500
+ size: 52,
501
+ meta: {
502
+ cellClass: "pl-16",
503
+ headerContentClass: "-mx-16"
504
+ },
505
+ cell(e) {
506
+ return z({
507
+ employee: e.row.original,
508
+ className: "flex w-full items-center justify-end"
509
+ });
510
+ }
511
+ }], te = ({
512
+ employee: e
513
+ }) => i("div", {
514
+ class: "flex flex-col gap-4 grow p-8"
515
+ }, [W.map((a, r) => i("div", {
516
+ key: a.id ?? a.accessorKey ?? r,
517
+ class: "fm-typo-en-body-md-400 line-clamp-2 w-full"
518
+ }, [a.cell ? a.cell({
519
+ row: {
520
+ original: e
521
+ }
522
+ }) : e[a.accessorKey]]))]), D = Me(), K = Je(), fe = De(D), Q = v(!1), G = v(), u = v();
523
+ function o(e) {
524
+ const a = e.isRestricted;
525
+ return a && D.open({
526
+ message: n("hr.employee.cannotUpdateMasterUser", {
527
+ name: e.name
528
+ }),
529
+ type: "error"
530
+ }), a;
531
+ }
532
+ const w = (e) => {
533
+ var r;
534
+ e && o(e) || (r = u.value) == null || r.trigger(e);
535
+ }, {
536
+ breakpoints: S
537
+ } = We(), M = (e) => {
538
+ o(e) || K.open({
539
+ title: n("hr.employee.remove.title"),
540
+ message: n("hr.employee.remove.message", {
541
+ name: e.name
542
+ }),
543
+ minWidth: S.value.lg ? 588 : 0,
544
+ primaryActions: {
545
+ text: n("common.remove"),
546
+ close: !1,
547
+ variant: "destructive",
548
+ isLoading: Q
549
+ },
550
+ secondaryActions: {
551
+ text: n("common.cancel"),
552
+ close: !0
553
+ }
554
+ }).onPrimary(async () => {
555
+ if (Q.value) return;
556
+ const r = e.isMasterUser ? d.deleteMasterEmployee : d.deleteEmployee;
557
+ await fe.minor(async () => {
558
+ await r(e), await ve();
559
+ }, {
560
+ isLoading: Q,
561
+ successMessage: n("hr.employee.remove.successMessage", {
562
+ name: e.name
563
+ })
564
+ }).catch(() => {
565
+ }), K.close();
566
+ });
567
+ }, x = v("");
568
+ function N() {
569
+ var e;
570
+ (e = u.value) == null || e.trigger();
571
+ }
572
+ const oe = h(() => he().roles.value.map((e) => ({
573
+ label: e.name,
574
+ value: e._id
575
+ }))), t = v();
576
+ async function B() {
577
+ try {
578
+ await d.syncUsersMeta(), await ve(), D.open({
579
+ message: n("hr.employee.sync.successMessage"),
580
+ type: "success"
581
+ });
582
+ } catch (e) {
583
+ console.error("Error syncing users:", e), D.open({
584
+ message: n("hr.employee.sync.errorMessage"),
585
+ type: "error"
586
+ });
587
+ }
588
+ }
589
+ async function re(e = s.value) {
590
+ var a, r;
591
+ try {
592
+ await d.readEmployeesPage({
593
+ limit: A,
594
+ offset: (e - 1) * A,
595
+ search: T.value.trim() || void 0,
596
+ restaurantIds: (a = k.value) != null && a.length ? k.value : void 0,
597
+ roleIds: (r = t.value) != null && r.length ? t.value : void 0
598
+ });
599
+ } catch (p) {
600
+ console.error("Failed to load employees:", p), D.open({
601
+ message: p instanceof Error ? p.message : String(p),
602
+ type: "error"
603
+ });
604
+ }
605
+ }
606
+ async function ve() {
607
+ var a;
608
+ if (!((a = U.value) != null && a._id)) return;
609
+ await re(s.value);
610
+ const e = Math.max(1, Math.ceil(b.value / A));
611
+ s.value > e && (s.value = e, await re(s.value));
612
+ }
613
+ async function Ne() {
614
+ var e, a;
615
+ return await d.readAllEmployeesPage({
616
+ search: T.value.trim() || void 0,
617
+ restaurantIds: (e = k.value) != null && e.length ? k.value : void 0,
618
+ roleIds: (a = t.value) != null && a.length ? t.value : void 0
619
+ }, b.value);
620
+ }
621
+ const Ae = na(_, () => {
622
+ T.value = _.value;
623
+ }, 300);
624
+ Be(Ae);
625
+ let ye = !1;
626
+ async function Oe({
627
+ pageIndex: e
628
+ }) {
629
+ var a;
630
+ if ((a = U.value) != null && a._id && !ye && !(e === 0 && s.value === 1 && H.value.length > 0)) {
631
+ ye = !0, s.value = e + 1;
632
+ try {
633
+ await re(s.value);
634
+ } finally {
635
+ ye = !1;
636
+ }
637
+ }
638
+ }
639
+ X(le, async () => {
640
+ var e;
641
+ s.value = 1, L.value = !1, (e = U.value) != null && e._id && (await re(1), L.value = !0);
642
+ }, {
643
+ immediate: !0
644
+ }), X(() => G.value && G.value.restaurants, (e) => {
645
+ e && e.length > 0 && (x.value = "");
646
+ });
647
+ const Te = h(() => b.value > A);
648
+ return ce({
649
+ create: N,
650
+ filteredEmployees: H,
651
+ exportEmployees: Ne,
652
+ getHasPaginationFooter: () => Te.value
653
+ }), (e, a) => {
654
+ var _e, be;
655
+ const r = E("FmButton"), p = E("FmTooltip"), Y = E("FmSearch"), Z = E("FmListItem"), ze = E("FmTable");
656
+ return g(), ee(Ie, null, [i(ha, {
657
+ ref_key: "employeeFormRef",
658
+ ref: u,
659
+ modelValue: G.value,
660
+ "onUpdate:modelValue": a[0] || (a[0] = (m) => G.value = m),
661
+ "role-error-message": x.value,
662
+ class: "gap-8",
663
+ onSubmitted: ve
664
+ }, null, 8, ["modelValue", "role-error-message"]), f("div", _a, [l(S).xs ? (g(), ee("div", xa, [f("div", Ea, [i(Y, {
665
+ modelValue: l(_),
666
+ "onUpdate:modelValue": a[4] || (a[4] = (m) => we(_) ? _.value = m : null),
667
+ placeholder: l(n)("hr.employee.search.placeholder")
668
+ }, null, 8, ["modelValue", "placeholder"])]), i(Xe), f("div", Va, [i(ue, {
669
+ modelValue: k.value,
670
+ "onUpdate:modelValue": a[5] || (a[5] = (m) => k.value = m),
671
+ multiple: "",
672
+ items: O.value,
673
+ variant: "dark",
674
+ "selected-prefix": l(n)("hr.role.columns.restaurants"),
675
+ placeholder: l(n)("hr.role.columns.restaurants"),
676
+ class: "!w-auto"
677
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ue, {
678
+ modelValue: t.value,
679
+ "onUpdate:modelValue": a[6] || (a[6] = (m) => t.value = m),
680
+ multiple: "",
681
+ items: oe.value,
682
+ variant: "dark",
683
+ "selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
684
+ placeholder: l(n)("hr.employee.filter.role_placeholder")
685
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (g(), ee("div", ba, [f("div", wa, [i(ue, {
686
+ modelValue: k.value,
687
+ "onUpdate:modelValue": a[1] || (a[1] = (m) => k.value = m),
688
+ multiple: "",
689
+ items: O.value,
690
+ variant: "dark",
691
+ "selected-prefix": l(n)("hr.role.columns.restaurants"),
692
+ placeholder: l(n)("hr.role.columns.restaurants"),
693
+ class: "!w-auto"
694
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ue, {
695
+ modelValue: t.value,
696
+ "onUpdate:modelValue": a[2] || (a[2] = (m) => t.value = m),
697
+ multiple: "",
698
+ variant: "dark",
699
+ items: oe.value,
700
+ "selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
701
+ placeholder: l(n)("hr.employee.filter.role_placeholder")
702
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), f("div", ka, [(_e = l(de)) != null && _e.role.isAdmin ? (g(), I(p, {
703
+ key: 0,
704
+ content: l(n)("hr.employee.sync.tooltip")
705
+ }, {
706
+ default: y(() => [i(r, {
707
+ icon: "refresh",
708
+ label: l(n)("hr.employee.sync.tooltip"),
709
+ variant: "tertiary",
710
+ onClick: B
711
+ }, null, 8, ["label"])]),
712
+ _: 1
713
+ }, 8, ["content"])) : j("", !0), i(Y, {
714
+ modelValue: l(_),
715
+ "onUpdate:modelValue": a[3] || (a[3] = (m) => we(_) ? _.value = m : null),
716
+ autofocus: "",
717
+ class: "pl-4 w-[320px]",
718
+ placeholder: l(n)("hr.employee.search.placeholder")
719
+ }, null, 8, ["modelValue", "placeholder"])])])), (be = l(U)) != null && be._id ? (g(), I(Qe, {
720
+ key: 2
721
+ }, {
722
+ default: y(() => [f("div", Sa, [!L.value && l(d).isLoading.value ? (g(), I(Ye, {
723
+ key: 0
724
+ })) : j("", !0), L.value ? (g(), I(la, {
725
+ key: 1,
726
+ "is-loading": l(d).isLoading.value,
727
+ "is-empty": b.value === 0,
728
+ title: l(n)("hr.employee.noData.title"),
729
+ subtitle: l(n)("hr.employee.noData.subtitle")
730
+ }, {
731
+ default: y(() => [(g(), I(ze, {
732
+ key: le.value,
733
+ class: ke(["employee-list-table h-full", {
734
+ "employee-list-table--pagination-loading": J.value
735
+ }]),
736
+ "column-defs": W,
737
+ "row-data": H.value,
738
+ "page-size": A,
739
+ "page-count": Math.ceil(b.value / A),
740
+ "row-count": b.value,
741
+ "fetch-fn": Oe,
742
+ "hide-footer": b.value <= A,
743
+ loading: l(d).isLoading.value,
744
+ virtual: !1,
745
+ "pin-header-row": "",
746
+ onRowClick: a[7] || (a[7] = (m) => w(m.original))
747
+ }, {
748
+ "list-row": y((m) => [l(S).xs ? (g(), I(Z, {
749
+ key: 0,
750
+ class: ke(["py-12 px-16 items-center justify-between", {
751
+ "border-t border-fm-color-neutral-gray-100": m.index > 0
752
+ }]),
753
+ onClick: (ne) => w(m.original)
754
+ }, {
755
+ default: y(() => [f("div", Ca, [f("p", Ua, [m.original.code ? (g(), ee("span", Fa, q(m.original.code) + ".", 1)) : j("", !0), ge(q(m.original.name), 1)]), f("div", Ia, [f("p", Ra, [f("span", Ma, q(l(n)("hr.employee.columns.restaurants")) + ":", 1), ge(" " + q(m.original.restaurants.map((ne) => se(ne)).join(", ")), 1)]), f("p", null, [a[8] || (a[8] = f("span", {
756
+ class: "font-bold"
757
+ }, "Since:", -1)), ge(" " + q(m.original.since), 1)])])]), i(r, {
758
+ icon: "delete",
759
+ variant: "tertiary",
760
+ "text-color": "neutral-gray-400",
761
+ onClick: je((ne) => M(m.original), ["stop"])
762
+ }, null, 8, ["onClick"])]),
763
+ _: 2
764
+ }, 1032, ["class", "onClick"])) : (g(), I(Z, {
765
+ key: 1,
766
+ style: {
767
+ padding: "0"
768
+ },
769
+ onClick: (ne) => w(m.original)
770
+ }, {
771
+ default: y(() => [(g(), I(qe(te), {
772
+ employee: m.original
773
+ }, null, 8, ["employee"]))]),
774
+ _: 2
775
+ }, 1032, ["onClick"]))]),
776
+ _: 1
777
+ }, 8, ["class", "row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
778
+ _: 1
779
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"])) : j("", !0)])]),
780
+ _: 1
781
+ })) : j("", !0)])], 64);
782
+ };
783
+ }
784
+ }), Xa = /* @__PURE__ */ ma($a, [["__scopeId", "data-v-5aed0d1c"]]);
785
+ export {
786
+ Xa as default
787
+ };