@feedmepos/mf-hrm-portal 2.3.0-dev.19 → 2.3.0-dev.20
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-INrLNl4W.js → ApprovalCodeList-ChZm8Cqn.js} +7 -7
- package/dist/{AuditLogList-BDgSBAPi.js → AuditLogList-DNb_HY2b.js} +5 -5
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQS6Y708.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1FZLRtw.js} +2 -2
- package/dist/{EmployeeList-DsuNI7P7.js → EmployeeList-D0_eAXnx.js} +254 -264
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-DZEUOnX-.js} +6 -6
- package/dist/{GrantUserList-Bmgie1HE.js → GrantUserList-HHl1a4dz.js} +8 -8
- package/dist/{Main-B1e9eyqv.js → Main-B35_MSKW.js} +11 -11
- package/dist/{Main-BKt8r7Ut.js → Main-DFk9nc3J.js} +8 -8
- package/dist/{Main-SBhiLPdR.js → Main-DMsmgQyL.js} +5 -5
- package/dist/{PermissionSetList-CMOKTS_m.js → PermissionSetList-CglEdefD.js} +19 -18
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-K1Ad4e-f.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-9tG8k0mR.js} +807 -807
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
- package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
- package/dist/{RoleList-DcbQo51I.js → RoleList-_UsStsN7.js} +21 -20
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DYhMssqd.js +530 -0
- package/dist/ScheduleGeneralPage-CP3Vb4XJ.js +776 -0
- package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-B_OqKDw_.js +2439 -0
- package/dist/SchedulePage-5cbZyAow.js +19250 -0
- package/dist/SchedulePositionPage-DwgNOVe8.js +262 -0
- package/dist/SelectFilter-BWM2fbe4.js +264 -0
- package/dist/{TeamMemberList-Bvjq14lE.js → TeamMemberList-CiYROtup.js} +25 -24
- package/dist/{TimesheetList-CybTPHdT.js → TimesheetList-ohxQpGBt.js} +10 -10
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CGmVMnqS.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CHgKOFjZ.js} +3 -3
- package/dist/{app-CEcv-vMB.js → app-hqb3iLmH.js} +4164 -2970
- package/dist/app.js +1 -1
- package/dist/{approval-code-jIjkeVEb.js → approval-code-BXUiojPH.js} +1 -1
- package/dist/{dayjs.min-yw8fgQPr.js → dayjs.min-jdSYngTL.js} +1 -1
- package/dist/{employee-ByRgP_2p.js → employee-DQksdva7.js} +29 -28
- package/dist/{grant-user-SNiDV22U.js → grant-user-CBJ3gEgW.js} +1 -1
- package/dist/{iteration-B3Z1Ojal.js → iteration-Ws9RBh0x.js} +1 -1
- package/dist/{lodash-D2BUlQJ1.js → lodash-Db0CBH2I.js} +1 -1
- package/dist/object-Dwyg2LgX.js +16 -0
- package/dist/{restaurant-BTpBmfBV.js → restaurant-D2mfKHaH.js} +230 -224
- package/dist/{role-_BDO50Cj.js → role-C5BIFEPz.js} +2 -2
- package/dist/{rule-FuP71XrW.js → rule-CU0v7pCG.js} +36 -36
- package/dist/src/api/restaurant/index.d.ts +2 -0
- package/dist/src/api/schedule/index.d.ts +63 -0
- 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/router/shared.d.ts +4 -1
- package/dist/src/types/employee.d.ts +1 -0
- package/dist/src/types/schedule.d.ts +23 -0
- package/dist/src/views/audit-log/locales/index.d.ts +252 -0
- 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/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 +32 -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 +35 -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 +33 -0
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +5 -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 +7 -0
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +19 -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 +3 -0
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -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 +22 -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 +7 -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 +120 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +73 -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 +297 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +612 -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 +30 -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 +30 -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 +51 -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 +59 -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 +1522 -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 +21 -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 +126 -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 +29 -0
- package/dist/src/views/scheduling/data.d.ts +123 -0
- package/dist/src/views/scheduling/locales/index.d.ts +716 -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 +135 -0
- package/dist/src/views/scheduling/types.d.ts +380 -0
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DCwd8GWN.js → useAppStore-DZCdxlCd.js} +1 -1
- package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
- package/dist/{useLoading-CXzTpIVv.js → useLoading-Nygx2zn8.js} +1 -1
- package/dist/{useReportPermissions-5AYWAQ8e.js → useReportPermissions-DeJMpuw7.js} +3 -3
- package/package.json +4 -2
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as
|
|
4
|
-
import { S as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
import { _ as
|
|
9
|
-
import { s as
|
|
10
|
-
import { u as
|
|
11
|
-
import { n as
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
14
|
-
import { l as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
1
|
+
import { defineComponent as Ce, ref as v, computed as h, watch as Z, resolveComponent as E, createElementBlock as X, openBlock as g, Fragment as Ue, renderSlot as Ke, createVNode as i, unref as l, withCtx as y, createElementVNode as f, createBlock as I, createCommentVNode as B, toDisplayString as j, onUnmounted as Oe, isRef as be, normalizeClass as ke, createTextVNode as ye, withModifiers as Ge, resolveDynamicComponent as Be, h as ne } from "vue";
|
|
2
|
+
import { useI18n as Fe, useCoreStore as je } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as Ie, components as Me, useDialog as qe, useBreakpoints as He } from "@feedmepos/ui-library";
|
|
4
|
+
import { S as ie } from "./SelectFilter-BWM2fbe4.js";
|
|
5
|
+
import { _ as We, b as Je, a as Qe } from "./app-hqb3iLmH.js";
|
|
6
|
+
import { _ as we, u as Ye, H as Ze } from "./FormItem.vue_vue_type_script_setup_true_lang-DZEUOnX-.js";
|
|
7
|
+
import { _ as Xe } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
8
|
+
import { _ as ea } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
9
|
+
import { s as aa, _ as la, a as sa, b as ta, c as xe } from "./PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js";
|
|
10
|
+
import { u as oa } from "./useDebounce-B8ZPVS5C.js";
|
|
11
|
+
import { n as ra } from "./string-VNuQNweN.js";
|
|
12
|
+
import { u as Re, E as na } from "./employee-DQksdva7.js";
|
|
13
|
+
import { u as $e } from "./restaurant-D2mfKHaH.js";
|
|
14
|
+
import { l as ia } from "./lodash-Db0CBH2I.js";
|
|
15
|
+
import { _ as Ee } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
16
|
+
import { u as ua } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
17
|
+
import { u as Le } from "./useLoading-Nygx2zn8.js";
|
|
18
|
+
import { c as Ve } from "./object-Dwyg2LgX.js";
|
|
19
|
+
import { u as ge } from "./role-C5BIFEPz.js";
|
|
18
20
|
/* empty css */
|
|
19
|
-
|
|
20
|
-
return JSON.parse(JSON.stringify($));
|
|
21
|
-
}
|
|
22
|
-
function Ce($) {
|
|
23
|
-
if (typeof structuredClone > "u")
|
|
24
|
-
return Se($);
|
|
25
|
-
try {
|
|
26
|
-
return structuredClone(Ke($));
|
|
27
|
-
} catch {
|
|
28
|
-
return Se($);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const da = { class: "flex w-full items-center justify-between" }, pa = { class: "fm-typo-en-title-md-600" }, fa = { class: "space-y-40" }, va = { class: "flex flex-row gap-16" }, ya = { class: "space-y-16" }, ga = { class: "flex gap-8 items-center justify-start" }, Ue = 4, ha = /* @__PURE__ */ Fe({
|
|
21
|
+
const ma = { class: "flex w-full items-center justify-between" }, ca = { class: "fm-typo-en-title-md-600" }, da = { class: "space-y-40" }, pa = { class: "flex flex-row gap-16" }, fa = { class: "space-y-16" }, va = { class: "flex gap-8 items-center justify-start" }, Se = 4, ya = /* @__PURE__ */ Ce({
|
|
32
22
|
__name: "EmployeeForm",
|
|
33
23
|
props: {
|
|
34
24
|
roleErrorMessage: {
|
|
@@ -37,30 +27,30 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
37
27
|
}
|
|
38
28
|
},
|
|
39
29
|
emits: ["submitted"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
function
|
|
30
|
+
setup(Pe, { expose: ue, emit: n }) {
|
|
31
|
+
const w = ge(), d = $e(), C = Re(), me = Ie(), U = Le(me), ce = n, { t: m } = Fe(), V = v(!1), M = v(!0);
|
|
32
|
+
function A() {
|
|
43
33
|
return {
|
|
44
34
|
restaurantId: "",
|
|
45
35
|
roleId: ""
|
|
46
36
|
};
|
|
47
37
|
}
|
|
48
|
-
function
|
|
38
|
+
function de(u) {
|
|
49
39
|
if (!u) return _();
|
|
50
|
-
const o =
|
|
40
|
+
const o = Ve(u);
|
|
51
41
|
return {
|
|
52
42
|
code: o.code ?? "",
|
|
53
43
|
isMasterUser: o.isMasterUser ?? !1,
|
|
54
44
|
name: o.name ?? "",
|
|
55
45
|
passcode: o.passcode ?? "",
|
|
56
|
-
restaurants: o.restaurants.length > 0 ? o.restaurants.map(({ restaurantId:
|
|
57
|
-
restaurantId:
|
|
46
|
+
restaurants: o.restaurants.length > 0 ? o.restaurants.map(({ restaurantId: k, roleId: S }) => ({
|
|
47
|
+
restaurantId: k,
|
|
58
48
|
roleId: S
|
|
59
|
-
})) : [
|
|
49
|
+
})) : [A()]
|
|
60
50
|
};
|
|
61
51
|
}
|
|
62
|
-
const
|
|
63
|
-
s.value =
|
|
52
|
+
const ee = (u) => {
|
|
53
|
+
s.value = de(u), b.value = Ve(s.value), H.value = u == null ? void 0 : u._id, F.value = [], s.value.passcode ? (F.value = s.value.passcode.split(""), L.value = !0) : L.value = !1, M.value = !u, V.value = !0;
|
|
64
54
|
};
|
|
65
55
|
function _() {
|
|
66
56
|
return {
|
|
@@ -68,41 +58,41 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
68
58
|
isMasterUser: !1,
|
|
69
59
|
name: "",
|
|
70
60
|
passcode: "",
|
|
71
|
-
restaurants: [
|
|
61
|
+
restaurants: [A()]
|
|
72
62
|
};
|
|
73
63
|
}
|
|
74
|
-
const T = h(() =>
|
|
75
|
-
() =>
|
|
64
|
+
const T = h(() => M.value ? m("hr.employee.form.add") : m("hr.employee.form.update")), q = h(() => M.value ? m("common.create") : m("common.update")), b = v(_()), s = v(_()), H = v(void 0), $ = h(
|
|
65
|
+
() => aa(s.value.restaurants)
|
|
76
66
|
);
|
|
77
|
-
function
|
|
67
|
+
function ae(u) {
|
|
78
68
|
var o;
|
|
79
|
-
return u ? !((o = d.restaurants.value.find((
|
|
69
|
+
return u ? !((o = d.restaurants.value.find((k) => k._id === u)) != null && o.managable) : !1;
|
|
80
70
|
}
|
|
81
|
-
function
|
|
71
|
+
function le(u) {
|
|
82
72
|
return u.isUsable;
|
|
83
73
|
}
|
|
84
|
-
const F = v([]),
|
|
85
|
-
async function
|
|
86
|
-
if (
|
|
74
|
+
const F = v([]), L = v(!1), z = v(!1), W = v(!1), se = h(() => $.value.length > 0);
|
|
75
|
+
async function P() {
|
|
76
|
+
if (se.value)
|
|
87
77
|
try {
|
|
88
78
|
const u = await U.custom(
|
|
89
|
-
() =>
|
|
90
|
-
restaurantIds:
|
|
91
|
-
excludePosUserId:
|
|
79
|
+
() => na.generateEmployeePasscode({
|
|
80
|
+
restaurantIds: $.value,
|
|
81
|
+
excludePosUserId: H.value
|
|
92
82
|
}),
|
|
93
83
|
{ isLoading: W }
|
|
94
84
|
);
|
|
95
|
-
|
|
85
|
+
L.value = !1, F.value = u.split(""), s.value.passcode = u;
|
|
96
86
|
} catch {
|
|
97
87
|
}
|
|
98
88
|
}
|
|
99
|
-
const K =
|
|
100
|
-
() => !
|
|
89
|
+
const K = ua(
|
|
90
|
+
() => !ia.isEqual(s.value, b.value),
|
|
101
91
|
() => {
|
|
102
92
|
V.value = !1;
|
|
103
93
|
}
|
|
104
94
|
);
|
|
105
|
-
async function
|
|
95
|
+
async function pe() {
|
|
106
96
|
const u = {
|
|
107
97
|
user: {
|
|
108
98
|
name: s.value.name,
|
|
@@ -113,9 +103,9 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
113
103
|
};
|
|
114
104
|
s.value.isMasterUser ? await C.createMasterEmployee(u) : (delete u.user.code, await C.createEmployee(u));
|
|
115
105
|
}
|
|
116
|
-
async function
|
|
117
|
-
var S,
|
|
118
|
-
const u = b.value, o =
|
|
106
|
+
async function J() {
|
|
107
|
+
var S, R;
|
|
108
|
+
const u = b.value, o = H.value, k = {
|
|
119
109
|
user: {
|
|
120
110
|
name: s.value.name,
|
|
121
111
|
passcode: s.value.passcode
|
|
@@ -127,7 +117,7 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
127
117
|
}))
|
|
128
118
|
};
|
|
129
119
|
if (!s.value.isMasterUser)
|
|
130
|
-
await C.updateEmployee(o,
|
|
120
|
+
await C.updateEmployee(o, k);
|
|
131
121
|
else {
|
|
132
122
|
const x = {
|
|
133
123
|
user: {
|
|
@@ -136,51 +126,51 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
136
126
|
code: s.value.code
|
|
137
127
|
},
|
|
138
128
|
roles: s.value.restaurants,
|
|
139
|
-
previousRoles: (
|
|
140
|
-
restaurantId:
|
|
141
|
-
roleId:
|
|
129
|
+
previousRoles: (R = u.restaurants) == null ? void 0 : R.map((D) => ({
|
|
130
|
+
restaurantId: D.restaurantId,
|
|
131
|
+
roleId: D.roleId
|
|
142
132
|
}))
|
|
143
133
|
};
|
|
144
134
|
b.value.isMasterUser ? await C.updateMasterEmployee(o, x) : await C.migrateToMasterUser(o, x);
|
|
145
135
|
}
|
|
146
136
|
}
|
|
147
|
-
async function
|
|
148
|
-
|
|
137
|
+
async function O() {
|
|
138
|
+
M.value ? await U.minor(
|
|
149
139
|
async () => {
|
|
150
|
-
await
|
|
140
|
+
await pe();
|
|
151
141
|
},
|
|
152
142
|
{
|
|
153
|
-
successMessage:
|
|
143
|
+
successMessage: m("hr.employee.create.successMessage"),
|
|
154
144
|
isLoading: z
|
|
155
145
|
}
|
|
156
146
|
) : await U.minor(
|
|
157
147
|
async () => {
|
|
158
|
-
await
|
|
148
|
+
await J();
|
|
159
149
|
},
|
|
160
150
|
{
|
|
161
|
-
successMessage:
|
|
151
|
+
successMessage: m("hr.employee.update.successMessage"),
|
|
162
152
|
isLoading: z
|
|
163
153
|
}
|
|
164
|
-
),
|
|
154
|
+
), ce("submitted"), V.value = !1;
|
|
165
155
|
}
|
|
166
|
-
return
|
|
156
|
+
return Z(
|
|
167
157
|
() => V.value,
|
|
168
158
|
(u) => {
|
|
169
159
|
}
|
|
170
|
-
),
|
|
160
|
+
), ue({
|
|
171
161
|
show: V,
|
|
172
|
-
trigger:
|
|
162
|
+
trigger: ee
|
|
173
163
|
}), (u, o) => {
|
|
174
|
-
const
|
|
175
|
-
return g(),
|
|
176
|
-
|
|
177
|
-
i(
|
|
164
|
+
const k = E("FmIcon"), S = E("FmSwitch"), R = E("FmTextField"), x = E("FmFormGroup"), D = E("fm-button"), te = E("fm-side-sheet");
|
|
165
|
+
return g(), X(Ue, null, [
|
|
166
|
+
Ke(u.$slots, "default", { trigger: ee }),
|
|
167
|
+
i(te, {
|
|
178
168
|
id: "unit-form",
|
|
179
169
|
modelValue: V.value,
|
|
180
170
|
"onUpdate:modelValue": o[9] || (o[9] = (t) => V.value = t),
|
|
181
|
-
"is-container": l(
|
|
171
|
+
"is-container": l(Me).FmForm,
|
|
182
172
|
"is-container-props": {
|
|
183
|
-
onValidationSuccess:
|
|
173
|
+
onValidationSuccess: O,
|
|
184
174
|
blameFormChildOnValidationFailed: !0
|
|
185
175
|
},
|
|
186
176
|
"max-width": 960,
|
|
@@ -188,9 +178,9 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
188
178
|
"onOn:clickedAway": l(K)
|
|
189
179
|
}, {
|
|
190
180
|
"side-sheet-header": y(() => [
|
|
191
|
-
f("div",
|
|
192
|
-
f("p",
|
|
193
|
-
i(
|
|
181
|
+
f("div", ma, [
|
|
182
|
+
f("p", ca, j(T.value), 1),
|
|
183
|
+
i(k, {
|
|
194
184
|
name: "close",
|
|
195
185
|
size: "md",
|
|
196
186
|
class: "cursor-pointer",
|
|
@@ -199,16 +189,16 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
199
189
|
])
|
|
200
190
|
]),
|
|
201
191
|
"side-sheet-footer": y(() => [
|
|
202
|
-
f("div",
|
|
203
|
-
i(
|
|
204
|
-
label:
|
|
192
|
+
f("div", va, [
|
|
193
|
+
i(D, {
|
|
194
|
+
label: q.value,
|
|
205
195
|
size: "lg",
|
|
206
196
|
type: "submit",
|
|
207
197
|
variant: "primary",
|
|
208
198
|
disabled: z.value
|
|
209
199
|
}, null, 8, ["label", "disabled"]),
|
|
210
|
-
i(
|
|
211
|
-
label: l(
|
|
200
|
+
i(D, {
|
|
201
|
+
label: l(m)("common.cancel"),
|
|
212
202
|
size: "lg",
|
|
213
203
|
variant: "tertiary",
|
|
214
204
|
disabled: z.value,
|
|
@@ -217,72 +207,72 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
217
207
|
])
|
|
218
208
|
]),
|
|
219
209
|
default: y(() => [
|
|
220
|
-
f("div",
|
|
221
|
-
i(
|
|
222
|
-
title: l(
|
|
210
|
+
f("div", da, [
|
|
211
|
+
i(Ee, {
|
|
212
|
+
title: l(m)("hr.employee.form.employeeSetting")
|
|
223
213
|
}, {
|
|
224
214
|
default: y(() => [
|
|
225
|
-
i(
|
|
226
|
-
label: l(
|
|
215
|
+
i(we, {
|
|
216
|
+
label: l(m)("hr.employee.form.masterUserConfig")
|
|
227
217
|
}, {
|
|
228
218
|
default: y(() => [
|
|
229
219
|
i(S, {
|
|
230
220
|
modelValue: s.value.isMasterUser,
|
|
231
221
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.isMasterUser = t),
|
|
232
222
|
value: "masterUser",
|
|
233
|
-
label: l(
|
|
234
|
-
sublabel: l(
|
|
223
|
+
label: l(m)("hr.employee.form.masterUser"),
|
|
224
|
+
sublabel: l(m)("hr.employee.form.masterUserSublabel"),
|
|
235
225
|
"label-placement": "right"
|
|
236
226
|
}, null, 8, ["modelValue", "label", "sublabel"])
|
|
237
227
|
]),
|
|
238
228
|
_: 1
|
|
239
229
|
}, 8, ["label"]),
|
|
240
|
-
f("div",
|
|
241
|
-
s.value.isMasterUser ? (g(), I(
|
|
230
|
+
f("div", pa, [
|
|
231
|
+
s.value.isMasterUser ? (g(), I(R, {
|
|
242
232
|
key: 0,
|
|
243
233
|
modelValue: s.value.code,
|
|
244
234
|
"onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.code = t),
|
|
245
|
-
label: l(
|
|
246
|
-
}, null, 8, ["modelValue", "label"])) :
|
|
247
|
-
i(
|
|
235
|
+
label: l(m)("hr.employee.form.code")
|
|
236
|
+
}, null, 8, ["modelValue", "label"])) : B("", !0),
|
|
237
|
+
i(R, {
|
|
248
238
|
modelValue: s.value.name,
|
|
249
239
|
"onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.name = t),
|
|
250
240
|
class: "w-full",
|
|
251
|
-
label: l(
|
|
252
|
-
rules: [(t) => !!t || l(
|
|
241
|
+
label: l(m)("hr.employee.form.name"),
|
|
242
|
+
rules: [(t) => !!t || l(m)("hr.employee.form.required")]
|
|
253
243
|
}, null, 8, ["modelValue", "label", "rules"])
|
|
254
244
|
]),
|
|
255
|
-
i(
|
|
256
|
-
label: l(
|
|
245
|
+
i(we, {
|
|
246
|
+
label: l(m)("hr.employee.form.passcode")
|
|
257
247
|
}, {
|
|
258
248
|
default: y(() => [
|
|
259
|
-
f("div",
|
|
249
|
+
f("div", fa, [
|
|
260
250
|
i(x, {
|
|
261
251
|
modelValue: F.value,
|
|
262
252
|
"onUpdate:modelValue": o[6] || (o[6] = (t) => F.value = t),
|
|
263
253
|
rules: [
|
|
264
|
-
(t) => (t == null ? void 0 : t.filter((
|
|
254
|
+
(t) => (t == null ? void 0 : t.filter((G) => !!G).length) !== Se ? l(m)("hr.employee.form.passcodeRequired") : !0
|
|
265
255
|
]
|
|
266
256
|
}, {
|
|
267
257
|
default: y(() => [
|
|
268
|
-
i(
|
|
258
|
+
i(la, {
|
|
269
259
|
modelValue: F.value,
|
|
270
260
|
"onUpdate:modelValue": o[3] || (o[3] = (t) => F.value = t),
|
|
271
|
-
masked:
|
|
272
|
-
"onUpdate:masked": o[4] || (o[4] = (t) =>
|
|
273
|
-
length:
|
|
274
|
-
"toggle-label": l(
|
|
261
|
+
masked: L.value,
|
|
262
|
+
"onUpdate:masked": o[4] || (o[4] = (t) => L.value = t),
|
|
263
|
+
length: Se,
|
|
264
|
+
"toggle-label": l(m)("hr.employee.form.passcodeToggleVisibility"),
|
|
275
265
|
onComplete: o[5] || (o[5] = (t) => s.value.passcode = t)
|
|
276
266
|
}, null, 8, ["modelValue", "masked", "toggle-label"])
|
|
277
267
|
]),
|
|
278
268
|
_: 1
|
|
279
269
|
}, 8, ["modelValue", "rules"]),
|
|
280
|
-
i(
|
|
281
|
-
label: l(
|
|
282
|
-
hint: l(
|
|
270
|
+
i(sa, {
|
|
271
|
+
label: l(m)("hr.employee.form.passcodeGenerate"),
|
|
272
|
+
hint: l(m)("hr.employee.form.passcodeSelectOutletFirst"),
|
|
283
273
|
loading: W.value,
|
|
284
|
-
disabled: !
|
|
285
|
-
onClick:
|
|
274
|
+
disabled: !se.value,
|
|
275
|
+
onClick: P
|
|
286
276
|
}, null, 8, ["label", "hint", "loading", "disabled"])
|
|
287
277
|
])
|
|
288
278
|
]),
|
|
@@ -291,31 +281,31 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
291
281
|
]),
|
|
292
282
|
_: 1
|
|
293
283
|
}, 8, ["title"]),
|
|
294
|
-
i(
|
|
284
|
+
i(Ee, null, {
|
|
295
285
|
default: y(() => [
|
|
296
286
|
i(x, {
|
|
297
287
|
modelValue: s.value.restaurants,
|
|
298
288
|
"onUpdate:modelValue": o[8] || (o[8] = (t) => s.value.restaurants = t),
|
|
299
289
|
tag: "div",
|
|
300
290
|
rules: [
|
|
301
|
-
(t) => t.length > 0 || l(
|
|
302
|
-
(t) => t.every((
|
|
291
|
+
(t) => t.length > 0 || l(m)("hr.employee.form.atLeastOneRestaurant"),
|
|
292
|
+
(t) => t.every((G) => G.restaurantId && G.roleId) || l(m)("hr.employee.form.roleRequired")
|
|
303
293
|
]
|
|
304
294
|
}, {
|
|
305
295
|
default: y(() => [
|
|
306
|
-
i(
|
|
296
|
+
i(ta, {
|
|
307
297
|
modelValue: s.value.restaurants,
|
|
308
298
|
"onUpdate:modelValue": o[7] || (o[7] = (t) => s.value.restaurants = t),
|
|
309
299
|
restaurants: l(d).restaurants.value,
|
|
310
|
-
roles: l(
|
|
311
|
-
"is-role-usable":
|
|
312
|
-
"is-restaurant-locked":
|
|
313
|
-
"create-row":
|
|
314
|
-
title: l(
|
|
315
|
-
"restaurant-label": l(
|
|
316
|
-
"role-label": l(
|
|
317
|
-
"add-label": l(
|
|
318
|
-
"remove-label": l(
|
|
300
|
+
roles: l(w).roles.value,
|
|
301
|
+
"is-role-usable": le,
|
|
302
|
+
"is-restaurant-locked": ae,
|
|
303
|
+
"create-row": A,
|
|
304
|
+
title: l(m)("hr.employee.form.assignmentSection"),
|
|
305
|
+
"restaurant-label": l(m)("hr.employee.columns.restaurants"),
|
|
306
|
+
"role-label": l(m)("hr.employee.form.role"),
|
|
307
|
+
"add-label": l(m)("hr.employee.form.addAnother"),
|
|
308
|
+
"remove-label": l(m)("common.remove")
|
|
319
309
|
}, null, 8, ["modelValue", "restaurants", "roles", "title", "restaurant-label", "role-label", "add-label", "remove-label"])
|
|
320
310
|
]),
|
|
321
311
|
_: 1
|
|
@@ -330,70 +320,70 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
330
320
|
], 64);
|
|
331
321
|
};
|
|
332
322
|
}
|
|
333
|
-
}),
|
|
323
|
+
}), ga = {
|
|
334
324
|
class: "space-y-8"
|
|
335
|
-
},
|
|
325
|
+
}, ha = {
|
|
336
326
|
key: 0,
|
|
337
327
|
class: "flex w-full items-start justify-between"
|
|
338
|
-
},
|
|
328
|
+
}, _a = {
|
|
339
329
|
class: "flex items-start gap-8"
|
|
340
|
-
},
|
|
330
|
+
}, ba = {
|
|
341
331
|
class: "flex"
|
|
342
|
-
},
|
|
332
|
+
}, ka = {
|
|
343
333
|
key: 1,
|
|
344
334
|
class: "space-y-4"
|
|
345
|
-
},
|
|
335
|
+
}, wa = {
|
|
346
336
|
class: "px-16"
|
|
347
|
-
},
|
|
337
|
+
}, xa = {
|
|
348
338
|
class: "px-16 flex items-start gap-8"
|
|
349
|
-
},
|
|
339
|
+
}, Ea = {
|
|
350
340
|
class: "flex h-full flex-col overflow-auto"
|
|
351
|
-
},
|
|
341
|
+
}, Va = {
|
|
352
342
|
class: "space-y-4"
|
|
353
|
-
},
|
|
343
|
+
}, Sa = {
|
|
354
344
|
class: "fm-typo-en-body-lg-600"
|
|
355
|
-
},
|
|
345
|
+
}, Ca = {
|
|
356
346
|
key: 0,
|
|
357
347
|
class: "mr-4"
|
|
358
|
-
},
|
|
348
|
+
}, Ua = {
|
|
359
349
|
class: "text-fm-color-typo-secondary"
|
|
360
|
-
},
|
|
350
|
+
}, Fa = {
|
|
361
351
|
class: "line-clamp-2"
|
|
362
|
-
},
|
|
352
|
+
}, Ia = {
|
|
363
353
|
class: "font-bold"
|
|
364
|
-
},
|
|
354
|
+
}, N = 200, Ma = /* @__PURE__ */ Ce({
|
|
365
355
|
__name: "EmployeeList",
|
|
366
|
-
setup(
|
|
367
|
-
expose:
|
|
356
|
+
setup(Pe, {
|
|
357
|
+
expose: ue
|
|
368
358
|
}) {
|
|
369
359
|
const {
|
|
370
360
|
t: n
|
|
371
|
-
} =
|
|
361
|
+
} = Fe(), w = v(), d = Re(), C = $e(), me = je(), {
|
|
372
362
|
currentBusiness: U,
|
|
373
|
-
sessionUser:
|
|
374
|
-
} = me,
|
|
375
|
-
|
|
363
|
+
sessionUser: ce
|
|
364
|
+
} = me, m = ge(), V = h(() => C.isLoading.value), M = v(m.roles.value.length === 0);
|
|
365
|
+
Z(C.restaurants, (e) => {
|
|
376
366
|
if (e.length > 0 && d.listEmployees.value.length > 0) {
|
|
377
367
|
const a = new Map(e.map((r) => [r._id, r]));
|
|
378
368
|
d.listEmployees.value = d.listEmployees.value.map((r) => ({
|
|
379
369
|
...r,
|
|
380
370
|
restaurants: r.restaurants.map((p) => {
|
|
381
|
-
var
|
|
371
|
+
var Q, Y;
|
|
382
372
|
return {
|
|
383
373
|
...p,
|
|
384
|
-
restaurantName: ((
|
|
385
|
-
restaurantCode: ((
|
|
374
|
+
restaurantName: ((Q = a.get(p.restaurantId)) == null ? void 0 : Q.profile.name) || p.restaurantName,
|
|
375
|
+
restaurantCode: ((Y = a.get(p.restaurantId)) == null ? void 0 : Y.profile.code) ?? void 0
|
|
386
376
|
};
|
|
387
377
|
})
|
|
388
378
|
}));
|
|
389
379
|
}
|
|
390
380
|
});
|
|
391
|
-
const
|
|
381
|
+
const A = h(() => C.restaurants.value.map((e) => ({
|
|
392
382
|
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
393
383
|
value: e._id
|
|
394
|
-
}))),
|
|
384
|
+
}))), de = Z(m.roles, (e) => {
|
|
395
385
|
if (e.length > 0) {
|
|
396
|
-
if (
|
|
386
|
+
if (M.value = !1, d.listEmployees.value.length > 0) {
|
|
397
387
|
const a = new Map(e.map((r) => [r._id, r.name]));
|
|
398
388
|
d.listEmployees.value = d.listEmployees.value.map((r) => ({
|
|
399
389
|
...r,
|
|
@@ -403,29 +393,29 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
403
393
|
}))
|
|
404
394
|
}));
|
|
405
395
|
}
|
|
406
|
-
|
|
396
|
+
de();
|
|
407
397
|
}
|
|
408
|
-
}),
|
|
398
|
+
}), ee = h(() => d.listEmployees.value), {
|
|
409
399
|
searchKey: _
|
|
410
|
-
} =
|
|
400
|
+
} = Ye(), T = v(""), q = h(() => ee.value), b = h(() => d.totalEmployees.value), s = v(1), H = h(() => d.isLoading.value), $ = v(!1), ae = h(() => {
|
|
411
401
|
var e;
|
|
412
402
|
return JSON.stringify({
|
|
413
403
|
businessId: ((e = U.value) == null ? void 0 : e._id) ?? "",
|
|
414
404
|
search: T.value.trim(),
|
|
415
|
-
restaurantIds: [...
|
|
405
|
+
restaurantIds: [...w.value ?? []].sort(),
|
|
416
406
|
roleIds: [...t.value ?? []].sort()
|
|
417
407
|
});
|
|
418
|
-
}),
|
|
408
|
+
}), le = (e) => {
|
|
419
409
|
const a = e.restaurantCode, r = e.restaurantName;
|
|
420
410
|
return a ? `${a} - ${r}` : r;
|
|
421
411
|
}, F = (e) => e.roleName || "-";
|
|
422
|
-
function
|
|
412
|
+
function L(e) {
|
|
423
413
|
return [{
|
|
424
414
|
label: n("hr.employee.form.update"),
|
|
425
|
-
onClick: () =>
|
|
415
|
+
onClick: () => k(e)
|
|
426
416
|
}, {
|
|
427
417
|
label: n("hr.employee.remove.title"),
|
|
428
|
-
onClick: () =>
|
|
418
|
+
onClick: () => R(e),
|
|
429
419
|
itemClass: "text-fm-color-typo-error"
|
|
430
420
|
}];
|
|
431
421
|
}
|
|
@@ -437,8 +427,8 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
437
427
|
onClick: (r) => {
|
|
438
428
|
r.stopPropagation();
|
|
439
429
|
}
|
|
440
|
-
}, [i(
|
|
441
|
-
items:
|
|
430
|
+
}, [i(Xe, {
|
|
431
|
+
items: L(e)
|
|
442
432
|
}, null)]), W = [{
|
|
443
433
|
accessorKey: "code",
|
|
444
434
|
size: 100,
|
|
@@ -451,9 +441,9 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
451
441
|
const a = e.row.original;
|
|
452
442
|
return i("div", {
|
|
453
443
|
class: "flex items-center gap-8"
|
|
454
|
-
}, [i(
|
|
444
|
+
}, [i(Me.FmAvatar, {
|
|
455
445
|
name: a.name,
|
|
456
|
-
initials:
|
|
446
|
+
initials: ra(a.name),
|
|
457
447
|
size: "sm",
|
|
458
448
|
class: "shrink-0"
|
|
459
449
|
}, null), i("span", {
|
|
@@ -466,9 +456,9 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
466
456
|
header: () => n("hr.employee.columns.restaurants"),
|
|
467
457
|
enableSorting: !1,
|
|
468
458
|
cell(e) {
|
|
469
|
-
return V.value ||
|
|
470
|
-
const p =
|
|
471
|
-
return
|
|
459
|
+
return V.value || M.value ? ne(xe) : e.row.original.restaurants.map((a, r) => {
|
|
460
|
+
const p = le(a);
|
|
461
|
+
return ne("div", {
|
|
472
462
|
key: a.restaurantId || r
|
|
473
463
|
}, (r ? `
|
|
474
464
|
` : "") + p);
|
|
@@ -480,11 +470,11 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
480
470
|
header: () => n("hr.employee.columns.assignedRole"),
|
|
481
471
|
enableSorting: !1,
|
|
482
472
|
cell(e) {
|
|
483
|
-
return V.value ||
|
|
473
|
+
return V.value || M.value ? ne(xe, {
|
|
484
474
|
width: "120px"
|
|
485
475
|
}) : e.row.original.restaurants.map((a, r) => {
|
|
486
476
|
const p = F(a);
|
|
487
|
-
return
|
|
477
|
+
return ne("div", {
|
|
488
478
|
key: a.restaurantId || r
|
|
489
479
|
}, (r ? `
|
|
490
480
|
` : "") + p);
|
|
@@ -507,7 +497,7 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
507
497
|
className: "flex w-full items-center justify-end"
|
|
508
498
|
});
|
|
509
499
|
}
|
|
510
|
-
}],
|
|
500
|
+
}], se = ({
|
|
511
501
|
employee: e
|
|
512
502
|
}) => i("div", {
|
|
513
503
|
class: "flex flex-col gap-4 grow p-8"
|
|
@@ -518,22 +508,22 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
518
508
|
row: {
|
|
519
509
|
original: e
|
|
520
510
|
}
|
|
521
|
-
}) : e[a.accessorKey]]))]),
|
|
511
|
+
}) : e[a.accessorKey]]))]), P = Ie(), K = qe(), pe = Le(P), J = v(!1), O = v(), u = v();
|
|
522
512
|
function o(e) {
|
|
523
513
|
const a = e.isRestricted;
|
|
524
|
-
return a &&
|
|
514
|
+
return a && P.open({
|
|
525
515
|
message: n("hr.employee.cannotUpdateMasterUser", {
|
|
526
516
|
name: e.name
|
|
527
517
|
}),
|
|
528
518
|
type: "error"
|
|
529
519
|
}), a;
|
|
530
520
|
}
|
|
531
|
-
const
|
|
521
|
+
const k = (e) => {
|
|
532
522
|
var r;
|
|
533
523
|
e && o(e) || (r = u.value) == null || r.trigger(e);
|
|
534
524
|
}, {
|
|
535
525
|
breakpoints: S
|
|
536
|
-
} =
|
|
526
|
+
} = He(), R = (e) => {
|
|
537
527
|
o(e) || K.open({
|
|
538
528
|
title: n("hr.employee.remove.title"),
|
|
539
529
|
message: n("hr.employee.remove.message", {
|
|
@@ -544,19 +534,19 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
544
534
|
text: n("common.remove"),
|
|
545
535
|
close: !1,
|
|
546
536
|
variant: "destructive",
|
|
547
|
-
isLoading:
|
|
537
|
+
isLoading: J
|
|
548
538
|
},
|
|
549
539
|
secondaryActions: {
|
|
550
540
|
text: n("common.cancel"),
|
|
551
541
|
close: !0
|
|
552
542
|
}
|
|
553
543
|
}).onPrimary(async () => {
|
|
554
|
-
if (
|
|
544
|
+
if (J.value) return;
|
|
555
545
|
const r = e.isMasterUser ? d.deleteMasterEmployee : d.deleteEmployee;
|
|
556
|
-
await
|
|
557
|
-
await r(e), await
|
|
546
|
+
await pe.minor(async () => {
|
|
547
|
+
await r(e), await fe();
|
|
558
548
|
}, {
|
|
559
|
-
isLoading:
|
|
549
|
+
isLoading: J,
|
|
560
550
|
successMessage: n("hr.employee.remove.successMessage", {
|
|
561
551
|
name: e.name
|
|
562
552
|
})
|
|
@@ -564,141 +554,141 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
564
554
|
}), K.close();
|
|
565
555
|
});
|
|
566
556
|
}, x = v("");
|
|
567
|
-
function
|
|
557
|
+
function D() {
|
|
568
558
|
var e;
|
|
569
559
|
(e = u.value) == null || e.trigger();
|
|
570
560
|
}
|
|
571
|
-
const
|
|
561
|
+
const te = h(() => ge().roles.value.map((e) => ({
|
|
572
562
|
label: e.name,
|
|
573
563
|
value: e._id
|
|
574
564
|
}))), t = v();
|
|
575
|
-
async function
|
|
565
|
+
async function G() {
|
|
576
566
|
try {
|
|
577
|
-
await d.syncUsersMeta(), await
|
|
567
|
+
await d.syncUsersMeta(), await fe(), P.open({
|
|
578
568
|
message: n("hr.employee.sync.successMessage"),
|
|
579
569
|
type: "success"
|
|
580
570
|
});
|
|
581
571
|
} catch (e) {
|
|
582
|
-
console.error("Error syncing users:", e),
|
|
572
|
+
console.error("Error syncing users:", e), P.open({
|
|
583
573
|
message: n("hr.employee.sync.errorMessage"),
|
|
584
574
|
type: "error"
|
|
585
575
|
});
|
|
586
576
|
}
|
|
587
577
|
}
|
|
588
|
-
async function
|
|
578
|
+
async function oe(e = s.value) {
|
|
589
579
|
var a, r;
|
|
590
580
|
try {
|
|
591
581
|
await d.readEmployeesPage({
|
|
592
|
-
limit:
|
|
593
|
-
offset: (e - 1) *
|
|
582
|
+
limit: N,
|
|
583
|
+
offset: (e - 1) * N,
|
|
594
584
|
search: T.value.trim() || void 0,
|
|
595
|
-
restaurantIds: (a =
|
|
585
|
+
restaurantIds: (a = w.value) != null && a.length ? w.value : void 0,
|
|
596
586
|
roleIds: (r = t.value) != null && r.length ? t.value : void 0
|
|
597
587
|
});
|
|
598
588
|
} catch (p) {
|
|
599
|
-
console.error("Failed to load employees:", p),
|
|
589
|
+
console.error("Failed to load employees:", p), P.open({
|
|
600
590
|
message: p instanceof Error ? p.message : String(p),
|
|
601
591
|
type: "error"
|
|
602
592
|
});
|
|
603
593
|
}
|
|
604
594
|
}
|
|
605
|
-
async function
|
|
595
|
+
async function fe() {
|
|
606
596
|
var a;
|
|
607
597
|
if (!((a = U.value) != null && a._id)) return;
|
|
608
|
-
await
|
|
609
|
-
const e = Math.max(1, Math.ceil(b.value /
|
|
610
|
-
s.value > e && (s.value = e, await
|
|
598
|
+
await oe(s.value);
|
|
599
|
+
const e = Math.max(1, Math.ceil(b.value / N));
|
|
600
|
+
s.value > e && (s.value = e, await oe(s.value));
|
|
611
601
|
}
|
|
612
|
-
async function
|
|
602
|
+
async function De() {
|
|
613
603
|
var e, a;
|
|
614
604
|
return await d.readAllEmployeesPage({
|
|
615
605
|
search: T.value.trim() || void 0,
|
|
616
|
-
restaurantIds: (e =
|
|
606
|
+
restaurantIds: (e = w.value) != null && e.length ? w.value : void 0,
|
|
617
607
|
roleIds: (a = t.value) != null && a.length ? t.value : void 0
|
|
618
608
|
}, b.value);
|
|
619
609
|
}
|
|
620
|
-
const
|
|
610
|
+
const Ne = oa(_, () => {
|
|
621
611
|
T.value = _.value;
|
|
622
612
|
}, 300);
|
|
623
|
-
|
|
624
|
-
let
|
|
625
|
-
async function
|
|
613
|
+
Oe(Ne);
|
|
614
|
+
let ve = !1;
|
|
615
|
+
async function Ae({
|
|
626
616
|
pageIndex: e
|
|
627
617
|
}) {
|
|
628
618
|
var a;
|
|
629
|
-
if ((a = U.value) != null && a._id && !
|
|
630
|
-
|
|
619
|
+
if ((a = U.value) != null && a._id && !ve && !(e === 0 && s.value === 1 && q.value.length > 0)) {
|
|
620
|
+
ve = !0, s.value = e + 1;
|
|
631
621
|
try {
|
|
632
|
-
await
|
|
622
|
+
await oe(s.value);
|
|
633
623
|
} finally {
|
|
634
|
-
|
|
624
|
+
ve = !1;
|
|
635
625
|
}
|
|
636
626
|
}
|
|
637
627
|
}
|
|
638
|
-
|
|
628
|
+
Z(ae, async () => {
|
|
639
629
|
var e;
|
|
640
|
-
s.value = 1,
|
|
630
|
+
s.value = 1, $.value = !1, (e = U.value) != null && e._id && (await oe(1), $.value = !0);
|
|
641
631
|
}, {
|
|
642
632
|
immediate: !0
|
|
643
|
-
}),
|
|
633
|
+
}), Z(() => O.value && O.value.restaurants, (e) => {
|
|
644
634
|
e && e.length > 0 && (x.value = "");
|
|
645
635
|
});
|
|
646
|
-
const Te = h(() => b.value >
|
|
647
|
-
return
|
|
648
|
-
create:
|
|
649
|
-
filteredEmployees:
|
|
650
|
-
exportEmployees:
|
|
636
|
+
const Te = h(() => b.value > N);
|
|
637
|
+
return ue({
|
|
638
|
+
create: D,
|
|
639
|
+
filteredEmployees: q,
|
|
640
|
+
exportEmployees: De,
|
|
651
641
|
getHasPaginationFooter: () => Te.value
|
|
652
642
|
}), (e, a) => {
|
|
653
|
-
var
|
|
654
|
-
const r = E("FmButton"), p = E("FmTooltip"),
|
|
655
|
-
return g(),
|
|
643
|
+
var he, _e;
|
|
644
|
+
const r = E("FmButton"), p = E("FmTooltip"), Q = E("FmSearch"), Y = E("FmListItem"), ze = E("FmTable");
|
|
645
|
+
return g(), X(Ue, null, [i(ya, {
|
|
656
646
|
ref_key: "employeeFormRef",
|
|
657
647
|
ref: u,
|
|
658
|
-
modelValue:
|
|
659
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
648
|
+
modelValue: O.value,
|
|
649
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => O.value = c),
|
|
660
650
|
"role-error-message": x.value,
|
|
661
651
|
class: "gap-8",
|
|
662
|
-
onSubmitted:
|
|
663
|
-
}, null, 8, ["modelValue", "role-error-message"]), f("div",
|
|
652
|
+
onSubmitted: fe
|
|
653
|
+
}, null, 8, ["modelValue", "role-error-message"]), f("div", ga, [l(S).xs ? (g(), X("div", ka, [f("div", wa, [i(Q, {
|
|
664
654
|
modelValue: l(_),
|
|
665
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
655
|
+
"onUpdate:modelValue": a[4] || (a[4] = (c) => be(_) ? _.value = c : null),
|
|
666
656
|
placeholder: l(n)("hr.employee.search.placeholder")
|
|
667
|
-
}, null, 8, ["modelValue", "placeholder"])]), i(
|
|
668
|
-
modelValue:
|
|
669
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
657
|
+
}, null, 8, ["modelValue", "placeholder"])]), i(Ze), f("div", xa, [i(ie, {
|
|
658
|
+
modelValue: w.value,
|
|
659
|
+
"onUpdate:modelValue": a[5] || (a[5] = (c) => w.value = c),
|
|
670
660
|
multiple: "",
|
|
671
|
-
items:
|
|
661
|
+
items: A.value,
|
|
672
662
|
variant: "dark",
|
|
673
663
|
"selected-prefix": l(n)("hr.role.columns.restaurants"),
|
|
674
664
|
placeholder: l(n)("hr.role.columns.restaurants"),
|
|
675
665
|
class: "!w-auto"
|
|
676
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(
|
|
666
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
|
|
677
667
|
modelValue: t.value,
|
|
678
|
-
"onUpdate:modelValue": a[6] || (a[6] = (
|
|
668
|
+
"onUpdate:modelValue": a[6] || (a[6] = (c) => t.value = c),
|
|
679
669
|
multiple: "",
|
|
680
|
-
items:
|
|
670
|
+
items: te.value,
|
|
681
671
|
variant: "dark",
|
|
682
672
|
"selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
|
|
683
673
|
placeholder: l(n)("hr.employee.filter.role_placeholder")
|
|
684
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (g(),
|
|
685
|
-
modelValue:
|
|
686
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
674
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (g(), X("div", ha, [f("div", _a, [i(ie, {
|
|
675
|
+
modelValue: w.value,
|
|
676
|
+
"onUpdate:modelValue": a[1] || (a[1] = (c) => w.value = c),
|
|
687
677
|
multiple: "",
|
|
688
|
-
items:
|
|
678
|
+
items: A.value,
|
|
689
679
|
variant: "dark",
|
|
690
680
|
"selected-prefix": l(n)("hr.role.columns.restaurants"),
|
|
691
681
|
placeholder: l(n)("hr.role.columns.restaurants"),
|
|
692
682
|
class: "!w-auto"
|
|
693
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(
|
|
683
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
|
|
694
684
|
modelValue: t.value,
|
|
695
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
685
|
+
"onUpdate:modelValue": a[2] || (a[2] = (c) => t.value = c),
|
|
696
686
|
multiple: "",
|
|
697
687
|
variant: "dark",
|
|
698
|
-
items:
|
|
688
|
+
items: te.value,
|
|
699
689
|
"selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
|
|
700
690
|
placeholder: l(n)("hr.employee.filter.role_placeholder")
|
|
701
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), f("div",
|
|
691
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), f("div", ba, [(he = l(ce)) != null && he.role.isAdmin ? (g(), I(p, {
|
|
702
692
|
key: 0,
|
|
703
693
|
content: l(n)("hr.employee.sync.tooltip")
|
|
704
694
|
}, {
|
|
@@ -706,21 +696,21 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
706
696
|
icon: "refresh",
|
|
707
697
|
label: l(n)("hr.employee.sync.tooltip"),
|
|
708
698
|
variant: "tertiary",
|
|
709
|
-
onClick:
|
|
699
|
+
onClick: G
|
|
710
700
|
}, null, 8, ["label"])]),
|
|
711
701
|
_: 1
|
|
712
|
-
}, 8, ["content"])) :
|
|
702
|
+
}, 8, ["content"])) : B("", !0), i(Q, {
|
|
713
703
|
modelValue: l(_),
|
|
714
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
704
|
+
"onUpdate:modelValue": a[3] || (a[3] = (c) => be(_) ? _.value = c : null),
|
|
715
705
|
autofocus: "",
|
|
716
706
|
class: "pl-4 w-[320px]",
|
|
717
707
|
placeholder: l(n)("hr.employee.search.placeholder")
|
|
718
|
-
}, null, 8, ["modelValue", "placeholder"])])])), (
|
|
708
|
+
}, null, 8, ["modelValue", "placeholder"])])])), (_e = l(U)) != null && _e._id ? (g(), I(We, {
|
|
719
709
|
key: 2
|
|
720
710
|
}, {
|
|
721
|
-
default: y(() => [f("div",
|
|
711
|
+
default: y(() => [f("div", Ea, [!$.value && l(d).isLoading.value ? (g(), I(Je, {
|
|
722
712
|
key: 0
|
|
723
|
-
})) :
|
|
713
|
+
})) : B("", !0), $.value ? (g(), I(ea, {
|
|
724
714
|
key: 1,
|
|
725
715
|
"is-loading": l(d).isLoading.value,
|
|
726
716
|
"is-empty": b.value === 0,
|
|
@@ -728,59 +718,59 @@ const da = { class: "flex w-full items-center justify-between" }, pa = { class:
|
|
|
728
718
|
subtitle: l(n)("hr.employee.noData.subtitle")
|
|
729
719
|
}, {
|
|
730
720
|
default: y(() => [(g(), I(ze, {
|
|
731
|
-
key:
|
|
721
|
+
key: ae.value,
|
|
732
722
|
class: ke(["employee-list-table h-full", {
|
|
733
|
-
"employee-list-table--pagination-loading":
|
|
723
|
+
"employee-list-table--pagination-loading": H.value
|
|
734
724
|
}]),
|
|
735
725
|
"column-defs": W,
|
|
736
|
-
"row-data":
|
|
737
|
-
"page-size":
|
|
738
|
-
"page-count": Math.ceil(b.value /
|
|
726
|
+
"row-data": q.value,
|
|
727
|
+
"page-size": N,
|
|
728
|
+
"page-count": Math.ceil(b.value / N),
|
|
739
729
|
"row-count": b.value,
|
|
740
|
-
"fetch-fn":
|
|
741
|
-
"hide-footer": b.value <=
|
|
730
|
+
"fetch-fn": Ae,
|
|
731
|
+
"hide-footer": b.value <= N,
|
|
742
732
|
loading: l(d).isLoading.value,
|
|
743
733
|
virtual: !1,
|
|
744
734
|
"pin-header-row": "",
|
|
745
|
-
onRowClick: a[7] || (a[7] = (
|
|
735
|
+
onRowClick: a[7] || (a[7] = (c) => k(c.original))
|
|
746
736
|
}, {
|
|
747
|
-
"list-row": y((
|
|
737
|
+
"list-row": y((c) => [l(S).xs ? (g(), I(Y, {
|
|
748
738
|
key: 0,
|
|
749
739
|
class: ke(["py-12 px-16 items-center justify-between", {
|
|
750
|
-
"border-t border-fm-color-neutral-gray-100":
|
|
740
|
+
"border-t border-fm-color-neutral-gray-100": c.index > 0
|
|
751
741
|
}]),
|
|
752
|
-
onClick: (
|
|
742
|
+
onClick: (re) => k(c.original)
|
|
753
743
|
}, {
|
|
754
|
-
default: y(() => [f("div",
|
|
744
|
+
default: y(() => [f("div", Va, [f("p", Sa, [c.original.code ? (g(), X("span", Ca, j(c.original.code) + ".", 1)) : B("", !0), ye(j(c.original.name), 1)]), f("div", Ua, [f("p", Fa, [f("span", Ia, j(l(n)("hr.employee.columns.restaurants")) + ":", 1), ye(" " + j(c.original.restaurants.map((re) => le(re)).join(", ")), 1)]), f("p", null, [a[8] || (a[8] = f("span", {
|
|
755
745
|
class: "font-bold"
|
|
756
|
-
}, "Since:", -1)),
|
|
746
|
+
}, "Since:", -1)), ye(" " + j(c.original.since), 1)])])]), i(r, {
|
|
757
747
|
icon: "delete",
|
|
758
748
|
variant: "tertiary",
|
|
759
749
|
"text-color": "neutral-gray-400",
|
|
760
|
-
onClick:
|
|
750
|
+
onClick: Ge((re) => R(c.original), ["stop"])
|
|
761
751
|
}, null, 8, ["onClick"])]),
|
|
762
752
|
_: 2
|
|
763
|
-
}, 1032, ["class", "onClick"])) : (g(), I(
|
|
753
|
+
}, 1032, ["class", "onClick"])) : (g(), I(Y, {
|
|
764
754
|
key: 1,
|
|
765
755
|
style: {
|
|
766
756
|
padding: "0"
|
|
767
757
|
},
|
|
768
|
-
onClick: (
|
|
758
|
+
onClick: (re) => k(c.original)
|
|
769
759
|
}, {
|
|
770
|
-
default: y(() => [(g(), I(
|
|
771
|
-
employee:
|
|
760
|
+
default: y(() => [(g(), I(Be(se), {
|
|
761
|
+
employee: c.original
|
|
772
762
|
}, null, 8, ["employee"]))]),
|
|
773
763
|
_: 2
|
|
774
764
|
}, 1032, ["onClick"]))]),
|
|
775
765
|
_: 1
|
|
776
766
|
}, 8, ["class", "row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
777
767
|
_: 1
|
|
778
|
-
}, 8, ["is-loading", "is-empty", "title", "subtitle"])) :
|
|
768
|
+
}, 8, ["is-loading", "is-empty", "title", "subtitle"])) : B("", !0)])]),
|
|
779
769
|
_: 1
|
|
780
|
-
})) :
|
|
770
|
+
})) : B("", !0)])], 64);
|
|
781
771
|
};
|
|
782
772
|
}
|
|
783
|
-
}), Za = /* @__PURE__ */ Qe(
|
|
773
|
+
}), Za = /* @__PURE__ */ Qe(Ma, [["__scopeId", "data-v-5aed0d1c"]]);
|
|
784
774
|
export {
|
|
785
775
|
Za as default
|
|
786
776
|
};
|