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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/dist/{ApprovalCodeList-C_F98cwM.js → ApprovalCodeList-D62tXKEd.js} +15 -14
  2. package/dist/AuditLogList-DQOdhFJm.js +2021 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js +438 -0
  4. package/dist/EmployeeList-Bd211chl.js +776 -0
  5. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js +45 -0
  6. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
  7. package/dist/{GrantUserList-BZGwZLsp.js → GrantUserList-DaUUILOT.js} +16 -15
  8. package/dist/{Main-CvVhcEJ-.js → Main-B95BdgQd.js} +5 -5
  9. package/dist/Main-CvGjvEQL.js +96 -0
  10. package/dist/{Main-iG516Bly.js → Main-Dh3E2cEf.js} +11 -11
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  12. package/dist/{PermissionSetList-COn_Nrzd.js → PermissionSetList-BIzlo_EV.js} +102 -100
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js +4181 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js +35 -0
  15. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  16. package/dist/RoleList-QJV3cGvV.js +740 -0
  17. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DsKfRa5Z.js +544 -0
  18. package/dist/ScheduleGeneralPage-D6NPsdrU.js +811 -0
  19. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-kYGNELLb.js +2556 -0
  20. package/dist/SchedulePage-CO_ZP2QD.js +19446 -0
  21. package/dist/SchedulePositionPage-DFjWfRwI.js +282 -0
  22. package/dist/SelectFilter-B94Z_Fat.js +263 -0
  23. package/dist/TeamMemberList-BbGMw0jg.js +1150 -0
  24. package/dist/{TimesheetList-DoNzT6xQ.js → TimesheetList-DiTCj2H7.js} +11 -11
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-n8cnb0Zw.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js} +4 -4
  26. package/dist/{app-BYPvZve5.js → app-BRlNuQIz.js} +11579 -6690
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-CeijALXj.js → approval-code-D6eLRwC7.js} +4 -4
  29. package/dist/{dayjs.min-CS0wjvq4.js → dayjs.min-BaLuYA95.js} +13 -13
  30. package/dist/{employee-DH4Wibqh.js → employee-DF_QGtpu.js} +71 -67
  31. package/dist/{grant-user-C0ko4LW8.js → grant-user-CdkuTYlZ.js} +2 -2
  32. package/dist/{iteration-Cnj0KTDr.js → iteration-t4kb_i13.js} +1 -1
  33. package/dist/{lodash-DAd2V4v-.js → lodash-Dv0NUeUP.js} +1 -1
  34. package/dist/object-Dwyg2LgX.js +16 -0
  35. package/dist/restaurant-D2q9eNtu.js +2685 -0
  36. package/dist/{role-DSu9cpI6.js → role-y253W1Ep.js} +20 -22
  37. package/dist/{rule-BmRzz26L.js → rule-DaFOMP6z.js} +164 -172
  38. package/dist/src/api/audit-log/index.d.ts +6 -0
  39. package/dist/src/api/employee/index.d.ts +2 -2
  40. package/dist/src/api/restaurant/index.d.ts +2 -0
  41. package/dist/src/api/schedule/index.d.ts +68 -0
  42. package/dist/src/components/AppForm.vue.d.ts +2 -2
  43. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  44. package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
  45. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  46. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  47. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  48. package/dist/src/composables/useMessage.d.ts +8 -2
  49. package/dist/src/composables/useTenant.d.ts +11 -0
  50. package/dist/src/helpers/string.d.ts +1 -10
  51. package/dist/src/router/courtGuard.d.ts +4 -0
  52. package/dist/src/router/shared.d.ts +3 -2
  53. package/dist/src/stores/approval-code.d.ts +1 -1
  54. package/dist/src/stores/employee.d.ts +14 -14
  55. package/dist/src/stores/grant-user.d.ts +1 -1
  56. package/dist/src/stores/permission-assignment.d.ts +2 -2
  57. package/dist/src/stores/permission-set.d.ts +2 -2
  58. package/dist/src/stores/restaurant.d.ts +9 -9
  59. package/dist/src/stores/role.d.ts +2 -2
  60. package/dist/src/stores/team.d.ts +2 -32
  61. package/dist/src/stores/timesheet.d.ts +2 -2
  62. package/dist/src/types/employee.d.ts +1 -0
  63. package/dist/src/types/schedule.d.ts +23 -0
  64. package/dist/src/types/team.d.ts +1 -17
  65. package/dist/src/views/audit-log/constants.d.ts +9 -30
  66. package/dist/src/views/audit-log/locales/index.d.ts +532 -0
  67. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  68. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  69. package/dist/src/views/hr/locales/index.d.ts +4 -24
  70. package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
  71. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  72. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  73. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  74. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  75. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  76. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  77. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  78. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  79. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  80. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  81. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  82. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  83. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  84. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  85. package/dist/src/views/{team/member/ExistingMemberNotice.vue.d.ts → scheduling/components/ScheduleAutoScheduleModal.vue.d.ts} +5 -6
  86. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  87. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  88. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  89. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  90. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  91. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  92. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  93. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  94. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  95. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  96. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  97. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  98. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  99. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  100. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  101. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  102. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  103. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  104. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  105. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  106. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  107. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  108. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  109. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  110. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  111. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  112. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  113. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  114. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  115. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  116. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  117. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  119. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  120. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  121. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  122. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  123. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  124. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  125. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  126. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  127. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  128. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  129. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  130. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  131. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  132. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  133. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  134. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  135. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  136. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  137. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  138. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  139. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  140. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  141. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  142. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  143. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  144. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  145. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  146. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  147. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  148. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  149. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  150. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  151. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  152. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  153. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  154. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  155. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  156. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  157. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  158. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  159. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  160. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  161. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  162. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  163. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  164. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  165. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  166. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  167. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  168. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  169. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  170. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  171. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  172. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  173. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  174. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  175. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  176. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  177. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  178. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  179. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  180. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  181. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  182. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  183. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  184. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  185. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  186. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  187. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  188. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  189. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  190. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  191. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  192. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  193. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  194. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  195. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  196. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  197. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  198. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  199. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  200. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  201. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  202. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  203. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  204. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  205. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  206. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  207. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  208. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  209. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  210. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  211. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  212. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  213. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  214. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  215. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  216. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  217. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  218. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  219. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  220. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  221. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  222. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  223. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  224. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  225. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  226. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  227. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  228. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  229. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  230. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  231. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  232. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  233. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  234. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  235. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  236. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  237. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  238. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  239. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  240. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  241. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  242. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  243. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  244. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  245. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  246. package/dist/src/views/scheduling/data.d.ts +123 -0
  247. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  248. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  249. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  250. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  251. package/dist/src/views/scheduling/types.d.ts +381 -0
  252. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
  253. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
  254. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  255. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
  256. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
  257. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  258. package/dist/src/views/team/locales/index.d.ts +0 -716
  259. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
  260. package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
  261. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
  262. package/dist/string-VNuQNweN.js +15 -0
  263. package/dist/style.css +1 -1
  264. package/dist/tsconfig.app.tsbuildinfo +1 -1
  265. package/dist/{useAppStore-BL4Iv-0s.js → useAppStore-CIPpnfP7.js} +1 -1
  266. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  267. package/dist/{useLoading-BEIlprgm.js → useLoading-BRCeBVXP.js} +1 -1
  268. package/dist/useMessage-_ywT_N9X.js +17 -0
  269. package/dist/useReportPermissions-Bveud3kc.js +80 -0
  270. package/package.json +8 -6
  271. package/dist/AuditLogList-CRQjG28b.js +0 -1777
  272. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BA4pgKNh.js +0 -459
  273. package/dist/EmployeeList-DurHeTfl.js +0 -907
  274. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BDGewUFD.js +0 -90
  275. package/dist/Main-DZ_LJKco.js +0 -101
  276. package/dist/MyPosProfile-C8iBUFAt.js +0 -301
  277. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
  278. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C1k42T7U.js +0 -4243
  279. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DAbgu49T.js +0 -1831
  280. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-CoWKz1qm.js +0 -547
  281. package/dist/RoleList-C5f_ulk9.js +0 -274
  282. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  283. package/dist/TeamMemberList-DCSbXFdg.js +0 -2085
  284. package/dist/member-grant-BaABegLK.js +0 -55
  285. package/dist/restaurant-CNsV-2OE.js +0 -45
  286. package/dist/src/api/my-pos-profile/index.d.ts +0 -5
  287. package/dist/src/api/sso-provider/index.d.ts +0 -5
  288. package/dist/src/api/staff-invite/index.d.ts +0 -16
  289. package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
  290. package/dist/src/composables/useMenuAccess.d.ts +0 -56
  291. package/dist/src/composables/useSsoProviders.d.ts +0 -19
  292. package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
  293. package/dist/src/helpers/member-grant.d.ts +0 -36
  294. package/dist/src/helpers/my-pos-profile.d.ts +0 -37
  295. package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
  296. package/dist/src/helpers/staff-invite.d.ts +0 -54
  297. package/dist/src/router/menu-access-guard.d.ts +0 -17
  298. package/dist/src/types/my-pos-profile.d.ts +0 -25
  299. package/dist/src/types/sso-provider.d.ts +0 -10
  300. package/dist/src/types/staff-invite.d.ts +0 -100
  301. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
  302. package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -200
  303. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
  304. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
  305. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
  306. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
  307. package/dist/string-DZQ1uNjn.js +0 -22
  308. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
  309. package/dist/useReportPermissions-BhiSxQCh.js +0 -82
  310. /package/dist/src/{views/my-pos-profile/MyPosProfile.vue.d.ts → components/layout/SchedulePromoBanner.vue.d.ts} +0 -0
