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