@feedmepos/mf-hrm-portal 2.2.2-dev → 2.2.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-Dpg-lwZA.js} +5 -5
- package/dist/AuditLogList-B8lU5FU1.js +1149 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Di-1ZwEW.js} +2 -2
- package/dist/{EmployeeList-BFxMwFJq.js → EmployeeList-ByeniR1c.js} +71 -71
- package/dist/{GrantUserList-CZtmMRoS.js → GrantUserList-D0YIdpMH.js} +6 -6
- package/dist/{Main-on0TXkQt.js → Main-Bg0Najd8.js} +8 -8
- package/dist/{Main-B622Z4q4.js → Main-C9-EztWV.js} +11 -11
- package/dist/{Main-DD6IthCS.js → Main-CTsTrR0m.js} +5 -5
- package/dist/{PermissionSetList-FCX3TBoi.js → PermissionSetList-CqVP3iB8.js} +78 -77
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CXNhJDfA.js} +569 -564
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js} +1 -1
- package/dist/RoleList-CQuV9O_f.js +739 -0
- package/dist/{TeamMemberList-BAU7Y3jh.js → TeamMemberList-DNitiMN5.js} +312 -313
- package/dist/{TimesheetList-DtFBWhma.js → TimesheetList-DYJsjODe.js} +7 -7
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DWKJIq76.js} +3 -3
- package/dist/{app-Bbf6hEPt.js → app-BJKd6Faz.js} +521 -817
- package/dist/app.js +1 -1
- package/dist/{approval-code-jIjkeVEb.js → approval-code-BRClD2HN.js} +1 -1
- package/dist/{dayjs.min-BAnGg8q2.js → dayjs.min-D8ClaZcZ.js} +1 -1
- package/dist/{employee-DVSD3L51.js → employee-C9VVckRM.js} +4 -4
- package/dist/{grant-user-SNiDV22U.js → grant-user-Dhi3ilC_.js} +1 -1
- package/dist/{iteration-BTZViJtd.js → iteration-CMXHdaKL.js} +1 -1
- package/dist/{lodash-Cgdk4_YL.js → lodash-0-Y1xSyQ.js} +1 -1
- package/dist/{restaurant-BTpBmfBV.js → restaurant-DiYb0pCm.js} +2 -2
- package/dist/{role-CXVpO6fB.js → role-B-Y4JezP.js} +2 -2
- package/dist/{rule-TR3MVo-b.js → rule-raGIIqlH.js} +288 -261
- package/dist/src/api/audit-log/index.d.ts +0 -6
- 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/audit-log.d.ts +1 -1
- package/dist/src/types/role.d.ts +1 -0
- package/dist/src/views/audit-log/locales/index.d.ts +0 -300
- 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/{useAppStore-DCwd8GWN.js → useAppStore-BGhlB1_1.js} +1 -1
- package/dist/useDebounce-CWb5QR9G.js +28 -0
- package/dist/{useLoading-CXzTpIVv.js → useLoading-CvgqVDbF.js} +1 -1
- package/dist/useReportPermissions-C5_EivtU.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/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
- package/dist/src/views/audit-log/change-nodes.d.ts +0 -14
- package/dist/src/views/audit-log/event-line.d.ts +0 -13
- package/dist/src/views/audit-log/operation-status.d.ts +0 -2
- package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
- package/dist/useDebounce-B8ZPVS5C.js +0 -15
- 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-BJKd6Faz.js";
|
|
4
|
+
import { l as fe } from "./lodash-0-Y1xSyQ.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,17 @@ 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-BJKd6Faz.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
|
-
import { _ as Ue } from "./
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import { l as ia } from "./lodash-Cgdk4_YL.js";
|
|
9
|
+
import { u as ra, _ as Ue } from "./useDebounce-CWb5QR9G.js";
|
|
10
|
+
import { u as Ke, E as na } from "./employee-C9VVckRM.js";
|
|
11
|
+
import { u as Oe } from "./restaurant-DiYb0pCm.js";
|
|
12
|
+
import { l as ia } from "./lodash-0-Y1xSyQ.js";
|
|
14
13
|
import { _ as $e } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
15
|
-
import { u as Be } from "./useLoading-
|
|
16
|
-
import { u as Ee } from "./role-
|
|
14
|
+
import { u as Be } from "./useLoading-CvgqVDbF.js";
|
|
15
|
+
import { u as Ee } from "./role-B-Y4JezP.js";
|
|
17
16
|
/* empty css */
|
|
18
17
|
function Me(z) {
|
|
19
18
|
return JSON.parse(JSON.stringify(z));
|
|
@@ -37,7 +36,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
37
36
|
},
|
|
38
37
|
emits: ["submitted"],
|
|
39
38
|
setup(z, { expose: ve, emit: u }) {
|
|
40
|
-
const E = Ee(), p = Oe(),
|
|
39
|
+
const E = Ee(), p = Oe(), U = Ke(), ye = Ne(), P = Be(ye), ge = u, { t: c } = De(), C = v(!1), A = v(!0);
|
|
41
40
|
function K() {
|
|
42
41
|
return {
|
|
43
42
|
restaurantId: "",
|
|
@@ -59,7 +58,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
59
58
|
};
|
|
60
59
|
}
|
|
61
60
|
const te = (o) => {
|
|
62
|
-
t.value = he(o), I.value = Le(t.value), se.value = o == null ? void 0 : o._id,
|
|
61
|
+
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
62
|
};
|
|
64
63
|
function k() {
|
|
65
64
|
return {
|
|
@@ -73,7 +72,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
73
72
|
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
73
|
() => t.value.restaurants.map((o) => o.restaurantId).filter(Boolean)
|
|
75
74
|
);
|
|
76
|
-
function
|
|
75
|
+
function S(o) {
|
|
77
76
|
var l;
|
|
78
77
|
return o ? !((l = p.restaurants.value.find((n) => n._id === o)) != null && l.managable) : !1;
|
|
79
78
|
}
|
|
@@ -92,8 +91,8 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
92
91
|
})) : [];
|
|
93
92
|
}
|
|
94
93
|
function _e(o, l) {
|
|
95
|
-
var b,
|
|
96
|
-
const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((
|
|
94
|
+
var b, R, G;
|
|
95
|
+
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
96
|
t.value.restaurants[o] = {
|
|
98
97
|
restaurantId: l,
|
|
99
98
|
roleId: _
|
|
@@ -111,7 +110,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
111
110
|
function Q(o) {
|
|
112
111
|
var n;
|
|
113
112
|
const l = ((n = t.value.restaurants[o]) == null ? void 0 : n.restaurantId) ?? "";
|
|
114
|
-
if (!
|
|
113
|
+
if (!S(l)) {
|
|
115
114
|
if (t.value.restaurants.length === 1) {
|
|
116
115
|
t.value.restaurants = [K()];
|
|
117
116
|
return;
|
|
@@ -128,16 +127,16 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
128
127
|
(n) => n.restaurantId && n.roleId
|
|
129
128
|
);
|
|
130
129
|
return o && l;
|
|
131
|
-
}),
|
|
130
|
+
}), V = v([]), T = v(!1);
|
|
132
131
|
function Y() {
|
|
133
|
-
T.value && (T.value = !1,
|
|
132
|
+
T.value && (T.value = !1, V.value = []);
|
|
134
133
|
}
|
|
135
134
|
const $ = v(!1), j = v(!1);
|
|
136
135
|
async function ie() {
|
|
137
136
|
j.value = !0;
|
|
138
137
|
try {
|
|
139
138
|
const o = await na.generateEmployeePasscode();
|
|
140
|
-
T.value = !1,
|
|
139
|
+
T.value = !1, V.value = o.split("");
|
|
141
140
|
} finally {
|
|
142
141
|
j.value = !1;
|
|
143
142
|
}
|
|
@@ -145,7 +144,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
145
144
|
const D = ta(
|
|
146
145
|
() => !ia.isEqual(t.value, I.value),
|
|
147
146
|
() => {
|
|
148
|
-
|
|
147
|
+
C.value = !1;
|
|
149
148
|
}
|
|
150
149
|
);
|
|
151
150
|
async function Z() {
|
|
@@ -157,7 +156,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
157
156
|
},
|
|
158
157
|
roles: t.value.restaurants
|
|
159
158
|
};
|
|
160
|
-
t.value.isMasterUser ? await
|
|
159
|
+
t.value.isMasterUser ? await U.createMasterEmployee(o) : (delete o.user.code, await U.createEmployee(o));
|
|
161
160
|
}
|
|
162
161
|
async function ue() {
|
|
163
162
|
var h, _;
|
|
@@ -173,7 +172,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
173
172
|
}))
|
|
174
173
|
};
|
|
175
174
|
if (!t.value.isMasterUser)
|
|
176
|
-
await
|
|
175
|
+
await U.updateEmployee(l, n);
|
|
177
176
|
else {
|
|
178
177
|
const b = {
|
|
179
178
|
user: {
|
|
@@ -182,12 +181,12 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
182
181
|
code: t.value.code
|
|
183
182
|
},
|
|
184
183
|
roles: t.value.restaurants,
|
|
185
|
-
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((
|
|
186
|
-
restaurantId:
|
|
187
|
-
roleId:
|
|
184
|
+
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((R) => ({
|
|
185
|
+
restaurantId: R.restaurantId,
|
|
186
|
+
roleId: R.roleId
|
|
188
187
|
}))
|
|
189
188
|
};
|
|
190
|
-
I.value.isMasterUser ? await
|
|
189
|
+
I.value.isMasterUser ? await U.updateMasterEmployee(l, b) : await U.migrateToMasterUser(l, b);
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
async function ce() {
|
|
@@ -207,22 +206,23 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
207
206
|
successMessage: c("hr.employee.update.successMessage"),
|
|
208
207
|
isLoading: $
|
|
209
208
|
}
|
|
210
|
-
), ge("submitted"),
|
|
209
|
+
), ge("submitted"), C.value = !1;
|
|
211
210
|
}
|
|
212
211
|
return ae(
|
|
213
|
-
() =>
|
|
212
|
+
() => C.value,
|
|
214
213
|
(o) => {
|
|
215
214
|
}
|
|
216
215
|
), ve({
|
|
217
|
-
show:
|
|
216
|
+
show: C,
|
|
218
217
|
trigger: te
|
|
219
218
|
}), (o, l) => {
|
|
220
|
-
const n = w("FmIcon"), h = w("FmSwitch"), _ = w("FmTextField"), b = w("FmPinField"),
|
|
219
|
+
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
220
|
return y(), N(ke, null, [
|
|
222
221
|
Ge(o.$slots, "default", { trigger: te }),
|
|
223
222
|
i(we, {
|
|
224
223
|
id: "unit-form",
|
|
225
|
-
|
|
224
|
+
modelValue: C.value,
|
|
225
|
+
"onUpdate:modelValue": l[7] || (l[7] = (e) => C.value = e),
|
|
226
226
|
"is-container": s(ze).FmForm,
|
|
227
227
|
"is-container-props": {
|
|
228
228
|
onValidationSuccess: ce,
|
|
@@ -302,17 +302,17 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
302
302
|
}, {
|
|
303
303
|
default: g(() => [
|
|
304
304
|
d("div", pa, [
|
|
305
|
-
i(
|
|
306
|
-
modelValue:
|
|
307
|
-
"onUpdate:modelValue": l[5] || (l[5] = (e) =>
|
|
305
|
+
i(R, {
|
|
306
|
+
modelValue: V.value,
|
|
307
|
+
"onUpdate:modelValue": l[5] || (l[5] = (e) => V.value = e),
|
|
308
308
|
rules: [
|
|
309
309
|
(e) => (e == null ? void 0 : e.filter((a) => !!a).length) !== Pe ? s(c)("hr.employee.form.passcodeRequired") : !0
|
|
310
310
|
]
|
|
311
311
|
}, {
|
|
312
312
|
default: g(() => [
|
|
313
313
|
i(b, {
|
|
314
|
-
modelValue:
|
|
315
|
-
"onUpdate:modelValue": l[3] || (l[3] = (e) =>
|
|
314
|
+
modelValue: V.value,
|
|
315
|
+
"onUpdate:modelValue": l[3] || (l[3] = (e) => V.value = e),
|
|
316
316
|
length: Pe,
|
|
317
317
|
masked: T.value,
|
|
318
318
|
onComplete: l[4] || (l[4] = (e) => t.value.passcode = e),
|
|
@@ -339,7 +339,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
339
339
|
}, 8, ["title"]),
|
|
340
340
|
i($e, null, {
|
|
341
341
|
default: g(() => [
|
|
342
|
-
i(
|
|
342
|
+
i(R, {
|
|
343
343
|
modelValue: t.value.restaurants,
|
|
344
344
|
"onUpdate:modelValue": l[6] || (l[6] = (e) => t.value.restaurants = e),
|
|
345
345
|
tag: "div",
|
|
@@ -355,13 +355,13 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
355
355
|
d("div", ga, [
|
|
356
356
|
d("div", ha, L(s(c)("hr.employee.columns.restaurants")), 1),
|
|
357
357
|
d("div", _a, L(s(c)("hr.employee.form.role")), 1),
|
|
358
|
-
l[
|
|
358
|
+
l[8] || (l[8] = d("div", null, null, -1))
|
|
359
359
|
]),
|
|
360
360
|
(y(!0), N(ke, null, qe(t.value.restaurants, (e, a) => (y(), N("div", {
|
|
361
361
|
key: `${e.restaurantId || "new"}-${a}`,
|
|
362
362
|
class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-16"
|
|
363
363
|
}, [
|
|
364
|
-
i(
|
|
364
|
+
i(F, {
|
|
365
365
|
class: "min-w-0",
|
|
366
366
|
"model-value": e.restaurantId,
|
|
367
367
|
items: oe(e.restaurantId),
|
|
@@ -369,27 +369,27 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
369
369
|
searchable: "",
|
|
370
370
|
"search-debounce": 300,
|
|
371
371
|
placeholder: s(c)("hr.employee.columns.restaurants"),
|
|
372
|
-
disabled:
|
|
372
|
+
disabled: S(e.restaurantId),
|
|
373
373
|
"onUpdate:modelValue": (r) => _e(a, r)
|
|
374
374
|
}, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
375
|
-
i(
|
|
375
|
+
i(F, {
|
|
376
376
|
class: "min-w-0",
|
|
377
377
|
"model-value": e.roleId,
|
|
378
378
|
items: re(e.restaurantId, e.roleId),
|
|
379
379
|
multiselect: !1,
|
|
380
380
|
placeholder: s(c)("hr.employee.form.role"),
|
|
381
|
-
disabled: !e.restaurantId ||
|
|
381
|
+
disabled: !e.restaurantId || S(e.restaurantId),
|
|
382
382
|
"onUpdate:modelValue": (r) => be(a, r)
|
|
383
383
|
}, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
|
|
384
384
|
d("div", ba, [
|
|
385
385
|
t.value.restaurants.length > 1 ? (y(), N("div", {
|
|
386
386
|
key: 0,
|
|
387
387
|
role: "button",
|
|
388
|
-
tabindex:
|
|
389
|
-
"aria-disabled":
|
|
388
|
+
tabindex: S(e.restaurantId) ? -1 : 0,
|
|
389
|
+
"aria-disabled": S(e.restaurantId),
|
|
390
390
|
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":
|
|
391
|
+
"cursor-pointer": !S(e.restaurantId),
|
|
392
|
+
"pointer-events-none": S(e.restaurantId)
|
|
393
393
|
}]),
|
|
394
394
|
"aria-label": s(c)("common.remove"),
|
|
395
395
|
onClick: le((r) => Q(a), ["stop"]),
|
|
@@ -427,7 +427,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
427
427
|
])
|
|
428
428
|
]),
|
|
429
429
|
_: 1
|
|
430
|
-
}, 8, ["
|
|
430
|
+
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
|
|
431
431
|
], 64);
|
|
432
432
|
};
|
|
433
433
|
}
|
|
@@ -436,9 +436,9 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
436
436
|
}, Ea = {
|
|
437
437
|
key: 0,
|
|
438
438
|
class: "flex w-full items-start justify-between"
|
|
439
|
-
}, Fa = {
|
|
440
|
-
class: "flex items-start gap-8"
|
|
441
439
|
}, Va = {
|
|
440
|
+
class: "flex items-start gap-8"
|
|
441
|
+
}, Fa = {
|
|
442
442
|
class: "flex"
|
|
443
443
|
}, Ca = {
|
|
444
444
|
key: 1,
|
|
@@ -469,11 +469,11 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
469
469
|
}) {
|
|
470
470
|
const {
|
|
471
471
|
t: u
|
|
472
|
-
} = De(), E = v(), p = Ke(),
|
|
472
|
+
} = De(), E = v(), p = Ke(), U = Oe(), ye = We(), {
|
|
473
473
|
currentBusiness: P,
|
|
474
474
|
sessionUser: ge
|
|
475
|
-
} = ye, c = Ee(),
|
|
476
|
-
ae(
|
|
475
|
+
} = ye, c = Ee(), C = x(() => U.isLoading.value), A = v(c.roles.value.length === 0);
|
|
476
|
+
ae(U.restaurants, (e) => {
|
|
477
477
|
if (e.length > 0 && p.listEmployees.value.length > 0) {
|
|
478
478
|
const a = new Map(e.map((r) => [r._id, r]));
|
|
479
479
|
p.listEmployees.value = p.listEmployees.value.map((r) => ({
|
|
@@ -489,7 +489,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
489
489
|
}));
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
|
-
const K = x(() =>
|
|
492
|
+
const K = x(() => U.restaurants.value.map((e) => ({
|
|
493
493
|
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
494
494
|
value: e._id
|
|
495
495
|
}))), he = ae(c.roles, (e) => {
|
|
@@ -508,7 +508,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
508
508
|
}
|
|
509
509
|
}), te = x(() => p.listEmployees.value), {
|
|
510
510
|
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),
|
|
511
|
+
} = 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
512
|
var e;
|
|
513
513
|
return JSON.stringify({
|
|
514
514
|
businessId: ((e = P.value) == null ? void 0 : e._id) ?? "",
|
|
@@ -566,7 +566,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
566
566
|
header: () => u("hr.employee.columns.restaurants"),
|
|
567
567
|
enableSorting: !1,
|
|
568
568
|
cell(e) {
|
|
569
|
-
return
|
|
569
|
+
return C.value || A.value ? pe(Ue) : e.row.original.restaurants.map((a, r) => {
|
|
570
570
|
const f = oe(a);
|
|
571
571
|
return pe("div", {
|
|
572
572
|
key: a.restaurantId || r
|
|
@@ -580,7 +580,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
580
580
|
header: () => u("hr.employee.columns.assignedRole"),
|
|
581
581
|
enableSorting: !1,
|
|
582
582
|
cell(e) {
|
|
583
|
-
return
|
|
583
|
+
return C.value || A.value ? pe(Ue, {
|
|
584
584
|
width: "120px"
|
|
585
585
|
}) : e.row.original.restaurants.map((a, r) => {
|
|
586
586
|
const f = re(a);
|
|
@@ -618,7 +618,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
618
618
|
row: {
|
|
619
619
|
original: e
|
|
620
620
|
}
|
|
621
|
-
}) : e[a.accessorKey]]))]), B = Ne(),
|
|
621
|
+
}) : e[a.accessorKey]]))]), B = Ne(), V = Qe(), T = Be(B), Y = v(!1), $ = v(), j = v();
|
|
622
622
|
function ie(e) {
|
|
623
623
|
const a = e.isRestricted;
|
|
624
624
|
return a && B.open({
|
|
@@ -634,7 +634,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
634
634
|
}, {
|
|
635
635
|
breakpoints: Z
|
|
636
636
|
} = Ye(), ue = (e) => {
|
|
637
|
-
ie(e) ||
|
|
637
|
+
ie(e) || V.open({
|
|
638
638
|
title: u("hr.employee.remove.title"),
|
|
639
639
|
message: u("hr.employee.remove.message", {
|
|
640
640
|
name: e.name
|
|
@@ -661,7 +661,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
661
661
|
name: e.name
|
|
662
662
|
})
|
|
663
663
|
}).catch(() => {
|
|
664
|
-
}),
|
|
664
|
+
}), V.close();
|
|
665
665
|
});
|
|
666
666
|
}, ce = v("");
|
|
667
667
|
function o() {
|
|
@@ -709,7 +709,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
709
709
|
const e = Math.max(1, Math.ceil(I.value / q));
|
|
710
710
|
t.value > e && (t.value = e, await _(t.value));
|
|
711
711
|
}
|
|
712
|
-
async function
|
|
712
|
+
async function R() {
|
|
713
713
|
var e, a;
|
|
714
714
|
return await p.readAllEmployeesPage({
|
|
715
715
|
search: J.value.trim() || void 0,
|
|
@@ -721,21 +721,21 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
721
721
|
J.value = k.value;
|
|
722
722
|
}, 300);
|
|
723
723
|
He(G);
|
|
724
|
-
let
|
|
724
|
+
let F = !1;
|
|
725
725
|
async function de({
|
|
726
726
|
pageIndex: e
|
|
727
727
|
}) {
|
|
728
728
|
var a;
|
|
729
|
-
if ((a = P.value) != null && a._id && !
|
|
730
|
-
|
|
729
|
+
if ((a = P.value) != null && a._id && !F && !(e === 0 && t.value === 1 && W.value.length > 0)) {
|
|
730
|
+
F = !0, t.value = e + 1;
|
|
731
731
|
try {
|
|
732
732
|
await _(t.value);
|
|
733
733
|
} finally {
|
|
734
|
-
|
|
734
|
+
F = !1;
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
ae(
|
|
738
|
+
ae(S, async () => {
|
|
739
739
|
var e;
|
|
740
740
|
t.value = 1, O.value = !1, (e = P.value) != null && e._id && (await _(1), O.value = !0);
|
|
741
741
|
}, {
|
|
@@ -747,10 +747,10 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
747
747
|
return ve({
|
|
748
748
|
create: o,
|
|
749
749
|
filteredEmployees: W,
|
|
750
|
-
exportEmployees:
|
|
750
|
+
exportEmployees: R,
|
|
751
751
|
getHasPaginationFooter: () => we.value
|
|
752
752
|
}), (e, a) => {
|
|
753
|
-
var
|
|
753
|
+
var Ve, Fe;
|
|
754
754
|
const r = w("FmButton"), f = w("FmTooltip"), X = w("FmSearch"), ee = w("FmListItem"), Te = w("FmTable");
|
|
755
755
|
return y(), N(ke, null, [i(ka, {
|
|
756
756
|
ref_key: "employeeFormRef",
|
|
@@ -781,7 +781,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
781
781
|
variant: "dark",
|
|
782
782
|
"selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
|
|
783
783
|
placeholder: s(u)("hr.employee.filter.role_placeholder")
|
|
784
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div",
|
|
784
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div", Va, [i(fe, {
|
|
785
785
|
modelValue: E.value,
|
|
786
786
|
"onUpdate:modelValue": a[1] || (a[1] = (m) => E.value = m),
|
|
787
787
|
multiple: "",
|
|
@@ -798,7 +798,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
798
798
|
items: l.value,
|
|
799
799
|
"selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
|
|
800
800
|
placeholder: s(u)("hr.employee.filter.role_placeholder")
|
|
801
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div",
|
|
801
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div", Fa, [(Ve = s(ge)) != null && Ve.role.isAdmin ? (y(), M(f, {
|
|
802
802
|
key: 0,
|
|
803
803
|
content: s(u)("hr.employee.sync.tooltip")
|
|
804
804
|
}, {
|
|
@@ -815,7 +815,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
815
815
|
autofocus: "",
|
|
816
816
|
class: "pl-4 w-[320px]",
|
|
817
817
|
placeholder: s(u)("hr.employee.search.placeholder")
|
|
818
|
-
}, null, 8, ["modelValue", "placeholder"])])])), (
|
|
818
|
+
}, null, 8, ["modelValue", "placeholder"])])])), (Fe = s(P)) != null && Fe._id ? (y(), M(Xe, {
|
|
819
819
|
key: 2
|
|
820
820
|
}, {
|
|
821
821
|
default: g(() => [d("div", Ua, [!O.value && s(p).isLoading.value ? (y(), M(ea, {
|
|
@@ -828,7 +828,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
828
828
|
subtitle: s(u)("hr.employee.noData.subtitle")
|
|
829
829
|
}, {
|
|
830
830
|
default: g(() => [(y(), M(Te, {
|
|
831
|
-
key:
|
|
831
|
+
key: S.value,
|
|
832
832
|
class: Ie(["employee-list-table h-full", {
|
|
833
833
|
"employee-list-table--pagination-loading": se.value
|
|
834
834
|
}]),
|
|
@@ -880,7 +880,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
880
880
|
})) : H("", !0)])], 64);
|
|
881
881
|
};
|
|
882
882
|
}
|
|
883
|
-
}),
|
|
883
|
+
}), al = /* @__PURE__ */ Ze(Na, [["__scopeId", "data-v-9cf34375"]]);
|
|
884
884
|
export {
|
|
885
|
-
|
|
885
|
+
al as default
|
|
886
886
|
};
|
|
@@ -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-D8ClaZcZ.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-BJKd6Faz.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
|
-
import { u as te } from "./useLoading-
|
|
10
|
-
import { u as ae } from "./grant-user-
|
|
11
|
-
import { u as se } from "./restaurant-
|
|
12
|
-
import { u as re } from "./role-
|
|
9
|
+
import { u as te } from "./useLoading-CvgqVDbF.js";
|
|
10
|
+
import { u as ae } from "./grant-user-Dhi3ilC_.js";
|
|
11
|
+
import { u as se } from "./restaurant-DiYb0pCm.js";
|
|
12
|
+
import { u as re } from "./role-B-Y4JezP.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",
|
|
@@ -3,16 +3,16 @@ import { useRouter as N, useRoute as h } from "vue-router";
|
|
|
3
3
|
import { useI18n as k } from "@feedmepos/mf-common";
|
|
4
4
|
import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
|
|
5
5
|
import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { u as w } from "./restaurant-
|
|
6
|
+
import { u as w } from "./restaurant-DiYb0pCm.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
|
-
import "./rule-
|
|
9
|
-
import "./lodash-
|
|
10
|
-
import "./iteration-
|
|
11
|
-
import "./useAppStore-
|
|
12
|
-
import { R as v } from "./app-
|
|
13
|
-
import "./role-
|
|
8
|
+
import "./rule-raGIIqlH.js";
|
|
9
|
+
import "./lodash-0-Y1xSyQ.js";
|
|
10
|
+
import "./iteration-CMXHdaKL.js";
|
|
11
|
+
import "./useAppStore-BGhlB1_1.js";
|
|
12
|
+
import { R as v } from "./app-BJKd6Faz.js";
|
|
13
|
+
import "./role-B-Y4JezP.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-
|
|
15
|
+
import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js";
|
|
16
16
|
const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
|
|
17
17
|
__name: "Main",
|
|
18
18
|
setup(q) {
|
|
@@ -4,19 +4,19 @@ import { useCoreStore as uf, useI18n as vf } from "@feedmepos/mf-common";
|
|
|
4
4
|
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
|
-
import { u as gf } from "./restaurant-
|
|
8
|
-
import { u as _f } from "./role-
|
|
7
|
+
import { u as gf } from "./restaurant-DiYb0pCm.js";
|
|
8
|
+
import { u as _f } from "./role-B-Y4JezP.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import "./employee-
|
|
11
|
-
import "./lodash-
|
|
12
|
-
import "./useAppStore-
|
|
13
|
-
import "./iteration-
|
|
10
|
+
import "./employee-C9VVckRM.js";
|
|
11
|
+
import "./lodash-0-Y1xSyQ.js";
|
|
12
|
+
import "./useAppStore-BGhlB1_1.js";
|
|
13
|
+
import "./iteration-CMXHdaKL.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-BJKd6Faz.js";
|
|
16
|
+
import "./rule-raGIIqlH.js";
|
|
17
|
+
import "./useReportPermissions-C5_EivtU.js";
|
|
18
|
+
import "./dayjs.min-D8ClaZcZ.js";
|
|
19
|
+
import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DWKJIq76.js";
|
|
20
20
|
var Nn = {};
|
|
21
21
|
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
22
22
|
var qt = {};
|
|
@@ -4,11 +4,11 @@ import { useI18n as E, useCoreStore as $ } from "@feedmepos/mf-common";
|
|
|
4
4
|
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
|
-
import { u as j } from "./restaurant-
|
|
8
|
-
import { u as H } from "./role-
|
|
9
|
-
import { u as J } from "./grant-user-
|
|
10
|
-
import { u as K } from "./approval-code-
|
|
11
|
-
import { R as n } from "./app-
|
|
7
|
+
import { u as j } from "./restaurant-DiYb0pCm.js";
|
|
8
|
+
import { u as H } from "./role-B-Y4JezP.js";
|
|
9
|
+
import { u as J } from "./grant-user-Dhi3ilC_.js";
|
|
10
|
+
import { u as K } from "./approval-code-BRClD2HN.js";
|
|
11
|
+
import { R as n } from "./app-BJKd6Faz.js";
|
|
12
12
|
const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
|
|
13
13
|
__name: "Main",
|
|
14
14
|
setup(W) {
|