@feedmepos/mf-hrm-portal 2.3.1-dev.1 → 2.3.2-dev

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