@feedmepos/mf-hrm-portal 2.1.1-dev.5 → 2.1.1-dev.6
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-CXJyMKEg.js → ApprovalCodeList-B1XHbhum.js} +2 -2
- package/dist/{AuditLogList-CXUkbDyT.js → AuditLogList-DrrL4vf4.js} +244 -240
- package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-CBjO1MZo.js +387 -0
- package/dist/EmployeeList-BMol4ah4.js +883 -0
- package/dist/{GrantUserList-DKP4MBQM.js → GrantUserList-CLBl7FZ-.js} +140 -137
- package/dist/{Main-Cz1pfe2k.js → Main-DNOHZd3j.js} +7 -7
- package/dist/{Main-CyCfz4ka.js → Main-D_LwrBdZ.js} +1033 -1029
- package/dist/{Main-CblWfQk_.js → Main-auigiuVZ.js} +3 -3
- package/dist/PermissionSetList-DLYrXFbz.js +393 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Drcx0tL_.js +4122 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -0
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +42 -0
- package/dist/RoleList-g8PjH_k2.js +685 -0
- package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
- package/dist/TeamMemberList-B9aCagSc.js +1215 -0
- package/dist/{TimesheetList-s_bP5OGA.js → TimesheetList-C1IJhOYE.js} +118 -112
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CqtiVm1j.js} +2 -2
- package/dist/{app-BP0oihBR.js → app-DnOYVjuj.js} +5058 -2360
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BTSZLci9.js → dayjs.min-Dxul0qTK.js} +1 -1
- package/dist/{employee-BPv1j6T4.js → employee-sr65CZR7.js} +3 -3
- package/dist/{iteration-BNA1cEos.js → iteration-DIqDMvFa.js} +1 -1
- package/dist/{lodash-DKG9IyB-.js → lodash-CXlqXFmD.js} +1 -1
- package/dist/{role-BS3LFO8u.js → role-CE3NY-63.js} +1 -1
- package/dist/rule-CEjrit6c.js +1058 -0
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +7 -1
- package/dist/src/components/table/TableEmptyState.vue.d.ts +7 -15
- package/dist/src/composables/useBasePermission.d.ts +2 -1
- package/dist/src/composables/useConditionDraft.d.ts +40 -0
- package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
- package/dist/src/helpers/business-timezone.d.ts +22 -0
- package/dist/src/helpers/filter.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.d.ts +15 -0
- package/dist/src/helpers/permission-reconcile.test.d.ts +1 -0
- package/dist/src/helpers/permission-set.d.ts +8 -4
- package/dist/src/helpers/rule.d.ts +2 -1
- package/dist/src/stores/permission-set.d.ts +12 -3
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +1 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
- package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
- package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
- package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
- package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
- package/dist/src/views/team/locales/index.d.ts +80 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-J3-DjopO.js → useReportPermissions-FVW_HwcL.js} +3 -3
- package/package.json +2 -2
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
- package/dist/EmployeeList-BSfUFTcN.js +0 -899
- package/dist/PermissionSetList-BwyblSeE.js +0 -357
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js +0 -3458
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
- package/dist/RoleList-CXYgCmHp.js +0 -567
- package/dist/TeamMemberList-CnLbqaPS.js +0 -1131
- package/dist/rule-DaSLVZWm.js +0 -996
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { d as ge } from "./dayjs.min-
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useSnackbar as
|
|
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-Dxul0qTK.js";
|
|
3
|
+
import { useI18n as Z } from "@feedmepos/mf-common";
|
|
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
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as be } from "./
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
6
|
+
import { _ as he } from "./app-DnOYVjuj.js";
|
|
7
|
+
import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
|
|
8
|
+
import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
9
|
+
import { u as te } from "./useLoading-BH02lYns.js";
|
|
10
|
+
import { u as ae } from "./grant-user-CQZaTzVt.js";
|
|
11
|
+
import { u as se } from "./restaurant-YOVMuuFY.js";
|
|
12
|
+
import { u as re } from "./role-CE3NY-63.js";
|
|
13
|
+
import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
|
|
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",
|
|
16
|
-
setup(
|
|
17
|
-
const a =
|
|
16
|
+
setup(le, { expose: M }) {
|
|
17
|
+
const a = ae(), I = re(), y = se(), x = ee(), C = te(x), { t: d } = Z(), h = S(!1), n = S({
|
|
18
18
|
name: "",
|
|
19
19
|
restaurantId: "",
|
|
20
20
|
roleId: ""
|
|
21
21
|
}), B = () => {
|
|
22
|
-
|
|
22
|
+
n.value = {
|
|
23
23
|
name: "",
|
|
24
24
|
restaurantId: "",
|
|
25
25
|
roleId: ""
|
|
26
|
-
},
|
|
27
|
-
},
|
|
26
|
+
}, h.value = !0;
|
|
27
|
+
}, U = f(() => d("grantUser.form.title")), b = f(() => d("common.create")), V = f(() => y.restaurants.value.map((c) => ({
|
|
28
28
|
label: `${c.profile.code ? c.profile.code + " - " : ""}${c.profile.name}`,
|
|
29
29
|
value: c._id
|
|
30
|
-
}))), $ = f(() =>
|
|
30
|
+
}))), $ = f(() => n.value.restaurantId ? I.roles.value.filter((c) => c.restaurants.some((i) => i.id === n.value.restaurantId)).map((c) => ({
|
|
31
31
|
label: c.name,
|
|
32
32
|
value: c._id,
|
|
33
33
|
disabled: !c.isUsable
|
|
34
34
|
})) : []);
|
|
35
|
-
|
|
36
|
-
() =>
|
|
35
|
+
ue(
|
|
36
|
+
() => n.value.restaurantId,
|
|
37
37
|
() => {
|
|
38
|
-
|
|
38
|
+
n.value.roleId = "";
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
async function N() {
|
|
42
42
|
await C.minor(async () => {
|
|
43
|
-
const c = await a.createGrantUser(
|
|
44
|
-
|
|
43
|
+
const c = await a.createGrantUser(n.value);
|
|
44
|
+
x.open({
|
|
45
45
|
message: d("grantUser.create.successMessage", {
|
|
46
46
|
passcode: c.passcode
|
|
47
47
|
}),
|
|
48
48
|
type: "success"
|
|
49
49
|
});
|
|
50
|
-
}),
|
|
50
|
+
}), h.value = !1;
|
|
51
51
|
}
|
|
52
52
|
return M({
|
|
53
|
-
show:
|
|
53
|
+
show: h,
|
|
54
54
|
trigger: B
|
|
55
55
|
}), (c, i) => {
|
|
56
|
-
const R = v("FmTextField"), z = v("FmSelect"),
|
|
57
|
-
return
|
|
58
|
-
|
|
56
|
+
const R = v("FmTextField"), z = v("FmSelect"), F = v("fm-button"), T = v("fm-side-sheet");
|
|
57
|
+
return w(), D(E, null, [
|
|
58
|
+
de(c.$slots, "default", { trigger: B }),
|
|
59
59
|
l(T, {
|
|
60
60
|
id: "grant-user-form",
|
|
61
|
-
modelValue:
|
|
62
|
-
"onUpdate:modelValue": i[4] || (i[4] = (u) =>
|
|
61
|
+
modelValue: h.value,
|
|
62
|
+
"onUpdate:modelValue": i[4] || (i[4] = (u) => h.value = u),
|
|
63
63
|
"is-container": s(K).FmForm,
|
|
64
64
|
"is-container-props": {
|
|
65
65
|
onValidationSuccess: N,
|
|
@@ -67,44 +67,44 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
67
67
|
},
|
|
68
68
|
"max-width": 560
|
|
69
69
|
}, {
|
|
70
|
-
"side-sheet-header":
|
|
71
|
-
|
|
70
|
+
"side-sheet-header": g(() => [
|
|
71
|
+
o("p", ke, _(U.value), 1)
|
|
72
72
|
]),
|
|
73
|
-
"side-sheet-footer":
|
|
74
|
-
|
|
75
|
-
l(
|
|
76
|
-
label:
|
|
73
|
+
"side-sheet-footer": g(() => [
|
|
74
|
+
o("div", we, [
|
|
75
|
+
l(F, {
|
|
76
|
+
label: b.value,
|
|
77
77
|
size: "lg",
|
|
78
78
|
type: "submit",
|
|
79
79
|
variant: "primary"
|
|
80
80
|
}, null, 8, ["label"]),
|
|
81
|
-
l(
|
|
81
|
+
l(F, {
|
|
82
82
|
label: s(d)("common.cancel"),
|
|
83
83
|
size: "lg",
|
|
84
84
|
variant: "tertiary",
|
|
85
|
-
onClick: i[3] || (i[3] = () =>
|
|
85
|
+
onClick: i[3] || (i[3] = () => h.value = !1)
|
|
86
86
|
}, null, 8, ["label"])
|
|
87
87
|
])
|
|
88
88
|
]),
|
|
89
|
-
default:
|
|
90
|
-
|
|
91
|
-
l(
|
|
89
|
+
default: g(() => [
|
|
90
|
+
o("div", Fe, [
|
|
91
|
+
l(Ve, {
|
|
92
92
|
title: s(d)("grantUser.form.section")
|
|
93
93
|
}, {
|
|
94
|
-
default:
|
|
94
|
+
default: g(() => [
|
|
95
95
|
l(R, {
|
|
96
|
-
modelValue:
|
|
97
|
-
"onUpdate:modelValue": i[0] || (i[0] = (u) =>
|
|
96
|
+
modelValue: n.value.name,
|
|
97
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => n.value.name = u),
|
|
98
98
|
label: s(d)("grantUser.form.name"),
|
|
99
99
|
rules: [(u) => !!u || s(d)("grantUser.form.nameRequired")]
|
|
100
100
|
}, null, 8, ["modelValue", "label", "rules"]),
|
|
101
|
-
l(
|
|
101
|
+
l(Q, {
|
|
102
102
|
label: s(d)("grantUser.form.restaurant")
|
|
103
103
|
}, {
|
|
104
|
-
default:
|
|
104
|
+
default: g(() => [
|
|
105
105
|
l(z, {
|
|
106
|
-
modelValue:
|
|
107
|
-
"onUpdate:modelValue": i[1] || (i[1] = (u) =>
|
|
106
|
+
modelValue: n.value.restaurantId,
|
|
107
|
+
"onUpdate:modelValue": i[1] || (i[1] = (u) => n.value.restaurantId = u),
|
|
108
108
|
items: V.value,
|
|
109
109
|
placeholder: s(d)("grantUser.form.selectRestaurant"),
|
|
110
110
|
rules: [(u) => !!u || s(d)("grantUser.form.restaurantRequired")]
|
|
@@ -112,16 +112,16 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
112
112
|
]),
|
|
113
113
|
_: 1
|
|
114
114
|
}, 8, ["label"]),
|
|
115
|
-
l(
|
|
115
|
+
l(Q, {
|
|
116
116
|
label: s(d)("grantUser.form.role")
|
|
117
117
|
}, {
|
|
118
|
-
default:
|
|
118
|
+
default: g(() => [
|
|
119
119
|
l(z, {
|
|
120
|
-
modelValue:
|
|
121
|
-
"onUpdate:modelValue": i[2] || (i[2] = (u) =>
|
|
120
|
+
modelValue: n.value.roleId,
|
|
121
|
+
"onUpdate:modelValue": i[2] || (i[2] = (u) => n.value.roleId = u),
|
|
122
122
|
items: $.value,
|
|
123
123
|
placeholder: s(d)("grantUser.form.selectRole"),
|
|
124
|
-
disabled: !
|
|
124
|
+
disabled: !n.value.restaurantId,
|
|
125
125
|
rules: [(u) => !!u || s(d)("grantUser.form.roleRequired")]
|
|
126
126
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled", "rules"])
|
|
127
127
|
]),
|
|
@@ -150,47 +150,49 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
150
150
|
}, Re = {
|
|
151
151
|
class: "px-16 flex items-start gap-8"
|
|
152
152
|
}, ze = {
|
|
153
|
-
class: "
|
|
153
|
+
class: "flex h-full flex-col overflow-auto"
|
|
154
154
|
}, Le = {
|
|
155
|
-
class: "
|
|
155
|
+
class: "pb-64 hidden xs:block"
|
|
156
156
|
}, Ae = {
|
|
157
|
-
class: "
|
|
157
|
+
class: "space-y-4"
|
|
158
158
|
}, De = {
|
|
159
|
-
class: "
|
|
159
|
+
class: "flex items-center gap-8"
|
|
160
160
|
}, Ke = {
|
|
161
|
-
class: "
|
|
161
|
+
class: "fm-typo-en-body-lg-600"
|
|
162
162
|
}, Me = {
|
|
163
|
-
class: "text-
|
|
163
|
+
class: "font-mono text-lg font-bold mr-4"
|
|
164
164
|
}, Te = {
|
|
165
|
-
class: "
|
|
165
|
+
class: "text-fm-color-typo-secondary"
|
|
166
166
|
}, Ge = {
|
|
167
|
-
class: "
|
|
167
|
+
class: "mt-4 space-y-2"
|
|
168
168
|
}, je = {
|
|
169
169
|
class: "text-xs"
|
|
170
170
|
}, Oe = {
|
|
171
|
+
class: "text-xs"
|
|
172
|
+
}, Ee = {
|
|
171
173
|
key: 0,
|
|
172
174
|
class: "flex flex-col gap-4"
|
|
173
|
-
},
|
|
175
|
+
}, rt = /* @__PURE__ */ X({
|
|
174
176
|
__name: "GrantUserList",
|
|
175
|
-
setup(
|
|
177
|
+
setup(le, {
|
|
176
178
|
expose: M
|
|
177
179
|
}) {
|
|
178
180
|
const {
|
|
179
181
|
t: a
|
|
180
|
-
} =
|
|
182
|
+
} = Z(), I = (e) => ge(e).format("DD/MM/YYYY, h:mm:ss A"), y = S(), x = ae(), {
|
|
181
183
|
restaurants: C
|
|
182
|
-
} =
|
|
184
|
+
} = se(), {
|
|
183
185
|
roles: d
|
|
184
|
-
} =
|
|
185
|
-
searchKey:
|
|
186
|
+
} = re(), h = f(() => x.grantUsers), {
|
|
187
|
+
searchKey: n,
|
|
186
188
|
filter: B
|
|
187
|
-
} =
|
|
189
|
+
} = Ue(), U = f(() => {
|
|
188
190
|
var e;
|
|
189
|
-
return (e =
|
|
190
|
-
const m = !
|
|
191
|
+
return (e = h.value) == null ? void 0 : e.filter((t) => {
|
|
192
|
+
const m = !y.value || y.value.includes(t.restaurantId), G = !k.value || k.value.includes(t.status), L = b.value[t.restaurantId] || "", j = V.value[t.roleId] || "";
|
|
191
193
|
return m && G && B([t.passcode, t.name, L, j, t.grantByName]);
|
|
192
194
|
});
|
|
193
|
-
}),
|
|
195
|
+
}), b = f(() => {
|
|
194
196
|
const e = {};
|
|
195
197
|
return C.value.forEach((t) => {
|
|
196
198
|
e[t._id] = t.profile.name;
|
|
@@ -222,11 +224,11 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
222
224
|
return p("div", {
|
|
223
225
|
class: "flex items-center gap-8"
|
|
224
226
|
}, [p(K.FmButton, {
|
|
225
|
-
variant:
|
|
227
|
+
variant: O.Tertiary,
|
|
226
228
|
textColor: "neutral-gray-400",
|
|
227
229
|
icon: "content_copy",
|
|
228
230
|
onClick: (m) => {
|
|
229
|
-
m.stopPropagation(),
|
|
231
|
+
m.stopPropagation(), q(t);
|
|
230
232
|
}
|
|
231
233
|
}), p("span", {
|
|
232
234
|
class: "font-mono text-lg font-bold"
|
|
@@ -237,13 +239,13 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
237
239
|
header: () => a("grantUser.columns.name")
|
|
238
240
|
}, {
|
|
239
241
|
accessorKey: "restaurantName",
|
|
240
|
-
accessorFn: (e) =>
|
|
242
|
+
accessorFn: (e) => b.value[e.restaurantId],
|
|
241
243
|
header: () => a("grantUser.columns.restaurant"),
|
|
242
244
|
meta: {
|
|
243
245
|
width: "250px"
|
|
244
246
|
},
|
|
245
247
|
cell(e) {
|
|
246
|
-
return p("div",
|
|
248
|
+
return p("div", b.value[e.row.original.restaurantId] || "-");
|
|
247
249
|
}
|
|
248
250
|
}, {
|
|
249
251
|
accessorKey: "roleName",
|
|
@@ -292,13 +294,13 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
292
294
|
class: "w-full flex justify-end items-center gap-4"
|
|
293
295
|
}, [p(K.FmButton, {
|
|
294
296
|
label: a("grantUser.actions.revoke"),
|
|
295
|
-
variant:
|
|
297
|
+
variant: O.Secondary,
|
|
296
298
|
onClick: (m) => {
|
|
297
299
|
m.stopPropagation(), u(t);
|
|
298
300
|
}
|
|
299
301
|
})]);
|
|
300
302
|
}
|
|
301
|
-
}], i =
|
|
303
|
+
}], i = ee(), R = _e(), z = te(i), F = S(), {
|
|
302
304
|
breakpoints: T
|
|
303
305
|
} = ye(), u = (e) => {
|
|
304
306
|
R.open({
|
|
@@ -318,7 +320,7 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
318
320
|
}
|
|
319
321
|
}).onPrimary(async () => {
|
|
320
322
|
z.minor(async () => {
|
|
321
|
-
await
|
|
323
|
+
await x.revokeGrantUser(e._id, e.restaurantId);
|
|
322
324
|
}, {
|
|
323
325
|
successMessage: a("grantUser.revoke.successMessage", {
|
|
324
326
|
name: e.name
|
|
@@ -326,11 +328,11 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
326
328
|
}), R.close();
|
|
327
329
|
});
|
|
328
330
|
};
|
|
329
|
-
function
|
|
331
|
+
function oe() {
|
|
330
332
|
var e;
|
|
331
|
-
(e =
|
|
333
|
+
(e = F.value) == null || e.trigger();
|
|
332
334
|
}
|
|
333
|
-
const
|
|
335
|
+
const P = f(() => [{
|
|
334
336
|
label: a("grantUser.status.active"),
|
|
335
337
|
value: "active"
|
|
336
338
|
}, {
|
|
@@ -339,11 +341,11 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
339
341
|
}, {
|
|
340
342
|
label: a("grantUser.status.revoked"),
|
|
341
343
|
value: "revoked"
|
|
342
|
-
}]),
|
|
344
|
+
}]), Y = f(() => C.value.map((e) => ({
|
|
343
345
|
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
344
346
|
value: e._id
|
|
345
|
-
}))),
|
|
346
|
-
async function
|
|
347
|
+
}))), k = S();
|
|
348
|
+
async function q(e) {
|
|
347
349
|
try {
|
|
348
350
|
await navigator.clipboard.writeText(e), i.open({
|
|
349
351
|
message: a("grantUser.passcode.copied"),
|
|
@@ -357,105 +359,106 @@ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
|
|
|
357
359
|
}
|
|
358
360
|
}
|
|
359
361
|
return M({
|
|
360
|
-
create:
|
|
361
|
-
filteredGrantUsers:
|
|
362
|
+
create: oe,
|
|
363
|
+
filteredGrantUsers: U
|
|
362
364
|
}), (e, t) => {
|
|
363
|
-
const m = v("FmSearch"), G = v("FmTable"), L = v("FmButton"), j = v("FmChip"),
|
|
364
|
-
return
|
|
365
|
+
const m = v("FmSearch"), G = v("FmTable"), L = v("FmButton"), j = v("FmChip"), ne = v("FmListItem"), ce = v("FmList");
|
|
366
|
+
return w(), D(E, null, [l(Se, {
|
|
365
367
|
ref_key: "grantUserFormRef",
|
|
366
|
-
ref:
|
|
368
|
+
ref: F,
|
|
367
369
|
class: "gap-8"
|
|
368
|
-
}, null, 512),
|
|
369
|
-
modelValue:
|
|
370
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) =>
|
|
370
|
+
}, null, 512), o("div", Ie, [o("div", Ce, [o("div", Be, [l(A, {
|
|
371
|
+
modelValue: y.value,
|
|
372
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => y.value = r),
|
|
371
373
|
multiple: "",
|
|
372
|
-
items:
|
|
374
|
+
items: Y.value,
|
|
373
375
|
variant: "dark",
|
|
374
376
|
"selected-prefix": s(a)("grantUser.columns.restaurant"),
|
|
375
377
|
placeholder: s(a)("grantUser.columns.restaurant"),
|
|
376
378
|
class: "!w-auto"
|
|
377
379
|
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(A, {
|
|
378
|
-
modelValue:
|
|
379
|
-
"onUpdate:modelValue": t[1] || (t[1] = (r) =>
|
|
380
|
+
modelValue: k.value,
|
|
381
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => k.value = r),
|
|
380
382
|
multiple: "",
|
|
381
383
|
variant: "dark",
|
|
382
|
-
items:
|
|
384
|
+
items: P.value,
|
|
383
385
|
"selected-prefix": s(a)("grantUser.filter.selected_status_prefix"),
|
|
384
386
|
placeholder: s(a)("grantUser.filter.status_placeholder")
|
|
385
387
|
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), l(m, {
|
|
386
|
-
modelValue: s(
|
|
387
|
-
"onUpdate:modelValue": t[2] || (t[2] = (r) =>
|
|
388
|
+
modelValue: s(n),
|
|
389
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => H(n) ? n.value = r : null),
|
|
388
390
|
autofocus: "",
|
|
389
391
|
class: "pl-4 w-[320px]",
|
|
390
392
|
placeholder: s(a)("grantUser.search.placeholder")
|
|
391
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
392
|
-
modelValue: s(
|
|
393
|
-
"onUpdate:modelValue": t[3] || (t[3] = (r) =>
|
|
393
|
+
}, null, 8, ["modelValue", "placeholder"])]), o("div", $e, [o("div", Ne, [l(m, {
|
|
394
|
+
modelValue: s(n),
|
|
395
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => H(n) ? n.value = r : null),
|
|
394
396
|
autofocus: "",
|
|
395
397
|
placeholder: s(a)("grantUser.search.placeholder")
|
|
396
|
-
}, null, 8, ["modelValue", "placeholder"])]), l(xe),
|
|
397
|
-
modelValue:
|
|
398
|
-
"onUpdate:modelValue": t[4] || (t[4] = (r) =>
|
|
398
|
+
}, null, 8, ["modelValue", "placeholder"])]), l(xe), o("div", Re, [l(A, {
|
|
399
|
+
modelValue: y.value,
|
|
400
|
+
"onUpdate:modelValue": t[4] || (t[4] = (r) => y.value = r),
|
|
399
401
|
multiple: "",
|
|
400
|
-
items:
|
|
402
|
+
items: Y.value,
|
|
401
403
|
variant: "dark",
|
|
402
404
|
"selected-prefix": s(a)("grantUser.columns.restaurant"),
|
|
403
405
|
placeholder: s(a)("grantUser.columns.restaurant"),
|
|
404
406
|
class: "!w-auto"
|
|
405
407
|
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(A, {
|
|
406
|
-
modelValue:
|
|
407
|
-
"onUpdate:modelValue": t[5] || (t[5] = (r) =>
|
|
408
|
+
modelValue: k.value,
|
|
409
|
+
"onUpdate:modelValue": t[5] || (t[5] = (r) => k.value = r),
|
|
408
410
|
multiple: "",
|
|
409
|
-
items:
|
|
411
|
+
items: P.value,
|
|
410
412
|
variant: "dark",
|
|
411
413
|
"selected-prefix": s(a)("grantUser.filter.selected_status_prefix"),
|
|
412
414
|
placeholder: s(a)("grantUser.filter.status_placeholder")
|
|
413
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]),
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
415
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), l(he, null, {
|
|
416
|
+
default: g(() => [o("div", ze, [l(be, {
|
|
417
|
+
"is-loading": s(x).isLoading,
|
|
418
|
+
"is-empty": U.value.length === 0,
|
|
419
|
+
title: s(a)("grantUser.noData.title"),
|
|
420
|
+
subtitle: s(a)("grantUser.noData.subtitle")
|
|
421
|
+
}, {
|
|
422
|
+
default: g(() => [l(G, {
|
|
423
|
+
class: "xs:hidden",
|
|
424
|
+
"column-defs": c,
|
|
425
|
+
"row-data": U.value,
|
|
426
|
+
"page-size": U.value.length,
|
|
427
|
+
loading: s(x).isLoading,
|
|
428
|
+
virtual: U.value.length > 0,
|
|
429
|
+
"pin-header-row": "",
|
|
430
|
+
"hide-footer": ""
|
|
431
|
+
}, null, 8, ["row-data", "page-size", "loading", "virtual"])]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["is-loading", "is-empty", "title", "subtitle"]), o("div", Le, [l(ce, {
|
|
427
434
|
separator: ""
|
|
428
435
|
}, {
|
|
429
|
-
default:
|
|
436
|
+
default: g(() => [(w(!0), D(E, null, me(U.value, (r) => (w(), pe(ne, {
|
|
430
437
|
key: r._id,
|
|
431
438
|
class: "py-12 px-16 items-center justify-between"
|
|
432
439
|
}, {
|
|
433
|
-
default:
|
|
440
|
+
default: g(() => [o("div", Ae, [o("div", De, [l(L, {
|
|
434
441
|
variant: "tertiary",
|
|
435
442
|
"text-color": "neutral-gray-400",
|
|
436
443
|
icon: "content_copy",
|
|
437
|
-
onClick:
|
|
438
|
-
}, null, 8, ["onClick"]),
|
|
444
|
+
onClick: W((ie) => q(r.passcode), ["stop"])
|
|
445
|
+
}, null, 8, ["onClick"]), o("p", Ke, [o("span", Me, _(r.passcode), 1), J(" - " + _(r.name), 1)])]), o("div", Te, [o("div", null, [J(_(b.value[r.restaurantId] || "-") + " ", 1), o("div", null, _(V.value[r.roleId] || "-"), 1)]), o("div", Ge, [o("div", je, _(s(a)("grantUser.columns.grantedBy")) + ": " + _(r.grantByName), 1), o("div", Oe, _(s(a)("grantUser.columns.createdAt")) + ": " + _(I(r.createdAt)), 1), l(j, {
|
|
439
446
|
label: N(r.status),
|
|
440
447
|
class: ve($(r.status))
|
|
441
|
-
}, null, 8, ["label", "class"])])])]), r.status === "active" ? (
|
|
448
|
+
}, null, 8, ["label", "class"])])])]), r.status === "active" ? (w(), D("div", Ee, [l(L, {
|
|
442
449
|
label: s(a)("grantUser.actions.revoke"),
|
|
443
|
-
variant: s(
|
|
444
|
-
onClick:
|
|
450
|
+
variant: s(O).Secondary,
|
|
451
|
+
onClick: W((ie) => u(r), ["stop"])
|
|
445
452
|
}, null, 8, ["label", "variant", "onClick"])])) : fe("", !0)]),
|
|
446
453
|
_: 2
|
|
447
454
|
}, 1024))), 128))]),
|
|
448
455
|
_: 1
|
|
449
|
-
})])]),
|
|
456
|
+
})])])]),
|
|
450
457
|
_: 1
|
|
451
|
-
}))
|
|
452
|
-
key: 1,
|
|
453
|
-
title: s(a)("grantUser.noData.title"),
|
|
454
|
-
subtitle: s(a)("grantUser.noData.subtitle")
|
|
455
|
-
}, null, 8, ["title", "subtitle"]))])], 64);
|
|
458
|
+
})])], 64);
|
|
456
459
|
};
|
|
457
460
|
}
|
|
458
461
|
});
|
|
459
462
|
export {
|
|
460
|
-
|
|
463
|
+
rt as default
|
|
461
464
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineComponent as M, ref as R, computed as s, resolveComponent as i, createBlock as c, openBlock as p, withCtx as l, createElementVNode as S, createVNode as d, resolveDynamicComponent as g, createCommentVNode as y, createTextVNode as A, toDisplayString as C } from "vue";
|
|
2
2
|
import { useRouter as N, useRoute as h } from "vue-router";
|
|
3
3
|
import { useI18n as k } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-
|
|
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
6
|
import { u as w } from "./restaurant-YOVMuuFY.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
|
-
import "./rule-
|
|
9
|
-
import "./lodash-
|
|
10
|
-
import "./iteration-
|
|
8
|
+
import "./rule-CEjrit6c.js";
|
|
9
|
+
import "./lodash-CXlqXFmD.js";
|
|
10
|
+
import "./iteration-DIqDMvFa.js";
|
|
11
11
|
import "./useAppStore-DNTlIeMv.js";
|
|
12
|
-
import { R as v } from "./app-
|
|
13
|
-
import "./role-
|
|
12
|
+
import { R as v } from "./app-DnOYVjuj.js";
|
|
13
|
+
import "./role-CE3NY-63.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import "./PortalUserSearcher.
|
|
15
|
+
import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js";
|
|
16
16
|
const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
|
|
17
17
|
__name: "Main",
|
|
18
18
|
setup(q) {
|