@feedmepos/mf-hrm-portal 2.3.2-dev.3 → 2.3.2-dev.5
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-D3U4nvlF.js → ApprovalCodeList-NYJNwdDZ.js} +14 -15
- package/dist/{AuditLogList-qGCW7tf0.js → AuditLogList-Ghn4aBnn.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BxZ9t3MZ.js +459 -0
- package/dist/EmployeeList-jc8LTznV.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DLgm6oCz.js +90 -0
- package/dist/{GrantUserList-C71pal0N.js → GrantUserList-BtPTpypR.js} +15 -16
- package/dist/Main-BF8hlYeV.js +101 -0
- package/dist/{Main-CCdTWngg.js → Main-BizCV-_x.js} +11 -11
- package/dist/{Main-BWJPyEU1.js → Main-McMZU_cR.js} +5 -5
- package/dist/MyPosProfile-BjeCnBvL.js +290 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BS-oBunI.js → PermissionSetList-NWLoqFHC.js} +45 -46
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-UPcpeVD5.js +4243 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-nwpdr7T7.js +1831 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-eT-dPsOX.js +547 -0
- package/dist/RoleList-CIfN10zu.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CMTXC_UR.js} +1 -1
- package/dist/{ScheduleGeneralPage-DpNvWNGs.js → ScheduleGeneralPage-8vS1DUrk.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-Br4AcF1g.js} +187 -186
- package/dist/{SchedulePage-QW-cYvu2.js → SchedulePage-DqbE1PoV.js} +13 -13
- package/dist/{SchedulePositionPage-BtFfVo2N.js → SchedulePositionPage-DUnkT0Tp.js} +3 -3
- package/dist/{SelectFilter-BXeVKgHN.js → SelectFilter-voMj4_j1.js} +1 -1
- package/dist/TeamMemberList-DoEOWNDC.js +2086 -0
- package/dist/{TimesheetList-D-bESKe5.js → TimesheetList-BBv2SV96.js} +9 -9
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-h-bWBmpI.js} +3 -3
- package/dist/{app-D-MUq9Ab.js → app-CDCO87ji.js} +6389 -3455
- package/dist/app.js +3 -3
- package/dist/{approval-code-BXUiojPH.js → approval-code-CLE9s5dL.js} +1 -1
- package/dist/{dayjs.min-BZ1pM-6M.js → dayjs.min-BW6-XAUB.js} +21 -21
- package/dist/{employee-HQEU8fjb.js → employee-BaCU-FLC.js} +48 -47
- package/dist/{grant-user-CBJ3gEgW.js → grant-user-DMtilLJx.js} +1 -1
- package/dist/{iteration-ogxW2-Tv.js → iteration-CPLGGFBb.js} +1 -1
- package/dist/{lodash-Def4gaas.js → lodash-snXoiw60.js} +1 -1
- package/dist/member-grant-CJyOr-q0.js +55 -0
- package/dist/restaurant-BMlLIUqe.js +51 -0
- package/dist/{role-JDoDFVd9.js → role-DqcBOWHL.js} +5 -4
- package/dist/{rule-DPtqlnz-.js → rule-B5YNhGJ4.js} +105 -100
- package/dist/src/api/my-pos-profile/index.d.ts +3 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +16 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
- package/dist/src/composables/useMenuAccess.d.ts +56 -0
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
- package/dist/src/helpers/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- package/dist/src/helpers/staff-invite.d.ts +54 -0
- package/dist/src/helpers/string.d.ts +10 -1
- package/dist/src/router/menu-access-guard.d.ts +17 -0
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +30 -0
- package/dist/src/types/my-pos-profile.d.ts +24 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/staff-invite.d.ts +100 -0
- package/dist/src/types/team.d.ts +17 -1
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +196 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
- package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
- package/dist/src/views/team/locales/index.d.ts +716 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
- package/dist/string-DZQ1uNjn.js +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DZCdxlCd.js → useAppStore-pKAGQL6q.js} +1 -1
- package/dist/{useLoading-Nygx2zn8.js → useLoading-D67DIqfk.js} +1 -1
- package/dist/{useReportPermissions-CxV7Dz1B.js → useReportPermissions-CfgnE0NY.js} +5 -5
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +0 -438
- package/dist/EmployeeList-Bd73xDCX.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-DGf0bQvy.js +0 -96
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +0 -4167
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +0 -35
- package/dist/RoleList-B_7UnVNb.js +0 -740
- package/dist/TeamMemberList-DoisBYnk.js +0 -1154
- package/dist/restaurant-D2mfKHaH.js +0 -1880
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -1,776 +0,0 @@
|
|
|
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-BXeVKgHN.js";
|
|
5
|
-
import { _ as We, b as Je, a as Qe } from "./app-D-MUq9Ab.js";
|
|
6
|
-
import { _ as we, u as Ye, H as Ze } from "./FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.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-HQEU8fjb.js";
|
|
13
|
-
import { u as $e } from "./restaurant-D2mfKHaH.js";
|
|
14
|
-
import { l as ia } from "./lodash-Def4gaas.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-JDoDFVd9.js";
|
|
20
|
-
/* empty css */
|
|
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({
|
|
22
|
-
__name: "EmployeeForm",
|
|
23
|
-
props: {
|
|
24
|
-
roleErrorMessage: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ""
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
emits: ["submitted"],
|
|
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() {
|
|
33
|
-
return {
|
|
34
|
-
restaurantId: "",
|
|
35
|
-
roleId: ""
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function de(u) {
|
|
39
|
-
if (!u) return _();
|
|
40
|
-
const o = Ve(u);
|
|
41
|
-
return {
|
|
42
|
-
code: o.code ?? "",
|
|
43
|
-
isMasterUser: o.isMasterUser ?? !1,
|
|
44
|
-
name: o.name ?? "",
|
|
45
|
-
passcode: o.passcode ?? "",
|
|
46
|
-
restaurants: o.restaurants.length > 0 ? o.restaurants.map(({ restaurantId: k, roleId: S }) => ({
|
|
47
|
-
restaurantId: k,
|
|
48
|
-
roleId: S
|
|
49
|
-
})) : [A()]
|
|
50
|
-
};
|
|
51
|
-
}
|
|
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;
|
|
54
|
-
};
|
|
55
|
-
function _() {
|
|
56
|
-
return {
|
|
57
|
-
code: "",
|
|
58
|
-
isMasterUser: !1,
|
|
59
|
-
name: "",
|
|
60
|
-
passcode: "",
|
|
61
|
-
restaurants: [A()]
|
|
62
|
-
};
|
|
63
|
-
}
|
|
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)
|
|
66
|
-
);
|
|
67
|
-
function ae(u) {
|
|
68
|
-
var o;
|
|
69
|
-
return u ? !((o = d.restaurants.value.find((k) => k._id === u)) != null && o.managable) : !1;
|
|
70
|
-
}
|
|
71
|
-
function le(u) {
|
|
72
|
-
return u.isUsable;
|
|
73
|
-
}
|
|
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)
|
|
77
|
-
try {
|
|
78
|
-
const u = await U.custom(
|
|
79
|
-
() => na.generateEmployeePasscode({
|
|
80
|
-
restaurantIds: $.value,
|
|
81
|
-
excludePosUserId: H.value
|
|
82
|
-
}),
|
|
83
|
-
{ isLoading: W }
|
|
84
|
-
);
|
|
85
|
-
L.value = !1, F.value = u.split(""), s.value.passcode = u;
|
|
86
|
-
} catch {
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const K = ua(
|
|
90
|
-
() => !ia.isEqual(s.value, b.value),
|
|
91
|
-
() => {
|
|
92
|
-
V.value = !1;
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
async function pe() {
|
|
96
|
-
const u = {
|
|
97
|
-
user: {
|
|
98
|
-
name: s.value.name,
|
|
99
|
-
passcode: s.value.passcode,
|
|
100
|
-
code: s.value.code
|
|
101
|
-
},
|
|
102
|
-
roles: s.value.restaurants
|
|
103
|
-
};
|
|
104
|
-
s.value.isMasterUser ? await C.createMasterEmployee(u) : (delete u.user.code, await C.createEmployee(u));
|
|
105
|
-
}
|
|
106
|
-
async function J() {
|
|
107
|
-
var S, R;
|
|
108
|
-
const u = b.value, o = H.value, k = {
|
|
109
|
-
user: {
|
|
110
|
-
name: s.value.name,
|
|
111
|
-
passcode: s.value.passcode
|
|
112
|
-
},
|
|
113
|
-
roles: s.value.restaurants,
|
|
114
|
-
previousRoles: (S = u.restaurants) == null ? void 0 : S.map((x) => ({
|
|
115
|
-
restaurantId: x.restaurantId,
|
|
116
|
-
roleId: x.roleId
|
|
117
|
-
}))
|
|
118
|
-
};
|
|
119
|
-
if (!s.value.isMasterUser)
|
|
120
|
-
await C.updateEmployee(o, k);
|
|
121
|
-
else {
|
|
122
|
-
const x = {
|
|
123
|
-
user: {
|
|
124
|
-
name: s.value.name,
|
|
125
|
-
passcode: s.value.passcode,
|
|
126
|
-
code: s.value.code
|
|
127
|
-
},
|
|
128
|
-
roles: s.value.restaurants,
|
|
129
|
-
previousRoles: (R = u.restaurants) == null ? void 0 : R.map((D) => ({
|
|
130
|
-
restaurantId: D.restaurantId,
|
|
131
|
-
roleId: D.roleId
|
|
132
|
-
}))
|
|
133
|
-
};
|
|
134
|
-
b.value.isMasterUser ? await C.updateMasterEmployee(o, x) : await C.migrateToMasterUser(o, x);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
async function O() {
|
|
138
|
-
M.value ? await U.minor(
|
|
139
|
-
async () => {
|
|
140
|
-
await pe();
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
successMessage: m("hr.employee.create.successMessage"),
|
|
144
|
-
isLoading: z
|
|
145
|
-
}
|
|
146
|
-
) : await U.minor(
|
|
147
|
-
async () => {
|
|
148
|
-
await J();
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
successMessage: m("hr.employee.update.successMessage"),
|
|
152
|
-
isLoading: z
|
|
153
|
-
}
|
|
154
|
-
), ce("submitted"), V.value = !1;
|
|
155
|
-
}
|
|
156
|
-
return Z(
|
|
157
|
-
() => V.value,
|
|
158
|
-
(u) => {
|
|
159
|
-
}
|
|
160
|
-
), ue({
|
|
161
|
-
show: V,
|
|
162
|
-
trigger: ee
|
|
163
|
-
}), (u, o) => {
|
|
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, {
|
|
168
|
-
id: "unit-form",
|
|
169
|
-
modelValue: V.value,
|
|
170
|
-
"onUpdate:modelValue": o[9] || (o[9] = (t) => V.value = t),
|
|
171
|
-
"is-container": l(Me).FmForm,
|
|
172
|
-
"is-container-props": {
|
|
173
|
-
onValidationSuccess: O,
|
|
174
|
-
blameFormChildOnValidationFailed: !0
|
|
175
|
-
},
|
|
176
|
-
"max-width": 960,
|
|
177
|
-
"close-button": !1,
|
|
178
|
-
"onOn:clickedAway": l(K)
|
|
179
|
-
}, {
|
|
180
|
-
"side-sheet-header": y(() => [
|
|
181
|
-
f("div", ma, [
|
|
182
|
-
f("p", ca, j(T.value), 1),
|
|
183
|
-
i(k, {
|
|
184
|
-
name: "close",
|
|
185
|
-
size: "md",
|
|
186
|
-
class: "cursor-pointer",
|
|
187
|
-
onClick: l(K)
|
|
188
|
-
}, null, 8, ["onClick"])
|
|
189
|
-
])
|
|
190
|
-
]),
|
|
191
|
-
"side-sheet-footer": y(() => [
|
|
192
|
-
f("div", va, [
|
|
193
|
-
i(D, {
|
|
194
|
-
label: q.value,
|
|
195
|
-
size: "lg",
|
|
196
|
-
type: "submit",
|
|
197
|
-
variant: "primary",
|
|
198
|
-
disabled: z.value
|
|
199
|
-
}, null, 8, ["label", "disabled"]),
|
|
200
|
-
i(D, {
|
|
201
|
-
label: l(m)("common.cancel"),
|
|
202
|
-
size: "lg",
|
|
203
|
-
variant: "tertiary",
|
|
204
|
-
disabled: z.value,
|
|
205
|
-
onClick: l(K)
|
|
206
|
-
}, null, 8, ["label", "disabled", "onClick"])
|
|
207
|
-
])
|
|
208
|
-
]),
|
|
209
|
-
default: y(() => [
|
|
210
|
-
f("div", da, [
|
|
211
|
-
i(Ee, {
|
|
212
|
-
title: l(m)("hr.employee.form.employeeSetting")
|
|
213
|
-
}, {
|
|
214
|
-
default: y(() => [
|
|
215
|
-
i(we, {
|
|
216
|
-
label: l(m)("hr.employee.form.masterUserConfig")
|
|
217
|
-
}, {
|
|
218
|
-
default: y(() => [
|
|
219
|
-
i(S, {
|
|
220
|
-
modelValue: s.value.isMasterUser,
|
|
221
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) => s.value.isMasterUser = t),
|
|
222
|
-
value: "masterUser",
|
|
223
|
-
label: l(m)("hr.employee.form.masterUser"),
|
|
224
|
-
sublabel: l(m)("hr.employee.form.masterUserSublabel"),
|
|
225
|
-
"label-placement": "right"
|
|
226
|
-
}, null, 8, ["modelValue", "label", "sublabel"])
|
|
227
|
-
]),
|
|
228
|
-
_: 1
|
|
229
|
-
}, 8, ["label"]),
|
|
230
|
-
f("div", pa, [
|
|
231
|
-
s.value.isMasterUser ? (g(), I(R, {
|
|
232
|
-
key: 0,
|
|
233
|
-
modelValue: s.value.code,
|
|
234
|
-
"onUpdate:modelValue": o[1] || (o[1] = (t) => s.value.code = t),
|
|
235
|
-
label: l(m)("hr.employee.form.code")
|
|
236
|
-
}, null, 8, ["modelValue", "label"])) : B("", !0),
|
|
237
|
-
i(R, {
|
|
238
|
-
modelValue: s.value.name,
|
|
239
|
-
"onUpdate:modelValue": o[2] || (o[2] = (t) => s.value.name = t),
|
|
240
|
-
class: "w-full",
|
|
241
|
-
label: l(m)("hr.employee.form.name"),
|
|
242
|
-
rules: [(t) => !!t || l(m)("hr.employee.form.required")]
|
|
243
|
-
}, null, 8, ["modelValue", "label", "rules"])
|
|
244
|
-
]),
|
|
245
|
-
i(we, {
|
|
246
|
-
label: l(m)("hr.employee.form.passcode")
|
|
247
|
-
}, {
|
|
248
|
-
default: y(() => [
|
|
249
|
-
f("div", fa, [
|
|
250
|
-
i(x, {
|
|
251
|
-
modelValue: F.value,
|
|
252
|
-
"onUpdate:modelValue": o[6] || (o[6] = (t) => F.value = t),
|
|
253
|
-
rules: [
|
|
254
|
-
(t) => (t == null ? void 0 : t.filter((G) => !!G).length) !== Se ? l(m)("hr.employee.form.passcodeRequired") : !0
|
|
255
|
-
]
|
|
256
|
-
}, {
|
|
257
|
-
default: y(() => [
|
|
258
|
-
i(la, {
|
|
259
|
-
modelValue: F.value,
|
|
260
|
-
"onUpdate:modelValue": o[3] || (o[3] = (t) => F.value = t),
|
|
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"),
|
|
265
|
-
onComplete: o[5] || (o[5] = (t) => s.value.passcode = t)
|
|
266
|
-
}, null, 8, ["modelValue", "masked", "toggle-label"])
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
}, 8, ["modelValue", "rules"]),
|
|
270
|
-
i(sa, {
|
|
271
|
-
label: l(m)("hr.employee.form.passcodeGenerate"),
|
|
272
|
-
hint: l(m)("hr.employee.form.passcodeSelectOutletFirst"),
|
|
273
|
-
loading: W.value,
|
|
274
|
-
disabled: !se.value,
|
|
275
|
-
onClick: P
|
|
276
|
-
}, null, 8, ["label", "hint", "loading", "disabled"])
|
|
277
|
-
])
|
|
278
|
-
]),
|
|
279
|
-
_: 1
|
|
280
|
-
}, 8, ["label"])
|
|
281
|
-
]),
|
|
282
|
-
_: 1
|
|
283
|
-
}, 8, ["title"]),
|
|
284
|
-
i(Ee, null, {
|
|
285
|
-
default: y(() => [
|
|
286
|
-
i(x, {
|
|
287
|
-
modelValue: s.value.restaurants,
|
|
288
|
-
"onUpdate:modelValue": o[8] || (o[8] = (t) => s.value.restaurants = t),
|
|
289
|
-
tag: "div",
|
|
290
|
-
rules: [
|
|
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")
|
|
293
|
-
]
|
|
294
|
-
}, {
|
|
295
|
-
default: y(() => [
|
|
296
|
-
i(ta, {
|
|
297
|
-
modelValue: s.value.restaurants,
|
|
298
|
-
"onUpdate:modelValue": o[7] || (o[7] = (t) => s.value.restaurants = t),
|
|
299
|
-
restaurants: l(d).restaurants.value,
|
|
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")
|
|
309
|
-
}, null, 8, ["modelValue", "restaurants", "roles", "title", "restaurant-label", "role-label", "add-label", "remove-label"])
|
|
310
|
-
]),
|
|
311
|
-
_: 1
|
|
312
|
-
}, 8, ["modelValue", "rules"])
|
|
313
|
-
]),
|
|
314
|
-
_: 1
|
|
315
|
-
})
|
|
316
|
-
])
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
|
|
320
|
-
], 64);
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
}), ga = {
|
|
324
|
-
class: "space-y-8"
|
|
325
|
-
}, ha = {
|
|
326
|
-
key: 0,
|
|
327
|
-
class: "flex w-full items-start justify-between"
|
|
328
|
-
}, _a = {
|
|
329
|
-
class: "flex items-start gap-8"
|
|
330
|
-
}, ba = {
|
|
331
|
-
class: "flex"
|
|
332
|
-
}, ka = {
|
|
333
|
-
key: 1,
|
|
334
|
-
class: "space-y-4"
|
|
335
|
-
}, wa = {
|
|
336
|
-
class: "px-16"
|
|
337
|
-
}, xa = {
|
|
338
|
-
class: "px-16 flex items-start gap-8"
|
|
339
|
-
}, Ea = {
|
|
340
|
-
class: "flex h-full flex-col overflow-auto"
|
|
341
|
-
}, Va = {
|
|
342
|
-
class: "space-y-4"
|
|
343
|
-
}, Sa = {
|
|
344
|
-
class: "fm-typo-en-body-lg-600"
|
|
345
|
-
}, Ca = {
|
|
346
|
-
key: 0,
|
|
347
|
-
class: "mr-4"
|
|
348
|
-
}, Ua = {
|
|
349
|
-
class: "text-fm-color-typo-secondary"
|
|
350
|
-
}, Fa = {
|
|
351
|
-
class: "line-clamp-2"
|
|
352
|
-
}, Ia = {
|
|
353
|
-
class: "font-bold"
|
|
354
|
-
}, N = 200, Ma = /* @__PURE__ */ Ce({
|
|
355
|
-
__name: "EmployeeList",
|
|
356
|
-
setup(Pe, {
|
|
357
|
-
expose: ue
|
|
358
|
-
}) {
|
|
359
|
-
const {
|
|
360
|
-
t: n
|
|
361
|
-
} = Fe(), w = v(), d = Re(), C = $e(), me = je(), {
|
|
362
|
-
currentBusiness: U,
|
|
363
|
-
sessionUser: ce
|
|
364
|
-
} = me, m = ge(), V = h(() => C.isLoading.value), M = v(m.roles.value.length === 0);
|
|
365
|
-
Z(C.restaurants, (e) => {
|
|
366
|
-
if (e.length > 0 && d.listEmployees.value.length > 0) {
|
|
367
|
-
const a = new Map(e.map((r) => [r._id, r]));
|
|
368
|
-
d.listEmployees.value = d.listEmployees.value.map((r) => ({
|
|
369
|
-
...r,
|
|
370
|
-
restaurants: r.restaurants.map((p) => {
|
|
371
|
-
var Q, Y;
|
|
372
|
-
return {
|
|
373
|
-
...p,
|
|
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
|
|
376
|
-
};
|
|
377
|
-
})
|
|
378
|
-
}));
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
const A = h(() => C.restaurants.value.map((e) => ({
|
|
382
|
-
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
383
|
-
value: e._id
|
|
384
|
-
}))), de = Z(m.roles, (e) => {
|
|
385
|
-
if (e.length > 0) {
|
|
386
|
-
if (M.value = !1, d.listEmployees.value.length > 0) {
|
|
387
|
-
const a = new Map(e.map((r) => [r._id, r.name]));
|
|
388
|
-
d.listEmployees.value = d.listEmployees.value.map((r) => ({
|
|
389
|
-
...r,
|
|
390
|
-
restaurants: r.restaurants.map((p) => ({
|
|
391
|
-
...p,
|
|
392
|
-
roleName: a.get(p.roleId) || p.roleName
|
|
393
|
-
}))
|
|
394
|
-
}));
|
|
395
|
-
}
|
|
396
|
-
de();
|
|
397
|
-
}
|
|
398
|
-
}), ee = h(() => d.listEmployees.value), {
|
|
399
|
-
searchKey: _
|
|
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(() => {
|
|
401
|
-
var e;
|
|
402
|
-
return JSON.stringify({
|
|
403
|
-
businessId: ((e = U.value) == null ? void 0 : e._id) ?? "",
|
|
404
|
-
search: T.value.trim(),
|
|
405
|
-
restaurantIds: [...w.value ?? []].sort(),
|
|
406
|
-
roleIds: [...t.value ?? []].sort()
|
|
407
|
-
});
|
|
408
|
-
}), le = (e) => {
|
|
409
|
-
const a = e.restaurantCode, r = e.restaurantName;
|
|
410
|
-
return a ? `${a} - ${r}` : r;
|
|
411
|
-
}, F = (e) => e.roleName || "-";
|
|
412
|
-
function L(e) {
|
|
413
|
-
return [{
|
|
414
|
-
label: n("hr.employee.form.update"),
|
|
415
|
-
onClick: () => k(e)
|
|
416
|
-
}, {
|
|
417
|
-
label: n("hr.employee.remove.title"),
|
|
418
|
-
onClick: () => R(e),
|
|
419
|
-
itemClass: "text-fm-color-typo-error"
|
|
420
|
-
}];
|
|
421
|
-
}
|
|
422
|
-
const z = ({
|
|
423
|
-
employee: e,
|
|
424
|
-
className: a = ""
|
|
425
|
-
}) => i("div", {
|
|
426
|
-
class: a,
|
|
427
|
-
onClick: (r) => {
|
|
428
|
-
r.stopPropagation();
|
|
429
|
-
}
|
|
430
|
-
}, [i(Xe, {
|
|
431
|
-
items: L(e)
|
|
432
|
-
}, null)]), W = [{
|
|
433
|
-
accessorKey: "code",
|
|
434
|
-
size: 100,
|
|
435
|
-
header: () => n("hr.employee.columns.code")
|
|
436
|
-
}, {
|
|
437
|
-
accessorKey: "name",
|
|
438
|
-
header: () => n("hr.employee.columns.name"),
|
|
439
|
-
enableSorting: !1,
|
|
440
|
-
cell(e) {
|
|
441
|
-
const a = e.row.original;
|
|
442
|
-
return i("div", {
|
|
443
|
-
class: "flex items-center gap-8"
|
|
444
|
-
}, [i(Me.FmAvatar, {
|
|
445
|
-
name: a.name,
|
|
446
|
-
initials: ra(a.name),
|
|
447
|
-
size: "sm",
|
|
448
|
-
class: "shrink-0"
|
|
449
|
-
}, null), i("span", {
|
|
450
|
-
class: "truncate"
|
|
451
|
-
}, [a.name])]);
|
|
452
|
-
}
|
|
453
|
-
}, {
|
|
454
|
-
accessorKey: "restaurants",
|
|
455
|
-
align: "center",
|
|
456
|
-
header: () => n("hr.employee.columns.restaurants"),
|
|
457
|
-
enableSorting: !1,
|
|
458
|
-
cell(e) {
|
|
459
|
-
return V.value || M.value ? ne(xe) : e.row.original.restaurants.map((a, r) => {
|
|
460
|
-
const p = le(a);
|
|
461
|
-
return ne("div", {
|
|
462
|
-
key: a.restaurantId || r
|
|
463
|
-
}, (r ? `
|
|
464
|
-
` : "") + p);
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
}, {
|
|
468
|
-
accessorKey: "assignedRole",
|
|
469
|
-
align: "center",
|
|
470
|
-
header: () => n("hr.employee.columns.assignedRole"),
|
|
471
|
-
enableSorting: !1,
|
|
472
|
-
cell(e) {
|
|
473
|
-
return V.value || M.value ? ne(xe, {
|
|
474
|
-
width: "120px"
|
|
475
|
-
}) : e.row.original.restaurants.map((a, r) => {
|
|
476
|
-
const p = F(a);
|
|
477
|
-
return ne("div", {
|
|
478
|
-
key: a.restaurantId || r
|
|
479
|
-
}, (r ? `
|
|
480
|
-
` : "") + p);
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
}, {
|
|
484
|
-
accessorKey: "since",
|
|
485
|
-
header: () => n("hr.employee.columns.since"),
|
|
486
|
-
enableSorting: !1
|
|
487
|
-
}, {
|
|
488
|
-
id: "action",
|
|
489
|
-
size: 52,
|
|
490
|
-
meta: {
|
|
491
|
-
cellClass: "pl-16",
|
|
492
|
-
headerContentClass: "-mx-16"
|
|
493
|
-
},
|
|
494
|
-
cell(e) {
|
|
495
|
-
return z({
|
|
496
|
-
employee: e.row.original,
|
|
497
|
-
className: "flex w-full items-center justify-end"
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
}], se = ({
|
|
501
|
-
employee: e
|
|
502
|
-
}) => i("div", {
|
|
503
|
-
class: "flex flex-col gap-4 grow p-8"
|
|
504
|
-
}, [W.map((a, r) => i("div", {
|
|
505
|
-
key: a.id ?? a.accessorKey ?? r,
|
|
506
|
-
class: "fm-typo-en-body-md-400 line-clamp-2 w-full"
|
|
507
|
-
}, [a.cell ? a.cell({
|
|
508
|
-
row: {
|
|
509
|
-
original: e
|
|
510
|
-
}
|
|
511
|
-
}) : e[a.accessorKey]]))]), P = Ie(), K = qe(), pe = Le(P), J = v(!1), O = v(), u = v();
|
|
512
|
-
function o(e) {
|
|
513
|
-
const a = e.isRestricted;
|
|
514
|
-
return a && P.open({
|
|
515
|
-
message: n("hr.employee.cannotUpdateMasterUser", {
|
|
516
|
-
name: e.name
|
|
517
|
-
}),
|
|
518
|
-
type: "error"
|
|
519
|
-
}), a;
|
|
520
|
-
}
|
|
521
|
-
const k = (e) => {
|
|
522
|
-
var r;
|
|
523
|
-
e && o(e) || (r = u.value) == null || r.trigger(e);
|
|
524
|
-
}, {
|
|
525
|
-
breakpoints: S
|
|
526
|
-
} = He(), R = (e) => {
|
|
527
|
-
o(e) || K.open({
|
|
528
|
-
title: n("hr.employee.remove.title"),
|
|
529
|
-
message: n("hr.employee.remove.message", {
|
|
530
|
-
name: e.name
|
|
531
|
-
}),
|
|
532
|
-
minWidth: S.value.lg ? 588 : 0,
|
|
533
|
-
primaryActions: {
|
|
534
|
-
text: n("common.remove"),
|
|
535
|
-
close: !1,
|
|
536
|
-
variant: "destructive",
|
|
537
|
-
isLoading: J
|
|
538
|
-
},
|
|
539
|
-
secondaryActions: {
|
|
540
|
-
text: n("common.cancel"),
|
|
541
|
-
close: !0
|
|
542
|
-
}
|
|
543
|
-
}).onPrimary(async () => {
|
|
544
|
-
if (J.value) return;
|
|
545
|
-
const r = e.isMasterUser ? d.deleteMasterEmployee : d.deleteEmployee;
|
|
546
|
-
await pe.minor(async () => {
|
|
547
|
-
await r(e), await fe();
|
|
548
|
-
}, {
|
|
549
|
-
isLoading: J,
|
|
550
|
-
successMessage: n("hr.employee.remove.successMessage", {
|
|
551
|
-
name: e.name
|
|
552
|
-
})
|
|
553
|
-
}).catch(() => {
|
|
554
|
-
}), K.close();
|
|
555
|
-
});
|
|
556
|
-
}, x = v("");
|
|
557
|
-
function D() {
|
|
558
|
-
var e;
|
|
559
|
-
(e = u.value) == null || e.trigger();
|
|
560
|
-
}
|
|
561
|
-
const te = h(() => ge().roles.value.map((e) => ({
|
|
562
|
-
label: e.name,
|
|
563
|
-
value: e._id
|
|
564
|
-
}))), t = v();
|
|
565
|
-
async function G() {
|
|
566
|
-
try {
|
|
567
|
-
await d.syncUsersMeta(), await fe(), P.open({
|
|
568
|
-
message: n("hr.employee.sync.successMessage"),
|
|
569
|
-
type: "success"
|
|
570
|
-
});
|
|
571
|
-
} catch (e) {
|
|
572
|
-
console.error("Error syncing users:", e), P.open({
|
|
573
|
-
message: n("hr.employee.sync.errorMessage"),
|
|
574
|
-
type: "error"
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
async function oe(e = s.value) {
|
|
579
|
-
var a, r;
|
|
580
|
-
try {
|
|
581
|
-
await d.readEmployeesPage({
|
|
582
|
-
limit: N,
|
|
583
|
-
offset: (e - 1) * N,
|
|
584
|
-
search: T.value.trim() || void 0,
|
|
585
|
-
restaurantIds: (a = w.value) != null && a.length ? w.value : void 0,
|
|
586
|
-
roleIds: (r = t.value) != null && r.length ? t.value : void 0
|
|
587
|
-
});
|
|
588
|
-
} catch (p) {
|
|
589
|
-
console.error("Failed to load employees:", p), P.open({
|
|
590
|
-
message: p instanceof Error ? p.message : String(p),
|
|
591
|
-
type: "error"
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
async function fe() {
|
|
596
|
-
var a;
|
|
597
|
-
if (!((a = U.value) != null && a._id)) return;
|
|
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));
|
|
601
|
-
}
|
|
602
|
-
async function De() {
|
|
603
|
-
var e, a;
|
|
604
|
-
return await d.readAllEmployeesPage({
|
|
605
|
-
search: T.value.trim() || void 0,
|
|
606
|
-
restaurantIds: (e = w.value) != null && e.length ? w.value : void 0,
|
|
607
|
-
roleIds: (a = t.value) != null && a.length ? t.value : void 0
|
|
608
|
-
}, b.value);
|
|
609
|
-
}
|
|
610
|
-
const Ne = oa(_, () => {
|
|
611
|
-
T.value = _.value;
|
|
612
|
-
}, 300);
|
|
613
|
-
Oe(Ne);
|
|
614
|
-
let ve = !1;
|
|
615
|
-
async function Ae({
|
|
616
|
-
pageIndex: e
|
|
617
|
-
}) {
|
|
618
|
-
var a;
|
|
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;
|
|
621
|
-
try {
|
|
622
|
-
await oe(s.value);
|
|
623
|
-
} finally {
|
|
624
|
-
ve = !1;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
Z(ae, async () => {
|
|
629
|
-
var e;
|
|
630
|
-
s.value = 1, $.value = !1, (e = U.value) != null && e._id && (await oe(1), $.value = !0);
|
|
631
|
-
}, {
|
|
632
|
-
immediate: !0
|
|
633
|
-
}), Z(() => O.value && O.value.restaurants, (e) => {
|
|
634
|
-
e && e.length > 0 && (x.value = "");
|
|
635
|
-
});
|
|
636
|
-
const Te = h(() => b.value > N);
|
|
637
|
-
return ue({
|
|
638
|
-
create: D,
|
|
639
|
-
filteredEmployees: q,
|
|
640
|
-
exportEmployees: De,
|
|
641
|
-
getHasPaginationFooter: () => Te.value
|
|
642
|
-
}), (e, a) => {
|
|
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, {
|
|
646
|
-
ref_key: "employeeFormRef",
|
|
647
|
-
ref: u,
|
|
648
|
-
modelValue: O.value,
|
|
649
|
-
"onUpdate:modelValue": a[0] || (a[0] = (c) => O.value = c),
|
|
650
|
-
"role-error-message": x.value,
|
|
651
|
-
class: "gap-8",
|
|
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, {
|
|
654
|
-
modelValue: l(_),
|
|
655
|
-
"onUpdate:modelValue": a[4] || (a[4] = (c) => be(_) ? _.value = c : null),
|
|
656
|
-
placeholder: l(n)("hr.employee.search.placeholder")
|
|
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),
|
|
660
|
-
multiple: "",
|
|
661
|
-
items: A.value,
|
|
662
|
-
variant: "dark",
|
|
663
|
-
"selected-prefix": l(n)("hr.role.columns.restaurants"),
|
|
664
|
-
placeholder: l(n)("hr.role.columns.restaurants"),
|
|
665
|
-
class: "!w-auto"
|
|
666
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
|
|
667
|
-
modelValue: t.value,
|
|
668
|
-
"onUpdate:modelValue": a[6] || (a[6] = (c) => t.value = c),
|
|
669
|
-
multiple: "",
|
|
670
|
-
items: te.value,
|
|
671
|
-
variant: "dark",
|
|
672
|
-
"selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
|
|
673
|
-
placeholder: l(n)("hr.employee.filter.role_placeholder")
|
|
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),
|
|
677
|
-
multiple: "",
|
|
678
|
-
items: A.value,
|
|
679
|
-
variant: "dark",
|
|
680
|
-
"selected-prefix": l(n)("hr.role.columns.restaurants"),
|
|
681
|
-
placeholder: l(n)("hr.role.columns.restaurants"),
|
|
682
|
-
class: "!w-auto"
|
|
683
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
|
|
684
|
-
modelValue: t.value,
|
|
685
|
-
"onUpdate:modelValue": a[2] || (a[2] = (c) => t.value = c),
|
|
686
|
-
multiple: "",
|
|
687
|
-
variant: "dark",
|
|
688
|
-
items: te.value,
|
|
689
|
-
"selected-prefix": l(n)("hr.employee.filter.selected_role_prefix"),
|
|
690
|
-
placeholder: l(n)("hr.employee.filter.role_placeholder")
|
|
691
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), f("div", ba, [(he = l(ce)) != null && he.role.isAdmin ? (g(), I(p, {
|
|
692
|
-
key: 0,
|
|
693
|
-
content: l(n)("hr.employee.sync.tooltip")
|
|
694
|
-
}, {
|
|
695
|
-
default: y(() => [i(r, {
|
|
696
|
-
icon: "refresh",
|
|
697
|
-
label: l(n)("hr.employee.sync.tooltip"),
|
|
698
|
-
variant: "tertiary",
|
|
699
|
-
onClick: G
|
|
700
|
-
}, null, 8, ["label"])]),
|
|
701
|
-
_: 1
|
|
702
|
-
}, 8, ["content"])) : B("", !0), i(Q, {
|
|
703
|
-
modelValue: l(_),
|
|
704
|
-
"onUpdate:modelValue": a[3] || (a[3] = (c) => be(_) ? _.value = c : null),
|
|
705
|
-
autofocus: "",
|
|
706
|
-
class: "pl-4 w-[320px]",
|
|
707
|
-
placeholder: l(n)("hr.employee.search.placeholder")
|
|
708
|
-
}, null, 8, ["modelValue", "placeholder"])])])), (_e = l(U)) != null && _e._id ? (g(), I(We, {
|
|
709
|
-
key: 2
|
|
710
|
-
}, {
|
|
711
|
-
default: y(() => [f("div", Ea, [!$.value && l(d).isLoading.value ? (g(), I(Je, {
|
|
712
|
-
key: 0
|
|
713
|
-
})) : B("", !0), $.value ? (g(), I(ea, {
|
|
714
|
-
key: 1,
|
|
715
|
-
"is-loading": l(d).isLoading.value,
|
|
716
|
-
"is-empty": b.value === 0,
|
|
717
|
-
title: l(n)("hr.employee.noData.title"),
|
|
718
|
-
subtitle: l(n)("hr.employee.noData.subtitle")
|
|
719
|
-
}, {
|
|
720
|
-
default: y(() => [(g(), I(ze, {
|
|
721
|
-
key: ae.value,
|
|
722
|
-
class: ke(["employee-list-table h-full", {
|
|
723
|
-
"employee-list-table--pagination-loading": H.value
|
|
724
|
-
}]),
|
|
725
|
-
"column-defs": W,
|
|
726
|
-
"row-data": q.value,
|
|
727
|
-
"page-size": N,
|
|
728
|
-
"page-count": Math.ceil(b.value / N),
|
|
729
|
-
"row-count": b.value,
|
|
730
|
-
"fetch-fn": Ae,
|
|
731
|
-
"hide-footer": b.value <= N,
|
|
732
|
-
loading: l(d).isLoading.value,
|
|
733
|
-
virtual: !1,
|
|
734
|
-
"pin-header-row": "",
|
|
735
|
-
onRowClick: a[7] || (a[7] = (c) => k(c.original))
|
|
736
|
-
}, {
|
|
737
|
-
"list-row": y((c) => [l(S).xs ? (g(), I(Y, {
|
|
738
|
-
key: 0,
|
|
739
|
-
class: ke(["py-12 px-16 items-center justify-between", {
|
|
740
|
-
"border-t border-fm-color-neutral-gray-100": c.index > 0
|
|
741
|
-
}]),
|
|
742
|
-
onClick: (re) => k(c.original)
|
|
743
|
-
}, {
|
|
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", {
|
|
745
|
-
class: "font-bold"
|
|
746
|
-
}, "Since:", -1)), ye(" " + j(c.original.since), 1)])])]), i(r, {
|
|
747
|
-
icon: "delete",
|
|
748
|
-
variant: "tertiary",
|
|
749
|
-
"text-color": "neutral-gray-400",
|
|
750
|
-
onClick: Ge((re) => R(c.original), ["stop"])
|
|
751
|
-
}, null, 8, ["onClick"])]),
|
|
752
|
-
_: 2
|
|
753
|
-
}, 1032, ["class", "onClick"])) : (g(), I(Y, {
|
|
754
|
-
key: 1,
|
|
755
|
-
style: {
|
|
756
|
-
padding: "0"
|
|
757
|
-
},
|
|
758
|
-
onClick: (re) => k(c.original)
|
|
759
|
-
}, {
|
|
760
|
-
default: y(() => [(g(), I(Be(se), {
|
|
761
|
-
employee: c.original
|
|
762
|
-
}, null, 8, ["employee"]))]),
|
|
763
|
-
_: 2
|
|
764
|
-
}, 1032, ["onClick"]))]),
|
|
765
|
-
_: 1
|
|
766
|
-
}, 8, ["class", "row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
|
|
767
|
-
_: 1
|
|
768
|
-
}, 8, ["is-loading", "is-empty", "title", "subtitle"])) : B("", !0)])]),
|
|
769
|
-
_: 1
|
|
770
|
-
})) : B("", !0)])], 64);
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
}), Za = /* @__PURE__ */ Qe(Ma, [["__scopeId", "data-v-5aed0d1c"]]);
|
|
774
|
-
export {
|
|
775
|
-
Za as default
|
|
776
|
-
};
|