@feedmepos/mf-hrm-portal 2.2.4 → 2.2.5-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-ChGQwko6.js → ApprovalCodeList-BsDMMSIz.js} +7 -7
- package/dist/{AuditLogList-Cpj8O5qS.js → AuditLogList-CGNZdtmn.js} +244 -241
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CNmbZlVZ.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C6MoToqi.js} +2 -2
- package/dist/EmployeeList-B_OuDWWQ.js +787 -0
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js} +1 -1
- package/dist/{GrantUserList-CAXJmQ4i.js → GrantUserList-Bd0lXmFo.js} +8 -8
- package/dist/{Main-Ada9K_jO.js → Main-B66lSeOv.js} +8 -8
- package/dist/{Main-T9-30vq8.js → Main-CzHSNHsH.js} +5 -5
- package/dist/{Main-7yT_w5vt.js → Main-njRQ1tFk.js} +11 -11
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-CkWYPmT2.js → PermissionSetList-GTI6Cwj5.js} +20 -20
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCLLrSyq.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C-QEQ-js.js} +937 -944
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
- package/dist/{RoleList-Do36AmlU.js → RoleList-CmHgtM0m.js} +9 -9
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-SFqxftRx.js +426 -0
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js +690 -0
- package/dist/ScheduleGeneralPage-DxFxJN5j.js +320 -0
- package/dist/SchedulePage-cJDI3-E7.js +14647 -0
- package/dist/SchedulePositionPage-n1wUShIM.js +293 -0
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
- package/dist/SelectFilter-CG13h83-.js +264 -0
- package/dist/TeamMemberList-ByZt3VqN.js +1154 -0
- package/dist/{TimesheetList-DboJ2_89.js → TimesheetList-Dv0-W--W.js} +71 -68
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-C4g8wRjv.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIo6h5-a.js} +3 -3
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-CcCcPbyB.js → app-SCXGJ95F.js} +3182 -2565
- package/dist/app.js +1 -1
- package/dist/{approval-code-BRClD2HN.js → approval-code-jIjkeVEb.js} +1 -1
- package/dist/{dayjs.min-lvkj1Rwa.js → dayjs.min-DqMLPYv-.js} +1 -1
- package/dist/employee-DT_xYQkz.js +204 -0
- package/dist/{grant-user-Dhi3ilC_.js → grant-user-SNiDV22U.js} +1 -1
- package/dist/{iteration-LZbo-knt.js → iteration-B5dB9ecy.js} +1 -1
- package/dist/{lodash-CKzaMa7f.js → lodash-CRHFapxI.js} +1 -1
- package/dist/{restaurant-DiYb0pCm.js → restaurant-BTpBmfBV.js} +2 -2
- package/dist/{role-BZr8zzeq.js → role-CJm8pXaw.js} +2 -2
- package/dist/{rule-DNaqlUUB.js → rule-AJm-eVzJ.js} +291 -279
- package/dist/src/api/employee/index.d.ts +5 -1
- package/dist/src/api/schedule/index.d.ts +41 -0
- package/dist/src/api/team/index.d.ts +3 -0
- package/dist/src/components/form/OutletRoleAssignment.vue.d.ts +16 -0
- package/dist/src/components/form/PasscodeGenerateButton.vue.d.ts +15 -0
- package/dist/src/components/form/PasscodePinField.vue.d.ts +18 -0
- package/dist/src/components/layout/AppSidebar.vue.d.ts +2 -0
- package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
- package/dist/src/components/layout/withShell.d.ts +14 -0
- package/dist/src/helpers/outlet-role-assignment.d.ts +40 -0
- package/dist/src/helpers/rule.d.ts +15 -0
- package/dist/src/helpers/string.d.ts +2 -1
- package/dist/src/router/shared.d.ts +4 -1
- package/dist/src/types/schedule.d.ts +232 -0
- package/dist/src/views/audit-log/locales/index.d.ts +4 -0
- package/dist/src/views/hr/locales/index.d.ts +8 -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 +10 -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/ScheduleAllShiftsRow.vue.d.ts +22 -0
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +34 -0
- package/dist/src/views/scheduling/components/ScheduleAssignEmployeePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -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/ScheduleConfirmModal.vue.d.ts +24 -0
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -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 +12 -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/ScheduleEmployeeMenu.vue.d.ts +6 -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 +8 -0
- package/dist/src/views/scheduling/components/ScheduleLegendBar.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +14 -0
- package/dist/src/views/scheduling/components/SchedulePdfPreview.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +54 -0
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.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 +6 -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/ScheduleStackPopover.vue.d.ts +14 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +60 -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/schedule-add-employee-form.d.ts +72 -0
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +38 -0
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +29 -0
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +14 -0
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +10 -0
- package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +98 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +73 -0
- package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +77 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +122 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +143 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +426 -0
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +43 -0
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +48 -0
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +77 -0
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +76 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +145 -0
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +41 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +26 -0
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +82 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +70 -0
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1316 -0
- package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +23 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +32 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +93 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +189 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +54 -0
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +163 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +181 -0
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +23 -0
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +10 -0
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
- package/dist/src/views/scheduling/data.d.ts +110 -0
- package/dist/src/views/scheduling/locales/index.d.ts +496 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +151 -0
- package/dist/src/views/scheduling/types.d.ts +324 -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/src/views/team/locales/index.d.ts +12 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +1 -0
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +21 -3
- package/dist/string-VNuQNweN.js +15 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BGhlB1_1.js → useAppStore-DCwd8GWN.js} +1 -1
- package/dist/{useLoading-CvgqVDbF.js → useLoading-CXzTpIVv.js} +1 -1
- package/dist/{useReportPermissions-Buzv6pkY.js → useReportPermissions-Cg3lV70m.js} +3 -3
- package/package.json +1 -1
- package/dist/EmployeeList-PdGzSCP-.js +0 -887
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
- package/dist/TeamMemberList-CVVNnz0R.js +0 -1216
- package/dist/employee-CLgrXpmZ.js +0 -201
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import { ref as d, computed as g, defineComponent as pe, onMounted as fe, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as r, withCtx as b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
|
|
2
|
-
import { d as v } from "./dayjs.min-
|
|
2
|
+
import { d as v } from "./dayjs.min-DqMLPYv-.js";
|
|
3
3
|
import { useI18n as _e } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as be, components as xe } from "@feedmepos/ui-library";
|
|
5
|
-
import { S as De
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { u as
|
|
9
|
-
import { g as
|
|
10
|
-
import { f as
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
14
|
-
|
|
5
|
+
import { S as De } from "./SelectFilter-CG13h83-.js";
|
|
6
|
+
import { _ as Se } from "./app-SCXGJ95F.js";
|
|
7
|
+
import { _ as Ve } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
8
|
+
import { u as ke } from "./useLoading-CXzTpIVv.js";
|
|
9
|
+
import { g as Ce, s as Fe } from "./iteration-B5dB9ecy.js";
|
|
10
|
+
import { f as Ye } from "./utils-BZkjJbju.js";
|
|
11
|
+
import { n as Le } from "./string-VNuQNweN.js";
|
|
12
|
+
import { u as Me } from "./employee-DT_xYQkz.js";
|
|
13
|
+
import { u as Te } from "./restaurant-BTpBmfBV.js";
|
|
14
|
+
import { u as Ie } from "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIo6h5-a.js";
|
|
15
|
+
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
function $e(x, a) {
|
|
15
17
|
return ["years", "months"].find((S) => {
|
|
16
|
-
const V = x.startOf(S),
|
|
17
|
-
return x.isSame(V, "day") && a.isSame(
|
|
18
|
+
const V = x.startOf(S), p = x.endOf(S);
|
|
19
|
+
return x.isSame(V, "day") && a.isSame(p, "day");
|
|
18
20
|
}) || "days";
|
|
19
21
|
}
|
|
20
|
-
function
|
|
22
|
+
function Ee() {
|
|
21
23
|
const x = {
|
|
22
24
|
startDate: v().format("YYYY-MM-DD"),
|
|
23
25
|
endDate: v().format("YYYY-MM-DD")
|
|
24
26
|
}, a = d(x), D = g(() => {
|
|
25
27
|
if (!a.value) return "No dates selected.";
|
|
26
|
-
const
|
|
27
|
-
return `${
|
|
28
|
+
const p = a.value.startDate ?? "Start", _ = a.value.endDate ?? "End";
|
|
29
|
+
return `${p} - ${_}`;
|
|
28
30
|
}), S = g(() => ({
|
|
29
31
|
startDate: new Date(a.value.startDate),
|
|
30
32
|
endDate: new Date(a.value.endDate)
|
|
31
33
|
}));
|
|
32
|
-
function V(
|
|
33
|
-
const _ = v(a.value.startDate), c = v(a.value.endDate), h =
|
|
34
|
+
function V(p) {
|
|
35
|
+
const _ = v(a.value.startDate), c = v(a.value.endDate), h = $e(_, c), k = h === "days" ? c.diff(_, "days") + 1 : 1, C = p === "subtract" ? (F) => F.subtract(k, h) : (F) => F.add(k, h);
|
|
34
36
|
a.value = {
|
|
35
37
|
startDate: C(_).startOf(h).format("YYYY-MM-DD"),
|
|
36
38
|
endDate: C(c).endOf(h).format("YYYY-MM-DD")
|
|
@@ -38,56 +40,56 @@ function $e() {
|
|
|
38
40
|
}
|
|
39
41
|
return { dateRange: a, parsedDateRange: S, dateRangeLabel: D, setRange: V };
|
|
40
42
|
}
|
|
41
|
-
const
|
|
43
|
+
const Oe = {
|
|
42
44
|
class: "my-16 flex w-[350px] flex-col gap-40"
|
|
43
|
-
}, Oe = {
|
|
44
|
-
class: "flex gap-16"
|
|
45
45
|
}, Ae = {
|
|
46
|
-
class: "flex
|
|
46
|
+
class: "flex gap-16"
|
|
47
47
|
}, Ke = {
|
|
48
|
-
class: "
|
|
48
|
+
class: "flex flex-col gap-4"
|
|
49
49
|
}, ze = {
|
|
50
|
-
class: "fm-typo-body-md-
|
|
50
|
+
class: "fm-typo-body-md-400 text-fm-color-typo-secondary"
|
|
51
51
|
}, Ne = {
|
|
52
|
-
class: "
|
|
52
|
+
class: "fm-typo-body-md-700 text-fm-color-typo-primary"
|
|
53
53
|
}, Ue = {
|
|
54
|
-
class: "
|
|
54
|
+
class: "flex flex-col gap-8"
|
|
55
55
|
}, Be = {
|
|
56
|
-
class: "
|
|
56
|
+
class: "fm-typo-body-xl-700"
|
|
57
57
|
}, Pe = {
|
|
58
|
-
class: "flex flex-col gap-
|
|
58
|
+
class: "flex flex-col gap-24"
|
|
59
59
|
}, je = {
|
|
60
|
-
class: "
|
|
60
|
+
class: "flex flex-col gap-8"
|
|
61
61
|
}, He = {
|
|
62
|
-
class: "
|
|
62
|
+
class: "fm-typo-body-xl-700"
|
|
63
63
|
}, Ge = {
|
|
64
|
+
class: "flex flex-col gap-24"
|
|
65
|
+
}, qe = {
|
|
64
66
|
key: 0,
|
|
65
67
|
class: "fm-typo-body-sm-400 text-fm-color-typo-error mt-1 flex items-center gap-4"
|
|
66
|
-
}, qe = {
|
|
67
|
-
class: "flex items-center justify-start gap-8"
|
|
68
68
|
}, Je = {
|
|
69
|
-
class: "
|
|
69
|
+
class: "flex items-center justify-start gap-8"
|
|
70
70
|
}, Qe = {
|
|
71
|
-
class: "
|
|
71
|
+
class: "space-y-8"
|
|
72
72
|
}, We = {
|
|
73
|
-
class: "flex items-
|
|
73
|
+
class: "flex items-start gap-8 flex-wrap xs:px-16"
|
|
74
74
|
}, Xe = {
|
|
75
|
+
class: "flex items-center gap-8"
|
|
76
|
+
}, Ze = {
|
|
75
77
|
class: "flex h-full flex-col overflow-auto"
|
|
76
|
-
},
|
|
78
|
+
}, et = /* @__PURE__ */ pe({
|
|
77
79
|
__name: "TimesheetList",
|
|
78
80
|
setup(x) {
|
|
79
81
|
const {
|
|
80
82
|
t: a
|
|
81
|
-
} = _e(), D = be(), S =
|
|
83
|
+
} = _e(), D = be(), S = ke(D), V = [{
|
|
82
84
|
label: a("hr.timesheet.listView"),
|
|
83
85
|
value: "listView"
|
|
84
86
|
}, {
|
|
85
87
|
label: a("hr.timesheet.userView"),
|
|
86
88
|
value: "userView"
|
|
87
|
-
}],
|
|
89
|
+
}], p = d("listView"), _ = g(() => {
|
|
88
90
|
var t;
|
|
89
|
-
return (t = V.find((e) => e.value ===
|
|
90
|
-
}), c = d(""), h =
|
|
91
|
+
return (t = V.find((e) => e.value === p.value)) == null ? void 0 : t.label;
|
|
92
|
+
}), c = d(""), h = Ie(), k = Me(), C = Te(), F = g(() => k.employees.value), j = g(() => h.timesheets.value.filter((s) => !A.value || A.value.includes(s.restaurantId)).map((s) => {
|
|
91
93
|
var y;
|
|
92
94
|
const n = (y = C.restaurants.value.find((f) => f._id === s.restaurantId)) == null ? void 0 : y.profile.code, w = F.value.find((f) => f._id === s.user.id);
|
|
93
95
|
return {
|
|
@@ -102,17 +104,17 @@ const Ee = {
|
|
|
102
104
|
var e, s;
|
|
103
105
|
return t.user.name.toLowerCase().includes(c.value.toLowerCase()) || t.restaurantName.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.restaurantCode) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase())) || ((s = t.user.code) == null ? void 0 : s.toLowerCase().includes(c.value.toLowerCase()));
|
|
104
106
|
})), H = g(() => {
|
|
105
|
-
const t =
|
|
107
|
+
const t = Ce(j.value, (s) => s.user.name), e = Object.entries(t).map(([s, n]) => {
|
|
106
108
|
const w = F.value.find((y) => y._id === n[0].user.id);
|
|
107
109
|
return {
|
|
108
110
|
key: s,
|
|
109
111
|
user: n[0].user.name,
|
|
110
112
|
code: w ? w.code : n[0].user.code || "",
|
|
111
113
|
timesheets: n,
|
|
112
|
-
total:
|
|
114
|
+
total: Ye(n.reduce((y, f) => y + f.totalMin, 0))
|
|
113
115
|
};
|
|
114
116
|
});
|
|
115
|
-
return
|
|
117
|
+
return Fe(e, {
|
|
116
118
|
selector: "user"
|
|
117
119
|
});
|
|
118
120
|
}), N = g(() => H.value.filter((t) => {
|
|
@@ -153,7 +155,7 @@ const Ee = {
|
|
|
153
155
|
dateRange: L,
|
|
154
156
|
dateRangeLabel: oe,
|
|
155
157
|
setRange: G
|
|
156
|
-
} =
|
|
158
|
+
} = Ee();
|
|
157
159
|
Z(L, async () => {
|
|
158
160
|
U();
|
|
159
161
|
});
|
|
@@ -245,23 +247,23 @@ const Ee = {
|
|
|
245
247
|
enableSorting: !1
|
|
246
248
|
}], M = d(!1);
|
|
247
249
|
function q(t) {
|
|
248
|
-
|
|
250
|
+
m.value = t, T.value = v(m.value.startedAt).format("YYYY-MM-DD"), R.value = v(m.value.endedAt || m.value.startedAt).format("YYYY-MM-DD"), I.value = v(m.value.startedAt).format("HH:mm"), $.value = v(m.value.endedAt || m.value.startedAt).format("HH:mm"), M.value = !0;
|
|
249
251
|
}
|
|
250
|
-
const T = d(),
|
|
252
|
+
const T = d(), I = d(), R = d(), $ = d(), m = d(), K = d("");
|
|
251
253
|
async function re() {
|
|
252
|
-
const t = J(T.value,
|
|
254
|
+
const t = J(T.value, I.value), e = J(R.value, $.value);
|
|
253
255
|
if (v(t).isAfter(e)) {
|
|
254
256
|
K.value = a("hr.timesheet.checkOutMustBeforeCheckIn");
|
|
255
257
|
return;
|
|
256
258
|
}
|
|
257
259
|
S.minor(async () => {
|
|
258
|
-
await h.updateTimesheet(
|
|
260
|
+
await h.updateTimesheet(m.value, t, e);
|
|
259
261
|
}, {
|
|
260
262
|
successMessage: a("hr.timesheet.update.successMessage")
|
|
261
263
|
}), U(), M.value = !1;
|
|
262
264
|
}
|
|
263
265
|
const J = (t, e) => v(t).set("h", parseInt(e.split(":")[0])).set("m", parseInt(e.split(":")[1])).toISOString();
|
|
264
|
-
return Z([T,
|
|
266
|
+
return Z([T, R, I, $], ([t, e, s, n]) => {
|
|
265
267
|
(t || e || s || n) && (K.value = "");
|
|
266
268
|
}), (t, e) => {
|
|
267
269
|
const s = u("FmAvatar"), n = u("FmDatePicker"), w = u("FmTimePicker"), y = u("FmIcon"), f = u("FmButton"), ne = u("FmSideSheet"), Q = u("FmChip"), ie = u("FmDateRangePicker"), ue = u("FmMenuItem"), de = u("FmMenu"), ce = u("FmSpacer"), me = u("FmSearch"), W = u("FmTable");
|
|
@@ -271,7 +273,7 @@ const Ee = {
|
|
|
271
273
|
"dismiss-away": "",
|
|
272
274
|
header: r(a)("hr.timesheet.update.title")
|
|
273
275
|
}, {
|
|
274
|
-
"side-sheet-footer": b(() => [i("div",
|
|
276
|
+
"side-sheet-footer": b(() => [i("div", Je, [l(f, {
|
|
275
277
|
label: r(a)("common.update"),
|
|
276
278
|
size: "md",
|
|
277
279
|
variant: "primary",
|
|
@@ -282,34 +284,35 @@ const Ee = {
|
|
|
282
284
|
variant: "secondary",
|
|
283
285
|
onClick: e[4] || (e[4] = (o) => M.value = !1)
|
|
284
286
|
}, null, 8, ["label"])])]),
|
|
285
|
-
default: b(() => [i("div",
|
|
286
|
-
name:
|
|
287
|
+
default: b(() => [i("div", Oe, [i("div", Ae, [l(s, {
|
|
288
|
+
name: m.value.user.name,
|
|
289
|
+
initials: r(Le)(m.value.user.name),
|
|
287
290
|
size: "lg"
|
|
288
|
-
}, null, 8, ["name"]), i("div",
|
|
291
|
+
}, null, 8, ["name", "initials"]), i("div", Ke, [i("div", ze, O(r(a)("hr.timesheet.employeeName")), 1), i("div", Ne, O(m.value.user.name), 1)])]), i("div", Ue, [i("div", Be, O(r(a)("hr.timesheet.update.checkIn")), 1), i("div", Pe, [l(n, {
|
|
289
292
|
modelValue: T.value,
|
|
290
293
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => T.value = o),
|
|
291
294
|
disabled: !1,
|
|
292
295
|
label: r(a)("hr.timesheet.update.date")
|
|
293
296
|
}, null, 8, ["modelValue", "label"]), l(w, {
|
|
294
|
-
modelValue: R.value,
|
|
295
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) => R.value = o),
|
|
296
|
-
label: r(a)("hr.timesheet.update.time")
|
|
297
|
-
}, null, 8, ["modelValue", "label"])])]), i("div", Pe, [i("div", je, O(r(a)("hr.timesheet.update.checkOut")), 1), i("div", He, [l(n, {
|
|
298
297
|
modelValue: I.value,
|
|
299
|
-
"onUpdate:modelValue": e[
|
|
298
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => I.value = o),
|
|
299
|
+
label: r(a)("hr.timesheet.update.time")
|
|
300
|
+
}, null, 8, ["modelValue", "label"])])]), i("div", je, [i("div", He, O(r(a)("hr.timesheet.update.checkOut")), 1), i("div", Ge, [l(n, {
|
|
301
|
+
modelValue: R.value,
|
|
302
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => R.value = o),
|
|
300
303
|
disabled: !1,
|
|
301
304
|
label: r(a)("hr.timesheet.update.date")
|
|
302
305
|
}, null, 8, ["modelValue", "label"]), l(w, {
|
|
303
306
|
modelValue: $.value,
|
|
304
307
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => $.value = o),
|
|
305
308
|
label: r(a)("hr.timesheet.update.time")
|
|
306
|
-
}, null, 8, ["modelValue", "label"])])]), K.value ? (E(), P("div",
|
|
309
|
+
}, null, 8, ["modelValue", "label"])])]), K.value ? (E(), P("div", qe, [l(y, {
|
|
307
310
|
color: "#FF3B30",
|
|
308
311
|
name: "error",
|
|
309
312
|
size: "sm"
|
|
310
313
|
}), he(" " + O(K.value), 1)])) : ve("", !0)])]),
|
|
311
314
|
_: 1
|
|
312
|
-
}, 8, ["modelValue", "header"]), i("div",
|
|
315
|
+
}, 8, ["modelValue", "header"]), i("div", Qe, [i("div", We, [l(De, {
|
|
313
316
|
modelValue: A.value,
|
|
314
317
|
"onUpdate:modelValue": e[6] || (e[6] = (o) => A.value = o),
|
|
315
318
|
multiple: "",
|
|
@@ -318,7 +321,7 @@ const Ee = {
|
|
|
318
321
|
"selected-prefix": r(a)("hr.role.columns.restaurants"),
|
|
319
322
|
placeholder: r(a)("hr.role.columns.restaurants"),
|
|
320
323
|
class: "!w-auto pt-[3px]"
|
|
321
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div",
|
|
324
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div", Xe, [l(ie, {
|
|
322
325
|
modelValue: r(L),
|
|
323
326
|
"onUpdate:modelValue": e[7] || (e[7] = (o) => ge(L) ? L.value = o : null),
|
|
324
327
|
"show-predefined-range": ""
|
|
@@ -345,7 +348,7 @@ const Ee = {
|
|
|
345
348
|
default: b(() => [(E(), P(ee, null, we(V, (o) => l(ue, {
|
|
346
349
|
key: o.value,
|
|
347
350
|
label: o.label,
|
|
348
|
-
onClick: (X) =>
|
|
351
|
+
onClick: (X) => p.value = o.value
|
|
349
352
|
}, null, 8, ["label", "onClick"])), 64))]),
|
|
350
353
|
_: 1
|
|
351
354
|
}), l(ce), l(me, {
|
|
@@ -353,17 +356,17 @@ const Ee = {
|
|
|
353
356
|
"onUpdate:modelValue": e[10] || (e[10] = (o) => c.value = o),
|
|
354
357
|
class: "w-[320px]",
|
|
355
358
|
placeholder: r(a)("hr.timesheet.search.placeholder")
|
|
356
|
-
}, null, 8, ["modelValue", "placeholder"])]), l(
|
|
359
|
+
}, null, 8, ["modelValue", "placeholder"])]), l(Se, {
|
|
357
360
|
class: "w-full xs:px-16"
|
|
358
361
|
}, {
|
|
359
|
-
default: b(() => [i("div",
|
|
362
|
+
default: b(() => [i("div", Ze, [l(Ve, {
|
|
360
363
|
"is-loading": Y.value,
|
|
361
|
-
"is-empty":
|
|
364
|
+
"is-empty": p.value === "listView" ? z.value.length === 0 : N.value.length === 0,
|
|
362
365
|
"collapse-at": !1,
|
|
363
366
|
title: r(a)("hr.timesheet.noData.title"),
|
|
364
367
|
subtitle: ""
|
|
365
368
|
}, {
|
|
366
|
-
default: b(() => [
|
|
369
|
+
default: b(() => [p.value === "listView" ? (E(), te(W, {
|
|
367
370
|
key: 0,
|
|
368
371
|
class: "min-w-[640px]",
|
|
369
372
|
"column-defs": se,
|
|
@@ -394,7 +397,7 @@ const Ee = {
|
|
|
394
397
|
})])], 64);
|
|
395
398
|
};
|
|
396
399
|
}
|
|
397
|
-
}),
|
|
400
|
+
}), ht = /* @__PURE__ */ Re(et, [["__scopeId", "data-v-63294af2"]]);
|
|
398
401
|
export {
|
|
399
|
-
|
|
402
|
+
ht as default
|
|
400
403
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as i } from "./dayjs.min-
|
|
1
|
+
import { d as i } from "./dayjs.min-DqMLPYv-.js";
|
|
2
2
|
import { defineStore as p, storeToRefs as T } from "pinia";
|
|
3
3
|
import { ref as l } from "vue";
|
|
4
|
-
import { b as c, g as y } from "./restaurant-
|
|
5
|
-
import { s as S } from "./iteration-
|
|
4
|
+
import { b as c, g as y } from "./restaurant-BTpBmfBV.js";
|
|
5
|
+
import { s as S } from "./iteration-B5dB9ecy.js";
|
|
6
6
|
import { i as f, f as g } from "./utils-BZkjJbju.js";
|
|
7
7
|
const u = {
|
|
8
8
|
async readTimesheets(t, e) {
|