@feedmepos/mf-hrm-portal 2.1.0-dev → 2.1.0-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/AuditLogList-AGlAsWwd.js +1608 -0
- package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-tiuei7CA.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-BYHKFwRm.js} +2 -2
- package/dist/EmployeeList-KvjoGI87.js +884 -0
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +1 -1
- package/dist/{Main-BgOhmojO.js → Main-BLh16xRg.js} +188 -185
- package/dist/Main-D3TSdtSE.js +94 -0
- package/dist/{Main-D2Wf__wM.js → Main-Dn1TfDRj.js} +1987 -1979
- package/dist/PermissionSetList-Ds69m9UU.js +392 -0
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCKVpAwv.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bk6ub3Dv.js} +1122 -1122
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-D-14ca2J.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BHxCP_uW.js} +1 -1
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
- package/dist/{RoleList-tSC8RJHe.js → RoleList-v8McRCnz.js} +231 -221
- package/dist/SelectFilter-ATOm0hdn.js +269 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js} +54 -20
- package/dist/{TeamMemberList-Bz-kDJ0e.js → TeamMemberList-BYQnNIhT.js} +137 -131
- package/dist/{TimesheetList-BFVhmcRt.js → TimesheetList-C1OWa6kf.js} +140 -134
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CtHuL5tW.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CLu9gzzi.js} +2 -2
- package/dist/{app-DRnSocX8.js → app-CJouCBgi.js} +792 -475
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B8xOAypU.js → dayjs.min-DUugkgDM.js} +1 -1
- package/dist/{employee-UrXqUaik.js → employee-D5rEVmge.js} +3 -3
- package/dist/{iteration-LEYoQKiI.js → iteration-QRRNYlps.js} +1 -1
- package/dist/{lodash-Bq6_eZZ0.js → lodash-BlZhpHhM.js} +1 -1
- package/dist/{rule-CJC6Cq6S.js → rule-Dy7eMChN.js} +116 -110
- package/dist/src/api/audit-log/index.d.ts +23 -0
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
- package/dist/src/components/form/SelectFilter.vue.d.ts +3 -0
- package/dist/src/components/table/EmptyDataTemplate/index.vue.d.ts +4 -1
- package/dist/src/components/table/TableEmptyState.vue.d.ts +31 -0
- package/dist/src/stores/permission-set.d.ts +12 -3
- package/dist/src/stores/team.d.ts +4 -1
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/views/audit-log/event-line.d.ts +13 -0
- package/dist/src/views/audit-log/locales/index.d.ts +320 -16
- package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
- package/dist/src/views/hr/locales/index.d.ts +4 -0
- package/dist/src/views/team/locales/index.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BGsfYWAR.js → useAppStore-CtMoad7V.js} +1 -1
- package/dist/useDebounce-B8ZPVS5C.js +15 -0
- package/dist/{useLoading-BUM5R2qV.js → useLoading-CNqlchYO.js} +1 -1
- package/dist/{useReportPermissions-nlQ_BBL2.js → useReportPermissions-C5wGC9bf.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-C1bGND8z.js +0 -1037
- package/dist/EmployeeList-DqQF9xEx.js +0 -851
- package/dist/Main-DcKVuIjB.js +0 -90
- package/dist/PermissionSetList-CQpTa0eY.js +0 -384
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/SelectFilter-DUj7GBtT.js +0 -251
- package/dist/useDebounce-CWb5QR9G.js +0 -28
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { computed as R, defineComponent as we, ref as
|
|
2
|
-
import { u as
|
|
1
|
+
import { computed as R, defineComponent as we, ref as D, watch as oe, onMounted as ke, resolveComponent as F, createBlock as j, openBlock as c, unref as o, withCtx as b, createElementVNode as n, createVNode as u, createElementBlock as C, Fragment as E, createCommentVNode as re, renderList as Q, toDisplayString as U, normalizeClass as ze, h as B, createTextVNode as pe, resolveDynamicComponent as xe, withModifiers as Ke, nextTick as Ce } from "vue";
|
|
2
|
+
import { u as _e, e as L } from "./iteration-QRRNYlps.js";
|
|
3
3
|
import { useI18n as Ve } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as Se, components as
|
|
5
|
-
import { k as qe, A as We, S as Ge, _ as He } from "./app-
|
|
4
|
+
import { useSnackbar as Se, components as ve, useDialog as Ne, useBreakpoints as Oe, FmButtonColorThemeVariant as Je } from "@feedmepos/ui-library";
|
|
5
|
+
import { k as qe, A as We, S as Ge, _ as He } from "./app-CJouCBgi.js";
|
|
6
6
|
import { u as Qe, _ as Fe } from "./useDiscardConfirm-DPhEV6v0.js";
|
|
7
|
-
import { _ as Xe } from "./
|
|
8
|
-
import { e as Ye, r as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { l as ie } from "./lodash-
|
|
12
|
-
import { u as ss, _ as ts, a as as } from "./ConditionFormHost.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { _ as
|
|
14
|
-
import { u as ls } from "./useLoading-
|
|
7
|
+
import { _ as Xe } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js";
|
|
8
|
+
import { e as Ye, r as W, h as Ue, f as Ze, g as Re, a as es, b as ne } from "./rule-Dy7eMChN.js";
|
|
9
|
+
import { u as $e } from "./useAppStore-CtMoad7V.js";
|
|
10
|
+
import { u as Ee } from "./useReportPermissions-C5wGC9bf.js";
|
|
11
|
+
import { l as ie } from "./lodash-BlZhpHhM.js";
|
|
12
|
+
import { u as ss, _ as ts, a as as } from "./ConditionFormHost.vue_vue_type_script_setup_true_lang-BYHKFwRm.js";
|
|
13
|
+
import { _ as fe } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
14
|
+
import { u as ls } from "./useLoading-CNqlchYO.js";
|
|
15
15
|
function os() {
|
|
16
|
-
const X =
|
|
16
|
+
const X = _e();
|
|
17
17
|
return R(() => {
|
|
18
18
|
const t = {};
|
|
19
19
|
return X.restaurants.value.forEach((V) => {
|
|
@@ -24,7 +24,7 @@ function os() {
|
|
|
24
24
|
const rs = { class: "flex w-full items-center justify-between" }, ns = { class: "fm-typo-en-title-md-600" }, is = { class: "space-y-40" }, us = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "flex justify-center py-16"
|
|
27
|
-
}, cs = { class: "space-y-8" }, ms = { class: "fm-typo-en-title-sm-600" }, ds = { class: "mt-16 space-y-8" }, ps = { class: "flex items-center" }, fs = { class: "h-[24px] w-[24px] flex items-center justify-center" }, vs = { class: "flex flex-col gap-12 p-16 w-[320px]" },
|
|
27
|
+
}, cs = { class: "space-y-8" }, ms = { class: "fm-typo-en-title-sm-600" }, ds = { class: "mt-16 space-y-8" }, ps = { class: "flex items-center" }, fs = { class: "h-[24px] w-[24px] flex items-center justify-center" }, vs = { class: "flex flex-col gap-12 p-16 w-[320px]" }, _s = { class: "fm-typo-en-title-sm-600" }, hs = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "h-px w-full bg-fm-color-neutral-gray-200"
|
|
30
30
|
}, gs = { class: "flex justify-end pt-8" }, bs = {
|
|
@@ -39,60 +39,60 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
setup(X, { expose: Y }) {
|
|
42
|
-
const { t } = Ve(), V =
|
|
42
|
+
const { t } = Ve(), V = _e(), A = D(""), M = R(() => V.restaurants.value.filter(({ profile: e }) => {
|
|
43
43
|
const s = `${e.code ? e.code + "-" : ""}${e.legalName}`;
|
|
44
44
|
return !A.value || s.toLowerCase().includes(A.value.toLowerCase());
|
|
45
|
-
})),
|
|
45
|
+
})), G = D(V.restaurants.value.length === 0);
|
|
46
46
|
oe(
|
|
47
47
|
() => V.restaurants.value.length,
|
|
48
48
|
(e) => {
|
|
49
|
-
e > 0 && (
|
|
49
|
+
e > 0 && (G.value = !1);
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
const z =
|
|
53
|
-
|
|
54
|
-
},
|
|
52
|
+
const z = $e(), Z = Se(), ee = ls(Z), { fetchReportPermissions: se, allReportPermissions: ue, availableReportKeys: K } = Ee(), $ = X, S = D(!1), ce = () => {
|
|
53
|
+
S.value = !S.value, S.value && _();
|
|
54
|
+
}, O = R(() => $.id ? t("hr.role.form.update") : t("hr.role.form.add")), te = R(() => $.id ? t("common.update") : t("common.add")), J = R(() => {
|
|
55
55
|
const e = Ye.filter(
|
|
56
|
-
(r) => r.subject !==
|
|
57
|
-
).map((r) =>
|
|
56
|
+
(r) => r.subject !== L.F_RULE_SUBJECT.enum.report
|
|
57
|
+
).map((r) => W(r)), s = ue.value.map((r) => W(r));
|
|
58
58
|
return [...e, ...s];
|
|
59
|
-
}), v = R(() => z.roles.value.find((e) => e._id ==
|
|
59
|
+
}), v = R(() => z.roles.value.find((e) => e._id == $.id)), P = () => ({
|
|
60
60
|
name: "",
|
|
61
61
|
restaurantIds: [],
|
|
62
62
|
permissions: [],
|
|
63
63
|
maxDiscountPercentage: 100
|
|
64
|
-
}), a =
|
|
64
|
+
}), a = D(P()), y = D(/* @__PURE__ */ new Map()), w = ss(y), ae = qe("report");
|
|
65
65
|
function me(e) {
|
|
66
|
-
const s =
|
|
66
|
+
const s = y.value.get(e);
|
|
67
67
|
return !!s && Object.keys(s).length > 0;
|
|
68
68
|
}
|
|
69
69
|
function l(e, s) {
|
|
70
70
|
const r = w.getDraft({ subject: e, builderKey: s.builderKey });
|
|
71
71
|
return r ? r.formValue : s.fromCondition(
|
|
72
|
-
We(
|
|
72
|
+
We(y.value.get(e), s)
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function i(e, s, r) {
|
|
76
76
|
w.setDraft({ subject: e, builderKey: s.builderKey }, { formValue: r });
|
|
77
77
|
}
|
|
78
78
|
function f(e) {
|
|
79
79
|
if (w.getDraftsForSubject(e).size === 0) return;
|
|
80
80
|
const r = [];
|
|
81
81
|
for (const I of ae) {
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const q = w.getDraft({ subject: e, builderKey: I.builderKey });
|
|
83
|
+
q && r.push({ builder: I, form: q.formValue });
|
|
84
84
|
}
|
|
85
85
|
if (r.length === 0) return;
|
|
86
|
-
const k =
|
|
86
|
+
const k = y.value.get(e), T = Ge(
|
|
87
87
|
k,
|
|
88
|
-
r.map(({ builder: I, form:
|
|
89
|
-
), H = new Map(
|
|
90
|
-
Object.keys(T).length === 0 ? H.delete(e) : H.set(e, T),
|
|
88
|
+
r.map(({ builder: I, form: q }) => ({ builder: I, formValue: q }))
|
|
89
|
+
), H = new Map(y.value);
|
|
90
|
+
Object.keys(T).length === 0 ? H.delete(e) : H.set(e, T), y.value = H, w.clearDraftsForSubject(e);
|
|
91
91
|
}
|
|
92
92
|
function p(e) {
|
|
93
93
|
return w.hasDraftsForSubject(e);
|
|
94
94
|
}
|
|
95
|
-
const
|
|
95
|
+
const x = R(() => [
|
|
96
96
|
{
|
|
97
97
|
title: t("hr.role.labels.operation"),
|
|
98
98
|
filter: (e) => e.isOrderOperation
|
|
@@ -107,7 +107,7 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
107
107
|
}
|
|
108
108
|
].map((e) => ({
|
|
109
109
|
title: e.title,
|
|
110
|
-
options:
|
|
110
|
+
options: J.value.filter(e.filter).map(({ label: s, value: r }) => ({
|
|
111
111
|
label: t(`hr.role.form.permissionLabels.${r}`, s),
|
|
112
112
|
value: r
|
|
113
113
|
}))
|
|
@@ -115,41 +115,41 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
115
115
|
var e;
|
|
116
116
|
return Ue(((e = v.value) == null ? void 0 : e.permissions) || []);
|
|
117
117
|
});
|
|
118
|
-
function
|
|
118
|
+
function _() {
|
|
119
119
|
var e;
|
|
120
|
-
if (a.value = P(),
|
|
121
|
-
a.value.restaurantIds = M.value.map((s) => s._id), a.value.permissions =
|
|
120
|
+
if (a.value = P(), y.value = /* @__PURE__ */ new Map(), a.value.name = ((e = v.value) == null ? void 0 : e.name) ?? "", m.value)
|
|
121
|
+
a.value.restaurantIds = M.value.map((s) => s._id), a.value.permissions = J.value.map((s) => s.value);
|
|
122
122
|
else if (v.value) {
|
|
123
|
-
a.value.restaurantIds = v.value.restaurants.map((s) => s.id), a.value.permissions = v.value.permissions.map((s) =>
|
|
123
|
+
a.value.restaurantIds = v.value.restaurants.map((s) => s.id), a.value.permissions = v.value.permissions.map((s) => W(s).value).filter((s) => s.startsWith("report:") ? K.value.has(s.split(":")[1]) : !0), a.value.maxDiscountPercentage = Re(
|
|
124
124
|
v.value.permissions
|
|
125
125
|
);
|
|
126
126
|
for (const s of v.value.permissions) {
|
|
127
|
-
const r =
|
|
128
|
-
k &&
|
|
127
|
+
const r = W(s), k = es(s);
|
|
128
|
+
k && y.value.set(r.value, k);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
ke(async () => {
|
|
133
|
-
await V.readRestaurants(), await se(),
|
|
134
|
-
}), oe(
|
|
133
|
+
await V.readRestaurants(), await se(), _();
|
|
134
|
+
}), oe(S, async (e) => {
|
|
135
135
|
e && await se();
|
|
136
136
|
}), oe(K, () => {
|
|
137
|
-
if (
|
|
137
|
+
if (S.value && v.value && !m.value) {
|
|
138
138
|
a.value.permissions = a.value.permissions.filter((s) => s.startsWith("report:") ? K.value.has(s.split(":")[1]) : !0);
|
|
139
|
-
const e = new Map(
|
|
139
|
+
const e = new Map(y.value);
|
|
140
140
|
for (const s of e.keys())
|
|
141
141
|
s.startsWith("report:") && !a.value.permissions.includes(s) && e.delete(s);
|
|
142
|
-
|
|
142
|
+
y.value = e;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
-
const N =
|
|
145
|
+
const N = D(""), le = R(() => ({
|
|
146
146
|
restaurantIds: a.value.restaurantIds,
|
|
147
147
|
role: {
|
|
148
148
|
name: a.value.name,
|
|
149
149
|
permissions: Ze(
|
|
150
150
|
a.value.permissions,
|
|
151
151
|
a.value.maxDiscountPercentage,
|
|
152
|
-
|
|
152
|
+
y.value
|
|
153
153
|
)
|
|
154
154
|
}
|
|
155
155
|
})), Ie = async () => {
|
|
@@ -161,17 +161,17 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
161
161
|
{
|
|
162
162
|
successMessage: v.value ? t("hr.role.update.successMessage", { name: e.role.name }) : t("hr.role.add.successMessage", { name: e.role.name })
|
|
163
163
|
}
|
|
164
|
-
),
|
|
164
|
+
), S.value = !1;
|
|
165
165
|
}, he = R(
|
|
166
166
|
() => a.value.restaurantIds.filter((e) => M.value.some((s) => s._id === e))
|
|
167
|
-
),
|
|
167
|
+
), ge = R(() => M.value.length > 0 && M.value.length === he.value.length), Le = () => {
|
|
168
168
|
const e = a.value.restaurantIds.filter((s) => !he.value.includes(s));
|
|
169
|
-
|
|
170
|
-
},
|
|
169
|
+
ge.value === !0 ? a.value.restaurantIds = e : a.value.restaurantIds = M.value.map((s) => s._id);
|
|
170
|
+
}, be = (e) => e.map((r) => r.value).every((r) => a.value.permissions.includes(r)), De = (e) => {
|
|
171
171
|
const s = a.value.permissions.filter(
|
|
172
172
|
(r) => !e.map((k) => k.value).includes(r)
|
|
173
173
|
);
|
|
174
|
-
|
|
174
|
+
be(e) === !0 ? a.value.permissions = s : a.value.permissions = [...s, ...e.map((r) => r.value)];
|
|
175
175
|
};
|
|
176
176
|
oe(
|
|
177
177
|
() => a.value.restaurantIds,
|
|
@@ -187,25 +187,25 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
187
187
|
((s = v.value) == null ? void 0 : s.restaurants.map((T) => T.id)) || P().restaurantIds
|
|
188
188
|
) || !ie.isEqual(
|
|
189
189
|
a.value.permissions,
|
|
190
|
-
((r = v.value) == null ? void 0 : r.permissions.map((T) =>
|
|
190
|
+
((r = v.value) == null ? void 0 : r.permissions.map((T) => W(T).value)) || P().permissions
|
|
191
191
|
) || !ie.isEqual(
|
|
192
192
|
a.value.maxDiscountPercentage,
|
|
193
193
|
v.value ? Re((k = v.value) == null ? void 0 : k.permissions) : P().maxDiscountPercentage
|
|
194
194
|
);
|
|
195
195
|
},
|
|
196
196
|
() => {
|
|
197
|
-
|
|
197
|
+
S.value = !1;
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
200
|
return Y({
|
|
201
|
-
show:
|
|
201
|
+
show: S,
|
|
202
202
|
trigger: ce
|
|
203
203
|
}), (e, s) => {
|
|
204
|
-
const r = F("FmIcon"), k = F("FmTextField"), T = F("FmCircularProgress"), H = F("FmSearch"), I = F("FmCheckbox"),
|
|
205
|
-
return
|
|
204
|
+
const r = F("FmIcon"), k = F("FmTextField"), T = F("FmCircularProgress"), H = F("FmSearch"), I = F("FmCheckbox"), q = F("FmFormGroup"), Me = F("FmButton"), Pe = F("FmMenu"), Te = F("FmCard"), ye = F("fm-button"), Be = F("fm-side-sheet");
|
|
205
|
+
return c(), j(Be, {
|
|
206
206
|
id: "unit-form",
|
|
207
|
-
"model-value":
|
|
208
|
-
"is-container": o(
|
|
207
|
+
"model-value": S.value,
|
|
208
|
+
"is-container": o(ve).FmForm,
|
|
209
209
|
"is-container-props": {
|
|
210
210
|
onValidationSuccess: Ie,
|
|
211
211
|
blameFormChildOnValidationFailed: !0
|
|
@@ -214,10 +214,10 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
214
214
|
"close-button": !1,
|
|
215
215
|
"onOn:clickedAway": o(de)
|
|
216
216
|
}, {
|
|
217
|
-
"side-sheet-header":
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
"side-sheet-header": b(() => [
|
|
218
|
+
n("div", rs, [
|
|
219
|
+
n("p", ns, U(O.value), 1),
|
|
220
|
+
u(r, {
|
|
221
221
|
name: "close",
|
|
222
222
|
size: "md",
|
|
223
223
|
class: "cursor-pointer",
|
|
@@ -225,16 +225,16 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
225
225
|
}, null, 8, ["onClick"])
|
|
226
226
|
])
|
|
227
227
|
]),
|
|
228
|
-
"side-sheet-footer":
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
"side-sheet-footer": b(() => [
|
|
229
|
+
n("div", xs, [
|
|
230
|
+
u(ye, {
|
|
231
231
|
label: te.value,
|
|
232
232
|
size: "lg",
|
|
233
233
|
type: "submit",
|
|
234
234
|
variant: "primary",
|
|
235
235
|
disabled: m.value
|
|
236
236
|
}, null, 8, ["label", "disabled"]),
|
|
237
|
-
|
|
237
|
+
u(ye, {
|
|
238
238
|
label: o(t)("common.cancel"),
|
|
239
239
|
size: "lg",
|
|
240
240
|
variant: "tertiary",
|
|
@@ -242,13 +242,13 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
242
242
|
}, null, 8, ["label", "onClick"])
|
|
243
243
|
])
|
|
244
244
|
]),
|
|
245
|
-
default:
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
default: b(() => [
|
|
246
|
+
n("div", is, [
|
|
247
|
+
u(fe, {
|
|
248
248
|
title: o(t)("hr.role.form.roleDetail")
|
|
249
249
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
|
|
250
|
+
default: b(() => [
|
|
251
|
+
u(k, {
|
|
252
252
|
modelValue: a.value.name,
|
|
253
253
|
"onUpdate:modelValue": s[0] || (s[0] = (d) => a.value.name = d),
|
|
254
254
|
autofocus: "",
|
|
@@ -259,41 +259,41 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
259
259
|
]),
|
|
260
260
|
_: 1
|
|
261
261
|
}, 8, ["title"]),
|
|
262
|
-
|
|
262
|
+
u(fe, {
|
|
263
263
|
title: o(t)("hr.role.form.restaurant")
|
|
264
264
|
}, {
|
|
265
|
-
default:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
])) : (
|
|
269
|
-
|
|
265
|
+
default: b(() => [
|
|
266
|
+
G.value ? (c(), C("div", us, [
|
|
267
|
+
u(T)
|
|
268
|
+
])) : (c(), C(E, { key: 1 }, [
|
|
269
|
+
u(H, {
|
|
270
270
|
modelValue: A.value,
|
|
271
271
|
"onUpdate:modelValue": s[1] || (s[1] = (d) => A.value = d),
|
|
272
272
|
placeholder: o(t)("hr.restaurant.search.placeholder")
|
|
273
273
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
274
|
-
|
|
274
|
+
u(q, {
|
|
275
275
|
modelValue: a.value.restaurantIds,
|
|
276
276
|
"onUpdate:modelValue": s[3] || (s[3] = (d) => a.value.restaurantIds = d),
|
|
277
277
|
rules: [(d) => d.length > 0 || o(t)("hr.role.form.atLeastOneRestaurant")]
|
|
278
278
|
}, {
|
|
279
|
-
default:
|
|
280
|
-
|
|
281
|
-
A.value ? re("", !0) : (
|
|
282
|
-
|
|
283
|
-
"model-value":
|
|
279
|
+
default: b(() => [
|
|
280
|
+
n("div", cs, [
|
|
281
|
+
A.value ? re("", !0) : (c(), C(E, { key: 0 }, [
|
|
282
|
+
u(I, {
|
|
283
|
+
"model-value": ge.value,
|
|
284
284
|
label: o(t)("hr.role.form.all"),
|
|
285
285
|
value: "1",
|
|
286
286
|
disabled: m.value,
|
|
287
|
-
"onUpdate:modelValue":
|
|
287
|
+
"onUpdate:modelValue": Le
|
|
288
288
|
}, null, 8, ["model-value", "label", "disabled"]),
|
|
289
|
-
s[6] || (s[6] =
|
|
289
|
+
s[6] || (s[6] = n("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1))
|
|
290
290
|
], 64)),
|
|
291
|
-
(
|
|
291
|
+
(c(!0), C(E, null, Q(M.value, (d) => (c(), C("div", {
|
|
292
292
|
key: d._id
|
|
293
293
|
}, [
|
|
294
|
-
|
|
294
|
+
u(I, {
|
|
295
295
|
modelValue: a.value.restaurantIds,
|
|
296
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
296
|
+
"onUpdate:modelValue": s[2] || (s[2] = (h) => a.value.restaurantIds = h),
|
|
297
297
|
label: `${d.profile.code ? d.profile.code + "-" : ""}${d.profile.name}`,
|
|
298
298
|
value: d._id,
|
|
299
299
|
disabled: m.value
|
|
@@ -307,89 +307,89 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
307
307
|
]),
|
|
308
308
|
_: 1
|
|
309
309
|
}, 8, ["title"]),
|
|
310
|
-
|
|
310
|
+
u(fe, {
|
|
311
311
|
title: o(t)("hr.role.form.permissions")
|
|
312
312
|
}, {
|
|
313
|
-
default:
|
|
314
|
-
(
|
|
313
|
+
default: b(() => [
|
|
314
|
+
(c(!0), C(E, null, Q(x.value, (d) => (c(), j(Te, {
|
|
315
315
|
key: d.title,
|
|
316
316
|
variant: "outlined",
|
|
317
317
|
class: "p-16"
|
|
318
318
|
}, {
|
|
319
|
-
default:
|
|
320
|
-
|
|
321
|
-
title:
|
|
322
|
-
|
|
319
|
+
default: b(() => [
|
|
320
|
+
u(ts, null, {
|
|
321
|
+
title: b(() => [
|
|
322
|
+
n("p", ms, U(d.title), 1)
|
|
323
323
|
]),
|
|
324
|
-
default:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
"model-value":
|
|
324
|
+
default: b(() => [
|
|
325
|
+
n("div", ds, [
|
|
326
|
+
u(I, {
|
|
327
|
+
"model-value": be(d.options),
|
|
328
328
|
label: o(t)("hr.role.form.all"),
|
|
329
329
|
value: "1",
|
|
330
330
|
disabled: m.value,
|
|
331
|
-
"onUpdate:modelValue": (
|
|
331
|
+
"onUpdate:modelValue": (h) => De(d.options)
|
|
332
332
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]),
|
|
333
|
-
s[7] || (s[7] =
|
|
334
|
-
(
|
|
335
|
-
key:
|
|
333
|
+
s[7] || (s[7] = n("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
334
|
+
(c(!0), C(E, null, Q(d.options, (h) => (c(), C("div", {
|
|
335
|
+
key: h.value
|
|
336
336
|
}, [
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
n("div", ps, [
|
|
338
|
+
u(I, {
|
|
339
339
|
modelValue: a.value.permissions,
|
|
340
340
|
"onUpdate:modelValue": s[4] || (s[4] = (g) => a.value.permissions = g),
|
|
341
|
-
label:
|
|
342
|
-
value:
|
|
341
|
+
label: h.label,
|
|
342
|
+
value: h.value,
|
|
343
343
|
disabled: m.value,
|
|
344
344
|
class: "flex-1"
|
|
345
345
|
}, null, 8, ["modelValue", "label", "value", "disabled"]),
|
|
346
|
-
|
|
347
|
-
a.value.permissions.includes(
|
|
346
|
+
h.value.startsWith("report:") ? (c(), C(E, { key: 0 }, [
|
|
347
|
+
a.value.permissions.includes(h.value) ? (c(), j(Pe, {
|
|
348
348
|
key: 0,
|
|
349
349
|
"close-on-click": !1,
|
|
350
350
|
disabled: m.value,
|
|
351
351
|
class: "h-5 flex items-center",
|
|
352
|
-
onClose: () => o(w).clearDraftsForSubject(
|
|
352
|
+
onClose: () => o(w).clearDraftsForSubject(h.value)
|
|
353
353
|
}, {
|
|
354
|
-
"menu-button":
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
"menu-button": b(() => [
|
|
355
|
+
n("div", fs, [
|
|
356
|
+
u(r, {
|
|
357
357
|
name: "settings",
|
|
358
358
|
size: "sm",
|
|
359
359
|
class: ze([
|
|
360
360
|
"cursor-pointer transition-colors",
|
|
361
|
-
me(
|
|
361
|
+
me(h.value) ? "text-fm-color-primary-main" : "text-fm-color-neutral-gray-400 hover:text-fm-color-neutral-gray-600"
|
|
362
362
|
])
|
|
363
363
|
}, null, 8, ["class"])
|
|
364
364
|
])
|
|
365
365
|
]),
|
|
366
|
-
default:
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
(
|
|
366
|
+
default: b(() => [
|
|
367
|
+
n("div", vs, [
|
|
368
|
+
n("p", _s, U(h.label), 1),
|
|
369
|
+
(c(!0), C(E, null, Q(o(ae), (g, je) => (c(), C(E, {
|
|
370
370
|
key: g.builderKey
|
|
371
371
|
}, [
|
|
372
|
-
je > 0 ? (
|
|
373
|
-
|
|
372
|
+
je > 0 ? (c(), C("div", hs)) : re("", !0),
|
|
373
|
+
u(as, {
|
|
374
374
|
builder: g,
|
|
375
|
-
"model-value": l(
|
|
375
|
+
"model-value": l(h.value, g),
|
|
376
376
|
disable: m.value,
|
|
377
|
-
"onUpdate:modelValue": (Ae) =>
|
|
377
|
+
"onUpdate:modelValue": (Ae) => i(h.value, g, Ae)
|
|
378
378
|
}, null, 8, ["builder", "model-value", "disable", "onUpdate:modelValue"])
|
|
379
379
|
], 64))), 128)),
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
n("div", gs, [
|
|
381
|
+
u(Me, {
|
|
382
382
|
label: o(t)("team.memberForm.permissions.conditionApply"),
|
|
383
383
|
size: "md",
|
|
384
384
|
variant: "primary",
|
|
385
|
-
disabled: m.value || !p(
|
|
386
|
-
onClick: (g) => f(
|
|
385
|
+
disabled: m.value || !p(h.value),
|
|
386
|
+
onClick: (g) => f(h.value)
|
|
387
387
|
}, null, 8, ["label", "disabled", "onClick"])
|
|
388
388
|
])
|
|
389
389
|
])
|
|
390
390
|
]),
|
|
391
391
|
_: 2
|
|
392
|
-
}, 1032, ["disabled", "onClose"])) : (
|
|
392
|
+
}, 1032, ["disabled", "onClose"])) : (c(), j(r, {
|
|
393
393
|
key: 1,
|
|
394
394
|
name: "settings",
|
|
395
395
|
size: "sm",
|
|
@@ -397,9 +397,9 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
397
397
|
}))
|
|
398
398
|
], 64)) : re("", !0)
|
|
399
399
|
]),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
h.value === "order:discount" && a.value.permissions.includes(h.value) ? (c(), C("div", bs, [
|
|
401
|
+
n("div", ys, U(o(t)("hr.role.form.maxDiscountPercentage")), 1),
|
|
402
|
+
u(k, {
|
|
403
403
|
modelValue: a.value.maxDiscountPercentage,
|
|
404
404
|
"onUpdate:modelValue": s[5] || (s[5] = (g) => a.value.maxDiscountPercentage = g),
|
|
405
405
|
rules: [
|
|
@@ -434,18 +434,32 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
434
434
|
}, Rs = {
|
|
435
435
|
class: "flex justify-end xs:px-16"
|
|
436
436
|
}, ws = {
|
|
437
|
-
class: "
|
|
437
|
+
class: "flex flex-col h-full overflow-auto"
|
|
438
438
|
}, ks = {
|
|
439
|
-
class: "
|
|
439
|
+
class: "pb-64 sm:hidden md:hidden lg:hidden"
|
|
440
440
|
}, Vs = {
|
|
441
|
-
class: "
|
|
441
|
+
class: "space-y-4"
|
|
442
442
|
}, Ss = {
|
|
443
|
-
class: "
|
|
443
|
+
class: "fm-typo-en-body-lg-600"
|
|
444
444
|
}, Us = {
|
|
445
|
-
class: "
|
|
445
|
+
class: "text-fm-color-typo-secondary"
|
|
446
|
+
}, $s = {
|
|
447
|
+
class: "line-clamp-2"
|
|
446
448
|
}, Es = {
|
|
447
|
-
class: "
|
|
448
|
-
},
|
|
449
|
+
class: "font-bold"
|
|
450
|
+
}, Is = {
|
|
451
|
+
class: "flex items-start gap-4"
|
|
452
|
+
}, Ls = {
|
|
453
|
+
class: "line-clamp-2"
|
|
454
|
+
}, Ds = {
|
|
455
|
+
class: "font-bold"
|
|
456
|
+
}, Ms = {
|
|
457
|
+
class: "flex items-start gap-4"
|
|
458
|
+
}, Ps = {
|
|
459
|
+
class: "line-clamp-2"
|
|
460
|
+
}, Ts = {
|
|
461
|
+
class: "font-bold"
|
|
462
|
+
}, Ys = /* @__PURE__ */ we({
|
|
449
463
|
__name: "RoleList",
|
|
450
464
|
setup(X, {
|
|
451
465
|
expose: Y
|
|
@@ -454,26 +468,26 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
454
468
|
t
|
|
455
469
|
} = Ve(), {
|
|
456
470
|
allReportPermissions: V
|
|
457
|
-
} =
|
|
458
|
-
function z(l,
|
|
459
|
-
const f =
|
|
460
|
-
return ["-", "All"].includes(p) ? () => null : () => B(
|
|
471
|
+
} = Ee(), A = _e(), M = R(() => A.restaurants.value), G = R(() => M.value.map((l) => l._id));
|
|
472
|
+
function z(l, i) {
|
|
473
|
+
const f = i === L.F_RULE_SUBJECT.enum.report ? V.value : void 0, p = ne(l, i, f);
|
|
474
|
+
return ["-", "All"].includes(p) ? () => null : () => B(ve.FmTooltip, {
|
|
461
475
|
"z-index": "999",
|
|
462
476
|
placement: "top",
|
|
463
477
|
class: "ml-2"
|
|
464
478
|
}, {
|
|
465
|
-
content: () => B("div", [t("hr.role.tooltip.labels.permission"), ...l.filter((
|
|
466
|
-
default: () => B(
|
|
479
|
+
content: () => B("div", [t("hr.role.tooltip.labels.permission"), ...l.filter((x) => x.subject === i).map((x) => B("div", ["- ", W(x).label]))]),
|
|
480
|
+
default: () => B(ve.FmIcon, {
|
|
467
481
|
name: "info",
|
|
468
482
|
color: Je.NeutralGray400
|
|
469
483
|
})
|
|
470
484
|
});
|
|
471
485
|
}
|
|
472
|
-
function Z(l,
|
|
473
|
-
const f =
|
|
486
|
+
function Z(l, i) {
|
|
487
|
+
const f = i === L.F_RULE_SUBJECT.enum.report ? V.value : void 0, p = ne(l, i, f);
|
|
474
488
|
return () => p === "All" ? p : B("div", {
|
|
475
489
|
class: "flex items-center"
|
|
476
|
-
}, [p, z(l,
|
|
490
|
+
}, [p, z(l, i)()]);
|
|
477
491
|
}
|
|
478
492
|
function ee(l) {
|
|
479
493
|
return [{
|
|
@@ -488,13 +502,13 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
488
502
|
}
|
|
489
503
|
const se = ({
|
|
490
504
|
role: l,
|
|
491
|
-
className:
|
|
492
|
-
}) =>
|
|
493
|
-
class:
|
|
505
|
+
className: i = ""
|
|
506
|
+
}) => u("div", {
|
|
507
|
+
class: i,
|
|
494
508
|
onClick: (f) => {
|
|
495
509
|
f.stopPropagation();
|
|
496
510
|
}
|
|
497
|
-
}, [
|
|
511
|
+
}, [u(Fe, {
|
|
498
512
|
items: ee(l)
|
|
499
513
|
}, null)]), ue = [{
|
|
500
514
|
accessorKey: "name",
|
|
@@ -503,20 +517,20 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
503
517
|
}, {
|
|
504
518
|
accessorKey: "operation",
|
|
505
519
|
header: () => t("hr.role.columns.operation"),
|
|
506
|
-
cell: (l) => B(Z(l.row.original.permissions,
|
|
520
|
+
cell: (l) => B(Z(l.row.original.permissions, L.F_RULE_SUBJECT.enum.order)),
|
|
507
521
|
enableSorting: !1
|
|
508
522
|
}, {
|
|
509
523
|
accessorKey: "report",
|
|
510
524
|
header: () => t("hr.role.columns.report"),
|
|
511
|
-
cell: (l) => B(Z(l.row.original.permissions,
|
|
525
|
+
cell: (l) => B(Z(l.row.original.permissions, L.F_RULE_SUBJECT.enum.report)),
|
|
512
526
|
enableSorting: !1
|
|
513
527
|
}, {
|
|
514
528
|
accessorKey: "restaurants",
|
|
515
529
|
header: () => t("hr.role.columns.restaurants"),
|
|
516
|
-
cell: (l) => l.row.original.restaurants.map((
|
|
517
|
-
const p =
|
|
530
|
+
cell: (l) => l.row.original.restaurants.map((i, f) => {
|
|
531
|
+
const p = i.code, x = `${p ? p + " - " : ""}${i.name}`;
|
|
518
532
|
return B("div", (f ? `
|
|
519
|
-
` : "") +
|
|
533
|
+
` : "") + x);
|
|
520
534
|
}),
|
|
521
535
|
enableSorting: !1
|
|
522
536
|
}, {
|
|
@@ -531,18 +545,18 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
531
545
|
className: "flex w-full items-center justify-end"
|
|
532
546
|
})
|
|
533
547
|
}], K = async (l) => {
|
|
534
|
-
var
|
|
535
|
-
w.value = l._id, await Ce(), (
|
|
536
|
-
},
|
|
537
|
-
const l =
|
|
538
|
-
return (
|
|
539
|
-
const p = f.restaurants.map((
|
|
540
|
-
const m =
|
|
548
|
+
var i;
|
|
549
|
+
w.value = l._id, await Ce(), (i = y.value) == null || i.trigger();
|
|
550
|
+
}, $ = $e(), S = os(), ce = R(() => {
|
|
551
|
+
const l = $.roles.value || [];
|
|
552
|
+
return (G.value.length === 0 ? l : l.filter((f) => f.restaurants.some((p) => G.value.includes(p.id)))).map((f) => {
|
|
553
|
+
const p = f.restaurants.map((x) => {
|
|
554
|
+
const m = S.value[x.id];
|
|
541
555
|
return {
|
|
542
|
-
...
|
|
556
|
+
...x,
|
|
543
557
|
// Prefer live data from restaurantMap so names populate reactively
|
|
544
558
|
// even when restaurants loaded after roles.
|
|
545
|
-
name: (m == null ? void 0 : m.profile.name) ||
|
|
559
|
+
name: (m == null ? void 0 : m.profile.name) || x.name,
|
|
546
560
|
code: m == null ? void 0 : m.profile.code
|
|
547
561
|
};
|
|
548
562
|
});
|
|
@@ -551,16 +565,16 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
551
565
|
restaurants: p
|
|
552
566
|
};
|
|
553
567
|
});
|
|
554
|
-
}),
|
|
555
|
-
var
|
|
556
|
-
return (
|
|
557
|
-
const p = a.value.toLowerCase(),
|
|
568
|
+
}), O = R(() => {
|
|
569
|
+
var i;
|
|
570
|
+
return (i = ce.value) == null ? void 0 : i.filter((f) => {
|
|
571
|
+
const p = a.value.toLowerCase(), x = f.name.toLowerCase().includes(p), _ = (f.restaurants || []).some((N) => {
|
|
558
572
|
var le;
|
|
559
573
|
return N.name.toLowerCase().includes(p) || ((le = N.code) == null ? void 0 : le.toLowerCase().includes(p));
|
|
560
574
|
});
|
|
561
|
-
return
|
|
575
|
+
return x || _;
|
|
562
576
|
});
|
|
563
|
-
}), te = Ne(),
|
|
577
|
+
}), te = Ne(), J = Se(), {
|
|
564
578
|
breakpoints: v
|
|
565
579
|
} = Oe(), P = (l) => {
|
|
566
580
|
te.open({
|
|
@@ -579,27 +593,27 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
579
593
|
close: !0
|
|
580
594
|
}
|
|
581
595
|
}).onPrimary(async () => {
|
|
582
|
-
await
|
|
596
|
+
await $.deleteRole(l).then(() => J.open({
|
|
583
597
|
message: t("hr.role.remove.successMessage", {
|
|
584
598
|
name: l.name
|
|
585
599
|
}),
|
|
586
600
|
type: "success"
|
|
587
|
-
})).catch((
|
|
588
|
-
message:
|
|
601
|
+
})).catch((i) => J.open({
|
|
602
|
+
message: i,
|
|
589
603
|
type: "error"
|
|
590
604
|
})), te.close();
|
|
591
605
|
});
|
|
592
|
-
}, a =
|
|
606
|
+
}, a = D(""), y = D(), w = D(void 0);
|
|
593
607
|
async function ae() {
|
|
594
608
|
var l;
|
|
595
|
-
w.value = void 0, await Ce(), (l =
|
|
609
|
+
w.value = void 0, await Ce(), (l = y.value) == null || l.trigger();
|
|
596
610
|
}
|
|
597
611
|
async function me() {
|
|
598
|
-
if (
|
|
612
|
+
if ($.roles.value.length === 0)
|
|
599
613
|
try {
|
|
600
|
-
await
|
|
614
|
+
await $.readRoles();
|
|
601
615
|
} catch (l) {
|
|
602
|
-
console.error("Failed to load roles:", l),
|
|
616
|
+
console.error("Failed to load roles:", l), J.open({
|
|
603
617
|
message: l instanceof Error ? l.message : String(l),
|
|
604
618
|
type: "error"
|
|
605
619
|
});
|
|
@@ -609,66 +623,62 @@ const rs = { class: "flex w-full items-center justify-between" }, ns = { class:
|
|
|
609
623
|
me();
|
|
610
624
|
}), Y({
|
|
611
625
|
create: ae
|
|
612
|
-
}), (l,
|
|
613
|
-
const f = F("FmSearch"), p = F("FmTable"),
|
|
614
|
-
return
|
|
626
|
+
}), (l, i) => {
|
|
627
|
+
const f = F("FmSearch"), p = F("FmTable"), x = F("FmListItem"), m = F("FmList");
|
|
628
|
+
return c(), C(E, null, [(c(), j(Cs, {
|
|
615
629
|
id: w.value,
|
|
616
630
|
key: w.value,
|
|
617
631
|
ref_key: "roleFormRef",
|
|
618
|
-
ref:
|
|
619
|
-
}, null, 8, ["id"])),
|
|
632
|
+
ref: y
|
|
633
|
+
}, null, 8, ["id"])), n("div", Fs, [n("div", Rs, [u(f, {
|
|
620
634
|
modelValue: a.value,
|
|
621
|
-
"onUpdate:modelValue":
|
|
635
|
+
"onUpdate:modelValue": i[0] || (i[0] = (_) => a.value = _),
|
|
622
636
|
class: "w-[320px] xs:w-full",
|
|
623
637
|
autofocus: "",
|
|
624
638
|
placeholder: o(t)("hr.role.search.placeholder") + " / " + o(t)("hr.restaurant.search.placeholder")
|
|
625
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
"
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
639
|
+
}, null, 8, ["modelValue", "placeholder"])]), u(He, null, {
|
|
640
|
+
default: b(() => [n("div", ws, [u(Xe, {
|
|
641
|
+
"is-loading": o($).isLoading.value,
|
|
642
|
+
"is-empty": O.value.length === 0,
|
|
643
|
+
"collapse-at": "xs",
|
|
644
|
+
title: o(t)("hr.role.noData.title"),
|
|
645
|
+
subtitle: o(t)("hr.role.noData.subtitle")
|
|
646
|
+
}, {
|
|
647
|
+
default: b(() => [u(p, {
|
|
648
|
+
class: "xs:hidden",
|
|
649
|
+
"column-defs": ue,
|
|
650
|
+
"row-data": O.value,
|
|
651
|
+
"page-size": O.value.length,
|
|
652
|
+
loading: o($).isLoading.value,
|
|
653
|
+
"pin-header-row": "",
|
|
654
|
+
"hide-footer": "",
|
|
655
|
+
"shrink-at": !1,
|
|
656
|
+
onRowClick: i[1] || (i[1] = (_) => K(_.original))
|
|
657
|
+
}, null, 8, ["row-data", "page-size", "loading"])]),
|
|
658
|
+
_: 1
|
|
659
|
+
}, 8, ["is-loading", "is-empty", "title", "subtitle"]), n("div", ks, [u(m, {
|
|
640
660
|
separator: ""
|
|
641
661
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
key:
|
|
662
|
+
default: b(() => [(c(!0), C(E, null, Q(O.value, (_) => (c(), j(x, {
|
|
663
|
+
key: _._id,
|
|
644
664
|
class: "py-12 px-16 items-center justify-between",
|
|
645
|
-
onClick: (N) => K(
|
|
665
|
+
onClick: (N) => K(_)
|
|
646
666
|
}, {
|
|
647
|
-
default:
|
|
648
|
-
|
|
649
|
-
})), 1), c("p", Us, [ye(j(o(t)("hr.role.labels.operationList", {
|
|
650
|
-
items: o(ne)(h.permissions, o(D.F_RULE_SUBJECT).enum.order)
|
|
651
|
-
})) + " ", 1), (u(), L(xe(z(h.permissions, o(D.F_RULE_SUBJECT).enum.order))))]), c("p", Es, [ye(j(o(t)("hr.role.labels.reportList", {
|
|
652
|
-
items: o(ne)(h.permissions, o(D.F_RULE_SUBJECT).enum.report, o(V))
|
|
653
|
-
})) + " ", 1), (u(), L(xe(z(h.permissions, o(D.F_RULE_SUBJECT).enum.report))))])])]), c("div", {
|
|
654
|
-
onClick: n[2] || (n[2] = Ke(() => {
|
|
667
|
+
default: b(() => [n("div", Vs, [n("p", Ss, U(_.name), 1), n("div", Us, [n("p", $s, [n("span", Es, U(o(t)("hr.role.labels.restaurant")) + ":", 1), pe(" " + U(_.restaurants.map((N) => N.name).join(", ")), 1)]), n("p", Is, [n("span", Ls, [n("span", Ds, U(o(t)("hr.role.labels.operation")) + ":", 1), pe(" " + U(o(ne)(_.permissions, o(L.F_RULE_SUBJECT).enum.order)), 1)]), (c(), j(xe(z(_.permissions, o(L.F_RULE_SUBJECT).enum.order))))]), n("p", Ms, [n("span", Ps, [n("span", Ts, U(o(t)("hr.role.labels.report")) + ":", 1), pe(" " + U(o(ne)(_.permissions, o(L.F_RULE_SUBJECT).enum.report, o(V))), 1)]), (c(), j(xe(z(_.permissions, o(L.F_RULE_SUBJECT).enum.report))))])])]), n("div", {
|
|
668
|
+
onClick: i[2] || (i[2] = Ke(() => {
|
|
655
669
|
}, ["stop"]))
|
|
656
|
-
}, [
|
|
657
|
-
items: ee(
|
|
670
|
+
}, [u(Fe, {
|
|
671
|
+
items: ee(_)
|
|
658
672
|
}, null, 8, ["items"])])]),
|
|
659
673
|
_: 2
|
|
660
674
|
}, 1032, ["onClick"]))), 128))]),
|
|
661
675
|
_: 1
|
|
662
|
-
})])]),
|
|
676
|
+
})])])]),
|
|
663
677
|
_: 1
|
|
664
|
-
}))
|
|
665
|
-
key: 1,
|
|
666
|
-
title: o(t)("hr.role.noData.title"),
|
|
667
|
-
subtitle: o(t)("hr.role.noData.subtitle")
|
|
668
|
-
}, null, 8, ["title", "subtitle"]))])], 64);
|
|
678
|
+
})])], 64);
|
|
669
679
|
};
|
|
670
680
|
}
|
|
671
681
|
});
|
|
672
682
|
export {
|
|
673
|
-
|
|
683
|
+
Ys as default
|
|
674
684
|
};
|