@feedmepos/mf-hrm-portal 2.3.2-dev → 2.3.2-dev.10
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.
- package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-RKU5B8SO.js} +14 -15
- package/dist/AuditLogList-DuDCMjGR.js +2026 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js} +10 -10
- package/dist/{EmployeeList-BG2KPvOB.js → EmployeeList-nrYsS5uz.js} +196 -208
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-7S2w36aY.js +90 -0
- package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-BSjeC4MC.js} +15 -16
- package/dist/{Main-Cg9SOzcz.js → Main-CpuHaXU6.js} +5 -5
- package/dist/{Main-BSHf8gTE.js → Main-DbdoVLCE.js} +12 -11
- package/dist/{Main-BcixH7R5.js → Main-DtmCBbTR.js} +1005 -999
- package/dist/MyPosProfile-CsTCfGNT.js +360 -0
- package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-B1c-uGZO.js} +82 -80
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +4208 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-D6Z9z_Yt.js +1831 -0
- package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-TWTVo_9Y.js +547 -0
- package/dist/RoleList-CwaGNsFy.js +265 -0
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js +544 -0
- package/dist/ScheduleGeneralPage-BVtXmxtp.js +811 -0
- package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-DdsQ8v-5.js +2557 -0
- package/dist/SchedulePage-3qksmT2I.js +19446 -0
- package/dist/SchedulePositionPage-DAU20KPZ.js +282 -0
- package/dist/SelectFilter-BpzBwBmQ.js +263 -0
- package/dist/TeamMemberList-Bdpm40i3.js +2087 -0
- package/dist/TimesheetList-CL_eJp2h.js +437 -0
- package/dist/{app-CdrnR_Pw.js → app-DEZT4wdV.js} +14439 -5834
- package/dist/app.js +1 -1
- package/dist/{approval-code-Bwvwehz9.js → approval-code-BZTz5OXK.js} +4 -4
- package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-B55I-uhI.js} +12 -12
- package/dist/employee-C6z5i6O4.js +172 -0
- package/dist/{grant-user-whFOaPZI.js → grant-user-B2rYztyf.js} +2 -2
- package/dist/{iteration-ZpERYj3o.js → index-Bfdseotz.js} +698 -726
- package/dist/iteration-CcXrOMQe.js +30 -0
- package/dist/{lodash-7SZBZ8VQ.js → lodash-B8bqa6a9.js} +1 -1
- package/dist/member-grant-BIpKkuu8.js +54 -0
- package/dist/object-Dwyg2LgX.js +16 -0
- package/dist/restaurant-ejyX2jEG.js +52 -0
- package/dist/role-C_t3DDlG.js +98 -0
- package/dist/rule-Ccopk8R_.js +843 -0
- package/dist/src/api/audit-log/index.d.ts +6 -0
- package/dist/src/api/employee/index.d.ts +3 -4
- package/dist/src/api/my-pos-profile/index.d.ts +1 -3
- package/dist/src/api/restaurant/index.d.ts +2 -0
- package/dist/src/api/schedule/index.d.ts +68 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +1 -2
- package/dist/src/api/timesheet/index.d.ts +1 -1
- package/dist/src/components/AppForm.vue.d.ts +2 -2
- package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
- package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
- package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
- package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
- package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
- package/dist/src/composables/useMessage.d.ts +8 -2
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/pos-assignment-rows.d.ts +2 -0
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/helpers/staff-invite.d.ts +3 -0
- package/dist/src/router/shared.d.ts +3 -0
- package/dist/src/stores/approval-code.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +15 -21
- package/dist/src/stores/grant-user.d.ts +1 -1
- package/dist/src/stores/permission-assignment.d.ts +2 -2
- package/dist/src/stores/permission-set.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +63 -3
- package/dist/src/stores/role.d.ts +2 -2
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/stores/timesheet.d.ts +68 -53
- package/dist/src/types/employee.d.ts +1 -0
- package/dist/src/types/my-pos-profile.d.ts +2 -3
- package/dist/src/types/schedule.d.ts +23 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/timesheet.d.ts +3 -0
- package/dist/src/views/audit-log/constants.d.ts +9 -30
- package/dist/src/views/audit-log/locales/index.d.ts +528 -0
- package/dist/src/views/audit-log/pos-row.d.ts +27 -0
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
- package/dist/src/views/hr/locales/index.d.ts +24 -4
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
- package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
- package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
- package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
- package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
- package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
- package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
- package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
- package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
- package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
- package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
- package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
- package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
- package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
- package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
- package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
- package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
- package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
- package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
- package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
- package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
- package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
- package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
- package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
- package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
- package/dist/src/views/scheduling/data.d.ts +123 -0
- package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
- package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
- package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
- package/dist/src/views/scheduling/types.d.ts +381 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +2 -6
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -2
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -2
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
- package/dist/style.css +1 -1
- package/dist/timesheet-CZHcebqS.js +76 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CL6EEDuw.js → useAppStore-DfqsbhT2.js} +1 -1
- package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
- package/dist/{useLoading-BBjBUzGJ.js → useLoading-CQnX5WjI.js} +1 -1
- package/dist/useMessage-_ywT_N9X.js +17 -0
- package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-kTjftFk7.js} +13 -13
- package/package.json +7 -5
- package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
- package/dist/RoleList-ALmAwN0U.js +0 -739
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
- package/dist/TimesheetList-CECFKt7H.js +0 -402
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js +0 -58
- package/dist/employee-Dg-J9goA.js +0 -205
- package/dist/member-grant-C46lvrh2.js +0 -55
- package/dist/restaurant-CKhT6kgj.js +0 -45
- package/dist/role-C6hFKOfU.js +0 -93
- package/dist/rule-BlMymDXm.js +0 -788
- package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { defineComponent as B, ref as C, resolveComponent as m, createBlock as s, openBlock as t, withCtx as l, createElementVNode as x, renderSlot as v, createCommentVNode as k, withModifiers as $, nextTick as V, createElementBlock as _, normalizeClass as M, createTextVNode as w, toDisplayString as g, computed as S, Fragment as F, renderList as h, createVNode as I } from "vue";
|
|
2
|
+
import { useBreakpoints as N } from "@feedmepos/ui-library";
|
|
3
|
+
const z = /* @__PURE__ */ B({
|
|
4
|
+
__name: "BottomSheetMenu",
|
|
5
|
+
setup(o) {
|
|
6
|
+
const e = C(!1);
|
|
7
|
+
async function r() {
|
|
8
|
+
await V(), e.value = !e.value;
|
|
9
|
+
}
|
|
10
|
+
return (u, n) => {
|
|
11
|
+
const f = m("FmButton"), y = m("FmBottomSheet");
|
|
12
|
+
return t(), s(y, {
|
|
13
|
+
modelValue: e.value,
|
|
14
|
+
"onUpdate:modelValue": n[1] || (n[1] = (d) => e.value = d),
|
|
15
|
+
"dismiss-away": "",
|
|
16
|
+
"no-header": "",
|
|
17
|
+
"z-index": 110
|
|
18
|
+
}, {
|
|
19
|
+
"bottom-sheet-button": l(() => [
|
|
20
|
+
u.$slots.button ? k("", !0) : (t(), s(f, {
|
|
21
|
+
key: 0,
|
|
22
|
+
icon: "more_vert",
|
|
23
|
+
variant: "tertiary",
|
|
24
|
+
onClick: $(r, ["stop"])
|
|
25
|
+
})),
|
|
26
|
+
v(u.$slots, "button")
|
|
27
|
+
]),
|
|
28
|
+
default: l(() => [
|
|
29
|
+
x("div", {
|
|
30
|
+
onClick: n[0] || (n[0] = (d) => e.value = !1)
|
|
31
|
+
}, [
|
|
32
|
+
v(u.$slots, "default")
|
|
33
|
+
])
|
|
34
|
+
]),
|
|
35
|
+
_: 3
|
|
36
|
+
}, 8, ["modelValue"]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}), E = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, T = /* @__PURE__ */ B({
|
|
40
|
+
__name: "BottomSheetMenuItem",
|
|
41
|
+
props: {
|
|
42
|
+
label: {},
|
|
43
|
+
icon: {},
|
|
44
|
+
disabled: { type: Boolean },
|
|
45
|
+
itemClass: {}
|
|
46
|
+
},
|
|
47
|
+
setup(o) {
|
|
48
|
+
const e = o;
|
|
49
|
+
return (r, u) => {
|
|
50
|
+
const n = m("FmIcon");
|
|
51
|
+
return t(), _("div", E, [
|
|
52
|
+
r.$slots.content ? k("", !0) : (t(), _("div", {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: M(["flex items-center", {
|
|
55
|
+
"text-fm-color-typo-disabled": e.disabled,
|
|
56
|
+
"cursor-pointer": !e.disabled,
|
|
57
|
+
"cursor-not-allowed": e.disabled,
|
|
58
|
+
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
59
|
+
}])
|
|
60
|
+
}, [
|
|
61
|
+
o.icon ? (t(), s(n, {
|
|
62
|
+
key: 0,
|
|
63
|
+
name: o.icon
|
|
64
|
+
}, null, 8, ["name"])) : k("", !0),
|
|
65
|
+
w(" " + g(o.label), 1)
|
|
66
|
+
], 2)),
|
|
67
|
+
v(r.$slots, "content")
|
|
68
|
+
]);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}), R = /* @__PURE__ */ B({
|
|
72
|
+
__name: "ResponsiveContextMenu",
|
|
73
|
+
props: {
|
|
74
|
+
items: {}
|
|
75
|
+
},
|
|
76
|
+
setup(o) {
|
|
77
|
+
const e = N(), r = S(() => e.breakpoints.value.xs);
|
|
78
|
+
return (u, n) => {
|
|
79
|
+
const f = m("FmButton"), y = m("FmMenuItem"), d = m("FmMenu");
|
|
80
|
+
return r.value ? (t(), s(z, { key: 0 }, {
|
|
81
|
+
default: l(() => [
|
|
82
|
+
(t(!0), _(F, null, h(o.items, ({ icon: i, label: a, disabled: p, itemClass: c, onClick: b }) => (t(), s(T, {
|
|
83
|
+
key: a,
|
|
84
|
+
icon: i,
|
|
85
|
+
label: a,
|
|
86
|
+
disabled: p,
|
|
87
|
+
itemClass: c,
|
|
88
|
+
onClick: () => {
|
|
89
|
+
!p && (b == null || b());
|
|
90
|
+
}
|
|
91
|
+
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
})) : (t(), s(d, {
|
|
95
|
+
key: 1,
|
|
96
|
+
"stop-click-propagation": "",
|
|
97
|
+
shift: !0
|
|
98
|
+
}, {
|
|
99
|
+
"menu-button": l(() => [
|
|
100
|
+
I(f, {
|
|
101
|
+
type: "button",
|
|
102
|
+
variant: "tertiary",
|
|
103
|
+
icon: "more_vert",
|
|
104
|
+
"text-color": "neutral-gray-400",
|
|
105
|
+
size: "md"
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
default: l(() => [
|
|
109
|
+
(t(!0), _(F, null, h(o.items, ({ label: i, disabled: a, itemClass: p, onClick: c }) => (t(), s(y, {
|
|
110
|
+
key: i,
|
|
111
|
+
disabled: a,
|
|
112
|
+
label: i,
|
|
113
|
+
onClick: () => {
|
|
114
|
+
!a && (c == null || c());
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
label: l(() => [
|
|
118
|
+
x("span", {
|
|
119
|
+
class: M(a ? "text-fm-color-typo-disabled" : p)
|
|
120
|
+
}, g(i), 3)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, 1032, ["disabled", "label", "onClick"]))), 128))
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}));
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
export {
|
|
131
|
+
R as _
|
|
132
|
+
};
|
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { defineComponent as ze, computed as y, ref as D, watch as q, onMounted as Le, resolveComponent as w, createBlock as E, openBlock as h, unref as o, withCtx as V, createElementVNode as c, createVNode as _, toDisplayString as M, createElementBlock as S, Fragment as z, renderList as ee, createCommentVNode as te, normalizeClass as he } from "vue";
|
|
2
|
+
import { l as W } from "./lodash-B8bqa6a9.js";
|
|
3
|
+
import { e as be } from "./index-Bfdseotz.js";
|
|
4
|
+
import { useI18n as Ne } from "@feedmepos/mf-common";
|
|
5
|
+
import { useBreakpoints as Ke, useSnackbar as Te, components as qe } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as We, _ as Ge, a as _e } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js";
|
|
7
|
+
import { u as Je } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
8
|
+
import { u as He } from "./useLoading-CQnX5WjI.js";
|
|
9
|
+
import { u as Qe } from "./useReportPermissions-kTjftFk7.js";
|
|
10
|
+
import { s as Xe, j as Ye, A as Ze, S as et } from "./app-DEZT4wdV.js";
|
|
11
|
+
import { r as ae, h as tt, d as at, s as st, g as ge, e as lt } from "./rule-Ccopk8R_.js";
|
|
12
|
+
import { u as rt } from "./restaurant-ejyX2jEG.js";
|
|
13
|
+
import { u as ot } from "./role-C_t3DDlG.js";
|
|
14
|
+
function Tt(d) {
|
|
15
|
+
const n = [];
|
|
16
|
+
for (const { restaurantId: m, roleId: a } of d) {
|
|
17
|
+
if (!m) continue;
|
|
18
|
+
const u = n.find((x) => x.roleId === a);
|
|
19
|
+
u ? u.restaurantIds.push(m) : n.push({ restaurantIds: [m], roleId: a });
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function qt(d) {
|
|
24
|
+
return d.flatMap(
|
|
25
|
+
(n) => n.restaurantIds.map((m) => ({ restaurantId: m, roleId: n.roleId }))
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function Wt(d, n) {
|
|
29
|
+
const m = (a) => a.map((u) => `${u.restaurantId}:${u.roleId}`).sort().join("|");
|
|
30
|
+
return m(d) === m(n);
|
|
31
|
+
}
|
|
32
|
+
function se(d) {
|
|
33
|
+
return `${d.profile.code ? `${d.profile.code} - ` : ""}${d.profile.name}`;
|
|
34
|
+
}
|
|
35
|
+
function Gt(d, n) {
|
|
36
|
+
return d.filter((m) => n.restaurantIds.includes(m._id)).map(se).join(", ");
|
|
37
|
+
}
|
|
38
|
+
function Jt(d, n, m) {
|
|
39
|
+
var x;
|
|
40
|
+
const a = ((x = n[m]) == null ? void 0 : x.restaurantIds) ?? [], u = new Set(n.flatMap((v, P) => P === m ? [] : v.restaurantIds));
|
|
41
|
+
return d.filter((v) => v.managable || a.includes(v._id)).map((v) => ({
|
|
42
|
+
label: se(v),
|
|
43
|
+
value: v._id,
|
|
44
|
+
disabled: u.has(v._id)
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
function nt(d, n, m) {
|
|
48
|
+
return n.restaurantIds.length === 0 ? [] : d.filter(
|
|
49
|
+
(a) => n.restaurantIds.every((u) => a.restaurants.some((x) => x.id === u))
|
|
50
|
+
).map((a) => ({
|
|
51
|
+
label: a.name,
|
|
52
|
+
value: a._id,
|
|
53
|
+
disabled: !m(a) && a._id !== n.roleId
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
function Ht(d, n, m) {
|
|
57
|
+
var u, x;
|
|
58
|
+
const a = nt(d, n, m);
|
|
59
|
+
return ((u = a.find((v) => v.value === n.roleId && !v.disabled)) == null ? void 0 : u.value) ?? ((x = a.find((v) => !v.disabled)) == null ? void 0 : x.value) ?? "";
|
|
60
|
+
}
|
|
61
|
+
function Qt(d, n) {
|
|
62
|
+
const m = new Set(n.flatMap((u) => u.restaurantIds));
|
|
63
|
+
return d.some((u) => u.managable && !m.has(u._id)) && n.every((u) => u.restaurantIds.length > 0 && u.roleId);
|
|
64
|
+
}
|
|
65
|
+
const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 flex-1 truncate fm-typo-en-title-md-600" }, dt = { class: "flex flex-col gap-24" }, mt = { class: "flex flex-col gap-16 rounded-[16px] border border-fm-color-neutral-gray-300 p-16" }, ct = { class: "fm-typo-en-title-sm-600" }, ft = { class: "flex flex-col gap-16 rounded-[16px] border border-fm-color-neutral-gray-200 p-16" }, pt = { class: "fm-typo-en-title-sm-600" }, vt = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "flex justify-center py-16"
|
|
68
|
+
}, ht = { class: "flex flex-col gap-8" }, bt = { class: "flex flex-col gap-16 rounded-[16px] border border-fm-color-neutral-gray-200 p-16" }, _t = { class: "flex flex-col gap-8" }, gt = { class: "fm-typo-en-title-sm-600" }, yt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xt = { class: "flex flex-col gap-24" }, Rt = { class: "text-[18px] font-semibold leading-[24px] text-fm-color-typo-primary" }, It = { class: "mt-16 space-y-8" }, Ft = { class: "flex items-center" }, kt = { class: "h-[24px] w-[24px] flex items-center justify-center" }, wt = { class: "h-[24px] w-[24px] flex items-center justify-center" }, Vt = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "ml-20 mt-8 flex max-w-[320px] flex-row items-start gap-8"
|
|
71
|
+
}, Ct = { class: "mt-8 whitespace-nowrap" }, Dt = { class: "flex gap-8 items-center justify-start" }, St = "condition-form-select-menu", Xt = /* @__PURE__ */ ze({
|
|
72
|
+
__name: "RoleForm",
|
|
73
|
+
props: {
|
|
74
|
+
id: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: void 0
|
|
77
|
+
},
|
|
78
|
+
/** Outlets ticked when creating a role (the member sheet passes the row's outlets). */
|
|
79
|
+
restaurantIds: {
|
|
80
|
+
type: Array,
|
|
81
|
+
default: () => []
|
|
82
|
+
},
|
|
83
|
+
/** Opened over another sheet: a back arrow returns to it. */
|
|
84
|
+
showBack: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: !1
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
emits: ["created"],
|
|
90
|
+
setup(d, { expose: n, emit: m }) {
|
|
91
|
+
const { t: a } = Ne(), { breakpoints: u } = Ke(), x = y(() => u.value.xs || u.value.sm), v = rt(), P = y(() => v.restaurants.value), le = D(v.restaurants.value.length === 0);
|
|
92
|
+
q(
|
|
93
|
+
() => v.restaurants.value.length,
|
|
94
|
+
(e) => {
|
|
95
|
+
e > 0 && (le.value = !1);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
const B = ot(), ye = Te(), xe = He(ye), {
|
|
99
|
+
fetchReportPermissions: re,
|
|
100
|
+
allReportPermissions: Re,
|
|
101
|
+
availableReportKeys: oe,
|
|
102
|
+
customReportKeys: Ie,
|
|
103
|
+
isLoaded: Fe
|
|
104
|
+
} = Qe(), L = d, ke = m, R = D(!1), we = () => {
|
|
105
|
+
R.value = !R.value, R.value && fe();
|
|
106
|
+
}, Ve = y(() => L.id ? a("hr.role.form.update") : a("hr.role.form.addTitle")), Ce = y(() => L.id ? a("common.update") : a("hr.role.form.add")), G = y(() => {
|
|
107
|
+
const e = Xe.filter(
|
|
108
|
+
(l) => l.subject !== be.F_RULE_SUBJECT.enum.report
|
|
109
|
+
).map((l) => ae(l)), t = Re.value.map((l) => ae(l));
|
|
110
|
+
return [...e, ...t];
|
|
111
|
+
}), b = y(() => B.roles.value.find((e) => e._id == L.id)), N = () => ({
|
|
112
|
+
name: "",
|
|
113
|
+
restaurantIds: [],
|
|
114
|
+
permissions: [],
|
|
115
|
+
maxDiscountPercentage: 100
|
|
116
|
+
}), s = D(N()), J = D([]), K = D([]), ne = D([]), I = D(/* @__PURE__ */ new Map()), U = We(I), H = Ye("report");
|
|
117
|
+
function ue(e) {
|
|
118
|
+
const t = I.value.get(e);
|
|
119
|
+
return !!t && Object.keys(t).length > 0;
|
|
120
|
+
}
|
|
121
|
+
function ie(e, t) {
|
|
122
|
+
const l = U.getDraft({ subject: e, builderKey: t.builderKey });
|
|
123
|
+
return l ? l.formValue : t.fromCondition(
|
|
124
|
+
Ze(I.value.get(e), t)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
function de(e, t, l) {
|
|
128
|
+
U.setDraft({ subject: e, builderKey: t.builderKey }, { formValue: l });
|
|
129
|
+
}
|
|
130
|
+
const Q = D(null);
|
|
131
|
+
function me(e, t) {
|
|
132
|
+
if (U.getDraftsForSubject(e).size === 0) {
|
|
133
|
+
t == null || t();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const p = [];
|
|
137
|
+
for (const C of H) {
|
|
138
|
+
const O = U.getDraft({ subject: e, builderKey: C.builderKey });
|
|
139
|
+
O && p.push({ builder: C, form: O.formValue });
|
|
140
|
+
}
|
|
141
|
+
if (p.length === 0) {
|
|
142
|
+
t == null || t();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const j = I.value.get(e), F = et(
|
|
146
|
+
j,
|
|
147
|
+
p.map(({ builder: C, form: O }) => ({ builder: C, formValue: O }))
|
|
148
|
+
), k = new Map(I.value);
|
|
149
|
+
Object.keys(F).length === 0 ? k.delete(e) : k.set(e, F), I.value = k, U.clearDraftsForSubject(e), t == null || t();
|
|
150
|
+
}
|
|
151
|
+
function ce(e) {
|
|
152
|
+
return U.hasDraftsForSubject(e);
|
|
153
|
+
}
|
|
154
|
+
const De = y(() => [
|
|
155
|
+
{
|
|
156
|
+
title: a("hr.role.labels.operation"),
|
|
157
|
+
filter: (e) => e.isOrderOperation
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: a("hr.role.labels.report"),
|
|
161
|
+
filter: (e) => e.isReportPermission
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
title: a("hr.role.labels.other"),
|
|
165
|
+
filter: (e) => !e.isOrderOperation && !e.isReportPermission
|
|
166
|
+
}
|
|
167
|
+
].map((e) => ({
|
|
168
|
+
title: e.title,
|
|
169
|
+
options: G.value.filter(e.filter).map(({ label: t, value: l }) => {
|
|
170
|
+
const p = a(`hr.role.form.permissionLabels.${l}`, t);
|
|
171
|
+
return l.startsWith($) && Ie.value.has(l.slice($.length)) ? {
|
|
172
|
+
label: `${p} ${a("hr.role.form.v8OnlyReportTag")}`,
|
|
173
|
+
value: l
|
|
174
|
+
} : {
|
|
175
|
+
label: p,
|
|
176
|
+
value: l
|
|
177
|
+
};
|
|
178
|
+
})
|
|
179
|
+
}))), g = y(() => {
|
|
180
|
+
var e;
|
|
181
|
+
return tt(((e = b.value) == null ? void 0 : e.permissions) || []);
|
|
182
|
+
}), $ = `${be.F_RULE_SUBJECT.enum.report}:`;
|
|
183
|
+
function X(e) {
|
|
184
|
+
return Fe.value ? e.filter(
|
|
185
|
+
(t) => !t.startsWith($) || oe.value.has(t.slice($.length))
|
|
186
|
+
) : e;
|
|
187
|
+
}
|
|
188
|
+
function fe() {
|
|
189
|
+
var e;
|
|
190
|
+
if (s.value = N(), I.value = /* @__PURE__ */ new Map(), J.value = [], s.value.name = ((e = b.value) == null ? void 0 : e.name) ?? "", g.value)
|
|
191
|
+
s.value.restaurantIds = P.value.map((t) => t._id), s.value.permissions = G.value.map((t) => t.value);
|
|
192
|
+
else if (b.value) {
|
|
193
|
+
s.value.restaurantIds = b.value.restaurants.map((F) => F.id);
|
|
194
|
+
const t = new Set(G.value.map((F) => F.value)), { values: l, passthrough: p, dropped: j } = st(
|
|
195
|
+
b.value.permissions,
|
|
196
|
+
t
|
|
197
|
+
);
|
|
198
|
+
J.value = p, j.length > 0 && console.warn("Dropping corrupted role permissions (repaired on save):", j), s.value.permissions = X(l), s.value.maxDiscountPercentage = ge(
|
|
199
|
+
b.value.permissions
|
|
200
|
+
);
|
|
201
|
+
for (const F of b.value.permissions) {
|
|
202
|
+
const k = ae(F), C = lt(F);
|
|
203
|
+
C && I.value.set(k.value, C);
|
|
204
|
+
}
|
|
205
|
+
} else
|
|
206
|
+
s.value.restaurantIds = [...L.restaurantIds];
|
|
207
|
+
K.value = [...s.value.permissions], ne.value = [...s.value.restaurantIds];
|
|
208
|
+
}
|
|
209
|
+
Le(async () => {
|
|
210
|
+
await v.readRestaurants(), await re(), R.value || fe();
|
|
211
|
+
}), q(R, async (e) => {
|
|
212
|
+
e && await re();
|
|
213
|
+
}), q(oe, () => {
|
|
214
|
+
if (R.value && b.value && !g.value) {
|
|
215
|
+
s.value.permissions = X(s.value.permissions), K.value = X(K.value);
|
|
216
|
+
const e = new Map(I.value);
|
|
217
|
+
for (const t of e.keys())
|
|
218
|
+
t.startsWith($) && !s.value.permissions.includes(t) && e.delete(t);
|
|
219
|
+
I.value = e;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
const Se = D(""), Pe = y(() => ({
|
|
223
|
+
restaurantIds: s.value.restaurantIds,
|
|
224
|
+
role: {
|
|
225
|
+
name: s.value.name,
|
|
226
|
+
permissions: [
|
|
227
|
+
...at(
|
|
228
|
+
s.value.permissions,
|
|
229
|
+
s.value.maxDiscountPercentage,
|
|
230
|
+
I.value
|
|
231
|
+
),
|
|
232
|
+
...J.value
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
})), Ue = async () => {
|
|
236
|
+
const e = Pe.value;
|
|
237
|
+
await xe.minor(
|
|
238
|
+
async () => {
|
|
239
|
+
if (b.value)
|
|
240
|
+
await B.updateRole(b.value._id, e);
|
|
241
|
+
else {
|
|
242
|
+
const t = new Set(B.roles.value.map((p) => p._id));
|
|
243
|
+
await B.createRole(e);
|
|
244
|
+
const l = B.roles.value.find((p) => !t.has(p._id));
|
|
245
|
+
l && ke("created", l._id);
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
successMessage: b.value ? a("hr.role.update.successMessage", { name: e.role.name }) : a("hr.role.add.successMessage", { name: e.role.name })
|
|
250
|
+
}
|
|
251
|
+
), R.value = !1;
|
|
252
|
+
}, Y = y(
|
|
253
|
+
() => s.value.restaurantIds.filter((e) => P.value.some((t) => t._id === e))
|
|
254
|
+
), Z = y(() => P.value.length > 0 && P.value.length === Y.value.length), je = y(() => Y.value.length > 0 && !Z.value), Ee = () => {
|
|
255
|
+
const e = s.value.restaurantIds.filter((t) => !Y.value.includes(t));
|
|
256
|
+
Z.value === !0 ? s.value.restaurantIds = e : s.value.restaurantIds = P.value.map((t) => t._id);
|
|
257
|
+
}, pe = (e) => e.map((l) => l.value).every((l) => s.value.permissions.includes(l)), Me = (e) => {
|
|
258
|
+
const t = e.filter(
|
|
259
|
+
(l) => s.value.permissions.includes(l.value)
|
|
260
|
+
).length;
|
|
261
|
+
return t === 1 ? a("hr.role.form.permissionAllowed") : a("hr.role.form.permissionsAllowed", { count: t });
|
|
262
|
+
}, Oe = (e) => {
|
|
263
|
+
const t = s.value.permissions.filter(
|
|
264
|
+
(l) => !e.map((p) => p.value).includes(l)
|
|
265
|
+
);
|
|
266
|
+
pe(e) === !0 ? s.value.permissions = t : s.value.permissions = [...t, ...e.map((l) => l.value)];
|
|
267
|
+
};
|
|
268
|
+
q(
|
|
269
|
+
() => s.value.restaurantIds,
|
|
270
|
+
(e) => {
|
|
271
|
+
e.length > 0 && (Se.value = "");
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
const T = Je(
|
|
275
|
+
() => {
|
|
276
|
+
var e, t;
|
|
277
|
+
return !W.isEqual(s.value.name, ((e = b.value) == null ? void 0 : e.name) || N().name) || !W.isEqual(s.value.restaurantIds, ne.value) || !W.isEqual(s.value.permissions, K.value) || !W.isEqual(
|
|
278
|
+
s.value.maxDiscountPercentage,
|
|
279
|
+
b.value ? ge((t = b.value) == null ? void 0 : t.permissions) : N().maxDiscountPercentage
|
|
280
|
+
);
|
|
281
|
+
},
|
|
282
|
+
() => {
|
|
283
|
+
R.value = !1;
|
|
284
|
+
}
|
|
285
|
+
);
|
|
286
|
+
return n({
|
|
287
|
+
show: R,
|
|
288
|
+
trigger: we
|
|
289
|
+
}), (e, t) => {
|
|
290
|
+
const l = w("FmButton"), p = w("FmIcon"), j = w("FmTextField"), F = w("FmCircularProgress"), k = w("FmCheckbox"), C = w("FmFormGroup"), O = w("FmBottomSheet"), Ae = w("FmPopover"), ve = w("fm-button"), Be = w("fm-side-sheet");
|
|
291
|
+
return h(), E(Be, {
|
|
292
|
+
id: "unit-form",
|
|
293
|
+
modelValue: R.value,
|
|
294
|
+
"onUpdate:modelValue": t[5] || (t[5] = (f) => R.value = f),
|
|
295
|
+
"is-container": o(qe).FmForm,
|
|
296
|
+
"is-container-props": {
|
|
297
|
+
onValidationSuccess: Ue,
|
|
298
|
+
blameFormChildOnValidationFailed: !0
|
|
299
|
+
},
|
|
300
|
+
"max-width": 960,
|
|
301
|
+
"close-button": !1,
|
|
302
|
+
"onOn:clickedAway": o(T)
|
|
303
|
+
}, {
|
|
304
|
+
"side-sheet-header": V(() => [
|
|
305
|
+
c("div", ut, [
|
|
306
|
+
d.showBack ? (h(), E(l, {
|
|
307
|
+
key: 0,
|
|
308
|
+
icon: "arrow_back",
|
|
309
|
+
variant: "tertiary",
|
|
310
|
+
size: "md",
|
|
311
|
+
"text-color": "neutral-gray-500",
|
|
312
|
+
"data-testid": "role-form-back",
|
|
313
|
+
onClick: o(T)
|
|
314
|
+
}, null, 8, ["onClick"])) : te("", !0),
|
|
315
|
+
c("p", it, M(Ve.value), 1),
|
|
316
|
+
_(p, {
|
|
317
|
+
name: "close",
|
|
318
|
+
size: "md",
|
|
319
|
+
class: "cursor-pointer",
|
|
320
|
+
onClick: o(T)
|
|
321
|
+
}, null, 8, ["onClick"])
|
|
322
|
+
])
|
|
323
|
+
]),
|
|
324
|
+
"side-sheet-footer": V(() => [
|
|
325
|
+
c("div", Dt, [
|
|
326
|
+
_(ve, {
|
|
327
|
+
label: Ce.value,
|
|
328
|
+
size: "md",
|
|
329
|
+
type: "submit",
|
|
330
|
+
variant: "primary",
|
|
331
|
+
disabled: g.value
|
|
332
|
+
}, null, 8, ["label", "disabled"]),
|
|
333
|
+
_(ve, {
|
|
334
|
+
label: o(a)("common.cancel"),
|
|
335
|
+
size: "md",
|
|
336
|
+
variant: "tertiary",
|
|
337
|
+
onClick: o(T)
|
|
338
|
+
}, null, 8, ["label", "onClick"])
|
|
339
|
+
])
|
|
340
|
+
]),
|
|
341
|
+
default: V(() => [
|
|
342
|
+
c("div", dt, [
|
|
343
|
+
c("section", mt, [
|
|
344
|
+
c("p", ct, M(o(a)("hr.role.form.roleDetail")), 1),
|
|
345
|
+
_(j, {
|
|
346
|
+
modelValue: s.value.name,
|
|
347
|
+
"onUpdate:modelValue": t[0] || (t[0] = (f) => s.value.name = f),
|
|
348
|
+
autofocus: "",
|
|
349
|
+
rules: [(f) => !!f || o(a)("hr.role.form.required")],
|
|
350
|
+
label: o(a)("hr.role.form.name"),
|
|
351
|
+
placeholder: o(a)("hr.role.form.namePlaceholder"),
|
|
352
|
+
disabled: g.value
|
|
353
|
+
}, null, 8, ["modelValue", "rules", "label", "placeholder", "disabled"])
|
|
354
|
+
]),
|
|
355
|
+
c("section", ft, [
|
|
356
|
+
c("p", pt, M(o(a)("hr.role.form.restaurant")), 1),
|
|
357
|
+
le.value ? (h(), S("div", vt, [
|
|
358
|
+
_(F)
|
|
359
|
+
])) : (h(), E(C, {
|
|
360
|
+
key: 1,
|
|
361
|
+
modelValue: s.value.restaurantIds,
|
|
362
|
+
"onUpdate:modelValue": t[2] || (t[2] = (f) => s.value.restaurantIds = f),
|
|
363
|
+
rules: [(f) => f.length > 0 || o(a)("hr.role.form.atLeastOneRestaurant")]
|
|
364
|
+
}, {
|
|
365
|
+
default: V(() => [
|
|
366
|
+
c("div", ht, [
|
|
367
|
+
_(k, {
|
|
368
|
+
"model-value": Z.value,
|
|
369
|
+
indeterminate: je.value,
|
|
370
|
+
label: o(a)("hr.role.form.all"),
|
|
371
|
+
value: "1",
|
|
372
|
+
disabled: g.value,
|
|
373
|
+
"onUpdate:modelValue": Ee
|
|
374
|
+
}, null, 8, ["model-value", "indeterminate", "label", "disabled"]),
|
|
375
|
+
(h(!0), S(z, null, ee(P.value, (f) => (h(), E(k, {
|
|
376
|
+
key: f._id,
|
|
377
|
+
modelValue: s.value.restaurantIds,
|
|
378
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => s.value.restaurantIds = r),
|
|
379
|
+
label: o(se)(f),
|
|
380
|
+
value: f._id,
|
|
381
|
+
disabled: g.value
|
|
382
|
+
}, null, 8, ["modelValue", "label", "value", "disabled"]))), 128))
|
|
383
|
+
])
|
|
384
|
+
]),
|
|
385
|
+
_: 1
|
|
386
|
+
}, 8, ["modelValue", "rules"]))
|
|
387
|
+
]),
|
|
388
|
+
c("section", bt, [
|
|
389
|
+
c("div", _t, [
|
|
390
|
+
c("p", gt, M(o(a)("hr.role.form.permissions")), 1),
|
|
391
|
+
c("p", yt, M(o(a)("hr.role.form.permissionsSubtitle")), 1)
|
|
392
|
+
]),
|
|
393
|
+
c("div", xt, [
|
|
394
|
+
(h(!0), S(z, null, ee(De.value, (f) => (h(), S("div", {
|
|
395
|
+
key: f.title
|
|
396
|
+
}, [
|
|
397
|
+
_(Ge, {
|
|
398
|
+
layout: "leading",
|
|
399
|
+
"initially-collapsed": "",
|
|
400
|
+
subtitle: Me(f.options)
|
|
401
|
+
}, {
|
|
402
|
+
title: V(() => [
|
|
403
|
+
c("p", Rt, M(f.title), 1)
|
|
404
|
+
]),
|
|
405
|
+
default: V(() => [
|
|
406
|
+
c("div", It, [
|
|
407
|
+
_(k, {
|
|
408
|
+
"model-value": pe(f.options),
|
|
409
|
+
label: o(a)("hr.role.form.all"),
|
|
410
|
+
value: "1",
|
|
411
|
+
disabled: g.value,
|
|
412
|
+
"onUpdate:modelValue": (r) => Oe(f.options)
|
|
413
|
+
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]),
|
|
414
|
+
t[6] || (t[6] = c("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
415
|
+
(h(!0), S(z, null, ee(f.options, (r) => (h(), S("div", {
|
|
416
|
+
key: r.value
|
|
417
|
+
}, [
|
|
418
|
+
c("div", Ft, [
|
|
419
|
+
_(k, {
|
|
420
|
+
modelValue: s.value.permissions,
|
|
421
|
+
"onUpdate:modelValue": t[3] || (t[3] = (i) => s.value.permissions = i),
|
|
422
|
+
label: r.label,
|
|
423
|
+
value: r.value,
|
|
424
|
+
disabled: g.value,
|
|
425
|
+
class: "flex-1"
|
|
426
|
+
}, null, 8, ["modelValue", "label", "value", "disabled"]),
|
|
427
|
+
r.value.startsWith("report:") ? (h(), S(z, { key: 0 }, [
|
|
428
|
+
s.value.permissions.includes(r.value) ? (h(), S(z, { key: 0 }, [
|
|
429
|
+
x.value ? (h(), E(O, {
|
|
430
|
+
key: 0,
|
|
431
|
+
"model-value": Q.value === r.value,
|
|
432
|
+
header: r.label,
|
|
433
|
+
"dismiss-away": "",
|
|
434
|
+
"z-index": 100,
|
|
435
|
+
class: "h-5 flex items-center",
|
|
436
|
+
"onUpdate:modelValue": (i) => {
|
|
437
|
+
Q.value = i ? r.value : null, i || o(U).clearDraftsForSubject(r.value);
|
|
438
|
+
}
|
|
439
|
+
}, {
|
|
440
|
+
"bottom-sheet-button": V(() => [
|
|
441
|
+
c("div", kt, [
|
|
442
|
+
_(p, {
|
|
443
|
+
name: "settings",
|
|
444
|
+
size: "sm",
|
|
445
|
+
class: he([
|
|
446
|
+
"cursor-pointer transition-colors",
|
|
447
|
+
ue(r.value) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
|
|
448
|
+
])
|
|
449
|
+
}, null, 8, ["class"])
|
|
450
|
+
])
|
|
451
|
+
]),
|
|
452
|
+
default: V(() => [
|
|
453
|
+
_(_e, {
|
|
454
|
+
builders: o(H),
|
|
455
|
+
"form-value-for": (i) => ie(r.value, i),
|
|
456
|
+
"has-changes": ce(r.value),
|
|
457
|
+
disable: g.value,
|
|
458
|
+
"full-width": !0,
|
|
459
|
+
onUpdateForm: ({ builder: i, form: A }) => de(r.value, i, A),
|
|
460
|
+
onApply: (i) => me(r.value, () => Q.value = null)
|
|
461
|
+
}, null, 8, ["builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
|
|
462
|
+
]),
|
|
463
|
+
_: 2
|
|
464
|
+
}, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (h(), E(Ae, {
|
|
465
|
+
key: 1,
|
|
466
|
+
disabled: g.value,
|
|
467
|
+
"z-index": 100,
|
|
468
|
+
"exclude-el-from-click-outside": [St],
|
|
469
|
+
class: "h-5 flex items-center",
|
|
470
|
+
onPopoverChanged: (i) => {
|
|
471
|
+
i || o(U).clearDraftsForSubject(r.value);
|
|
472
|
+
}
|
|
473
|
+
}, {
|
|
474
|
+
"popover-button": V(() => [
|
|
475
|
+
c("div", wt, [
|
|
476
|
+
_(p, {
|
|
477
|
+
name: "settings",
|
|
478
|
+
size: "sm",
|
|
479
|
+
class: he([
|
|
480
|
+
"cursor-pointer transition-colors",
|
|
481
|
+
ue(r.value) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
|
|
482
|
+
])
|
|
483
|
+
}, null, 8, ["class"])
|
|
484
|
+
])
|
|
485
|
+
]),
|
|
486
|
+
default: V(({ hide: i }) => [
|
|
487
|
+
_(_e, {
|
|
488
|
+
title: r.label,
|
|
489
|
+
builders: o(H),
|
|
490
|
+
"form-value-for": (A) => ie(r.value, A),
|
|
491
|
+
"has-changes": ce(r.value),
|
|
492
|
+
disable: g.value,
|
|
493
|
+
onUpdateForm: ({ builder: A, form: $e }) => de(r.value, A, $e),
|
|
494
|
+
onApply: (A) => me(r.value, i)
|
|
495
|
+
}, null, 8, ["title", "builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
|
|
496
|
+
]),
|
|
497
|
+
_: 2
|
|
498
|
+
}, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
|
|
499
|
+
], 64)) : (h(), E(p, {
|
|
500
|
+
key: 1,
|
|
501
|
+
name: "settings",
|
|
502
|
+
size: "sm",
|
|
503
|
+
class: "invisible"
|
|
504
|
+
}))
|
|
505
|
+
], 64)) : te("", !0)
|
|
506
|
+
]),
|
|
507
|
+
r.value === "order:discount" && s.value.permissions.includes(r.value) ? (h(), S("div", Vt, [
|
|
508
|
+
c("div", Ct, M(o(a)("hr.role.form.maxDiscountPercentage")), 1),
|
|
509
|
+
_(j, {
|
|
510
|
+
modelValue: s.value.maxDiscountPercentage,
|
|
511
|
+
"onUpdate:modelValue": t[4] || (t[4] = (i) => s.value.maxDiscountPercentage = i),
|
|
512
|
+
rules: [
|
|
513
|
+
(i) => !!i || o(a)("hr.role.form.required"),
|
|
514
|
+
(i) => !isNaN(i) || o(a)("hr.role.form.onlyContainsNumber"),
|
|
515
|
+
(i) => i <= 100 || o(a)("hr.role.form.maxValueIs", { max: 100 }),
|
|
516
|
+
(i) => i >= 0 || o(a)("hr.role.form.minValueIs", { min: 0 })
|
|
517
|
+
],
|
|
518
|
+
"append-text": "%",
|
|
519
|
+
disabled: g.value
|
|
520
|
+
}, null, 8, ["modelValue", "rules", "disabled"])
|
|
521
|
+
])) : te("", !0)
|
|
522
|
+
]))), 128))
|
|
523
|
+
])
|
|
524
|
+
]),
|
|
525
|
+
_: 2
|
|
526
|
+
}, 1032, ["subtitle"])
|
|
527
|
+
]))), 128))
|
|
528
|
+
])
|
|
529
|
+
])
|
|
530
|
+
])
|
|
531
|
+
]),
|
|
532
|
+
_: 1
|
|
533
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
export {
|
|
538
|
+
Xt as _,
|
|
539
|
+
qt as a,
|
|
540
|
+
Jt as b,
|
|
541
|
+
Qt as c,
|
|
542
|
+
nt as d,
|
|
543
|
+
Ht as p,
|
|
544
|
+
Gt as r,
|
|
545
|
+
Wt as s,
|
|
546
|
+
Tt as t
|
|
547
|
+
};
|