@feedmepos/mf-hrm-portal 2.2.1 → 2.2.2-dev
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-BWQBJGCZ.js → ApprovalCodeList-B9O8QzzI.js} +5 -5
- package/dist/AuditLogList-CtFEXKWZ.js +1722 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDOdtKwI.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js} +2 -2
- package/dist/{EmployeeList-BZ6fxRCN.js → EmployeeList-BFxMwFJq.js} +71 -71
- package/dist/{GrantUserList-CaVpRVzA.js → GrantUserList-CZtmMRoS.js} +6 -6
- package/dist/{Main-CEKiyT80.js → Main-B622Z4q4.js} +11 -11
- package/dist/{Main-CQpEciKH.js → Main-DD6IthCS.js} +5 -5
- package/dist/{Main-DrfRLxA5.js → Main-on0TXkQt.js} +8 -8
- package/dist/{PermissionSetList-BgOSJy4y.js → PermissionSetList-FCX3TBoi.js} +77 -78
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B2SX3ZoV.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js} +832 -837
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
- package/dist/RoleList-p_9KHzqF.js +725 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
- package/dist/{TeamMemberList-BXk_pXjc.js → TeamMemberList-BAU7Y3jh.js} +313 -312
- package/dist/{TimesheetList-DgaZmgug.js → TimesheetList-DtFBWhma.js} +7 -7
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B_Lc8Xmy.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js} +3 -3
- package/dist/{app-DzagkC6l.js → app-Bbf6hEPt.js} +1086 -781
- package/dist/app.js +1 -1
- package/dist/{approval-code-BRClD2HN.js → approval-code-jIjkeVEb.js} +1 -1
- package/dist/{dayjs.min-CqJsImsm.js → dayjs.min-BAnGg8q2.js} +1 -1
- package/dist/{employee-CXBuv0Bx.js → employee-DVSD3L51.js} +4 -4
- package/dist/{grant-user-Dhi3ilC_.js → grant-user-SNiDV22U.js} +1 -1
- package/dist/{iteration-BCfwR_XH.js → iteration-BTZViJtd.js} +1 -1
- package/dist/{lodash-BJl3phr9.js → lodash-Cgdk4_YL.js} +1 -1
- package/dist/{restaurant-DiYb0pCm.js → restaurant-BTpBmfBV.js} +2 -2
- package/dist/{role-BfCNRnuy.js → role-CXVpO6fB.js} +2 -2
- package/dist/{rule-B3Eg-J8O.js → rule-TR3MVo-b.js} +259 -279
- package/dist/src/api/audit-log/index.d.ts +6 -0
- package/dist/src/api/user/index.d.ts +2 -2
- package/dist/src/composables/useReportPermissions.d.ts +0 -1
- package/dist/src/helpers/rule.d.ts +0 -2
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/types/role.d.ts +0 -1
- package/dist/src/views/audit-log/change-nodes.d.ts +14 -0
- package/dist/src/views/audit-log/event-line.d.ts +13 -0
- package/dist/src/views/audit-log/locales/index.d.ts +300 -0
- package/dist/src/views/audit-log/operation-status.d.ts +2 -0
- package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
- package/dist/src/views/hr/locales/index.d.ts +0 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BGhlB1_1.js → useAppStore-DCwd8GWN.js} +1 -1
- package/dist/useDebounce-B8ZPVS5C.js +15 -0
- package/dist/{useLoading-CvgqVDbF.js → useLoading-CXzTpIVv.js} +1 -1
- package/dist/useReportPermissions-BpAFyO17.js +71 -0
- package/package.json +1 -1
- package/dist/AuditLogList-CymSyHag.js +0 -1149
- package/dist/RoleList-C2PrTc1f.js +0 -739
- package/dist/useDebounce-CWb5QR9G.js +0 -28
- package/dist/useReportPermissions-CXXq725N.js +0 -82
|
@@ -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-Bbf6hEPt.js";
|
|
4
|
+
import { l as fe } from "./lodash-Cgdk4_YL.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,17 +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-Bbf6hEPt.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 {
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
9
|
+
import { _ as Ue } from "./Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js";
|
|
10
|
+
import { u as ra } from "./useDebounce-B8ZPVS5C.js";
|
|
11
|
+
import { u as Ke, E as na } from "./employee-DVSD3L51.js";
|
|
12
|
+
import { u as Oe } from "./restaurant-BTpBmfBV.js";
|
|
13
|
+
import { l as ia } from "./lodash-Cgdk4_YL.js";
|
|
13
14
|
import { _ as $e } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
14
|
-
import { u as Be } from "./useLoading-
|
|
15
|
-
import { u as Ee } from "./role-
|
|
15
|
+
import { u as Be } from "./useLoading-CXzTpIVv.js";
|
|
16
|
+
import { u as Ee } from "./role-CXVpO6fB.js";
|
|
16
17
|
/* empty css */
|
|
17
18
|
function Me(z) {
|
|
18
19
|
return JSON.parse(JSON.stringify(z));
|
|
@@ -36,7 +37,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
36
37
|
},
|
|
37
38
|
emits: ["submitted"],
|
|
38
39
|
setup(z, { expose: ve, emit: u }) {
|
|
39
|
-
const E = Ee(), p = Oe(),
|
|
40
|
+
const E = Ee(), p = Oe(), R = Ke(), ye = Ne(), P = Be(ye), ge = u, { t: c } = De(), U = v(!1), A = v(!0);
|
|
40
41
|
function K() {
|
|
41
42
|
return {
|
|
42
43
|
restaurantId: "",
|
|
@@ -58,7 +59,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
const te = (o) => {
|
|
61
|
-
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, F.value = [], t.value.passcode && (F.value = t.value.passcode.split(""), T.value = !0), A.value = !o, U.value = !0;
|
|
62
63
|
};
|
|
63
64
|
function k() {
|
|
64
65
|
return {
|
|
@@ -72,7 +73,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
72
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(
|
|
73
74
|
() => t.value.restaurants.map((o) => o.restaurantId).filter(Boolean)
|
|
74
75
|
);
|
|
75
|
-
function
|
|
76
|
+
function C(o) {
|
|
76
77
|
var l;
|
|
77
78
|
return o ? !((l = p.restaurants.value.find((n) => n._id === o)) != null && l.managable) : !1;
|
|
78
79
|
}
|
|
@@ -91,8 +92,8 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
91
92
|
})) : [];
|
|
92
93
|
}
|
|
93
94
|
function _e(o, l) {
|
|
94
|
-
var b,
|
|
95
|
-
const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((
|
|
95
|
+
var b, S, G;
|
|
96
|
+
const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((S = h.find((V) => V.value === n && !V.disabled)) == null ? void 0 : S.value) ?? ((G = h.find((V) => !V.disabled)) == null ? void 0 : G.value) ?? "";
|
|
96
97
|
t.value.restaurants[o] = {
|
|
97
98
|
restaurantId: l,
|
|
98
99
|
roleId: _
|
|
@@ -110,7 +111,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
110
111
|
function Q(o) {
|
|
111
112
|
var n;
|
|
112
113
|
const l = ((n = t.value.restaurants[o]) == null ? void 0 : n.restaurantId) ?? "";
|
|
113
|
-
if (!
|
|
114
|
+
if (!C(l)) {
|
|
114
115
|
if (t.value.restaurants.length === 1) {
|
|
115
116
|
t.value.restaurants = [K()];
|
|
116
117
|
return;
|
|
@@ -127,16 +128,16 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
127
128
|
(n) => n.restaurantId && n.roleId
|
|
128
129
|
);
|
|
129
130
|
return o && l;
|
|
130
|
-
}),
|
|
131
|
+
}), F = v([]), T = v(!1);
|
|
131
132
|
function Y() {
|
|
132
|
-
T.value && (T.value = !1,
|
|
133
|
+
T.value && (T.value = !1, F.value = []);
|
|
133
134
|
}
|
|
134
135
|
const $ = v(!1), j = v(!1);
|
|
135
136
|
async function ie() {
|
|
136
137
|
j.value = !0;
|
|
137
138
|
try {
|
|
138
139
|
const o = await na.generateEmployeePasscode();
|
|
139
|
-
T.value = !1,
|
|
140
|
+
T.value = !1, F.value = o.split("");
|
|
140
141
|
} finally {
|
|
141
142
|
j.value = !1;
|
|
142
143
|
}
|
|
@@ -144,7 +145,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
144
145
|
const D = ta(
|
|
145
146
|
() => !ia.isEqual(t.value, I.value),
|
|
146
147
|
() => {
|
|
147
|
-
|
|
148
|
+
U.value = !1;
|
|
148
149
|
}
|
|
149
150
|
);
|
|
150
151
|
async function Z() {
|
|
@@ -156,7 +157,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
156
157
|
},
|
|
157
158
|
roles: t.value.restaurants
|
|
158
159
|
};
|
|
159
|
-
t.value.isMasterUser ? await
|
|
160
|
+
t.value.isMasterUser ? await R.createMasterEmployee(o) : (delete o.user.code, await R.createEmployee(o));
|
|
160
161
|
}
|
|
161
162
|
async function ue() {
|
|
162
163
|
var h, _;
|
|
@@ -172,7 +173,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
172
173
|
}))
|
|
173
174
|
};
|
|
174
175
|
if (!t.value.isMasterUser)
|
|
175
|
-
await
|
|
176
|
+
await R.updateEmployee(l, n);
|
|
176
177
|
else {
|
|
177
178
|
const b = {
|
|
178
179
|
user: {
|
|
@@ -181,12 +182,12 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
181
182
|
code: t.value.code
|
|
182
183
|
},
|
|
183
184
|
roles: t.value.restaurants,
|
|
184
|
-
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((
|
|
185
|
-
restaurantId:
|
|
186
|
-
roleId:
|
|
185
|
+
previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((S) => ({
|
|
186
|
+
restaurantId: S.restaurantId,
|
|
187
|
+
roleId: S.roleId
|
|
187
188
|
}))
|
|
188
189
|
};
|
|
189
|
-
I.value.isMasterUser ? await
|
|
190
|
+
I.value.isMasterUser ? await R.updateMasterEmployee(l, b) : await R.migrateToMasterUser(l, b);
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
async function ce() {
|
|
@@ -206,23 +207,22 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
|
|
|
206
207
|
successMessage: c("hr.employee.update.successMessage"),
|
|
207
208
|
isLoading: $
|
|
208
209
|
}
|
|
209
|
-
), ge("submitted"),
|
|
210
|
+
), ge("submitted"), U.value = !1;
|
|
210
211
|
}
|
|
211
212
|
return ae(
|
|
212
|
-
() =>
|
|
213
|
+
() => U.value,
|
|
213
214
|
(o) => {
|
|
214
215
|
}
|
|
215
216
|
), ve({
|
|
216
|
-
show:
|
|
217
|
+
show: U,
|
|
217
218
|
trigger: te
|
|
218
219
|
}), (o, l) => {
|
|
219
|
-
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"), S = w("FmFormGroup"), G = w("FmButton"), V = w("FmSelect"), de = w("fm-button"), we = w("fm-side-sheet");
|
|
220
221
|
return y(), N(ke, null, [
|
|
221
222
|
Ge(o.$slots, "default", { trigger: te }),
|
|
222
223
|
i(we, {
|
|
223
224
|
id: "unit-form",
|
|
224
|
-
|
|
225
|
-
"onUpdate:modelValue": l[7] || (l[7] = (e) => C.value = e),
|
|
225
|
+
"model-value": U.value,
|
|
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(S, {
|
|
306
|
+
modelValue: F.value,
|
|
307
|
+
"onUpdate:modelValue": l[5] || (l[5] = (e) => F.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: F.value,
|
|
315
|
+
"onUpdate:modelValue": l[3] || (l[3] = (e) => F.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(S, {
|
|
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[7] || (l[7] = 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(V, {
|
|
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: C(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(V, {
|
|
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 || C(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: C(e.restaurantId) ? -1 : 0,
|
|
389
|
+
"aria-disabled": C(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": !C(e.restaurantId),
|
|
392
|
+
"pointer-events-none": C(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, ["model-value", "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
|
-
}, Va = {
|
|
440
|
-
class: "flex items-start gap-8"
|
|
441
439
|
}, Fa = {
|
|
440
|
+
class: "flex items-start gap-8"
|
|
441
|
+
}, Va = {
|
|
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(), R = Oe(), ye = We(), {
|
|
473
473
|
currentBusiness: P,
|
|
474
474
|
sessionUser: ge
|
|
475
|
-
} = ye, c = Ee(),
|
|
476
|
-
ae(
|
|
475
|
+
} = ye, c = Ee(), U = x(() => R.isLoading.value), A = v(c.roles.value.length === 0);
|
|
476
|
+
ae(R.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(() => R.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), C = 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 U.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 U.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(), F = 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) || F.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
|
+
}), F.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 S() {
|
|
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 V = !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 && !V && !(e === 0 && t.value === 1 && W.value.length > 0)) {
|
|
730
|
+
V = !0, t.value = e + 1;
|
|
731
731
|
try {
|
|
732
732
|
await _(t.value);
|
|
733
733
|
} finally {
|
|
734
|
-
|
|
734
|
+
V = !1;
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
ae(
|
|
738
|
+
ae(C, 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: S,
|
|
751
751
|
getHasPaginationFooter: () => we.value
|
|
752
752
|
}), (e, a) => {
|
|
753
|
-
var
|
|
753
|
+
var Fe, Ve;
|
|
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", Fa, [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", Va, [(Fe = s(ge)) != null && Fe.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"])])])), (Ve = s(P)) != null && Ve._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: C.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
|
+
}), ll = /* @__PURE__ */ Ze(Na, [["__scopeId", "data-v-9cf34375"]]);
|
|
884
884
|
export {
|
|
885
|
-
|
|
885
|
+
ll 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-BAnGg8q2.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-Bbf6hEPt.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-CXzTpIVv.js";
|
|
10
|
+
import { u as ae } from "./grant-user-SNiDV22U.js";
|
|
11
|
+
import { u as se } from "./restaurant-BTpBmfBV.js";
|
|
12
|
+
import { u as re } from "./role-CXVpO6fB.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",
|
|
@@ -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-BTpBmfBV.js";
|
|
8
|
+
import { u as _f } from "./role-CXVpO6fB.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import "./employee-
|
|
11
|
-
import "./lodash-
|
|
12
|
-
import "./useAppStore-
|
|
13
|
-
import "./iteration-
|
|
10
|
+
import "./employee-DVSD3L51.js";
|
|
11
|
+
import "./lodash-Cgdk4_YL.js";
|
|
12
|
+
import "./useAppStore-DCwd8GWN.js";
|
|
13
|
+
import "./iteration-BTZViJtd.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-Bbf6hEPt.js";
|
|
16
|
+
import "./rule-TR3MVo-b.js";
|
|
17
|
+
import "./useReportPermissions-BpAFyO17.js";
|
|
18
|
+
import "./dayjs.min-BAnGg8q2.js";
|
|
19
|
+
import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.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-BTpBmfBV.js";
|
|
8
|
+
import { u as H } from "./role-CXVpO6fB.js";
|
|
9
|
+
import { u as J } from "./grant-user-SNiDV22U.js";
|
|
10
|
+
import { u as K } from "./approval-code-jIjkeVEb.js";
|
|
11
|
+
import { R as n } from "./app-Bbf6hEPt.js";
|
|
12
12
|
const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
|
|
13
13
|
__name: "Main",
|
|
14
14
|
setup(W) {
|
|
@@ -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-BTpBmfBV.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-TR3MVo-b.js";
|
|
9
|
+
import "./lodash-Cgdk4_YL.js";
|
|
10
|
+
import "./iteration-BTZViJtd.js";
|
|
11
|
+
import "./useAppStore-DCwd8GWN.js";
|
|
12
|
+
import { R as v } from "./app-Bbf6hEPt.js";
|
|
13
|
+
import "./role-CXVpO6fB.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-XHuHin8t.js";
|
|
16
16
|
const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
|
|
17
17
|
__name: "Main",
|
|
18
18
|
setup(q) {
|