@feedmepos/mf-hrm-portal 1.1.3-dev → 1.1.6-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/{EmployeeList-zU7fmC4c.js → EmployeeList-CP42mLpi.js} +16 -18
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js → PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js} +2 -2
- package/dist/{RoleList-jbZqer7A.js → RoleList-CsctaXlu.js} +53 -57
- package/dist/TeamMemberList-DtXoUa5K.js +1508 -0
- package/dist/{TimesheetList-hgT9DrHd.js → TimesheetList-qaolOL4w.js} +41 -42
- package/dist/api/team/index.d.ts +1 -5
- package/dist/app-G_Dbs0OJ.js +1202 -0
- package/dist/app.js +4 -4
- package/dist/components/AppForm.vue.d.ts +2 -3
- package/dist/components/CheckboxInput.vue.d.ts +4 -10
- package/dist/components/CollapsibleWrapper.vue.d.ts +2 -3
- package/dist/components/form/SelectFilter.vue.d.ts +2 -3
- package/dist/components/layout/FormColumn.vue.d.ts +3 -6
- package/dist/components/layout/FormItem.vue.d.ts +1 -2
- package/dist/components/layout/FormSection.vue.d.ts +1 -2
- package/dist/components/layout/FullWrapper.vue.d.ts +3 -6
- package/dist/components/layout/PageLayout.vue.d.ts +1 -2
- package/dist/components/menu/BottomSheetMenu.vue.d.ts +1 -2
- package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +3 -6
- package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +3 -6
- package/dist/composables/useAppStore.d.ts +6 -6
- package/dist/composables/useDateRange.d.ts +1 -1
- package/dist/composables/useRestaurantMap.d.ts +8 -4
- package/dist/composables/useSheet.d.ts +1 -1
- package/dist/employee-BTWpYxn5.js +449 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → empty-placeholder-ey8LJtN1.js} +2 -43
- package/dist/helpers/rule.d.ts +3 -4
- package/dist/index-8ift6lz3.js +57 -0
- package/dist/{lodash-7Am6_Zd3.js → lodash-B5BTJU4_.js} +343 -326
- package/dist/{Main-DGymQNz9.js → main-C370wsCl.js} +1531 -1501
- package/dist/router/shared.d.ts +1 -4
- package/dist/rule-CM7JgjNr.js +142112 -0
- package/dist/stores/employee.d.ts +4 -4
- package/dist/stores/role.d.ts +4 -4
- package/dist/stores/timesheet.d.ts +19 -19
- package/dist/{timesheet-DKhEeLe7.js → timesheet-Cy-jSzje.js} +14 -14
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/permission.d.ts +4 -1
- package/dist/types/team.d.ts +3 -13
- package/dist/useAppStore-zINIo0LR.js +93 -0
- package/dist/useLoading-CWBRIBiy.js +141 -0
- package/dist/{useRestaurantMap-D5BNPLKh.js → useRestaurantMap-CpS9-OSq.js} +7 -7
- package/dist/{SelectFilter-NbXrJ4iH.js → useSearch-C25VELOk.js} +101 -90
- package/dist/views/hr/employee/{EmployeeForm.vue.d.ts → components/EmployeeForm.vue.d.ts} +7 -10
- package/dist/views/team/{member → components}/AddMemberForm.vue.d.ts +0 -1
- package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +28 -68
- package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +36 -0
- package/dist/views/team/components/{ConditionPermission.vue.d.ts → TeamMemberConditionPermission.vue.d.ts} +1 -14
- package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +718 -0
- package/dist/views/team/components/{PosRolePermission.vue.d.ts → TeamMemberRolePermission.vue.d.ts} +1 -14
- package/dist/views/team/locales/index.d.ts +4 -176
- package/package.json +8 -13
- package/dist/AuditLogList-DNQh1rE9.js +0 -316
- package/dist/Main-BqhrqOzx.js +0 -85
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BvjXcknf.js +0 -3050
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/RolePermissionList-Dd8ks5i7.js +0 -285
- package/dist/TeamMemberList-uamoOFIV.js +0 -949
- package/dist/api/audit-log/index.d.ts +0 -10
- package/dist/api/permission-assignment/index.d.ts +0 -10
- package/dist/api/permission-set/index.d.ts +0 -8
- package/dist/app-CcbYGJ22.js +0 -2598
- package/dist/dayjs.min-CgN1oBQf.js +0 -282
- package/dist/employee-khk560IC.js +0 -172
- package/dist/helpers/permission-set.d.ts +0 -32
- package/dist/helpers/portal-user.d.ts +0 -8
- package/dist/index-D5sdamN5.js +0 -8411
- package/dist/stores/permission-assignment.d.ts +0 -277
- package/dist/stores/permission-set.d.ts +0 -250
- package/dist/stores/team.d.ts +0 -288
- package/dist/team-CFyc6tnm.js +0 -26
- package/dist/types/audit-log.d.ts +0 -19
- package/dist/types/permission-assignment.d.ts +0 -20
- package/dist/types/permission-set.d.ts +0 -20
- package/dist/useAppStore-DOSLuH24.js +0 -180
- package/dist/useLoading-BA-GSZ3R.js +0 -99
- package/dist/useSearch-B6WK1LBB.js +0 -15
- package/dist/views/audit-log/locales/index.d.ts +0 -211
- package/dist/views/team/Main.vue.d.ts +0 -2
- package/dist/views/team/components/BasePermission.vue.d.ts +0 -64
- package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +0 -14
- package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +0 -14
- package/dist/views/team/member/TeamMemberList.vue.d.ts +0 -4
- package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -55
- package/dist/views/team/role/RolePermissionForm.vue.d.ts +0 -19
- package/dist/views/team/role/RolePermissionList.vue.d.ts +0 -5
- /package/dist/views/{audit-log/AuditLogList.vue.d.ts → hr/main.vue.d.ts} +0 -0
- /package/dist/views/{hr/Main.vue.d.ts → team/TeamMemberList.vue.d.ts} +0 -0
- /package/dist/views/team/{member → components}/MemberInfo.vue.d.ts +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { openBlock as h, createElementBlock as $, createElementVNode as c, toRaw as Ce, defineComponent as he, ref as g, computed as F, watch as _e, resolveComponent as v, Fragment as G, renderSlot as Me, createVNode as n, unref as o, withCtx as y, createBlock as B, createCommentVNode as Q, isRef as re, renderList as ge, toDisplayString as K, onMounted as Ie, createTextVNode as $e, withModifiers as Oe, h as se } from "vue";
|
|
2
2
|
import { useCoreStore as be, useI18n as Ve, RestaurantSelector as me } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as Fe, components as xe, useDialog as Le, useBreakpoints as Be, FmButtonVariant as De } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as Ne, S as ce } from "./
|
|
5
|
-
import { _ as Pe } from "./app-
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as Ge } from "./useLoading-BA-GSZ3R.js";
|
|
12
|
-
import { u as ne } from "./useAppStore-DOSLuH24.js";
|
|
4
|
+
import { _ as Ne, u as we, S as ce } from "./useSearch-C25VELOk.js";
|
|
5
|
+
import { _ as Pe } from "./app-G_Dbs0OJ.js";
|
|
6
|
+
import { u as Te, _ as ze } from "./useLoading-CWBRIBiy.js";
|
|
7
|
+
import { u as ke, E as Ae } from "./employee-BTWpYxn5.js";
|
|
8
|
+
import { l as je } from "./lodash-B5BTJU4_.js";
|
|
9
|
+
import { u as Ke, _ as de, a as pe, b as Ge } from "./useRestaurantMap-CpS9-OSq.js";
|
|
10
|
+
import { u as ne } from "./rule-CM7JgjNr.js";
|
|
13
11
|
const qe = {};
|
|
14
12
|
function He(S, O) {
|
|
15
13
|
return h(), $("div", null, [...O[0] || (O[0] = [
|
|
@@ -38,7 +36,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
38
36
|
}
|
|
39
37
|
},
|
|
40
38
|
setup(S, { expose: O }) {
|
|
41
|
-
const u = ne(), E = be(), d = ke(), q = Fe(), H =
|
|
39
|
+
const u = ne(), E = be(), d = ke(), q = Fe(), H = Te(q), { t: i } = Ve(), f = g(!1), L = g(!0), R = (a) => {
|
|
42
40
|
s.value = a ? fe(a) : D(), x.value = fe(s.value), l.value = [], b.value = s.value.restaurants.map((e) => e.restaurantId), s.value.passcode && (l.value = s.value.passcode.split(""), t.value = !0), L.value = !a, f.value = !0;
|
|
43
41
|
};
|
|
44
42
|
function D() {
|
|
@@ -105,11 +103,11 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
105
103
|
t.value && (t.value = !1, l.value = []);
|
|
106
104
|
}
|
|
107
105
|
async function _() {
|
|
108
|
-
const a = await
|
|
106
|
+
const a = await Ae.generateEmployeePasscode();
|
|
109
107
|
t.value = !1, l.value = a.split("");
|
|
110
108
|
}
|
|
111
|
-
const V =
|
|
112
|
-
() => !
|
|
109
|
+
const V = Ke(
|
|
110
|
+
() => !je.isEqual(s.value, x.value),
|
|
113
111
|
() => {
|
|
114
112
|
f.value = !1;
|
|
115
113
|
}
|
|
@@ -358,7 +356,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
358
356
|
class: "mr-4"
|
|
359
357
|
}, dl = {
|
|
360
358
|
class: "text-fm-color-typo-secondary"
|
|
361
|
-
},
|
|
359
|
+
}, xl = /* @__PURE__ */ he({
|
|
362
360
|
__name: "EmployeeList",
|
|
363
361
|
setup(S, {
|
|
364
362
|
expose: O
|
|
@@ -376,7 +374,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
376
374
|
const p = !E.value || t.restaurants.some((V) => E.value.includes(V.restaurantId)), _ = !U.value || t.restaurants.some((V) => V.roleId && U.value.includes(V.roleId));
|
|
377
375
|
return p && _ && L([t.code, t.name, `${t.restaurants.map((V) => N(V)).join(" ")}`]);
|
|
378
376
|
});
|
|
379
|
-
}), D =
|
|
377
|
+
}), D = Ge(), N = (l) => {
|
|
380
378
|
var _;
|
|
381
379
|
const t = (_ = D.value[l.restaurantId]) == null ? void 0 : _.profile.code;
|
|
382
380
|
let p = l.restaurantName;
|
|
@@ -594,7 +592,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
594
592
|
_: 1
|
|
595
593
|
})])]),
|
|
596
594
|
_: 1
|
|
597
|
-
})) : (h(), B(o(
|
|
595
|
+
})) : (h(), B(o(ze), {
|
|
598
596
|
key: 1,
|
|
599
597
|
title: o(u)("hr.employee.noData.title"),
|
|
600
598
|
subtitle: o(u)("hr.employee.noData.subtitle")
|
|
@@ -603,5 +601,5 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
|
|
|
603
601
|
}
|
|
604
602
|
});
|
|
605
603
|
export {
|
|
606
|
-
|
|
604
|
+
xl as default
|
|
607
605
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as l,
|
|
1
|
+
import { defineComponent as l, openBlock as a, createElementBlock as r, createElementVNode as o, renderSlot as s, toDisplayString as d, normalizeClass as t } from "vue";
|
|
2
2
|
const i = {
|
|
3
3
|
class: /* @__PURE__ */ t([
|
|
4
4
|
"flex flex-col",
|
|
@@ -19,7 +19,7 @@ const i = {
|
|
|
19
19
|
heading: {}
|
|
20
20
|
},
|
|
21
21
|
setup(n) {
|
|
22
|
-
return (e, m) => (
|
|
22
|
+
return (e, m) => (a(), r("div", i, [
|
|
23
23
|
o("div", c, [
|
|
24
24
|
s(e.$slots, "prepend-heading"),
|
|
25
25
|
o("div", null, [
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { defineComponent as ce, ref as T, computed as _, onMounted as pe, watch as xe, resolveComponent as y,
|
|
2
|
-
import {
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useSnackbar as
|
|
5
|
-
import { _ as Ie } from "./app-
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { u as Ee } from "./useLoading-BA-GSZ3R.js";
|
|
11
|
-
const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, De = { class: "space-y-8" }, Pe = { class: "space-y-8" }, Me = {
|
|
1
|
+
import { defineComponent as ce, ref as T, computed as _, onMounted as pe, watch as xe, resolveComponent as y, openBlock as p, createBlock as C, unref as t, withCtx as b, createElementVNode as f, createVNode as c, createCommentVNode as re, createElementBlock as L, Fragment as j, renderList as G, toDisplayString as D, createTextVNode as ne, resolveDynamicComponent as ie, withModifiers as Fe, h as F, nextTick as ue } from "vue";
|
|
2
|
+
import { u as ve, f as Ce, e as E, r as K, h as le, j as Re, k as de, l as J } from "./rule-CM7JgjNr.js";
|
|
3
|
+
import { useI18n as fe, useCoreStore as _e } from "@feedmepos/mf-common";
|
|
4
|
+
import { useSnackbar as he, components as W, useDialog as Ve, useBreakpoints as we, FmButtonColorThemeVariant as me, FmButtonVariant as ke } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as Ie } from "./app-G_Dbs0OJ.js";
|
|
6
|
+
import { u as Le, _ as Ue } from "./useLoading-CWBRIBiy.js";
|
|
7
|
+
import { u as Se, _ as se, a as $e, b as Ee } from "./useRestaurantMap-CpS9-OSq.js";
|
|
8
|
+
import { l as z } from "./lodash-B5BTJU4_.js";
|
|
9
|
+
const Te = { class: "fm-typo-en-title-md-600" }, Pe = { class: "space-y-40" }, Be = { class: "space-y-8" }, De = { class: "space-y-8" }, Me = {
|
|
12
10
|
key: 0,
|
|
13
11
|
class: "w-50 ml-5 flex flex-row items-start"
|
|
14
12
|
}, Ae = { class: "m-2" }, Ne = { class: "flex gap-8 items-center justify-start" }, Oe = /* @__PURE__ */ ce({
|
|
@@ -20,14 +18,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
20
18
|
}
|
|
21
19
|
},
|
|
22
20
|
setup(te, { expose: H }) {
|
|
23
|
-
const { t: s } =
|
|
21
|
+
const { t: s } = fe(), Q = _e(), U = T(""), R = _(() => Q.restaurants.value.filter(({ profile: e }) => {
|
|
24
22
|
const a = `${e.code ? e.code + "-" : ""}${e.legalName}`;
|
|
25
23
|
return !U.value || a.toLowerCase().includes(U.value.toLowerCase());
|
|
26
|
-
})), S =
|
|
24
|
+
})), S = ve(), q = he(), X = Le(q), P = te, d = T(!1), Y = () => {
|
|
27
25
|
d.value = !d.value, d.value && $();
|
|
28
|
-
}, Z = _(() =>
|
|
29
|
-
(e) => !(e.subject === E.F_RULE_SUBJECT.enum.report && !e.conditions)
|
|
30
|
-
).map((e) => K(e))), m = _(() => S.roles.value.find((e) => e._id == B.id)), V = () => ({
|
|
26
|
+
}, Z = _(() => P.id ? s("hr.role.form.update") : s("hr.role.form.add")), M = _(() => P.id ? s("common.update") : s("common.add")), A = _(() => Ce.filter((e) => !(e.subject === E.F_RULE_SUBJECT.enum.report && !e.conditions)).map((e) => K(e))), m = _(() => S.roles.value.find((e) => e._id == P.id)), V = () => ({
|
|
31
27
|
name: "",
|
|
32
28
|
restaurantIds: [],
|
|
33
29
|
permissions: [],
|
|
@@ -89,7 +85,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
89
85
|
i.value === !0 ? l.value.restaurantIds = e : l.value.restaurantIds = R.value.map((a) => a._id);
|
|
90
86
|
}, g = (e) => e.map((v) => v.value).every((v) => l.value.permissions.includes(v)), w = (e) => {
|
|
91
87
|
const a = l.value.permissions.filter(
|
|
92
|
-
(v) => !e.map((
|
|
88
|
+
(v) => !e.map((B) => B.value).includes(v)
|
|
93
89
|
);
|
|
94
90
|
g(e) === !0 ? l.value.permissions = a : l.value.permissions = [...a, ...e.map((v) => v.value)];
|
|
95
91
|
};
|
|
@@ -99,9 +95,9 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
99
95
|
e.length > 0 && (ee.value = "");
|
|
100
96
|
}
|
|
101
97
|
);
|
|
102
|
-
const O =
|
|
98
|
+
const O = Se(
|
|
103
99
|
() => {
|
|
104
|
-
var e, a, v,
|
|
100
|
+
var e, a, v, B;
|
|
105
101
|
return !z.isEqual(l.value.name, ((e = m.value) == null ? void 0 : e.name) || V().name) || !z.isEqual(
|
|
106
102
|
l.value.restaurantIds,
|
|
107
103
|
((a = m.value) == null ? void 0 : a.restaurants.map((k) => k.id)) || V().restaurantIds
|
|
@@ -110,7 +106,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
110
106
|
((v = m.value) == null ? void 0 : v.permissions.map((k) => K(k).value)) || V().permissions
|
|
111
107
|
) || !z.isEqual(
|
|
112
108
|
l.value.maxDiscountPercentage,
|
|
113
|
-
m.value ? de((
|
|
109
|
+
m.value ? de((B = m.value) == null ? void 0 : B.permissions) : V().maxDiscountPercentage
|
|
114
110
|
);
|
|
115
111
|
},
|
|
116
112
|
() => {
|
|
@@ -121,7 +117,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
121
117
|
show: d,
|
|
122
118
|
trigger: Y
|
|
123
119
|
}), (e, a) => {
|
|
124
|
-
const v = y("FmTextField"),
|
|
120
|
+
const v = y("FmTextField"), B = y("FmSearch"), k = y("FmCheckbox"), ge = y("FmFormGroup"), be = y("FmCard"), oe = y("fm-button"), ye = y("fm-side-sheet");
|
|
125
121
|
return p(), C(ye, {
|
|
126
122
|
id: "unit-form",
|
|
127
123
|
modelValue: d.value,
|
|
@@ -135,7 +131,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
135
131
|
"onOn:clickedAway": t(O)
|
|
136
132
|
}, {
|
|
137
133
|
"side-sheet-header": b(() => [
|
|
138
|
-
f("p", Te,
|
|
134
|
+
f("p", Te, D(Z.value), 1)
|
|
139
135
|
]),
|
|
140
136
|
"side-sheet-footer": b(() => [
|
|
141
137
|
f("div", Ne, [
|
|
@@ -155,7 +151,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
155
151
|
])
|
|
156
152
|
]),
|
|
157
153
|
default: b(() => [
|
|
158
|
-
f("div",
|
|
154
|
+
f("div", Pe, [
|
|
159
155
|
c(se, { title: "Role detail" }, {
|
|
160
156
|
default: b(() => [
|
|
161
157
|
c(v, {
|
|
@@ -173,7 +169,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
173
169
|
title: t(s)("hr.role.form.restaurant")
|
|
174
170
|
}, {
|
|
175
171
|
default: b(() => [
|
|
176
|
-
c(
|
|
172
|
+
c(B, {
|
|
177
173
|
modelValue: U.value,
|
|
178
174
|
"onUpdate:modelValue": a[1] || (a[1] = (n) => U.value = n),
|
|
179
175
|
placeholder: t(s)("hr.restaurant.search.placeholder")
|
|
@@ -184,7 +180,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
184
180
|
rules: [(n) => n.length > 0 || t(s)("hr.role.form.atLeastOneRestaurant")]
|
|
185
181
|
}, {
|
|
186
182
|
default: b(() => [
|
|
187
|
-
f("div",
|
|
183
|
+
f("div", Be, [
|
|
188
184
|
U.value ? re("", !0) : (p(), C(k, {
|
|
189
185
|
key: 0,
|
|
190
186
|
"model-value": i.value,
|
|
@@ -193,7 +189,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
193
189
|
disabled: h.value,
|
|
194
190
|
"onUpdate:modelValue": u
|
|
195
191
|
}, null, 8, ["model-value", "disabled"])),
|
|
196
|
-
(p(!0), L(
|
|
192
|
+
(p(!0), L(j, null, G(R.value, (n) => (p(), L("div", {
|
|
197
193
|
key: n._id
|
|
198
194
|
}, [
|
|
199
195
|
c(k, {
|
|
@@ -215,17 +211,17 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
215
211
|
title: t(s)("hr.role.form.permissions")
|
|
216
212
|
}, {
|
|
217
213
|
default: b(() => [
|
|
218
|
-
(p(!0), L(
|
|
214
|
+
(p(!0), L(j, null, G(N.value, (n) => (p(), C(be, {
|
|
219
215
|
key: n.title,
|
|
220
216
|
variant: "outlined",
|
|
221
217
|
class: "p-16"
|
|
222
218
|
}, {
|
|
223
219
|
default: b(() => [
|
|
224
|
-
c(
|
|
220
|
+
c($e, {
|
|
225
221
|
label: n.title
|
|
226
222
|
}, {
|
|
227
223
|
default: b(() => [
|
|
228
|
-
f("div",
|
|
224
|
+
f("div", De, [
|
|
229
225
|
c(k, {
|
|
230
226
|
"model-value": g(n.options),
|
|
231
227
|
label: "All",
|
|
@@ -233,7 +229,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
233
229
|
disabled: h.value,
|
|
234
230
|
"onUpdate:modelValue": (I) => w(n.options)
|
|
235
231
|
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
|
|
236
|
-
(p(!0), L(
|
|
232
|
+
(p(!0), L(j, null, G(n.options, (I) => (p(), L("div", {
|
|
237
233
|
key: I.value
|
|
238
234
|
}, [
|
|
239
235
|
c(k, {
|
|
@@ -244,7 +240,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
244
240
|
disabled: h.value
|
|
245
241
|
}, null, 8, ["modelValue", "label", "value", "disabled"]),
|
|
246
242
|
I.value === "order:discount" && l.value.permissions.includes(I.value) ? (p(), L("div", Me, [
|
|
247
|
-
f("div", Ae,
|
|
243
|
+
f("div", Ae, D(t(s)("hr.role.form.maxDiscountPercentage")), 1),
|
|
248
244
|
c(v, {
|
|
249
245
|
modelValue: l.value.maxDiscountPercentage,
|
|
250
246
|
"onUpdate:modelValue": a[5] || (a[5] = (x) => l.value.maxDiscountPercentage = x),
|
|
@@ -275,11 +271,11 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
275
271
|
}, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]);
|
|
276
272
|
};
|
|
277
273
|
}
|
|
278
|
-
}),
|
|
274
|
+
}), je = {
|
|
279
275
|
class: "space-y-8"
|
|
280
|
-
},
|
|
276
|
+
}, qe = {
|
|
281
277
|
class: "flex justify-end xs:px-16"
|
|
282
|
-
},
|
|
278
|
+
}, Je = {
|
|
283
279
|
class: "pb-64 hidden xs:block"
|
|
284
280
|
}, ze = {
|
|
285
281
|
class: "space-y-4"
|
|
@@ -291,16 +287,16 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
291
287
|
class: "flex"
|
|
292
288
|
}, He = {
|
|
293
289
|
class: "flex"
|
|
294
|
-
},
|
|
290
|
+
}, ta = /* @__PURE__ */ ce({
|
|
295
291
|
__name: "RoleList",
|
|
296
292
|
setup(te, {
|
|
297
293
|
expose: H
|
|
298
294
|
}) {
|
|
299
295
|
const {
|
|
300
296
|
t: s
|
|
301
|
-
} =
|
|
297
|
+
} = fe(), Q = _e(), U = _(() => Q.restaurants.value), R = _(() => U.value.map((o) => o._id));
|
|
302
298
|
function S(o, r) {
|
|
303
|
-
const i =
|
|
299
|
+
const i = J(o, r);
|
|
304
300
|
return ["-", "All"].includes(i) ? () => null : () => F(W.FmTooltip, {
|
|
305
301
|
"z-index": "999",
|
|
306
302
|
placement: "top",
|
|
@@ -318,8 +314,8 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
318
314
|
})
|
|
319
315
|
});
|
|
320
316
|
}
|
|
321
|
-
function
|
|
322
|
-
const i =
|
|
317
|
+
function q(o, r) {
|
|
318
|
+
const i = J(o, r);
|
|
323
319
|
return () => i === "All" ? i : F("div", {
|
|
324
320
|
class: "flex items-center"
|
|
325
321
|
}, [i, S(o, r)()]);
|
|
@@ -331,12 +327,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
331
327
|
}, {
|
|
332
328
|
accessorKey: "operation",
|
|
333
329
|
header: () => s("hr.role.columns.operation"),
|
|
334
|
-
cell: (o) => F(
|
|
330
|
+
cell: (o) => F(q(o.row.original.permissions, E.F_RULE_SUBJECT.enum.order)),
|
|
335
331
|
enableSorting: !1
|
|
336
332
|
}, {
|
|
337
333
|
accessorKey: "report",
|
|
338
334
|
header: () => s("hr.role.columns.report"),
|
|
339
|
-
cell: (o) => F(
|
|
335
|
+
cell: (o) => F(q(o.row.original.permissions, E.F_RULE_SUBJECT.enum.report)),
|
|
340
336
|
enableSorting: !1
|
|
341
337
|
}, {
|
|
342
338
|
accessorKey: "restaurants",
|
|
@@ -365,10 +361,10 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
365
361
|
r.stopPropagation(), l(o.row.original);
|
|
366
362
|
}
|
|
367
363
|
})])
|
|
368
|
-
}],
|
|
364
|
+
}], P = async (o) => {
|
|
369
365
|
var r;
|
|
370
366
|
$.value = o._id, await ue(), (r = h.value) == null || r.trigger();
|
|
371
|
-
}, d =
|
|
367
|
+
}, d = ve(), Y = Ee(), Z = _(() => (d.roles.value || []).filter((i) => i.restaurants.some((u) => R.value.includes(u.id))).map((i) => {
|
|
372
368
|
const u = i.restaurants.map((g) => {
|
|
373
369
|
const w = Y.value[g.id];
|
|
374
370
|
return {
|
|
@@ -389,7 +385,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
389
385
|
});
|
|
390
386
|
return g || O;
|
|
391
387
|
});
|
|
392
|
-
}), A = Ve(), m =
|
|
388
|
+
}), A = Ve(), m = he(), {
|
|
393
389
|
breakpoints: V
|
|
394
390
|
} = we(), l = (o) => {
|
|
395
391
|
A.open({
|
|
@@ -432,12 +428,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
432
428
|
create: ee
|
|
433
429
|
}), (o, r) => {
|
|
434
430
|
const i = y("FmSearch"), u = y("FmTable"), g = y("FmButton"), w = y("FmListItem"), O = y("FmList");
|
|
435
|
-
return p(), L(
|
|
431
|
+
return p(), L(j, null, [(p(), C(Oe, {
|
|
436
432
|
id: $.value,
|
|
437
433
|
key: $.value,
|
|
438
434
|
ref_key: "roleFormRef",
|
|
439
435
|
ref: h
|
|
440
|
-
}, null, 8, ["id"])), f("div",
|
|
436
|
+
}, null, 8, ["id"])), f("div", je, [f("div", qe, [c(i, {
|
|
441
437
|
modelValue: N.value,
|
|
442
438
|
"onUpdate:modelValue": r[0] || (r[0] = (e) => N.value = e),
|
|
443
439
|
class: "w-[320px] xs:w-full",
|
|
@@ -456,21 +452,21 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
456
452
|
"pin-header-row": "",
|
|
457
453
|
"hide-footer": "",
|
|
458
454
|
"shrink-at": !1,
|
|
459
|
-
onRowClick: r[1] || (r[1] = (e) =>
|
|
460
|
-
}, null, 8, ["row-data", "page-size", "loading"]), f("div",
|
|
455
|
+
onRowClick: r[1] || (r[1] = (e) => P(e.original))
|
|
456
|
+
}, null, 8, ["row-data", "page-size", "loading"]), f("div", Je, [c(O, {
|
|
461
457
|
separator: ""
|
|
462
458
|
}, {
|
|
463
|
-
default: b(() => [(p(!0), L(
|
|
459
|
+
default: b(() => [(p(!0), L(j, null, G(M.value, (e) => (p(), C(w, {
|
|
464
460
|
key: e._id,
|
|
465
461
|
class: "py-12 px-16 items-center justify-between",
|
|
466
|
-
onClick: (a) =>
|
|
462
|
+
onClick: (a) => P(e)
|
|
467
463
|
}, {
|
|
468
|
-
default: b(() => [f("div", ze, [f("p", Ge,
|
|
464
|
+
default: b(() => [f("div", ze, [f("p", Ge, D(e.name), 1), f("div", Ke, [f("p", null, D(t(s)("hr.role.labels.restaurantList", {
|
|
469
465
|
items: e.restaurants.map((a) => a.name).join(", ")
|
|
470
|
-
})), 1), f("p", We, [ne(
|
|
471
|
-
items: t(
|
|
472
|
-
})) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.order))))]), f("p", He, [ne(
|
|
473
|
-
items: t(
|
|
466
|
+
})), 1), f("p", We, [ne(D(t(s)("hr.role.labels.operationList", {
|
|
467
|
+
items: t(J)(e.permissions, t(E.F_RULE_SUBJECT).enum.order)
|
|
468
|
+
})) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.order))))]), f("p", He, [ne(D(t(s)("hr.role.labels.reportList", {
|
|
469
|
+
items: t(J)(e.permissions, t(E.F_RULE_SUBJECT).enum.report)
|
|
474
470
|
})) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.report))))])])]), c(g, {
|
|
475
471
|
disabled: t(le)(e.permissions),
|
|
476
472
|
icon: "delete",
|
|
@@ -483,7 +479,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
483
479
|
_: 1
|
|
484
480
|
})])]),
|
|
485
481
|
_: 1
|
|
486
|
-
})) : (p(), C(t(
|
|
482
|
+
})) : (p(), C(t(Ue), {
|
|
487
483
|
key: 1,
|
|
488
484
|
title: t(s)("hr.role.noData.title"),
|
|
489
485
|
subtitle: t(s)("hr.role.noData.subtitle")
|
|
@@ -492,5 +488,5 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
|
|
|
492
488
|
}
|
|
493
489
|
});
|
|
494
490
|
export {
|
|
495
|
-
|
|
491
|
+
ta as default
|
|
496
492
|
};
|