@feedmepos/mf-hrm-portal 2.3.4-dev → 2.4.1

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