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

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-xOyDG5ug.js → ApprovalCodeList-DoNoFW6w.js} +14 -15
  2. package/dist/AuditLogList-D5M0cl8g.js +2026 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1dLOPFb.js} +10 -10
  4. package/dist/{EmployeeList-BG2KPvOB.js → EmployeeList-BX9gy9WG.js} +196 -208
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-iCgTyICI.js +90 -0
  6. package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-DNvmmlDI.js} +15 -16
  7. package/dist/{Main-Cg9SOzcz.js → Main-2NivoQNg.js} +5 -5
  8. package/dist/{Main-BSHf8gTE.js → Main-BHmY7VHC.js} +12 -11
  9. package/dist/{Main-BcixH7R5.js → Main-SzU5H5uC.js} +2394 -2383
  10. package/dist/MyPosProfile-2W5mT5d5.js +360 -0
  11. package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-BCAm8rHm.js} +82 -80
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-e2vu_Mcn.js +4208 -0
  13. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DYbfmF2P.js +1797 -0
  14. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-o4mXv2hT.js +547 -0
  16. package/dist/RoleList-BXkyCeH0.js +265 -0
  17. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DOxRdHY1.js +544 -0
  18. package/dist/ScheduleGeneralPage-4hV53-q6.js +811 -0
  19. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-D5jOHLA1.js +2557 -0
  20. package/dist/SchedulePage-CqNa_p32.js +19446 -0
  21. package/dist/SchedulePositionPage-7xYBe1xd.js +282 -0
  22. package/dist/SelectFilter-Dy2Nv1_D.js +263 -0
  23. package/dist/TeamMemberList-okhiXdLg.js +2087 -0
  24. package/dist/TimesheetList-BKj9OnJW.js +437 -0
  25. package/dist/{app-CdrnR_Pw.js → app-C37qvNnc.js} +14439 -5834
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-Bwvwehz9.js → approval-code-B7rpc4Oe.js} +4 -4
  28. package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-D35yhU4A.js} +12 -12
  29. package/dist/employee-Bn6HTMxg.js +172 -0
  30. package/dist/{grant-user-whFOaPZI.js → grant-user-CostZ0Md.js} +2 -2
  31. package/dist/{iteration-ZpERYj3o.js → index-DPiNc7mn.js} +698 -726
  32. package/dist/iteration-CcXrOMQe.js +30 -0
  33. package/dist/{lodash-7SZBZ8VQ.js → lodash-C8MGI_QW.js} +1 -1
  34. package/dist/member-grant-CktOoicv.js +54 -0
  35. package/dist/object-Dwyg2LgX.js +16 -0
  36. package/dist/restaurant-BgvuJL8G.js +52 -0
  37. package/dist/role-D8G5QOG1.js +98 -0
  38. package/dist/rule-EYBPBkv_.js +843 -0
  39. package/dist/src/api/audit-log/index.d.ts +6 -0
  40. package/dist/src/api/employee/index.d.ts +3 -4
  41. package/dist/src/api/my-pos-profile/index.d.ts +1 -3
  42. package/dist/src/api/restaurant/index.d.ts +2 -0
  43. package/dist/src/api/schedule/index.d.ts +68 -0
  44. package/dist/src/api/sso-provider/index.d.ts +5 -0
  45. package/dist/src/api/staff-invite/index.d.ts +1 -2
  46. package/dist/src/api/timesheet/index.d.ts +1 -1
  47. package/dist/src/components/AppForm.vue.d.ts +2 -2
  48. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  49. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  50. package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
  51. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  52. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  53. package/dist/src/composables/useMessage.d.ts +8 -2
  54. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  55. package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
  56. package/dist/src/helpers/permission-set.d.ts +1 -102
  57. package/dist/src/helpers/pos-assignment-rows.d.ts +2 -0
  58. package/dist/src/helpers/rule.d.ts +2 -2
  59. package/dist/src/helpers/staff-invite.d.ts +3 -0
  60. package/dist/src/router/shared.d.ts +3 -0
  61. package/dist/src/stores/approval-code.d.ts +1 -1
  62. package/dist/src/stores/employee.d.ts +15 -21
  63. package/dist/src/stores/grant-user.d.ts +1 -1
  64. package/dist/src/stores/permission-assignment.d.ts +2 -2
  65. package/dist/src/stores/permission-set.d.ts +2 -2
  66. package/dist/src/stores/restaurant.d.ts +63 -3
  67. package/dist/src/stores/role.d.ts +2 -2
  68. package/dist/src/stores/team.d.ts +1 -1
  69. package/dist/src/stores/timesheet.d.ts +68 -53
  70. package/dist/src/types/employee.d.ts +1 -0
  71. package/dist/src/types/my-pos-profile.d.ts +2 -3
  72. package/dist/src/types/schedule.d.ts +23 -0
  73. package/dist/src/types/sso-provider.d.ts +10 -0
  74. package/dist/src/types/timesheet.d.ts +3 -0
  75. package/dist/src/views/audit-log/constants.d.ts +9 -30
  76. package/dist/src/views/audit-log/locales/index.d.ts +528 -0
  77. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  78. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  79. package/dist/src/views/hr/locales/index.d.ts +24 -4
  80. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  81. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  82. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
  83. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  84. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  85. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  86. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  87. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  88. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  89. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  90. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  91. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  92. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  93. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  94. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  95. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  96. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  97. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
  98. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  99. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  100. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  101. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  102. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  103. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  104. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  105. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  106. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  107. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  108. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  109. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  110. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  111. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  112. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  113. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  114. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  115. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  116. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  117. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  119. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  120. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  121. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  122. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  123. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  124. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  125. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  126. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  127. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  128. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  129. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  130. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  131. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  132. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  133. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  134. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  135. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  136. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  137. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  138. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  139. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  140. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  141. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  142. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  143. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  144. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  145. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  146. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  147. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  148. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  149. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  150. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  151. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  152. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  153. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  154. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  155. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  156. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  157. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  158. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  159. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  160. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  161. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  162. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  163. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  164. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  165. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  166. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  167. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  168. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  169. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  170. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  171. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  172. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  173. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  174. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  175. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  176. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  177. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  178. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  179. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  180. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  181. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  182. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  183. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  184. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  185. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  186. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  187. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  188. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  189. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  190. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  191. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  192. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  193. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  194. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  195. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  196. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  197. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  198. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  199. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  200. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  201. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  202. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  203. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  204. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  205. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  206. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  207. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  208. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  209. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  210. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  211. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  212. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  213. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  214. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  215. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  216. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  217. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  218. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  219. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  220. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  221. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  222. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  223. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  224. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  225. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  226. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  227. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  228. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  229. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  230. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  231. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  232. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  233. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  234. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  235. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  236. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  237. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  238. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  239. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  240. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  241. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  242. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  243. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  244. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  245. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  246. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  247. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  248. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  249. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  250. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  251. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  252. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  253. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  254. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  255. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  256. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  257. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  258. package/dist/src/views/scheduling/data.d.ts +123 -0
  259. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  260. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  261. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  262. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  263. package/dist/src/views/scheduling/types.d.ts +381 -0
  264. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +2 -6
  265. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  266. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -2
  267. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  268. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -2
  269. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
  270. package/dist/style.css +1 -1
  271. package/dist/timesheet-D6jBeR-V.js +76 -0
  272. package/dist/tsconfig.app.tsbuildinfo +1 -1
  273. package/dist/{useAppStore-CL6EEDuw.js → useAppStore-BmBJPo1_.js} +1 -1
  274. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  275. package/dist/{useLoading-BBjBUzGJ.js → useLoading-BtyGXkm_.js} +1 -1
  276. package/dist/useMessage-_ywT_N9X.js +17 -0
  277. package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-C8z7EA7v.js} +13 -13
  278. package/dist/useSsoProviders-CZrTNgfp.js +41 -0
  279. package/package.json +7 -5
  280. package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
  281. package/dist/FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js +0 -45
  282. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  283. package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
  284. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
  285. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
  286. package/dist/RoleList-ALmAwN0U.js +0 -739
  287. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  288. package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
  289. package/dist/TimesheetList-CECFKt7H.js +0 -402
  290. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js +0 -58
  291. package/dist/employee-Dg-J9goA.js +0 -205
  292. package/dist/member-grant-C46lvrh2.js +0 -55
  293. package/dist/restaurant-CKhT6kgj.js +0 -45
  294. package/dist/role-C6hFKOfU.js +0 -93
  295. package/dist/rule-BlMymDXm.js +0 -788
  296. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -0,0 +1,843 @@
