@feedmepos/mf-hrm-portal 2.3.1 → 2.3.3-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/dist/{ApprovalCodeList-CcvVEriB.js → ApprovalCodeList-D8ZVkmrF.js} +14 -15
  2. package/dist/AuditLogList-Fby1fcGU.js +1777 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B1uS6T3r.js +459 -0
  4. package/dist/EmployeeList-DY2Y-FtT.js +907 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BDGewUFD.js +90 -0
  6. package/dist/{GrantUserList-1ErIV7b7.js → GrantUserList-RK38DjjY.js} +15 -16
  7. package/dist/{Main-R0qyd8Ea.js → Main-424HHE7m.js} +5 -5
  8. package/dist/Main-BuJe2QNl.js +101 -0
  9. package/dist/{Main-CD8OS1rM.js → Main-Pv9x678t.js} +11 -11
  10. package/dist/MyPosProfile-Rc2ZTeQR.js +301 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList-ig3oxdhh.js → PermissionSetList-BT1oUm8M.js} +44 -46
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BRrhFF3y.js +4243 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CD3d4RX6.js +1840 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DS4eMJ6w.js +547 -0
  16. package/dist/RoleList-CrLxn4_K.js +274 -0
  17. package/dist/SelectFilter-ATOm0hdn.js +269 -0
  18. package/dist/TeamMemberList-D32ZtSLP.js +2060 -0
  19. package/dist/{TimesheetList-BvsUk6kd.js → TimesheetList-ByUp0yfA.js} +11 -11
  20. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D3--3EhR.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-9x0jnL2P.js} +3 -3
  21. package/dist/{app-DKHtjxyC.js → app-BsAwRWj0.js} +6670 -11433
  22. package/dist/app.js +3 -3
  23. package/dist/{approval-code-BIpLingm.js → approval-code-BUuYtJAO.js} +1 -1
  24. package/dist/{dayjs.min-CNNMpacl.js → dayjs.min-C9xnIrg1.js} +13 -13
  25. package/dist/{employee-H2J0xRqJ.js → employee-DAwBQ0bc.js} +62 -66
  26. package/dist/{grant-user-uZmvD_bw.js → grant-user-D-PdX5g-.js} +1 -1
  27. package/dist/{iteration-DkcNkScw.js → iteration-Dat4Ismm.js} +1 -1
  28. package/dist/{lodash-g-62RoFP.js → lodash-DjYVoggD.js} +1 -1
  29. package/dist/member-grant-CQHFGo-k.js +55 -0
  30. package/dist/restaurant-dbllb9m8.js +45 -0
  31. package/dist/{role-CkxDtfst.js → role-DN-jiQnS.js} +5 -4
  32. package/dist/{rule-BWvSqhBk.js → rule-Bgcb9R7I.js} +108 -103
  33. package/dist/src/api/audit-log/index.d.ts +0 -4
  34. package/dist/src/api/employee/index.d.ts +2 -2
  35. package/dist/src/api/my-pos-profile/index.d.ts +5 -0
  36. package/dist/src/api/restaurant/index.d.ts +0 -2
  37. package/dist/src/api/staff-invite/index.d.ts +17 -0
  38. package/dist/src/components/AppForm.vue.d.ts +2 -2
  39. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  40. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  41. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  42. package/dist/src/composables/useDiscardConfirm.d.ts +1 -3
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useMessage.d.ts +2 -8
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +19 -0
  46. package/dist/src/helpers/member-grant.d.ts +36 -0
  47. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  48. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  49. package/dist/src/helpers/staff-invite.d.ts +51 -0
  50. package/dist/src/helpers/string.d.ts +10 -1
  51. package/dist/src/router/menu-access-guard.d.ts +17 -0
  52. package/dist/src/router/shared.d.ts +2 -3
  53. package/dist/src/stores/employee.d.ts +12 -12
  54. package/dist/src/stores/restaurant.d.ts +7 -7
  55. package/dist/src/stores/team.d.ts +30 -0
  56. package/dist/src/types/employee.d.ts +0 -1
  57. package/dist/src/types/my-pos-profile.d.ts +25 -0
  58. package/dist/src/types/staff-invite.d.ts +100 -0
  59. package/dist/src/types/team.d.ts +17 -1
  60. package/dist/src/views/audit-log/constants.d.ts +30 -9
  61. package/dist/src/views/audit-log/locales/index.d.ts +0 -488
  62. package/dist/src/views/hr/locales/index.d.ts +20 -0
  63. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  64. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  65. package/dist/src/views/my-pos-profile/locales/index.d.ts +200 -0
  66. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  67. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  68. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  69. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  70. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  71. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  72. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  73. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  74. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  75. package/dist/src/views/team/locales/index.d.ts +716 -0
  76. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  77. package/dist/src/views/{scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts → team/member/ExistingMemberNotice.vue.d.ts} +6 -5
  78. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  79. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  80. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  81. package/dist/string-DZQ1uNjn.js +22 -0
  82. package/dist/style.css +1 -1
  83. package/dist/tsconfig.app.tsbuildinfo +1 -1
  84. package/dist/{useAppStore-Bp0PwbAN.js → useAppStore-BABlZnfR.js} +1 -1
  85. package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
  86. package/dist/{useLoading-sgL8DRUz.js → useLoading-B47q5dVg.js} +1 -1
  87. package/dist/{useReportPermissions-CcIHwTRI.js → useReportPermissions-D-nbQAm5.js} +5 -5
  88. package/package.json +3 -5
  89. package/dist/AuditLogList-C61-SnWG.js +0 -1950
  90. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZ-ZDviW.js +0 -438
  91. package/dist/EmployeeList-Cucr2mxn.js +0 -776
  92. package/dist/FormItem.vue_vue_type_script_setup_true_lang-4XV2qPxn.js +0 -45
  93. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  94. package/dist/Main-B-F_cdM_.js +0 -96
  95. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  96. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ClG4YhnF.js +0 -4167
  97. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DaAx79pC.js +0 -35
  98. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +0 -132
  99. package/dist/RoleList-BqR_Vf8H.js +0 -740
  100. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Dg7S6nFO.js +0 -544
  101. package/dist/ScheduleGeneralPage-QYijA95u.js +0 -811
  102. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-Bnyqna_E.js +0 -2556
  103. package/dist/SchedulePage-BrBZmuMj.js +0 -19458
  104. package/dist/SchedulePositionPage-NCvNg8v5.js +0 -282
  105. package/dist/SelectFilter-r-QOCO99.js +0 -264
  106. package/dist/TeamMemberList-B6ZnfKV0.js +0 -1154
  107. package/dist/object-Dwyg2LgX.js +0 -16
  108. package/dist/restaurant-CHpkjUPy.js +0 -1880
  109. package/dist/src/api/schedule/index.d.ts +0 -68
  110. package/dist/src/components/layout/PortalShell.vue.d.ts +0 -12
  111. package/dist/src/components/layout/withScheduleShell.d.ts +0 -10
  112. package/dist/src/types/schedule.d.ts +0 -23
  113. package/dist/src/views/audit-log/pos-row.d.ts +0 -27
  114. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +0 -3
  115. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +0 -3
  116. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +0 -3
  117. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +0 -6
  118. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +0 -12
  119. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +0 -6
  120. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +0 -6
  121. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +0 -10
  122. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +0 -6
  123. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +0 -6
  124. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +0 -6
  125. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +0 -41
  126. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +0 -6
  127. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +0 -2
  128. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +0 -10
  129. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +0 -25
  130. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +0 -17
  131. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +0 -31
  132. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +0 -29
  133. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +0 -34
  134. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +0 -26
  135. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +0 -17
  136. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +0 -38
  137. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +0 -22
  138. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +0 -23
  139. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +0 -8
  140. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +0 -6
  141. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +0 -6
  142. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +0 -15
  143. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +0 -33
  144. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +0 -17
  145. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +0 -8
  146. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +0 -2
  147. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +0 -6
  148. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +0 -6
  149. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +0 -17
  150. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +0 -23
  151. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +0 -10
  152. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +0 -2
  153. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +0 -12
  154. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +0 -17
  155. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +0 -7
  156. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +0 -18
  157. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +0 -6
  158. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +0 -18
  159. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +0 -2
  160. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +0 -6
  161. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +0 -9
  162. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +0 -26
  163. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +0 -6
  164. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +0 -6
  165. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +0 -6
  166. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +0 -6
  167. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +0 -6
  168. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +0 -2
  169. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +0 -6
  170. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +0 -6
  171. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +0 -6
  172. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +0 -11
  173. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +0 -9
  174. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +0 -6
  175. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +0 -11
  176. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +0 -8
  177. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +0 -2
  178. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +0 -12
  179. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +0 -70
  180. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +0 -6
  181. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +0 -12
  182. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +0 -35
  183. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +0 -10
  184. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +0 -6
  185. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +0 -8
  186. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +0 -16
  187. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +0 -8
  188. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +0 -8
  189. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +0 -25
  190. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +0 -16
  191. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +0 -50
  192. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +0 -12
  193. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +0 -8
  194. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +0 -6
  195. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +0 -20
  196. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +0 -35
  197. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +0 -7
  198. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +0 -7
  199. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +0 -51
  200. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +0 -15
  201. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +0 -82
  202. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +0 -63
  203. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +0 -9
  204. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +0 -17
  205. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +0 -24
  206. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +0 -22
  207. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +0 -21
  208. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +0 -23
  209. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +0 -7
  210. package/dist/src/views/scheduling/composables/schedule-error.d.ts +0 -1
  211. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +0 -14
  212. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +0 -9
  213. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +0 -16
  214. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +0 -23
  215. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +0 -29
  216. package/dist/src/views/scheduling/composables/schedule-time.d.ts +0 -8
  217. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +0 -9
  218. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +0 -9
  219. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +0 -16
  220. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +0 -137
  221. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +0 -75
  222. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -50
  223. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +0 -11
  224. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +0 -13
  225. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +0 -301
  226. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +0 -615
  227. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +0 -27
  228. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +0 -28
  229. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +0 -21
  230. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +0 -80
  231. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +0 -12
  232. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +0 -60
  233. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -44
  234. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -111
  235. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +0 -59
  236. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +0 -47
  237. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +0 -166
  238. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +0 -55
  239. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +0 -24
  240. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +0 -13
  241. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +0 -49
  242. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +0 -7
  243. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +0 -22
  244. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +0 -50
  245. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +0 -38
  246. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +0 -32
  247. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +0 -16
  248. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +0 -18
  249. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +0 -52
  250. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +0 -14
  251. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +0 -79
  252. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +0 -60
  253. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +0 -15
  254. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +0 -58
  255. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +0 -45
  256. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +0 -231
  257. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +0 -9
  258. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +0 -15
  259. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +0 -11
  260. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +0 -13
  261. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +0 -1543
  262. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +0 -25
  263. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +0 -18
  264. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +0 -9
  265. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +0 -21
  266. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +0 -20
  267. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +0 -33
  268. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +0 -22
  269. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +0 -21
  270. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +0 -19
  271. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +0 -55
  272. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +0 -35
  273. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +0 -127
  274. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +0 -11
  275. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +0 -27
  276. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +0 -313
  277. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +0 -40
  278. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +0 -17
  279. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +0 -245
  280. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +0 -63
  281. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +0 -17
  282. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +0 -255
  283. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +0 -27
  284. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +0 -49
  285. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +0 -95
  286. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +0 -9
  287. package/dist/src/views/scheduling/country-rules/index.d.ts +0 -33
  288. package/dist/src/views/scheduling/data.d.ts +0 -123
  289. package/dist/src/views/scheduling/locales/index.d.ts +0 -6988
  290. package/dist/src/views/scheduling/schedule-constants.d.ts +0 -7
  291. package/dist/src/views/scheduling/schedule-state.d.ts +0 -767
  292. package/dist/src/views/scheduling/schedule-store.d.ts +0 -140
  293. package/dist/src/views/scheduling/types.d.ts +0 -381
  294. package/dist/string-VNuQNweN.js +0 -15
  295. package/dist/useDiscardConfirm-CzZSPyvh.js +0 -28
  296. /package/dist/src/{components/layout/SchedulePromoBanner.vue.d.ts → views/my-pos-profile/MyPosProfile.vue.d.ts} +0 -0
@@ -0,0 +1,907 @@
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-BsAwRWj0.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-DAwBQ0bc.js";
13
+ import { u as De } from "./restaurant-dbllb9m8.js";
14
+ import { l as ga } from "./lodash-DjYVoggD.js";
15
+ import { u as Ne } from "./useLoading-B47q5dVg.js";
16
+ import { u as _e } from "./role-DN-jiQnS.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
+ };