@feedmepos/mf-hrm-portal 2.3.2-dev → 2.3.2-dev.3

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