1
+ import { e as j } from "./index-DPiNc7mn.js";
2
+ import { y as N, m as h, k as W, z as ne, P as z, g, b, B as L, v as x, C as y, s as F } from "./app-C37qvNnc.js";
3
+ import { s as V, c as re } from "./iteration-CcXrOMQe.js";
4
+ import { s as ie } from "./utils-BZkjJbju.js";
5
+ import { defineStore as K, storeToRefs as Q } from "pinia";
6
+ import { ref as v, computed as C } from "vue";
7
+ import { useCoreStore as H } from "@feedmepos/mf-common";
8
+ import { u as oe } from "./restaurant-BgvuJL8G.js";
9
+ function k(e) {
10
+ if (e) {
11
+ if (typeof e == "string") {
12
+ if (e === "{}") return;
13
+ try {
14
+ return JSON.parse(e);
15
+ } catch {
16
+ return;
17
+ }
18
+ }
19
+ if (typeof e == "object")
20
+ return Object.keys(e).length > 0 ? e : void 0;
21
+ }
22
+ }
23
+ function w(e) {
24
+ return e ? Object.values(e).every(
25
+ (t) => t !== null && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 1 && Array.isArray(t.$in)
26
+ ) : !0;
27
+ }
28
+ function Y(e) {
29
+ const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = (r, s, o) => {
30
+ var a, c;
31
+ const u = k(s.conditions);
32
+ let l = `${s.subject}::${JSON.stringify([...s.actions].sort())}`;
33
+ w(u) || (l += `::${JSON.stringify(u)}`);
34
+ const m = r.get(l);
35
+ if (!m) {
36
+ r.set(l, { ...s, setNames: [o.name], setId: o._id });
37
+ return;
38
+ }
39
+ m.setNames.push(o.name);
40
+ const d = k(m.conditions);
41
+ if (!d || !u) {
42
+ m.conditions = void 0;
43
+ return;
44
+ }
45
+ for (const f in u)
46
+ (a = d[f]) != null && a.$in && (c = u[f]) != null && c.$in ? d[f].$in = Array.from(
47
+ /* @__PURE__ */ new Set([...d[f].$in, ...u[f].$in])
48
+ ) : d[f] || (d[f] = u[f]);
49
+ m.conditions = JSON.stringify(d);
50
+ };
51
+ for (const r of e)
52
+ for (const s of r.permissions)
53
+ n(s.inverted ? i : t, s, r);
54
+ return [...Array.from(t.values()), ...Array.from(i.values())];
55
+ }
56
+ function E(e, t) {
57
+ return `${e}::${[...t].sort().join(",")}`;
58
+ }
59
+ function G(e, t) {
60
+ const i = [...e], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
61
+ for (const a of e) {
62
+ const c = N(a.subject);
63
+ n.add(E(c, a.actions)), a.inverted && a.actions.includes("manage") && r.add(`set_${c}`), !a.inverted && a.actions.includes("manage") && s.add(c);
64
+ }
65
+ const o = [...e];
66
+ for (; o.length > 0; ) {
67
+ const a = o.shift(), c = `set_${N(a.subject)}`, u = t[c];
68
+ if (!u || r.has(c) || !a.actions.includes("manage") || a.inverted) continue;
69
+ r.add(c);
70
+ const l = ae(a);
71
+ a.source && !a.source.trace && (a.source = { ...a.source, trace: l });
72
+ const m = [...l, `${u.name} (system)`];
73
+ for (const d of u.permissions ?? []) {
74
+ const f = N(d.subject), p = E(f, d.actions);
75
+ n.has(p) || s.has(f) || (n.add(p), i.push({
76
+ ...d,
77
+ // FdoPermissionRule.fields is string[] | null; RawRule expects string[] | undefined
78
+ fields: d.fields ?? void 0,
79
+ source: {
80
+ type: "systemPermissionSet",
81
+ permissionSetId: u.key,
82
+ permissionSetName: u.name,
83
+ trace: m
84
+ }
85
+ }));
86
+ }
87
+ for (const d of u.permissionSets ?? []) {
88
+ const f = N(d), p = E(f, ["manage"]), S = {
89
+ subject: f,
90
+ actions: ["manage"],
91
+ source: {
92
+ type: "systemPermissionSet",
93
+ permissionSetId: u.key,
94
+ permissionSetName: u.name,
95
+ trace: m
96
+ }
97
+ };
98
+ n.has(p) || (n.add(p), i.push(S)), o.push(S);
99
+ }
100
+ }
101
+ return [...i.filter((a) => !a.inverted), ...i.filter((a) => a.inverted)];
102
+ }
103
+ function ae(e) {
104
+ if (!e.source) return [];
105
+ const { type: t, trace: i, permissionSetName: n } = e.source;
106
+ if (i && i.length > 0) return i;
107
+ switch (t) {
108
+ case "permissionSet":
109
+ return n ? [n] : [];
110
+ case "custom":
111
+ return ["custom"];
112
+ default:
113
+ return [];
114
+ }
115
+ }
116
+ function X(e, t) {
117
+ return Array.isArray(e) ? e.includes(t) : e === t;
118
+ }
119
+ function ue(e) {
120
+ return Array.isArray(e) ? e[0] : e;
121
+ }
122
+ function Te(e, t) {
123
+ const i = t.find((r) => X(r.subject, e));
124
+ if (!(i != null && i.category) || i.isCategoryCover) return;
125
+ const n = t.find((r) => r.category === i.category && r.isCategoryCover);
126
+ if (n)
127
+ return ue(n.subject);
128
+ }
129
+ function Le(e, t) {
130
+ const i = t.find((n) => X(n.subject, e));
131
+ return !!(i != null && i.isCategoryCover);
132
+ }
133
+ function Z(e, t, i = /* @__PURE__ */ new Set()) {
134
+ var n;
135
+ const r = [];
136
+ for (const s of e) {
137
+ if (i.has(s)) continue;
138
+ i.add(s);
139
+ const o = t.find((a) => a.id === s);
140
+ o && (r.push(o), (n = o.permissionSetIds) != null && n.length && r.push(...Z(o.permissionSetIds, t, i)));
141
+ }
142
+ return r;
143
+ }
144
+ function ce(e) {
145
+ const t = Y(e).map(
146
+ ({ setNames: r, setId: s, ...o }) => o
147
+ ), i = t.filter((r) => !r.inverted), n = t.filter((r) => r.inverted);
148
+ return T(i, n);
149
+ }
150
+ function le(e, t) {
151
+ const i = (a, c) => {
152
+ const u = { ...a }, l = JSON.parse(u.conditions || "{}");
153
+ if (c)
154
+ if (c.length > 0) {
155
+ const m = Object.keys(l)[0];
156
+ l[m].$in = c;
157
+ } else
158
+ delete u.conditions;
159
+ return {
160
+ ...u,
161
+ inverted: !0,
162
+ ...u.conditions && { conditions: JSON.stringify(l) }
163
+ };
164
+ }, n = new Map(e.map((a) => [a.subject, a])), r = new Map(t.map((a) => [a.subject, a])), s = [], o = /* @__PURE__ */ new Set([...n.keys(), ...r.keys()]);
165
+ for (const a of o) {
166
+ const c = n.get(a), u = r.get(a);
167
+ if (c && u) {
168
+ if (c.conditions && u.conditions) {
169
+ const l = JSON.parse(c.conditions), m = JSON.parse(u.conditions);
170
+ if (!w(l) || !w(m)) {
171
+ JSON.stringify(l) !== JSON.stringify(m) && s.push(u);
172
+ continue;
173
+ }
174
+ const d = Object.keys(l)[0], f = l[d].$in.filter(
175
+ (p) => !m[d].$in.includes(p)
176
+ );
177
+ f.length > 0 && s.push(i(c, f)), m[d].$in.filter(
178
+ (p) => !l[d].$in.includes(p)
179
+ ).length > 0 && s.push(u);
180
+ } else if (!c.conditions && u.conditions)
181
+ s.push(u);
182
+ else if (c.conditions && !u.conditions)
183
+ w(JSON.parse(c.conditions)) || s.push(u);
184
+ else if (!c.conditions && !u.conditions) {
185
+ const l = new Set(c.actions), m = new Set(u.actions), d = u.actions.some((p) => !l.has(p)), f = c.actions.filter((p) => !m.has(p));
186
+ if (d) {
187
+ const p = u.actions.filter((S) => !l.has(S));
188
+ s.push({
189
+ ...u,
190
+ actions: p
191
+ });
192
+ }
193
+ f.length > 0 && s.push({
194
+ ...c,
195
+ actions: f,
196
+ inverted: !0
197
+ });
198
+ }
199
+ continue;
200
+ }
201
+ if (c) {
202
+ s.push(
203
+ i(
204
+ c,
205
+ // If base has conditions, set diffIds to empty array, disallow all access to collection
206
+ // otherwise, invert directly
207
+ c.conditions && []
208
+ )
209
+ );
210
+ continue;
211
+ }
212
+ u && s.push(u);
213
+ }
214
+ return s;
215
+ }
216
+ function de(e) {
217
+ const t = G(
218
+ e,
219
+ z
220
+ ), i = new Set(
221
+ t.filter((r) => {
222
+ var s;
223
+ return ((s = r.source) == null ? void 0 : s.type) === "systemPermissionSet" && !r.inverted;
224
+ }).map((r) => r.subject)
225
+ ), n = new Set(
226
+ t.filter(
227
+ (r) => {
228
+ var s;
229
+ return ((s = r.source) == null ? void 0 : s.type) === "systemPermissionSet" && !r.inverted && r.actions.includes("manage");
230
+ }
231
+ ).map((r) => r.subject)
232
+ );
233
+ return e.filter((r) => r.inverted ? !(i.has(r.subject) && !n.has(r.subject)) : !i.has(r.subject));
234
+ }
235
+ const me = "business::report::";
236
+ function fe(e, t) {
237
+ const i = [], n = e.filter((r) => {
238
+ const s = r.subject;
239
+ return !s.startsWith(me) || t.has(s) ? !0 : (i.push(s), !1);
240
+ });
241
+ return i.length > 0 && console.warn("[filterStalePermissions] dropped stale report permissions:", i), n;
242
+ }
243
+ const pe = "business::report::reports::", ge = h.Subject.Business.report_reports_allDefaultReports, be = h.Subject.Business.report_reports_allCustomReports;
244
+ function he(e, t) {
245
+ return e.conditions ? !!t.conditions && e.conditions === t.conditions : !t.conditions;
246
+ }
247
+ function ve(e, t) {
248
+ const i = e.find(
249
+ (o) => !o.inverted && o.subject === ge
250
+ ), n = e.find(
251
+ (o) => !o.inverted && o.subject === be
252
+ );
253
+ if (!i && !n) return e;
254
+ const r = i ? new Set(i.actions) : null, s = n ? new Set(n.actions) : null;
255
+ return e.reduce((o, a) => {
256
+ if (a.inverted)
257
+ return o.push(a), o;
258
+ const c = a.subject;
259
+ if (!c.startsWith(pe))
260
+ return o.push(a), o;
261
+ const u = t.has(c), l = u ? r : s, m = u ? i : n;
262
+ if (!l || !m || !he(m, a))
263
+ return o.push(a), o;
264
+ if (l.has("manage")) return o;
265
+ const d = a.actions;
266
+ if (d.includes("manage"))
267
+ return o.push(a), o;
268
+ const f = new Set(d);
269
+ for (const p of l)
270
+ f.delete(p);
271
+ return f.size === 0 || o.push({ ...a, actions: Array.from(f) }), o;
272
+ }, []);
273
+ }
274
+ function T(e, t) {
275
+ var i, n;
276
+ const r = new Map(e.map((s) => [s.subject, s]));
277
+ for (const s of t) {
278
+ if (s.inverted) {
279
+ const a = r.get(s.subject);
280
+ if (s.conditions) {
281
+ if (a != null && a.conditions) {
282
+ const c = JSON.parse(a.conditions), u = JSON.parse(s.conditions);
283
+ if (!w(c) || !w(u)) {
284
+ r.delete(s.subject);
285
+ continue;
286
+ }
287
+ const l = Object.keys(u)[0], m = ((i = u[l]) == null ? void 0 : i.$in) ?? [], d = (((n = c[l]) == null ? void 0 : n.$in) ?? []).filter((f) => !m.includes(f));
288
+ d.length > 0 ? r.set(s.subject, {
289
+ ...a,
290
+ conditions: JSON.stringify({ [l]: { $in: d } })
291
+ }) : r.delete(s.subject);
292
+ } else
293
+ r.delete(s.subject);
294
+ continue;
295
+ }
296
+ if (a) {
297
+ const c = new Set(s.actions), u = a.actions.filter((l) => !c.has(l));
298
+ u.length > 0 ? r.set(s.subject, { ...a, actions: u }) : r.delete(s.subject);
299
+ continue;
300
+ }
301
+ continue;
302
+ }
303
+ if (s.conditions) {
304
+ r.set(s.subject, s);
305
+ continue;
306
+ }
307
+ const o = r.get(s.subject);
308
+ if (o != null && o.conditions && !w(JSON.parse(o.conditions))) {
309
+ r.set(s.subject, s);
310
+ continue;
311
+ }
312
+ if (o) {
313
+ const a = [
314
+ .../* @__PURE__ */ new Set([...o.actions, ...s.actions])
315
+ ];
316
+ r.set(s.subject, {
317
+ ...o,
318
+ actions: a
319
+ });
320
+ } else
321
+ r.set(s.subject, s);
322
+ }
323
+ return Array.from(r.values());
324
+ }
325
+ function Se(e, t) {
326
+ const i = T(e, t), n = new Set(e.map((s) => s.subject)), r = t.filter(
327
+ (s) => s.inverted && !n.has(s.subject)
328
+ );
329
+ return [...i, ...r];
330
+ }
331
+ const q = (e) => JSON.parse(JSON.stringify(e));
332
+ function ee(e) {
333
+ const t = e.find(
334
+ (i) => i.subject === h.Subject.Restaurant.restaurant
335
+ );
336
+ return t ? t.conditions ? JSON.parse(t.conditions).restaurantId.$in : null : [];
337
+ }
338
+ function te(e) {
339
+ const t = e.find((i) => i.subject === h.Subject.Business.role);
340
+ return t ? t.conditions ? JSON.parse(t.conditions).roleId.$in : null : [];
341
+ }
342
+ function ye(e, t) {
343
+ const i = q(
344
+ e.filter((n) => n.subject !== h.Subject.Business.role)
345
+ );
346
+ return t && t.length > 0 && i.push({
347
+ actions: [h.Action.manage],
348
+ subject: h.Subject.Business.role,
349
+ conditions: JSON.stringify({ roleId: { $in: t } })
350
+ }), i;
351
+ }
352
+ function xe(e, t, { restaurantRoles: i, allRoleIds: n }) {
353
+ let r = q(
354
+ e.filter(
355
+ (s) => s.subject !== h.Subject.Business.restaurant && s.subject !== h.Subject.Restaurant.restaurant
356
+ )
357
+ );
358
+ if (!t || t.length > 0) {
359
+ const {
360
+ category: s,
361
+ showByFeatureFlag: o,
362
+ ...a
363
+ } = W.restaurant;
364
+ r.push(a);
365
+ const c = {
366
+ actions: [h.Action.manage],
367
+ subject: h.Subject.Restaurant.restaurant
368
+ };
369
+ t && (c.conditions = JSON.stringify({ restaurantId: { $in: t } })), r.push(c);
370
+ }
371
+ if (t) {
372
+ const s = [
373
+ ...new Set(t.map((o) => i[o] ?? []).flatMap((o) => o))
374
+ ];
375
+ s.length !== n.length && (r = ye(
376
+ r,
377
+ (te(e) || n).filter((o) => s.includes(o))
378
+ ));
379
+ }
380
+ return r;
381
+ }
382
+ function ke(e) {
383
+ let t = e.userPermissions;
384
+ return e.reportSubjects && (t = fe(t, e.reportSubjects)), e.defaultReportSubjects && (t = ve(t, e.defaultReportSubjects)), {
385
+ customPermissions: le(
386
+ ce(e.inheritedPermissions),
387
+ de(t)
388
+ ),
389
+ permissions: t.filter((i) => !i.inverted).map((i) => ({ ...i, subject: ne(i.subject) }))
390
+ };
391
+ }
392
+ const _ = "/permission-sets", J = {
393
+ async read() {
394
+ return g(await b().get(_));
395
+ },
396
+ async create(e) {
397
+ return g(await b().post(_, e));
398
+ },
399
+ async update(e, t) {
400
+ return g(await b().put(`${_}/${e}`, t));
401
+ },
402
+ async delete(e) {
403
+ return g(await b().delete(`${_}/${e}`));
404
+ }
405
+ }, je = K("hrm-permission-set", () => {
406
+ const { currentBusiness: e } = H(), t = v([]), i = v(!1), n = v(null);
407
+ async function r() {
408
+ var l;
409
+ const u = ((l = e.value) == null ? void 0 : l._id) ?? null;
410
+ if (n.value !== u)
411
+ try {
412
+ i.value = !0;
413
+ const m = await J.read();
414
+ t.value = c(m), n.value = u;
415
+ } finally {
416
+ i.value = !1;
417
+ }
418
+ }
419
+ async function s(u) {
420
+ const l = await J.create(u);
421
+ t.value = c([...t.value, l]);
422
+ }
423
+ async function o(u, l) {
424
+ const m = await J.update(u, l);
425
+ t.value = c(t.value.map((d) => d.id === u ? m : d));
426
+ }
427
+ async function a(u) {
428
+ await J.delete(u), t.value = c(t.value.filter((l) => l.id !== u));
429
+ }
430
+ function c(u) {
431
+ return u.sort((l, m) => l.name.localeCompare(m.name));
432
+ }
433
+ return {
434
+ permissionSets: t,
435
+ isLoading: i,
436
+ readPermissionSets: r,
437
+ createPermissionSet: s,
438
+ updatePermissionSet: o,
439
+ deletePermissionSet: a
440
+ };
441
+ }), we = () => {
442
+ const e = je();
443
+ return {
444
+ ...e,
445
+ ...Q(e)
446
+ };
447
+ }, P = "/permission-assignments", I = {
448
+ async readAll() {
449
+ return g(await b().get(P));
450
+ },
451
+ async readByUserId(e) {
452
+ return g(await b().get(`${P}/user/${e}`));
453
+ },
454
+ async readById(e) {
455
+ return g(await b().get(`${P}/${e}`));
456
+ },
457
+ async create(e) {
458
+ return g(await b().post(P, e));
459
+ },
460
+ async update(e, t) {
461
+ return g(await b().put(`${P}/${e}`, t));
462
+ },
463
+ async delete(e) {
464
+ return g(await b().delete(`${P}/${e}`));
465
+ },
466
+ async addReportManagePermission(e, t) {
467
+ return g(
468
+ await b().post("/my-permissions/report-manage", { permissionKey: e, label: t })
469
+ );
470
+ }
471
+ }, Pe = K("hrm-permission-assignment", () => {
472
+ const e = v([]);
473
+ async function t() {
474
+ const a = await I.readAll();
475
+ e.value = a;
476
+ }
477
+ async function i(a) {
478
+ return await I.readByUserId(a);
479
+ }
480
+ async function n(a) {
481
+ const c = await I.create(a);
482
+ e.value = [...e.value, c];
483
+ }
484
+ async function r(a, c) {
485
+ const u = await I.update(a, c);
486
+ e.value = e.value.map((l) => l.id === a ? u : l);
487
+ }
488
+ async function s(a) {
489
+ await I.delete(a), e.value = e.value.filter((c) => c.id !== a);
490
+ }
491
+ function o(a) {
492
+ return e.value.find((c) => c.userId === a);
493
+ }
494
+ return {
495
+ permissionAssignments: e,
496
+ readPermissionAssignments: t,
497
+ readPermissionAssignmentByUserId: i,
498
+ createPermissionAssignment: n,
499
+ updatePermissionAssignment: r,
500
+ deletePermissionAssignment: s,
501
+ getPermissionAssignmentByUserId: o
502
+ };
503
+ }), $e = () => {
504
+ const e = Pe();
505
+ return {
506
+ ...e,
507
+ ...Q(e)
508
+ };
509
+ }, Ie = {
510
+ async fetchReportPermissions(e, t) {
511
+ const i = t ? { lang: t } : {};
512
+ return g(
513
+ await L().get(`/report-query/hrm/${e}/reports`, { params: i })
514
+ );
515
+ },
516
+ async fetchReportPermissionsForPortal(e, t) {
517
+ const i = t ? { isSupportPos: !1, lang: t } : { isSupportPos: !1 };
518
+ return g(
519
+ await L().get(`/report-query/hrm/${e}/reports`, { params: i })
520
+ );
521
+ }
522
+ }, B = v([]), U = v(!1), O = v(!1), R = v(null), D = v(null), M = v(!1);
523
+ function Oe() {
524
+ const e = H();
525
+ async function t() {
526
+ var s;
527
+ const n = (s = e.currentBusiness.value) == null ? void 0 : s.id;
528
+ if (!n) return;
529
+ const r = localStorage.getItem("locale");
530
+ if (R.value !== n && (B.value = [], U.value = !1, O.value = !1, R.value = n, M.value = !1), !(U.value && D.value === r)) {
531
+ if (O.value) {
532
+ M.value = !0;
533
+ return;
534
+ }
535
+ O.value = !0;
536
+ try {
537
+ const o = await Ie.fetchReportPermissionsForPortal(n, r);
538
+ if (R.value !== n) return;
539
+ B.value = o, U.value = !0, D.value = r;
540
+ } catch (o) {
541
+ if (R.value !== n) return;
542
+ console.warn("Failed to fetch custom report permissions:", o), B.value = [];
543
+ } finally {
544
+ R.value === n && (O.value = !1, M.value && (M.value = !1, await t()));
545
+ }
546
+ }
547
+ }
548
+ const i = C(() => B.value.map(
549
+ (n) => n.isDefault ? {
550
+ label: n.name,
551
+ subject: `business::report::reports::${n.permissionKey}`,
552
+ actions: [y.manage, y.read, y.create],
553
+ category: x.reports
554
+ } : {
555
+ label: n.name,
556
+ subject: `business::report::reports::${n.permissionKey}`,
557
+ actions: [
558
+ y.manage,
559
+ y.read,
560
+ y.create,
561
+ y.update,
562
+ y.delete
563
+ ],
564
+ category: x.customReports
565
+ }
566
+ ));
567
+ return {
568
+ fetchCustomReportPermissions: t,
569
+ customReportPermissions: i,
570
+ isLoading: C(() => O.value),
571
+ isLoaded: C(() => U.value)
572
+ };
573
+ }
574
+ function A(e) {
575
+ const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } = Oe(), s = i.getPermissionAssignmentByUserId(e.id), o = Z(
576
+ (s == null ? void 0 : s.permissionSetIds) ?? e.permissionSetIds ?? [],
577
+ t.permissionSets.value
578
+ ), a = Y(o).map(
579
+ ({ setNames: p, ...S }) => S
580
+ ), c = s == null ? void 0 : s.customPermissions, u = c ?? e.permissions.map((p) => ({
581
+ ...p,
582
+ subject: N(p.subject)
583
+ })), l = T(a, u), m = G(
584
+ Se(a, u),
585
+ z
586
+ ).filter((p) => !p.inverted), d = ee(m), f = d ?? n.value.map((p) => p._id);
587
+ return {
588
+ doc: e,
589
+ id: e.id,
590
+ // An invite's name is the admin's, or its sign-in key when it has none.
591
+ name: e.status === "invited" ? e.name || "-" : e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
592
+ phoneNumber: e.phoneNumber,
593
+ email: e.email,
594
+ restaurants: V(
595
+ f.map((p) => {
596
+ var S;
597
+ return ((S = n.value.find((se) => se._id === p)) == null ? void 0 : S.profile.name) ?? "";
598
+ })
599
+ ),
600
+ managableRestaurantIds: d,
601
+ permissionLabels: Ne(m, r.value),
602
+ permissions: l,
603
+ status: e.status ?? "active",
604
+ loginMethod: e.loginMethod ?? "feedme"
605
+ };
606
+ }
607
+ const Re = Object.freeze(
608
+ Object.values(W)
609
+ ), De = {
610
+ async readTeamMembers() {
611
+ return g(
612
+ await b().get("/portal-users")
613
+ ).map(A);
614
+ },
615
+ async readTeamMembersPage(e) {
616
+ var i, n, r, s, o;
617
+ const t = g(
618
+ await b().get("/portal-users/paged", {
619
+ params: {
620
+ limit: e.limit,
621
+ offset: e.offset,
622
+ search: e.search,
623
+ restaurantIds: (i = e.restaurantIds) != null && i.length ? e.restaurantIds : void 0,
624
+ permissionSubjects: (n = e.permissionSubjects) != null && n.length ? e.permissionSubjects : void 0,
625
+ permissionSetIds: (r = e.permissionSetIds) != null && r.length ? e.permissionSetIds : void 0,
626
+ statuses: (s = e.statuses) != null && s.length ? e.statuses : void 0,
627
+ loginMethods: (o = e.loginMethods) != null && o.length ? e.loginMethods : void 0
628
+ }
629
+ })
630
+ );
631
+ return {
632
+ items: t.items.map(A),
633
+ total: t.total
634
+ };
635
+ },
636
+ async readTeamMember(e) {
637
+ return A(
638
+ g(await b().get(`/portal-users/${e}`))
639
+ );
640
+ },
641
+ async createTeamMember(e) {
642
+ return A(
643
+ g(await b().post("/portal-users", e))
644
+ );
645
+ },
646
+ async updateTeamMember(e, t) {
647
+ return A(
648
+ g(await b().put(`/portal-users/${e}`, t))
649
+ );
650
+ },
651
+ async deleteTeamMember(e) {
652
+ return g(await b().delete(`/portal-users/${e}`));
653
+ },
654
+ async readTeamMemberPosUserIds() {
655
+ return g(await b().get("/portal-users")).map((t) => t.posUserId);
656
+ },
657
+ async generateMasterUserPasscode(e) {
658
+ return `${g(
659
+ await b().post("/portal-users/generate-passcode", {
660
+ restaurantIds: e.restaurantIds,
661
+ excludePosUserId: e.excludePosUserId
662
+ })
663
+ )}`;
664
+ }
665
+ };
666
+ function We(e, t, i) {
667
+ if (e.some((o) => o.subject === "all")) return "All";
668
+ const n = (i ?? F).filter(
669
+ (o) => o.subject === t
670
+ ), r = new Set(n.map((o) => $(o).value)), s = e.filter((o) => o.subject === t).filter((o) => r.has($(o).value));
671
+ return s.length === n.length ? "All" : s.length === 0 ? "-" : `${s.length} permission allow`;
672
+ }
673
+ function $(e) {
674
+ const t = re(e), i = t.subject;
675
+ return {
676
+ ...t,
677
+ get conditions() {
678
+ if (typeof t.conditions != "string") return t.conditions;
679
+ try {
680
+ return JSON.parse(t.conditions);
681
+ } catch {
682
+ return;
683
+ }
684
+ },
685
+ get isDiscountOperation() {
686
+ var n;
687
+ return i === j.F_RULE_SUBJECT.enum.order && ((n = this.conditions) == null ? void 0 : n.operation) === j.F_RULE_ORDER_OPERATION.enum.discount;
688
+ },
689
+ get isOrderOperation() {
690
+ return i === j.F_RULE_SUBJECT.enum.order;
691
+ },
692
+ get isReportPermission() {
693
+ return i === j.F_RULE_SUBJECT.enum.report;
694
+ },
695
+ /**
696
+ * Order and report rules are only meaningful together with the condition
697
+ * that names them. A rule missing it cannot be rendered or matched against
698
+ * the available permission list, so callers must preserve it verbatim —
699
+ * see `splitRoleFormPermissions`, which routes it to `passthrough`, not
700
+ * `dropped`. Dropping it would silently revoke a grant the portal cannot
701
+ * display (HRM-0027).
702
+ */
703
+ get isResolvable() {
704
+ return this.discriminator !== void 0;
705
+ },
706
+ /**
707
+ * The condition value that identifies this rule, if the subject needs one.
708
+ * An empty condition counts as missing: `{ name: '' }` is a known corrupted
709
+ * shape that used to resolve to the first hardcoded report permission on
710
+ * save (HRM-0027), so it must not look resolvable here either.
711
+ */
712
+ get discriminator() {
713
+ var n, r;
714
+ return this.isOrderOperation ? ((n = this.conditions) == null ? void 0 : n.operation) || void 0 : this.isReportPermission ? ((r = this.conditions) == null ? void 0 : r.name) || void 0 : i.toString();
715
+ },
716
+ get formatted() {
717
+ const n = this.discriminator;
718
+ return n === void 0 ? i.toString() : n.endsWith("_") ? n.slice(0, n.length - 1) : n;
719
+ },
720
+ get label() {
721
+ return t.label || ie(this.formatted);
722
+ },
723
+ get value() {
724
+ const n = this.discriminator;
725
+ return this.isOrderOperation || this.isReportPermission ? n === void 0 ? i.toString() : `${i}:${n}` : i.toString();
726
+ }
727
+ };
728
+ }
729
+ function ze(e) {
730
+ var n, r;
731
+ const t = e.map((s) => $(s)).find((s) => s.isDiscountOperation);
732
+ if (!t) return 100;
733
+ const i = Number((r = (n = t.conditions) == null ? void 0 : n.adjustment) == null ? void 0 : r.$lte);
734
+ return Number.isFinite(i) ? parseInt((i * 100).toFixed(0)) : 0;
735
+ }
736
+ function Ve(e, t) {
737
+ return t.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: ee(e), roleIds: te(e) };
738
+ }
739
+ function Ke(e) {
740
+ return (e == null ? void 0 : e.some((t) => t.subject === "all")) ?? !1;
741
+ }
742
+ function Qe(e) {
743
+ const t = $(e);
744
+ if (!t.isReportPermission) return;
745
+ const { name: i, ...n } = t.conditions ?? {};
746
+ return Object.keys(n).length > 0 ? n : void 0;
747
+ }
748
+ function He(e, t, i) {
749
+ return e.flatMap((n) => {
750
+ const r = Ae(n);
751
+ if (!r) return [];
752
+ const s = r.isReportPermission ? i == null ? void 0 : i.get(n) : void 0;
753
+ return [
754
+ {
755
+ subject: r.subject,
756
+ actions: r.actions,
757
+ conditions: {
758
+ ...r.conditions,
759
+ ...s ?? {},
760
+ adjustment: r.isDiscountOperation ? { $lte: parseFloat((t / 100).toFixed(2)) } : void 0
761
+ }
762
+ }
763
+ ];
764
+ });
765
+ }
766
+ function Ae(e) {
767
+ const t = e.indexOf(":"), i = t === -1 ? e : e.slice(0, t), n = t === -1 ? void 0 : e.slice(t + 1);
768
+ if (t !== -1 && !n) return;
769
+ let r;
770
+ return n ? (r = F.find((s) => {
771
+ if (s.subject !== i) return !1;
772
+ const o = typeof s.conditions == "string" ? JSON.parse(s.conditions) : s.conditions;
773
+ return [o == null ? void 0 : o.operation, o == null ? void 0 : o.name].includes(n);
774
+ }), !r && i === j.F_RULE_SUBJECT.enum.report && (r = {
775
+ label: "",
776
+ subject: j.F_RULE_SUBJECT.enum.report,
777
+ actions: ["read"],
778
+ conditions: { name: n },
779
+ inverted: !1,
780
+ reason: ""
781
+ })) : r = F.find((s) => s.subject === i), r ? $(r) : void 0;
782
+ }
783
+ function Ye(e, t) {
784
+ const i = { values: [], passthrough: [], dropped: [] };
785
+ for (const n of e) {
786
+ const r = n == null ? void 0 : n.actions;
787
+ if (typeof (n == null ? void 0 : n.subject) != "string" || n.subject.trim().length === 0 || !Array.isArray(r) || r.length === 0 || r.some((c) => typeof c != "string" || c.trim().length === 0)) {
788
+ i.dropped.push(n);
789
+ continue;
790
+ }
791
+ const s = $(n).value, o = `${j.F_RULE_SUBJECT.enum.report}:`, a = s.startsWith(o) ? s.slice(o.length) : "";
792
+ t.has(s) || a && a !== "undefined" ? i.values.push(s) : i.passthrough.push(n);
793
+ }
794
+ return i;
795
+ }
796
+ function Ne(e, t = []) {
797
+ return V(
798
+ e.reduce((i, n) => {
799
+ const r = Re.find(
800
+ (s) => s.subject === n.subject && n.actions.includes("manage")
801
+ ) || t.find((s) => s.subject === n.subject);
802
+ if (r) {
803
+ const s = r.subject === h.Subject.Business.inventory_stock ? "Warehouse Management" : r.label;
804
+ i.push(s);
805
+ }
806
+ return i;
807
+ }, [])
808
+ );
809
+ }
810
+ export {
811
+ me as $,
812
+ te as A,
813
+ fe as B,
814
+ ye as C,
815
+ xe as D,
816
+ le as E,
817
+ Se as H,
818
+ G as N,
819
+ Z as P,
820
+ ee as Q,
821
+ ce as R,
822
+ de as T,
823
+ Te as V,
824
+ Le as Y,
825
+ Oe as a,
826
+ Ve as b,
827
+ $e as c,
828
+ He as d,
829
+ Qe as e,
830
+ We as f,
831
+ ze as g,
832
+ Ke as h,
833
+ Ie as i,
834
+ Y as j,
835
+ Ne as m,
836
+ Re as p,
837
+ $ as r,
838
+ Ye as s,
839
+ De as t,
840
+ we as u,
841
+ ve as x,
842
+ ke as z
843
+ };