@feedmepos/mf-hrm-portal 2.2.2-dev → 2.2.2-dev.2
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-B9O8QzzI.js → ApprovalCodeList-BvZs3tn-.js} +2 -2
- package/dist/AuditLogList-Bv4fkVpI.js +1611 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C-03FIfv.js} +2 -2
- package/dist/{EmployeeList-BFxMwFJq.js → EmployeeList-BDTcK6GD.js} +66 -65
- package/dist/{GrantUserList-CZtmMRoS.js → GrantUserList-BOxUsFcl.js} +3 -3
- package/dist/{Main-on0TXkQt.js → Main-Csma2yIU.js} +5 -5
- package/dist/{Main-DD6IthCS.js → Main-Da_g7CTz.js} +2 -2
- package/dist/{Main-B622Z4q4.js → Main-laHdN12w.js} +9 -9
- package/dist/{PermissionSetList-FCX3TBoi.js → PermissionSetList-CpK7M-eA.js} +77 -76
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D91dsivb.js} +627 -622
- package/dist/RoleList-CnuSsHaU.js +739 -0
- package/dist/{TeamMemberList-BAU7Y3jh.js → TeamMemberList-mID3B9gL.js} +305 -305
- package/dist/{TimesheetList-DtFBWhma.js → TimesheetList-B1Vq7RMs.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-BXVYGX0n.js} +2 -2
- package/dist/{app-Bbf6hEPt.js → app-CDhU3geD.js} +16 -16
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BAnGg8q2.js → dayjs.min-CuJv-tp-.js} +1 -1
- package/dist/{employee-DVSD3L51.js → employee-RyVvi0m5.js} +3 -3
- package/dist/{iteration-BTZViJtd.js → iteration-3WrCeF_5.js} +1 -1
- package/dist/{lodash-Cgdk4_YL.js → lodash-Cm-71byT.js} +1 -1
- package/dist/{role-CXVpO6fB.js → role-CHQOtd0E.js} +1 -1
- package/dist/{rule-TR3MVo-b.js → rule--e-16FwK.js} +287 -260
- package/dist/src/api/user/index.d.ts +2 -2
- package/dist/src/composables/useReportPermissions.d.ts +1 -0
- package/dist/src/helpers/rule.d.ts +2 -0
- package/dist/src/types/role.d.ts +1 -0
- package/dist/src/views/audit-log/locales/index.d.ts +0 -4
- package/dist/src/views/hr/locales/index.d.ts +12 -8
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useReportPermissions-Br78ni1L.js +82 -0
- package/package.json +2 -2
- package/dist/AuditLogList-CtFEXKWZ.js +0 -1722
- package/dist/RoleList-p_9KHzqF.js +0 -725
- package/dist/src/views/audit-log/change-nodes.d.ts +0 -14
- package/dist/src/views/audit-log/operation-status.d.ts +0 -2
- package/dist/useReportPermissions-BpAFyO17.js +0 -71
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as M, ref as S, onMounted as ae, nextTick as le, onUnmounted as ue, resolveComponent as F, createElementBlock as p, openBlock as s, Fragment as C, createElementVNode as U, renderSlot as _, createCommentVNode as w, toDisplayString as J, createVNode as E, normalizeStyle as re, watch as X, defineAsyncComponent as se, computed as z, renderList as T, createBlock as h, withCtx as H, unref as x, resolveDynamicComponent as ie, normalizeClass as de } from "vue";
|
|
2
2
|
import { useI18n as q, useCoreStore as me } from "@feedmepos/mf-common";
|
|
3
|
-
import { O as j, f as ce, U as L } from "./app-
|
|
4
|
-
import { l as fe } from "./lodash-
|
|
3
|
+
import { O as j, f as ce, U as L } from "./app-CDhU3geD.js";
|
|
4
|
+
import { l as fe } from "./lodash-Cm-71byT.js";
|
|
5
5
|
const ye = { class: "flex items-center" }, be = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
@@ -2,18 +2,18 @@ import { toRaw as je, defineComponent as Ae, ref as v, computed as x, watch as a
|
|
|
2
2
|
import { useI18n as De, useCoreStore as We } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Ne, components as ze, useDialog as Qe, useBreakpoints as Ye } from "@feedmepos/ui-library";
|
|
4
4
|
import { S as fe, _ as Ze } from "./SelectFilter-ATOm0hdn.js";
|
|
5
|
-
import { _ as Xe, a as ea } from "./app-
|
|
5
|
+
import { _ as Xe, a as ea } from "./app-CDhU3geD.js";
|
|
6
6
|
import { _ as Re, u as aa, H as la } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
|
|
7
7
|
import { u as ta, _ as sa } from "./useDiscardConfirm-DPhEV6v0.js";
|
|
8
8
|
import { _ as oa } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
9
9
|
import { _ as Ue } from "./Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js";
|
|
10
10
|
import { u as ra } from "./useDebounce-B8ZPVS5C.js";
|
|
11
|
-
import { u as Ke, E as na } from "./employee-
|
|
11
|
+
import { u as Ke, E as na } from "./employee-RyVvi0m5.js";
|
|
12
12
|
import { u as Oe } from "./restaurant-BTpBmfBV.js";
|
|
13
|
-
import { l as ia } from "./lodash-
|
|
13
|
+
import { l as ia } from "./lodash-Cm-71byT.js";
|
|
14
14
|
import { _ as $e } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
15
15
|
import { u as Be } from "./useLoading-CXzTpIVv.js";
|
|
16
|
-
import { u as Ee } from "./role-
|
|
16
|
+
import { u as Ee } from "./role-CHQOtd0E.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
function Me(z) {
|
|
19
19
|
return JSON.parse(JSON.stringify(z));
|
|
@@ -37,7 +37,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["submitted"],
|
|
39
39
|
setup(z, { expose: ve, emit: u }) {
|
|
40
|
-
const E = Ee(), p = Oe(),
|
|
40
|
+
const E = Ee(), p = Oe(), U = Ke(), ye = Ne(), P = Be(ye), ge = u, { t: c } = De(), C = v(!1), A = v(!0);
|
|
41
41
|
function K() {
|
|
42
42
|
return {
|
|
43
43
|
restaurantId: "",
|
|
@@ -59,7 +59,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
const te = (o) => {
|
|
62
|
-
t.value = he(o), I.value = Le(t.value), se.value = o == null ? void 0 : o._id,
|
|
62
|
+
t.value = he(o), I.value = Le(t.value), se.value = o == null ? void 0 : o._id, V.value = [], t.value.passcode && (V.value = t.value.passcode.split(""), T.value = !0), A.value = !o, C.value = !0;
|
|
63
63
|
};
|
|
64
64
|
function k() {
|
|
65
65
|
return {
|
|
@@ -73,7 +73,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
73
73
|
const J = x(() => A.value ? c("hr.employee.form.add") : c("hr.employee.form.update")), W = x(() => A.value ? c("common.create") : c("common.update")), I = v(k()), t = v(k()), se = v(void 0), O = x(
|
|
74
74
|
() => t.value.restaurants.map((o) => o.restaurantId).filter(Boolean)
|
|
75
75
|
);
|
|
76
|
-
function
|
|
76
|
+
function S(o) {
|
|
77
77
|
var l;
|
|
78
78
|
return o ? !((l = p.restaurants.value.find((n) => n._id === o)) != null && l.managable) : !1;
|
|
79
79
|
}
|
|
@@ -92,8 +92,8 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
92
92
|
})) : [];
|
|
93
93
|
}
|
|
94
94
|
function _e(o, l) {
|
|
95
|
-
var b,
|
|
96
|
-
const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((
|
|
95
|
+
var b, R, G;
|
|
96
|
+
const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((R = h.find((F) => F.value === n && !F.disabled)) == null ? void 0 : R.value) ?? ((G = h.find((F) => !F.disabled)) == null ? void 0 : G.value) ?? "";
|
|
97
97
|
t.value.restaurants[o] = {
|
|
98
98
|
restaurantId: l,
|
|
99
99
|
roleId: _
|
|
@@ -111,7 +111,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
111
111
|
function Q(o) {
|
|
112
112
|
var n;
|
|
113
113
|
const l = ((n = t.value.restaurants[o]) == null ? void 0 : n.restaurantId) ?? "";
|
|
114
|
-
if (!
|
|
114
|
+
if (!S(l)) {
|
|
115
115
|
if (t.value.restaurants.length === 1) {
|
|
116
116
|
t.value.restaurants = [K()];
|
|
117
117
|
return;
|
|
@@ -128,16 +128,16 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
128
128
|
(n) => n.restaurantId && n.roleId
|
|
129
129
|
);
|
|
130
130
|
return o && l;
|
|
131
|
-
}),
|
|
131
|
+
}), V = v([]), T = v(!1);
|
|
132
132
|
function Y() {
|
|
133
|
-
T.value && (T.value = !1,
|
|
133
|
+
T.value && (T.value = !1, V.value = []);
|
|
134
134
|
}
|
|
135
135
|
const $ = v(!1), j = v(!1);
|
|
136
136
|
async function ie() {
|
|
137
137
|
j.value = !0;
|
|
138
138
|
try {
|
|
139
139
|
const o = await na.generateEmployeePasscode();
|
|
140
|
-
T.value = !1,
|
|
140
|
+
T.value = !1, V.value = o.split("");
|
|
141
141
|
} finally {
|
|
142
142
|
j.value = !1;
|
|
143
143
|
}
|
|
@@ -145,7 +145,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
145
145
|
const D = ta(
|
|
146
146
|
() => !ia.isEqual(t.value, I.value),
|
|
147
147
|
() => {
|
|
148
|
-
|
|
148
|
+
C.value = !1;
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
async function Z() {
|
|
@@ -157,7 +157,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
157
157
|
},
|
|
158
158
|
roles: t.value.restaurants
|
|
159
159
|
};
|
|
160
|
-
t.value.isMasterUser ? await
|
|
160
|
+
t.value.isMasterUser ? await U.createMasterEmployee(o) : (delete o.user.code, await U.createEmployee(o));
|
|
161
161
|
}
|
|
162
162
|
async function ue() {
|
|
163
163
|
var h, _;
|
|
@@ -173,7 +173,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
173
173
|
}))
|
|
174
174
|
};
|
|
175
175
|
if (!t.value.isMasterUser)
|
|
176
|
-
await
|
|
176
|
+
await U.updateEmployee(l, n);
|
|
177
177
|
else {
|
|
178
178
|
const b = {
|
|
179
179
|
user: {
|
|
@@ -182,12 +182,12 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
182
182
|
code: t.value.code
|
|
183
183
|
},
|
|
184
184
|
roles: t.value.restaurants,
|
|
185
|
-
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((
|
|
186
|
-
restaurantId:
|
|
187
|
-
roleId:
|
|
185
|
+
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((R) => ({
|
|
186
|
+
restaurantId: R.restaurantId,
|
|
187
|
+
roleId: R.roleId
|
|
188
188
|
}))
|
|
189
189
|
};
|
|
190
|
-
I.value.isMasterUser ? await
|
|
190
|
+
I.value.isMasterUser ? await U.updateMasterEmployee(l, b) : await U.migrateToMasterUser(l, b);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
async function ce() {
|
|
@@ -207,22 +207,23 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
207
207
|
successMessage: c("hr.employee.update.successMessage"),
|
|
208
208
|
isLoading: $
|
|
209
209
|
}
|
|
210
|
-
), ge("submitted"),
|
|
210
|
+
), ge("submitted"), C.value = !1;
|
|
211
211
|
}
|
|
212
212
|
return ae(
|
|
213
|
-
() =>
|
|
213
|
+
() => C.value,
|
|
214
214
|
(o) => {
|
|
215
215
|
}
|
|
216
216
|
), ve({
|
|
217
|
-
show:
|
|
217
|
+
show: C,
|
|
218
218
|
trigger: te
|
|
219
219
|
}), (o, l) => {
|
|
220
|
-
const n = w("FmIcon"), h = w("FmSwitch"), _ = w("FmTextField"), b = w("FmPinField"),
|
|
220
|
+
const n = w("FmIcon"), h = w("FmSwitch"), _ = w("FmTextField"), b = w("FmPinField"), R = w("FmFormGroup"), G = w("FmButton"), F = w("FmSelect"), de = w("fm-button"), we = w("fm-side-sheet");
|
|
221
221
|
return y(), N(ke, null, [
|
|
222
222
|
Ge(o.$slots, "default", { trigger: te }),
|
|
223
223
|
i(we, {
|
|
224
224
|
id: "unit-form",
|
|
225
|
-
|
|
225
|
+
modelValue: C.value,
|
|
226
|
+
"onUpdate:modelValue": l[7] || (l[7] = (e) => C.value = e),
|
|
226
227
|
"is-container": s(ze).FmForm,
|
|
227
228
|
"is-container-props": {
|
|
228
229
|
onValidationSuccess: ce,
|
|
@@ -302,17 +303,17 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
302
303
|
}, {
|
|
303
304
|
default: g(() => [
|
|
304
305
|
d("div", pa, [
|
|
305
|
-
i(
|
|
306
|
-
modelValue:
|
|
307
|
-
"onUpdate:modelValue": l[5] || (l[5] = (e) =>
|
|
306
|
+
i(R, {
|
|
307
|
+
modelValue: V.value,
|
|
308
|
+
"onUpdate:modelValue": l[5] || (l[5] = (e) => V.value = e),
|
|
308
309
|
rules: [
|
|
309
310
|
(e) => (e == null ? void 0 : e.filter((a) => !!a).length) !== Pe ? s(c)("hr.employee.form.passcodeRequired") : !0
|
|
310
311
|
]
|
|
311
312
|
}, {
|
|
312
313
|
default: g(() => [
|
|
313
314
|
i(b, {
|
|
314
|
-
modelValue:
|
|
315
|
-
"onUpdate:modelValue": l[3] || (l[3] = (e) =>
|
|
315
|
+
modelValue: V.value,
|
|
316
|
+
"onUpdate:modelValue": l[3] || (l[3] = (e) => V.value = e),
|
|
316
317
|
length: Pe,
|
|
317
318
|
masked: T.value,
|
|
318
319
|
onComplete: l[4] || (l[4] = (e) => t.value.passcode = e),
|
|
@@ -339,7 +340,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
339
340
|
}, 8, ["title"]),
|
|
340
341
|
i($e, null, {
|
|
341
342
|
default: g(() => [
|
|
342
|
-
i(
|
|
343
|
+
i(R, {
|
|
343
344
|
modelValue: t.value.restaurants,
|
|
344
345
|
"onUpdate:modelValue": l[6] || (l[6] = (e) => t.value.restaurants = e),
|
|
345
346
|
tag: "div",
|
|
@@ -355,13 +356,13 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
355
356
|
d("div", ga, [
|
|
356
357
|
d("div", ha, L(s(c)("hr.employee.columns.restaurants")), 1),
|
|
357
358
|
d("div", _a, L(s(c)("hr.employee.form.role")), 1),
|
|
358
|
-
l[
|
|
359
|
+
l[8] || (l[8] = d("div", null, null, -1))
|
|
359
360
|
]),
|
|
360
361
|
(y(!0), N(ke, null, qe(t.value.restaurants, (e, a) => (y(), N("div", {
|
|
361
362
|
key: `${e.restaurantId || "new"}-${a}`,
|
|
362
363
|
class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-16"
|
|
363
364
|
}, [
|
|
364
|
-
i(
|
|
365
|
+
i(F, {
|
|
365
366
|
class: "min-w-0",
|
|
366
367
|
"model-value": e.restaurantId,
|
|
367
368
|
items: oe(e.restaurantId),
|
|
@@ -369,27 +370,27 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
369
370
|
searchable: "",
|
|
370
371
|
"search-debounce": 300,
|
|
371
372
|
placeholder: s(c)("hr.employee.columns.restaurants"),
|
|
372
|
-
disabled:
|
|
373
|
+
disabled: S(e.restaurantId),
|
|
373
374
|
"onUpdate:modelValue": (r) => _e(a, r)
|
|
374
375
|
}, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
375
|
-
i(
|
|
376
|
+
i(F, {
|
|
376
377
|
class: "min-w-0",
|
|
377
378
|
"model-value": e.roleId,
|
|
378
379
|
items: re(e.restaurantId, e.roleId),
|
|
379
380
|
multiselect: !1,
|
|
380
381
|
placeholder: s(c)("hr.employee.form.role"),
|
|
381
|
-
disabled: !e.restaurantId ||
|
|
382
|
+
disabled: !e.restaurantId || S(e.restaurantId),
|
|
382
383
|
"onUpdate:modelValue": (r) => be(a, r)
|
|
383
384
|
}, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
384
385
|
d("div", ba, [
|
|
385
386
|
t.value.restaurants.length > 1 ? (y(), N("div", {
|
|
386
387
|
key: 0,
|
|
387
388
|
role: "button",
|
|
388
|
-
tabindex:
|
|
389
|
-
"aria-disabled":
|
|
389
|
+
tabindex: S(e.restaurantId) ? -1 : 0,
|
|
390
|
+
"aria-disabled": S(e.restaurantId),
|
|
390
391
|
class: Ie(["inline-flex h-40 w-40 shrink-0 items-center justify-center rounded-lg text-fm-color-neutral-gray-400 transition-colors hover:bg-fm-color-neutral-gray-100 focus:outline-none focus:ring-2 focus:ring-fm-color-primary disabled:cursor-not-allowed disabled:text-fm-color-neutral-gray-200 disabled:hover:bg-transparent", {
|
|
391
|
-
"cursor-pointer": !
|
|
392
|
-
"pointer-events-none":
|
|
392
|
+
"cursor-pointer": !S(e.restaurantId),
|
|
393
|
+
"pointer-events-none": S(e.restaurantId)
|
|
393
394
|
}]),
|
|
394
395
|
"aria-label": s(c)("common.remove"),
|
|
395
396
|
onClick: le((r) => Q(a), ["stop"]),
|
|
@@ -427,7 +428,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
427
428
|
])
|
|
428
429
|
]),
|
|
429
430
|
_: 1
|
|
430
|
-
}, 8, ["
|
|
431
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
|
|
431
432
|
], 64);
|
|
432
433
|
};
|
|
433
434
|
}
|
|
@@ -436,9 +437,9 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
436
437
|
}, Ea = {
|
|
437
438
|
key: 0,
|
|
438
439
|
class: "flex w-full items-start justify-between"
|
|
439
|
-
}, Fa = {
|
|
440
|
-
class: "flex items-start gap-8"
|
|
441
440
|
}, Va = {
|
|
441
|
+
class: "flex items-start gap-8"
|
|
442
|
+
}, Fa = {
|
|
442
443
|
class: "flex"
|
|
443
444
|
}, Ca = {
|
|
444
445
|
key: 1,
|
|
@@ -469,11 +470,11 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
469
470
|
}) {
|
|
470
471
|
const {
|
|
471
472
|
t: u
|
|
472
|
-
} = De(), E = v(), p = Ke(),
|
|
473
|
+
} = De(), E = v(), p = Ke(), U = Oe(), ye = We(), {
|
|
473
474
|
currentBusiness: P,
|
|
474
475
|
sessionUser: ge
|
|
475
|
-
} = ye, c = Ee(),
|
|
476
|
-
ae(
|
|
476
|
+
} = ye, c = Ee(), C = x(() => U.isLoading.value), A = v(c.roles.value.length === 0);
|
|
477
|
+
ae(U.restaurants, (e) => {
|
|
477
478
|
if (e.length > 0 && p.listEmployees.value.length > 0) {
|
|
478
479
|
const a = new Map(e.map((r) => [r._id, r]));
|
|
479
480
|
p.listEmployees.value = p.listEmployees.value.map((r) => ({
|
|
@@ -489,7 +490,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
489
490
|
}));
|
|
490
491
|
}
|
|
491
492
|
});
|
|
492
|
-
const K = x(() =>
|
|
493
|
+
const K = x(() => U.restaurants.value.map((e) => ({
|
|
493
494
|
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
494
495
|
value: e._id
|
|
495
496
|
}))), he = ae(c.roles, (e) => {
|
|
@@ -508,7 +509,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
508
509
|
}
|
|
509
510
|
}), te = x(() => p.listEmployees.value), {
|
|
510
511
|
searchKey: k
|
|
511
|
-
} = aa(), J = v(""), W = x(() => te.value), I = x(() => p.totalEmployees.value), t = v(1), se = x(() => p.isLoading.value), O = v(!1),
|
|
512
|
+
} = aa(), J = v(""), W = x(() => te.value), I = x(() => p.totalEmployees.value), t = v(1), se = x(() => p.isLoading.value), O = v(!1), S = x(() => {
|
|
512
513
|
var e;
|
|
513
514
|
return JSON.stringify({
|
|
514
515
|
businessId: ((e = P.value) == null ? void 0 : e._id) ?? "",
|
|
@@ -566,7 +567,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
566
567
|
header: () => u("hr.employee.columns.restaurants"),
|
|
567
568
|
enableSorting: !1,
|
|
568
569
|
cell(e) {
|
|
569
|
-
return
|
|
570
|
+
return C.value || A.value ? pe(Ue) : e.row.original.restaurants.map((a, r) => {
|
|
570
571
|
const f = oe(a);
|
|
571
572
|
return pe("div", {
|
|
572
573
|
key: a.restaurantId || r
|
|
@@ -580,7 +581,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
580
581
|
header: () => u("hr.employee.columns.assignedRole"),
|
|
581
582
|
enableSorting: !1,
|
|
582
583
|
cell(e) {
|
|
583
|
-
return
|
|
584
|
+
return C.value || A.value ? pe(Ue, {
|
|
584
585
|
width: "120px"
|
|
585
586
|
}) : e.row.original.restaurants.map((a, r) => {
|
|
586
587
|
const f = re(a);
|
|
@@ -618,7 +619,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
618
619
|
row: {
|
|
619
620
|
original: e
|
|
620
621
|
}
|
|
621
|
-
}) : e[a.accessorKey]]))]), B = Ne(),
|
|
622
|
+
}) : e[a.accessorKey]]))]), B = Ne(), V = Qe(), T = Be(B), Y = v(!1), $ = v(), j = v();
|
|
622
623
|
function ie(e) {
|
|
623
624
|
const a = e.isRestricted;
|
|
624
625
|
return a && B.open({
|
|
@@ -634,7 +635,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
634
635
|
}, {
|
|
635
636
|
breakpoints: Z
|
|
636
637
|
} = Ye(), ue = (e) => {
|
|
637
|
-
ie(e) ||
|
|
638
|
+
ie(e) || V.open({
|
|
638
639
|
title: u("hr.employee.remove.title"),
|
|
639
640
|
message: u("hr.employee.remove.message", {
|
|
640
641
|
name: e.name
|
|
@@ -661,7 +662,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
661
662
|
name: e.name
|
|
662
663
|
})
|
|
663
664
|
}).catch(() => {
|
|
664
|
-
}),
|
|
665
|
+
}), V.close();
|
|
665
666
|
});
|
|
666
667
|
}, ce = v("");
|
|
667
668
|
function o() {
|
|
@@ -709,7 +710,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
709
710
|
const e = Math.max(1, Math.ceil(I.value / q));
|
|
710
711
|
t.value > e && (t.value = e, await _(t.value));
|
|
711
712
|
}
|
|
712
|
-
async function
|
|
713
|
+
async function R() {
|
|
713
714
|
var e, a;
|
|
714
715
|
return await p.readAllEmployeesPage({
|
|
715
716
|
search: J.value.trim() || void 0,
|
|
@@ -721,21 +722,21 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
721
722
|
J.value = k.value;
|
|
722
723
|
}, 300);
|
|
723
724
|
He(G);
|
|
724
|
-
let
|
|
725
|
+
let F = !1;
|
|
725
726
|
async function de({
|
|
726
727
|
pageIndex: e
|
|
727
728
|
}) {
|
|
728
729
|
var a;
|
|
729
|
-
if ((a = P.value) != null && a._id && !
|
|
730
|
-
|
|
730
|
+
if ((a = P.value) != null && a._id && !F && !(e === 0 && t.value === 1 && W.value.length > 0)) {
|
|
731
|
+
F = !0, t.value = e + 1;
|
|
731
732
|
try {
|
|
732
733
|
await _(t.value);
|
|
733
734
|
} finally {
|
|
734
|
-
|
|
735
|
+
F = !1;
|
|
735
736
|
}
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
|
-
ae(
|
|
739
|
+
ae(S, async () => {
|
|
739
740
|
var e;
|
|
740
741
|
t.value = 1, O.value = !1, (e = P.value) != null && e._id && (await _(1), O.value = !0);
|
|
741
742
|
}, {
|
|
@@ -747,10 +748,10 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
747
748
|
return ve({
|
|
748
749
|
create: o,
|
|
749
750
|
filteredEmployees: W,
|
|
750
|
-
exportEmployees:
|
|
751
|
+
exportEmployees: R,
|
|
751
752
|
getHasPaginationFooter: () => we.value
|
|
752
753
|
}), (e, a) => {
|
|
753
|
-
var
|
|
754
|
+
var Ve, Fe;
|
|
754
755
|
const r = w("FmButton"), f = w("FmTooltip"), X = w("FmSearch"), ee = w("FmListItem"), Te = w("FmTable");
|
|
755
756
|
return y(), N(ke, null, [i(ka, {
|
|
756
757
|
ref_key: "employeeFormRef",
|
|
@@ -781,7 +782,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
781
782
|
variant: "dark",
|
|
782
783
|
"selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
|
|
783
784
|
placeholder: s(u)("hr.employee.filter.role_placeholder")
|
|
784
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div",
|
|
785
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div", Va, [i(fe, {
|
|
785
786
|
modelValue: E.value,
|
|
786
787
|
"onUpdate:modelValue": a[1] || (a[1] = (m) => E.value = m),
|
|
787
788
|
multiple: "",
|
|
@@ -798,7 +799,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
798
799
|
items: l.value,
|
|
799
800
|
"selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
|
|
800
801
|
placeholder: s(u)("hr.employee.filter.role_placeholder")
|
|
801
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div",
|
|
802
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div", Fa, [(Ve = s(ge)) != null && Ve.role.isAdmin ? (y(), M(f, {
|
|
802
803
|
key: 0,
|
|
803
804
|
content: s(u)("hr.employee.sync.tooltip")
|
|
804
805
|
}, {
|
|
@@ -815,7 +816,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
815
816
|
autofocus: "",
|
|
816
817
|
class: "pl-4 w-[320px]",
|
|
817
818
|
placeholder: s(u)("hr.employee.search.placeholder")
|
|
818
|
-
}, null, 8, ["modelValue", "placeholder"])])])), (
|
|
819
|
+
}, null, 8, ["modelValue", "placeholder"])])])), (Fe = s(P)) != null && Fe._id ? (y(), M(Xe, {
|
|
819
820
|
key: 2
|
|
820
821
|
}, {
|
|
821
822
|
default: g(() => [d("div", Ua, [!O.value && s(p).isLoading.value ? (y(), M(ea, {
|
|
@@ -828,7 +829,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
828
829
|
subtitle: s(u)("hr.employee.noData.subtitle")
|
|
829
830
|
}, {
|
|
830
831
|
default: g(() => [(y(), M(Te, {
|
|
831
|
-
key:
|
|
832
|
+
key: S.value,
|
|
832
833
|
class: Ie(["employee-list-table h-full", {
|
|
833
834
|
"employee-list-table--pagination-loading": se.value
|
|
834
835
|
}]),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as X, ref as S, computed as f, watch as ue, resolveComponent as v, createElementBlock as D, openBlock as w, Fragment as E, renderSlot as de, createVNode as l, unref as s, withCtx as g, createElementVNode as o, toDisplayString as _, isRef as H, renderList as me, createBlock as pe, createCommentVNode as fe, withModifiers as W, createTextVNode as J, normalizeClass as ve, h as p } from "vue";
|
|
2
|
-
import { d as ge } from "./dayjs.min-
|
|
2
|
+
import { d as ge } from "./dayjs.min-CuJv-tp-.js";
|
|
3
3
|
import { useI18n as Z } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as ee, components as K, useDialog as _e, useBreakpoints as ye, FmButtonVariant as O } from "@feedmepos/ui-library";
|
|
5
5
|
import { S as A } from "./SelectFilter-ATOm0hdn.js";
|
|
6
|
-
import { _ as he } from "./app-
|
|
6
|
+
import { _ as he } from "./app-CDhU3geD.js";
|
|
7
7
|
import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
|
|
8
8
|
import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
9
9
|
import { u as te } from "./useLoading-CXzTpIVv.js";
|
|
10
10
|
import { u as ae } from "./grant-user-SNiDV22U.js";
|
|
11
11
|
import { u as se } from "./restaurant-BTpBmfBV.js";
|
|
12
|
-
import { u as re } from "./role-
|
|
12
|
+
import { u as re } from "./role-CHQOtd0E.js";
|
|
13
13
|
import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
14
14
|
const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, we = { class: "flex gap-8 items-center justify-start" }, Se = /* @__PURE__ */ X({
|
|
15
15
|
__name: "GrantUserForm",
|
|
@@ -5,12 +5,12 @@ import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lan
|
|
|
5
5
|
import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
6
|
import { u as w } from "./restaurant-BTpBmfBV.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
|
-
import "./rule-
|
|
9
|
-
import "./lodash-
|
|
10
|
-
import "./iteration-
|
|
8
|
+
import "./rule--e-16FwK.js";
|
|
9
|
+
import "./lodash-Cm-71byT.js";
|
|
10
|
+
import "./iteration-3WrCeF_5.js";
|
|
11
11
|
import "./useAppStore-DCwd8GWN.js";
|
|
12
|
-
import { R as v } from "./app-
|
|
13
|
-
import "./role-
|
|
12
|
+
import { R as v } from "./app-CDhU3geD.js";
|
|
13
|
+
import "./role-CHQOtd0E.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js";
|
|
16
16
|
const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
|
|
@@ -5,10 +5,10 @@ import { useSnackbar as I } from "@feedmepos/ui-library";
|
|
|
5
5
|
import { _ as z } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
|
|
6
6
|
import { _ as M } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
7
7
|
import { u as j } from "./restaurant-BTpBmfBV.js";
|
|
8
|
-
import { u as H } from "./role-
|
|
8
|
+
import { u as H } from "./role-CHQOtd0E.js";
|
|
9
9
|
import { u as J } from "./grant-user-SNiDV22U.js";
|
|
10
10
|
import { u as K } from "./approval-code-jIjkeVEb.js";
|
|
11
|
-
import { R as n } from "./app-
|
|
11
|
+
import { R as n } from "./app-CDhU3geD.js";
|
|
12
12
|
const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
|
|
13
13
|
__name: "Main",
|
|
14
14
|
setup(W) {
|
|
@@ -5,18 +5,18 @@ import { useSnackbar as pf } from "@feedmepos/ui-library";
|
|
|
5
5
|
import { _ as df } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
|
|
6
6
|
import { _ as mf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
7
7
|
import { u as gf } from "./restaurant-BTpBmfBV.js";
|
|
8
|
-
import { u as _f } from "./role-
|
|
8
|
+
import { u as _f } from "./role-CHQOtd0E.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import "./employee-
|
|
11
|
-
import "./lodash-
|
|
10
|
+
import "./employee-RyVvi0m5.js";
|
|
11
|
+
import "./lodash-Cm-71byT.js";
|
|
12
12
|
import "./useAppStore-DCwd8GWN.js";
|
|
13
|
-
import "./iteration-
|
|
13
|
+
import "./iteration-3WrCeF_5.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { R as pt } from "./app-
|
|
16
|
-
import "./rule-
|
|
17
|
-
import "./useReportPermissions-
|
|
18
|
-
import "./dayjs.min-
|
|
19
|
-
import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-
|
|
15
|
+
import { R as pt } from "./app-CDhU3geD.js";
|
|
16
|
+
import "./rule--e-16FwK.js";
|
|
17
|
+
import "./useReportPermissions-Br78ni1L.js";
|
|
18
|
+
import "./dayjs.min-CuJv-tp-.js";
|
|
19
|
+
import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-BXVYGX0n.js";
|
|
20
20
|
var Nn = {};
|
|
21
21
|
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
22
22
|
var qt = {};
|