@@ -0,0 +1,740 @@
1
+ import { computed as y, defineComponent as Pe, ref as V, watch as le, onMounted as Me, resolveComponent as F, createBlock as M, openBlock as v, unref as o, withCtx as g, createElementVNode as u, createVNode as c, createElementBlock as R, Fragment as P, createCommentVNode as _e, renderList as ne, normalizeClass as Ue, toDisplayString as $, h as A, createTextVNode as ge, resolveDynamicComponent as Ee, withModifiers as Ze, nextTick as Le } from "vue";
2
+ import { e as L } from "./iteration-t4kb_i13.js";
3
+ import { useI18n as Te } from "@feedmepos/mf-common";
4
+ import { useBreakpoints as Be, useSnackbar as je, components as ye, useDialog as es, FmButtonColorThemeVariant as ss } from "@feedmepos/ui-library";
5
+ import { L as ts, k as as, A as ls, S as os, _ as rs } from "./app-BRlNuQIz.js";
6
+ import { _ as $e } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
+ import { _ as ns } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
+ import { r as ie, h as Ae, f as is, s as us, g as Ie, e as cs, a as oe } from "./rule-DaFOMP6z.js";
9
+ import { u as xe } from "./restaurant-D2q9eNtu.js";
10
+ import { u as Oe } from "./role-y253W1Ep.js";
11
+ import { u as Ne } from "./useReportPermissions-Bveud3kc.js";
12
+ import { l as re } from "./lodash-Dv0NUeUP.js";
13
+ import { u as ms, _ as ds, a as De } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js";
14
+ import { _ as be } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
15
+ import { u as ps } from "./useDiscardConfirm-CzZSPyvh.js";
16
+ import { u as fs } from "./useLoading-BRCeBVXP.js";
17
+ function vs() {
18
+ const se = xe();
19
+ return y(() => {
20
+ const t = {};
21
+ return se.restaurants.value.forEach((I) => {
22
+ t[I._id] = I;
23
+ }), t;
24
+ });
25
+ }
26
+ const hs = { class: "flex w-full items-center justify-between" }, _s = { class: "fm-typo-en-title-md-600" }, gs = { class: "space-y-40" }, bs = {
27
+ key: 0,
28
+ class: "flex justify-center py-16"
29
+ }, ys = { class: "space-y-8" }, xs = { class: "fm-typo-en-title-sm-600" }, Fs = { class: "mt-16 space-y-8" }, Cs = { class: "flex items-center" }, Rs = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ws = { class: "h-[24px] w-[24px] flex items-center justify-center" }, ks = {
30
+ key: 0,
31
+ class: "ml-20 mt-8 flex max-w-[320px] flex-row items-start gap-8"
32
+ }, Vs = { class: "mt-8 whitespace-nowrap" }, Ss = { class: "flex gap-8 items-center justify-start" }, Us = "condition-form-select-menu", Es = /* @__PURE__ */ Pe({
33
+ __name: "RoleForm",
34
+ props: {
35
+ id: {
36
+ type: String,
37
+ default: void 0
38
+ }
39
+ },
40
+ setup(se, { expose: te }) {
41
+ const { t } = Te(), { breakpoints: I } = Be(), ue = y(() => I.value.xs || I.value.sm), z = xe(), T = V(""), U = y(() => z.restaurants.value.filter(({ profile: e }) => {
42
+ const s = `${e.code ? e.code + "-" : ""}${e.legalName}`;
43
+ return !T.value || s.toLowerCase().includes(T.value.toLowerCase());
44
+ })), Y = V(z.restaurants.value.length === 0);
45
+ le(
46
+ () => z.restaurants.value.length,
47
+ (e) => {
48
+ e > 0 && (Y.value = !1);
49
+ }
50
+ );
51
+ const K = Oe(), ce = je(), me = fs(ce), {
52
+ fetchReportPermissions: J,
53
+ allReportPermissions: B,
54
+ availableReportKeys: ae,
55
+ customReportKeys: de,
56
+ isLoaded: q
57
+ } = Ne(), W = se, C = V(!1), pe = () => {
58
+ C.value = !C.value, C.value && Re();
59
+ }, fe = y(() => W.id ? t("hr.role.form.update") : t("hr.role.form.add")), Z = y(() => W.id ? t("common.update") : t("common.add")), O = y(() => {
60
+ const e = ts.filter(
61
+ (r) => r.subject !== L.F_RULE_SUBJECT.enum.report
62
+ ).map((r) => ie(r)), s = B.value.map((r) => ie(r));
63
+ return [...e, ...s];
64
+ }), h = y(() => K.roles.value.find((e) => e._id == W.id)), N = () => ({
65
+ name: "",
66
+ restaurantIds: [],
67
+ permissions: [],
68
+ maxDiscountPercentage: 100
69
+ }), l = V(N()), a = V([]), n = V([]), i = V(/* @__PURE__ */ new Map()), m = ms(i), b = as("report");
70
+ function w(e) {
71
+ const s = i.value.get(e);
72
+ return !!s && Object.keys(s).length > 0;
73
+ }
74
+ function _(e, s) {
75
+ const r = m.getDraft({ subject: e, builderKey: s.builderKey });
76
+ return r ? r.formValue : s.fromCondition(
77
+ ls(i.value.get(e), s)
78
+ );
79
+ }
80
+ function j(e, s, r) {
81
+ m.setDraft({ subject: e, builderKey: s.builderKey }, { formValue: r });
82
+ }
83
+ const G = V(null);
84
+ function Fe(e, s) {
85
+ if (m.getDraftsForSubject(e).size === 0) {
86
+ s == null || s();
87
+ return;
88
+ }
89
+ const x = [];
90
+ for (const D of b) {
91
+ const Q = m.getDraft({ subject: e, builderKey: D.builderKey });
92
+ Q && x.push({ builder: D, form: Q.formValue });
93
+ }
94
+ if (x.length === 0) {
95
+ s == null || s();
96
+ return;
97
+ }
98
+ const H = i.value.get(e), S = os(
99
+ H,
100
+ x.map(({ builder: D, form: Q }) => ({ builder: D, formValue: Q }))
101
+ ), E = new Map(i.value);
102
+ Object.keys(S).length === 0 ? E.delete(e) : E.set(e, S), i.value = E, m.clearDraftsForSubject(e), s == null || s();
103
+ }
104
+ function Ce(e) {
105
+ return m.hasDraftsForSubject(e);
106
+ }
107
+ const ze = y(() => [
108
+ {
109
+ title: t("hr.role.labels.operation"),
110
+ filter: (e) => e.isOrderOperation
111
+ },
112
+ {
113
+ title: t("hr.role.labels.report"),
114
+ filter: (e) => e.isReportPermission
115
+ },
116
+ {
117
+ title: t("hr.role.labels.other"),
118
+ filter: (e) => !e.isOrderOperation && !e.isReportPermission
119
+ }
120
+ ].map((e) => ({
121
+ title: e.title,
122
+ options: O.value.filter(e.filter).map(({ label: s, value: r }) => {
123
+ const x = t(`hr.role.form.permissionLabels.${r}`, s);
124
+ return r.startsWith(ee) && de.value.has(r.slice(ee.length)) ? {
125
+ label: `${x} ${t("hr.role.form.v8OnlyReportTag")}`,
126
+ value: r
127
+ } : {
128
+ label: x,
129
+ value: r
130
+ };
131
+ })
132
+ }))), k = y(() => {
133
+ var e;
134
+ return Ae(((e = h.value) == null ? void 0 : e.permissions) || []);
135
+ }), ee = `${L.F_RULE_SUBJECT.enum.report}:`;
136
+ function ve(e) {
137
+ return q.value ? e.filter(
138
+ (s) => !s.startsWith(ee) || ae.value.has(s.slice(ee.length))
139
+ ) : e;
140
+ }
141
+ function Re() {
142
+ var e;
143
+ if (l.value = N(), i.value = /* @__PURE__ */ new Map(), a.value = [], l.value.name = ((e = h.value) == null ? void 0 : e.name) ?? "", k.value)
144
+ l.value.restaurantIds = U.value.map((s) => s._id), l.value.permissions = O.value.map((s) => s.value);
145
+ else if (h.value) {
146
+ l.value.restaurantIds = h.value.restaurants.map((S) => S.id);
147
+ const s = new Set(O.value.map((S) => S.value)), { values: r, passthrough: x, dropped: H } = us(
148
+ h.value.permissions,
149
+ s
150
+ );
151
+ a.value = x, H.length > 0 && console.warn("Dropping corrupted role permissions (repaired on save):", H), l.value.permissions = ve(r), l.value.maxDiscountPercentage = Ie(
152
+ h.value.permissions
153
+ );
154
+ for (const S of h.value.permissions) {
155
+ const E = ie(S), D = cs(S);
156
+ D && i.value.set(E.value, D);
157
+ }
158
+ }
159
+ n.value = [...l.value.permissions];
160
+ }
161
+ Me(async () => {
162
+ await z.readRestaurants(), await J(), Re();
163
+ }), le(C, async (e) => {
164
+ e && await J();
165
+ }), le(ae, () => {
166
+ if (C.value && h.value && !k.value) {
167
+ l.value.permissions = ve(l.value.permissions), n.value = ve(n.value);
168
+ const e = new Map(i.value);
169
+ for (const s of e.keys())
170
+ s.startsWith(ee) && !l.value.permissions.includes(s) && e.delete(s);
171
+ i.value = e;
172
+ }
173
+ });
174
+ const Ke = V(""), Je = y(() => ({
175
+ restaurantIds: l.value.restaurantIds,
176
+ role: {
177
+ name: l.value.name,
178
+ permissions: [
179
+ ...is(
180
+ l.value.permissions,
181
+ l.value.maxDiscountPercentage,
182
+ i.value
183
+ ),
184
+ ...a.value
185
+ ]
186
+ }
187
+ })), qe = async () => {
188
+ const e = Je.value;
189
+ await me.minor(
190
+ async () => {
191
+ h.value ? await K.updateRole(h.value._id, e) : await K.createRole(e);
192
+ },
193
+ {
194
+ successMessage: h.value ? t("hr.role.update.successMessage", { name: e.role.name }) : t("hr.role.add.successMessage", { name: e.role.name })
195
+ }
196
+ ), C.value = !1;
197
+ }, we = y(
198
+ () => l.value.restaurantIds.filter((e) => U.value.some((s) => s._id === e))
199
+ ), ke = y(() => U.value.length > 0 && U.value.length === we.value.length), We = () => {
200
+ const e = l.value.restaurantIds.filter((s) => !we.value.includes(s));
201
+ ke.value === !0 ? l.value.restaurantIds = e : l.value.restaurantIds = U.value.map((s) => s._id);
202
+ }, Ve = (e) => e.map((r) => r.value).every((r) => l.value.permissions.includes(r)), Ge = (e) => {
203
+ const s = l.value.permissions.filter(
204
+ (r) => !e.map((x) => x.value).includes(r)
205
+ );
206
+ Ve(e) === !0 ? l.value.permissions = s : l.value.permissions = [...s, ...e.map((r) => r.value)];
207
+ };
208
+ le(
209
+ () => l.value.restaurantIds,
210
+ (e) => {
211
+ e.length > 0 && (Ke.value = "");
212
+ }
213
+ );
214
+ const he = ps(
215
+ () => {
216
+ var e, s, r;
217
+ return !re.isEqual(l.value.name, ((e = h.value) == null ? void 0 : e.name) || N().name) || !re.isEqual(
218
+ l.value.restaurantIds,
219
+ ((s = h.value) == null ? void 0 : s.restaurants.map((x) => x.id)) || N().restaurantIds
220
+ ) || !re.isEqual(l.value.permissions, n.value) || !re.isEqual(
221
+ l.value.maxDiscountPercentage,
222
+ h.value ? Ie((r = h.value) == null ? void 0 : r.permissions) : N().maxDiscountPercentage
223
+ );
224
+ },
225
+ () => {
226
+ C.value = !1;
227
+ }
228
+ );
229
+ return te({
230
+ show: C,
231
+ trigger: pe
232
+ }), (e, s) => {
233
+ const r = F("FmIcon"), x = F("FmTextField"), H = F("FmCircularProgress"), S = F("FmSearch"), E = F("FmCheckbox"), D = F("FmFormGroup"), Q = F("FmBottomSheet"), He = F("FmPopover"), Qe = F("FmCard"), Se = F("fm-button"), Xe = F("fm-side-sheet");
234
+ return v(), M(Xe, {
235
+ id: "unit-form",
236
+ modelValue: C.value,
237
+ "onUpdate:modelValue": s[6] || (s[6] = (p) => C.value = p),
238
+ "is-container": o(ye).FmForm,
239
+ "is-container-props": {
240
+ onValidationSuccess: qe,
241
+ blameFormChildOnValidationFailed: !0
242
+ },
243
+ "max-width": 960,
244
+ "close-button": !1,
245
+ "onOn:clickedAway": o(he)
246
+ }, {
247
+ "side-sheet-header": g(() => [
248
+ u("div", hs, [
249
+ u("p", _s, $(fe.value), 1),
250
+ c(r, {
251
+ name: "close",
252
+ size: "md",
253
+ class: "cursor-pointer",
254
+ onClick: o(he)
255
+ }, null, 8, ["onClick"])
256
+ ])
257
+ ]),
258
+ "side-sheet-footer": g(() => [
259
+ u("div", Ss, [
260
+ c(Se, {
261
+ label: Z.value,
262
+ size: "lg",
263
+ type: "submit",
264
+ variant: "primary",
265
+ disabled: k.value
266
+ }, null, 8, ["label", "disabled"]),
267
+ c(Se, {
268
+ label: o(t)("common.cancel"),
269
+ size: "lg",
270
+ variant: "tertiary",
271
+ onClick: o(he)
272
+ }, null, 8, ["label", "onClick"])
273
+ ])
274
+ ]),
275
+ default: g(() => [
276
+ u("div", gs, [
277
+ c(be, {
278
+ title: o(t)("hr.role.form.roleDetail")
279
+ }, {
280
+ default: g(() => [
281
+ c(x, {
282
+ modelValue: l.value.name,
283
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => l.value.name = p),
284
+ autofocus: "",
285
+ rules: [(p) => !!p || o(t)("hr.role.form.required")],
286
+ label: o(t)("hr.role.form.name"),
287
+ disabled: k.value
288
+ }, null, 8, ["modelValue", "rules", "label", "disabled"])
289
+ ]),
290
+ _: 1
291
+ }, 8, ["title"]),
292
+ c(be, {
293
+ title: o(t)("hr.role.form.restaurant")
294
+ }, {
295
+ default: g(() => [
296
+ Y.value ? (v(), R("div", bs, [
297
+ c(H)
298
+ ])) : (v(), R(P, { key: 1 }, [
299
+ c(S, {
300
+ modelValue: T.value,
301
+ "onUpdate:modelValue": s[1] || (s[1] = (p) => T.value = p),
302
+ placeholder: o(t)("hr.restaurant.search.placeholder")
303
+ }, null, 8, ["modelValue", "placeholder"]),
304
+ c(D, {
305
+ modelValue: l.value.restaurantIds,
306
+ "onUpdate:modelValue": s[3] || (s[3] = (p) => l.value.restaurantIds = p),
307
+ rules: [(p) => p.length > 0 || o(t)("hr.role.form.atLeastOneRestaurant")]
308
+ }, {
309
+ default: g(() => [
310
+ u("div", ys, [
311
+ T.value ? _e("", !0) : (v(), R(P, { key: 0 }, [
312
+ c(E, {
313
+ "model-value": ke.value,
314
+ label: o(t)("hr.role.form.all"),
315
+ value: "1",
316
+ disabled: k.value,
317
+ "onUpdate:modelValue": We
318
+ }, null, 8, ["model-value", "label", "disabled"]),
319
+ s[7] || (s[7] = u("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1))
320
+ ], 64)),
321
+ (v(!0), R(P, null, ne(U.value, (p) => (v(), R("div", {
322
+ key: p._id
323
+ }, [
324
+ c(E, {
325
+ modelValue: l.value.restaurantIds,
326
+ "onUpdate:modelValue": s[2] || (s[2] = (d) => l.value.restaurantIds = d),
327
+ label: `${p.profile.code ? p.profile.code + "-" : ""}${p.profile.name}`,
328
+ value: p._id,
329
+ disabled: k.value
330
+ }, null, 8, ["modelValue", "label", "value", "disabled"])
331
+ ]))), 128))
332
+ ])
333
+ ]),
334
+ _: 1
335
+ }, 8, ["modelValue", "rules"])
336
+ ], 64))
337
+ ]),
338
+ _: 1
339
+ }, 8, ["title"]),
340
+ c(be, {
341
+ title: o(t)("hr.role.form.permissions")
342
+ }, {
343
+ default: g(() => [
344
+ (v(!0), R(P, null, ne(ze.value, (p) => (v(), M(Qe, {
345
+ key: p.title,
346
+ variant: "outlined",
347
+ class: "p-16"
348
+ }, {
349
+ default: g(() => [
350
+ c(ds, null, {
351
+ title: g(() => [
352
+ u("p", xs, $(p.title), 1)
353
+ ]),
354
+ default: g(() => [
355
+ u("div", Fs, [
356
+ c(E, {
357
+ "model-value": Ve(p.options),
358
+ label: o(t)("hr.role.form.all"),
359
+ value: "1",
360
+ disabled: k.value,
361
+ "onUpdate:modelValue": (d) => Ge(p.options)
362
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]),
363
+ s[8] || (s[8] = u("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1)),
364
+ (v(!0), R(P, null, ne(p.options, (d) => (v(), R("div", {
365
+ key: d.value
366
+ }, [
367
+ u("div", Cs, [
368
+ c(E, {
369
+ modelValue: l.value.permissions,
370
+ "onUpdate:modelValue": s[4] || (s[4] = (f) => l.value.permissions = f),
371
+ label: d.label,
372
+ value: d.value,
373
+ disabled: k.value,
374
+ class: "flex-1"
375
+ }, null, 8, ["modelValue", "label", "value", "disabled"]),
376
+ d.value.startsWith("report:") ? (v(), R(P, { key: 0 }, [
377
+ l.value.permissions.includes(d.value) ? (v(), R(P, { key: 0 }, [
378
+ ue.value ? (v(), M(Q, {
379
+ key: 0,
380
+ "model-value": G.value === d.value,
381
+ header: d.label,
382
+ "dismiss-away": "",
383
+ "z-index": 100,
384
+ class: "h-5 flex items-center",
385
+ "onUpdate:modelValue": (f) => {
386
+ G.value = f ? d.value : null, f || o(m).clearDraftsForSubject(d.value);
387
+ }
388
+ }, {
389
+ "bottom-sheet-button": g(() => [
390
+ u("div", Rs, [
391
+ c(r, {
392
+ name: "settings",
393
+ size: "sm",
394
+ class: Ue([
395
+ "cursor-pointer transition-colors",
396
+ w(d.value) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
397
+ ])
398
+ }, null, 8, ["class"])
399
+ ])
400
+ ]),
401
+ default: g(() => [
402
+ c(De, {
403
+ builders: o(b),
404
+ "form-value-for": (f) => _(d.value, f),
405
+ "has-changes": Ce(d.value),
406
+ disable: k.value,
407
+ "full-width": !0,
408
+ onUpdateForm: ({ builder: f, form: X }) => j(d.value, f, X),
409
+ onApply: (f) => Fe(d.value, () => G.value = null)
410
+ }, null, 8, ["builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
411
+ ]),
412
+ _: 2
413
+ }, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (v(), M(He, {
414
+ key: 1,
415
+ disabled: k.value,
416
+ "z-index": 100,
417
+ "exclude-el-from-click-outside": [Us],
418
+ class: "h-5 flex items-center",
419
+ onPopoverChanged: (f) => {
420
+ f || o(m).clearDraftsForSubject(d.value);
421
+ }
422
+ }, {
423
+ "popover-button": g(() => [
424
+ u("div", ws, [
425
+ c(r, {
426
+ name: "settings",
427
+ size: "sm",
428
+ class: Ue([
429
+ "cursor-pointer transition-colors",
430
+ w(d.value) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
431
+ ])
432
+ }, null, 8, ["class"])
433
+ ])
434
+ ]),
435
+ default: g(({ hide: f }) => [
436
+ c(De, {
437
+ title: d.label,
438
+ builders: o(b),
439
+ "form-value-for": (X) => _(d.value, X),
440
+ "has-changes": Ce(d.value),
441
+ disable: k.value,
442
+ onUpdateForm: ({ builder: X, form: Ye }) => j(d.value, X, Ye),
443
+ onApply: (X) => Fe(d.value, f)
444
+ }, null, 8, ["title", "builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
445
+ ]),
446
+ _: 2
447
+ }, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
448
+ ], 64)) : (v(), M(r, {
449
+ key: 1,
450
+ name: "settings",
451
+ size: "sm",
452
+ class: "invisible"
453
+ }))
454
+ ], 64)) : _e("", !0)
455
+ ]),
456
+ d.value === "order:discount" && l.value.permissions.includes(d.value) ? (v(), R("div", ks, [
457
+ u("div", Vs, $(o(t)("hr.role.form.maxDiscountPercentage")), 1),
458
+ c(x, {
459
+ modelValue: l.value.maxDiscountPercentage,
460
+ "onUpdate:modelValue": s[5] || (s[5] = (f) => l.value.maxDiscountPercentage = f),
461
+ rules: [
462
+ (f) => !!f || o(t)("hr.role.form.required"),
463
+ (f) => !isNaN(f) || o(t)("hr.role.form.onlyContainsNumber"),
464
+ (f) => f <= 100 || o(t)("hr.role.form.maxValueIs", { max: 100 }),
465
+ (f) => f >= 0 || o(t)("hr.role.form.minValueIs", { min: 0 })
466
+ ],
467
+ "append-text": "%",
468
+ disabled: k.value
469
+ }, null, 8, ["modelValue", "rules", "disabled"])
470
+ ])) : _e("", !0)
471
+ ]))), 128))
472
+ ])
473
+ ]),
474
+ _: 2
475
+ }, 1024)
476
+ ]),
477
+ _: 2
478
+ }, 1024))), 128))
479
+ ]),
480
+ _: 1
481
+ }, 8, ["title"])
482
+ ])
483
+ ]),
484
+ _: 1
485
+ }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]);
486
+ };
487
+ }
488
+ }), Ls = {
489
+ class: "space-y-8"
490
+ }, $s = {
491
+ class: "flex justify-end xs:px-16"
492
+ }, Is = {
493
+ class: "flex flex-col h-full overflow-auto"
494
+ }, Ds = {
495
+ class: "pb-64 sm:hidden md:hidden lg:hidden"
496
+ }, Ps = {
497
+ class: "space-y-4"
498
+ }, Ms = {
499
+ class: "fm-typo-en-body-lg-600"
500
+ }, Ts = {
501
+ class: "text-fm-color-typo-secondary"
502
+ }, Bs = {
503
+ class: "line-clamp-2"
504
+ }, js = {
505
+ class: "font-bold"
506
+ }, As = {
507
+ class: "flex items-start gap-4"
508
+ }, Os = {
509
+ class: "line-clamp-2"
510
+ }, Ns = {
511
+ class: "font-bold"
512
+ }, zs = {
513
+ class: "flex items-start gap-4"
514
+ }, Ks = {
515
+ class: "line-clamp-2"
516
+ }, Js = {
517
+ class: "font-bold"
518
+ }, it = /* @__PURE__ */ Pe({
519
+ __name: "RoleList",
520
+ setup(se, {
521
+ expose: te
522
+ }) {
523
+ const {
524
+ t
525
+ } = Te(), {
526
+ allReportPermissions: I
527
+ } = Ne(), ue = xe(), z = y(() => ue.restaurants.value), T = y(() => z.value.map((a) => a._id));
528
+ function U(a, n) {
529
+ const i = n === L.F_RULE_SUBJECT.enum.report ? I.value : void 0, m = oe(a, n, i);
530
+ return ["-", "All"].includes(m) ? () => null : () => A(ye.FmTooltip, {
531
+ "z-index": "999",
532
+ placement: "top",
533
+ class: "ml-2"
534
+ }, {
535
+ content: () => A("div", [t("hr.role.tooltip.labels.permission"), ...a.filter((b) => b.subject === n).map((b) => A("div", ["- ", ie(b).label]))]),
536
+ default: () => A(ye.FmIcon, {
537
+ name: "info",
538
+ color: ss.NeutralGray400
539
+ })
540
+ });
541
+ }
542
+ function Y(a, n) {
543
+ const i = n === L.F_RULE_SUBJECT.enum.report ? I.value : void 0, m = oe(a, n, i);
544
+ return () => m === "All" ? m : A("div", {
545
+ class: "flex items-center"
546
+ }, [m, U(a, n)()]);
547
+ }
548
+ function K(a) {
549
+ return [{
550
+ label: t("hr.role.form.update"),
551
+ onClick: () => J(a)
552
+ }, {
553
+ label: t("hr.role.remove.title"),
554
+ onClick: () => fe(a),
555
+ itemClass: "text-fm-color-typo-error",
556
+ disabled: Ae(a.permissions)
557
+ }];
558
+ }
559
+ const ce = ({
560
+ role: a,
561
+ className: n = ""
562
+ }) => c("div", {
563
+ class: n,
564
+ onClick: (i) => {
565
+ i.stopPropagation();
566
+ }
567
+ }, [c($e, {
568
+ items: K(a)
569
+ }, null)]), me = [{
570
+ accessorKey: "name",
571
+ header: () => t("hr.role.columns.name"),
572
+ enableSorting: !1
573
+ }, {
574
+ accessorKey: "operation",
575
+ header: () => t("hr.role.columns.operation"),
576
+ cell: (a) => A(Y(a.row.original.permissions, L.F_RULE_SUBJECT.enum.order)),
577
+ enableSorting: !1
578
+ }, {
579
+ accessorKey: "report",
580
+ header: () => t("hr.role.columns.report"),
581
+ cell: (a) => A(Y(a.row.original.permissions, L.F_RULE_SUBJECT.enum.report)),
582
+ enableSorting: !1
583
+ }, {
584
+ accessorKey: "restaurants",
585
+ header: () => t("hr.role.columns.restaurants"),
586
+ cell: (a) => a.row.original.restaurants.map((n, i) => {
587
+ const m = n.code, b = `${m ? m + " - " : ""}${n.name}`;
588
+ return A("div", (i ? `
589
+ ` : "") + b);
590
+ }),
591
+ enableSorting: !1
592
+ }, {
593
+ id: "action",
594
+ size: 52,
595
+ meta: {
596
+ cellClass: "pl-16",
597
+ headerContentClass: "-mx-16"
598
+ },
599
+ cell: (a) => ce({
600
+ role: a.row.original,
601
+ className: "flex w-full items-center justify-end"
602
+ })
603
+ }], J = async (a) => {
604
+ var n;
605
+ h.value = a._id, await Le(), (n = O.value) == null || n.trigger();
606
+ }, B = Oe(), ae = vs(), de = y(() => {
607
+ const a = B.roles.value || [];
608
+ return (T.value.length === 0 ? a : a.filter((i) => i.restaurants.some((m) => T.value.includes(m.id)))).map((i) => {
609
+ const m = i.restaurants.map((b) => {
610
+ const w = ae.value[b.id];
611
+ return {
612
+ ...b,
613
+ // Prefer live data from restaurantMap so names populate reactively
614
+ // even when restaurants loaded after roles.
615
+ name: (w == null ? void 0 : w.profile.name) || b.name,
616
+ code: w == null ? void 0 : w.profile.code
617
+ };
618
+ });
619
+ return {
620
+ ...i,
621
+ restaurants: m
622
+ };
623
+ });
624
+ }), q = y(() => {
625
+ var n;
626
+ return (n = de.value) == null ? void 0 : n.filter((i) => {
627
+ const m = Z.value.toLowerCase(), b = i.name.toLowerCase().includes(m), _ = (i.restaurants || []).some((j) => {
628
+ var G;
629
+ return j.name.toLowerCase().includes(m) || ((G = j.code) == null ? void 0 : G.toLowerCase().includes(m));
630
+ });
631
+ return b || _;
632
+ });
633
+ }), W = es(), C = je(), {
634
+ breakpoints: pe
635
+ } = Be(), fe = (a) => {
636
+ W.open({
637
+ title: t("hr.role.remove.title"),
638
+ message: t("hr.role.remove.message", {
639
+ name: a.name
640
+ }),
641
+ minWidth: pe.value.lg ? 588 : 0,
642
+ primaryActions: {
643
+ text: t("common.remove"),
644
+ close: !1,
645
+ variant: "destructive"
646
+ },
647
+ secondaryActions: {
648
+ text: t("common.cancel"),
649
+ close: !0
650
+ }
651
+ }).onPrimary(async () => {
652
+ await B.deleteRole(a).then(() => C.open({
653
+ message: t("hr.role.remove.successMessage", {
654
+ name: a.name
655
+ }),
656
+ type: "success"
657
+ })).catch((n) => C.open({
658
+ message: n,
659
+ type: "error"
660
+ })), W.close();
661
+ });
662
+ }, Z = V(""), O = V(), h = V(void 0);
663
+ async function N() {
664
+ var a;
665
+ h.value = void 0, await Le(), (a = O.value) == null || a.trigger();
666
+ }
667
+ async function l() {
668
+ if (B.roles.value.length === 0)
669
+ try {
670
+ await B.readRoles();
671
+ } catch (a) {
672
+ console.error("Failed to load roles:", a), C.open({
673
+ message: a instanceof Error ? a.message : String(a),
674
+ type: "error"
675
+ });
676
+ }
677
+ }
678
+ return Me(() => {
679
+ l();
680
+ }), te({
681
+ create: N
682
+ }), (a, n) => {
683
+ const i = F("FmSearch"), m = F("FmTable"), b = F("FmListItem"), w = F("FmList");
684
+ return v(), R(P, null, [(v(), M(Es, {
685
+ id: h.value,
686
+ key: h.value,
687
+ ref_key: "roleFormRef",
688
+ ref: O
689
+ }, null, 8, ["id"])), u("div", Ls, [u("div", $s, [c(i, {
690
+ modelValue: Z.value,
691
+ "onUpdate:modelValue": n[0] || (n[0] = (_) => Z.value = _),
692
+ class: "w-[320px] xs:w-full",
693
+ autofocus: "",
694
+ placeholder: o(t)("hr.role.search.placeholder") + " / " + o(t)("hr.restaurant.search.placeholder")
695
+ }, null, 8, ["modelValue", "placeholder"])]), c(rs, null, {
696
+ default: g(() => [u("div", Is, [c(ns, {
697
+ "is-loading": o(B).isLoading.value,
698
+ "is-empty": q.value.length === 0,
699
+ "collapse-at": "xs",
700
+ title: o(t)("hr.role.noData.title"),
701
+ subtitle: o(t)("hr.role.noData.subtitle")
702
+ }, {
703
+ default: g(() => [c(m, {
704
+ class: "xs:hidden",
705
+ "column-defs": me,
706
+ "row-data": q.value,
707
+ "page-size": q.value.length,
708
+ loading: o(B).isLoading.value,
709
+ "pin-header-row": "",
710
+ "hide-footer": "",
711
+ "shrink-at": !1,
712
+ onRowClick: n[1] || (n[1] = (_) => J(_.original))
713
+ }, null, 8, ["row-data", "page-size", "loading"])]),
714
+ _: 1
715
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"]), u("div", Ds, [c(w, {
716
+ separator: ""
717
+ }, {
718
+ default: g(() => [(v(!0), R(P, null, ne(q.value, (_) => (v(), M(b, {
719
+ key: _._id,
720
+ class: "py-12 px-16 items-center justify-between",
721
+ onClick: (j) => J(_)
722
+ }, {
723
+ default: g(() => [u("div", Ps, [u("p", Ms, $(_.name), 1), u("div", Ts, [u("p", Bs, [u("span", js, $(o(t)("hr.role.labels.restaurant")) + ":", 1), ge(" " + $(_.restaurants.map((j) => j.name).join(", ")), 1)]), u("p", As, [u("span", Os, [u("span", Ns, $(o(t)("hr.role.labels.operation")) + ":", 1), ge(" " + $(o(oe)(_.permissions, o(L.F_RULE_SUBJECT).enum.order)), 1)]), (v(), M(Ee(U(_.permissions, o(L.F_RULE_SUBJECT).enum.order))))]), u("p", zs, [u("span", Ks, [u("span", Js, $(o(t)("hr.role.labels.report")) + ":", 1), ge(" " + $(o(oe)(_.permissions, o(L.F_RULE_SUBJECT).enum.report, o(I))), 1)]), (v(), M(Ee(U(_.permissions, o(L.F_RULE_SUBJECT).enum.report))))])])]), u("div", {
724
+ onClick: n[2] || (n[2] = Ze(() => {
725
+ }, ["stop"]))
726
+ }, [c($e, {
727
+ items: K(_)
728
+ }, null, 8, ["items"])])]),
729
+ _: 2
730
+ }, 1032, ["onClick"]))), 128))]),
731
+ _: 1
732
+ })])])]),
733
+ _: 1
734
+ })])], 64);
735
+ };
736
+ }
737
+ });
738
+ export {
739
+ it as default
740
+ };