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