@feedmepos/mf-hrm-portal 2.3.2-dev.2 → 2.3.2-dev.20
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-sHnINTik.js → ApprovalCodeList-eCTF8Rwt.js} +7 -7
- package/dist/AuditLogList-YzR5ysmN.js +2021 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BbsPesWY.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang--660w-zJ.js} +2 -2
- package/dist/{EmployeeList-D4oy5hXz.js → EmployeeList-C2ctTGCo.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-Cl053Tg1.js → FormSection.vue_vue_type_script_setup_true_lang-DWvJM14K.js} +1 -1
- package/dist/{GrantUserList-LWpqhl-5.js → GrantUserList-BoN1MUkB.js} +8 -8
- package/dist/{Main-PBJjfzBg.js → Main-BLmTdeYO.js} +5 -5
- package/dist/{Main-BWKb-QIE.js → Main-CIldvI5X.js} +2274 -2280
- package/dist/{Main-CVGiOYpC.js → Main-Di-083Pw.js} +29 -29
- package/dist/MyPosProfile-CctvT3RF.js +360 -0
- package/dist/{PermissionSetList-D2qZVlF4.js → PermissionSetList-BzvVAzwG.js} +126 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JgrJvMly.js +4212 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DRGTxOMW.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BdjAh48A.js} +414 -448
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-DFDTw0lj.js → RoleForm.vue_vue_type_script_setup_true_lang-WCNUeA3G.js} +74 -74
- package/dist/{RoleList-DG0crFzW.js → RoleList-wPupuMBG.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cs0rhCa3.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DcBIt4DL.js} +1 -1
- package/dist/{ScheduleGeneralPage-C4J6jYtG.js → ScheduleGeneralPage-NCKqPyt5.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3UqO6uPu.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CG5Xxj3Q.js} +4 -4
- package/dist/{SchedulePage-ICzggri0.js → SchedulePage-BZ5bKLly.js} +197 -209
- package/dist/{SchedulePositionPage-BshUCd_C.js → SchedulePositionPage-CwHd3rf2.js} +3 -3
- package/dist/{SelectFilter-D9T0nFvG.js → SelectFilter-DLZNvKwI.js} +2 -3
- package/dist/TeamMemberList-D8uWsS0J.js +2082 -0
- package/dist/TimesheetList-K6doo0BX.js +408 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BLqgALLe.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-DFoIix3D.js} +7 -7
- package/dist/{app-n6d4AmtP.js → app-BGzac7xv.js} +5618 -4632
- package/dist/app.js +1 -1
- package/dist/{approval-code-1j1OoXt1.js → approval-code-BBNbWSqR.js} +4 -4
- package/dist/{dayjs.min-DdNivv4b.js → dayjs.min-ey-9Jb-9.js} +20 -20
- package/dist/employee-D_COMGXq.js +237 -0
- package/dist/{grant-user-BmTyexk3.js → grant-user-CTTTpewT.js} +2 -2
- package/dist/{iteration-y_jodvfN.js → index-CTqdA7gA.js} +573 -558
- package/dist/{lodash-B2eWEGH4.js → lodash-DNSDZgnL.js} +1 -1
- package/dist/member-grant-5DnD17dB.js +54 -0
- package/dist/restaurant-qoOY3iMJ.js +49 -0
- package/dist/role-BEbd5Qsi.js +91 -0
- package/dist/rule-BLG5i_xT.js +845 -0
- package/dist/src/api/audit-log/index.d.ts +2 -0
- package/dist/src/api/my-pos-profile/index.d.ts +1 -3
- package/dist/src/composables/useTenant.d.ts +11 -0
- package/dist/src/helpers/employee-merge.d.ts +33 -0
- package/dist/src/helpers/iteration.d.ts +9 -2
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
- package/dist/src/helpers/role-merge.d.ts +11 -0
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/router/courtGuard.d.ts +4 -0
- package/dist/src/stores/approval-code.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +2 -2
- package/dist/src/stores/grant-user.d.ts +1 -1
- package/dist/src/stores/permission-assignment.d.ts +2 -2
- package/dist/src/stores/permission-set.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +2 -2
- package/dist/src/stores/role.d.ts +2 -2
- package/dist/src/stores/team.d.ts +2 -2
- package/dist/src/stores/timesheet.d.ts +2 -2
- package/dist/src/types/my-pos-profile.d.ts +2 -3
- package/dist/src/views/audit-log/constants.d.ts +1 -1
- package/dist/src/views/audit-log/locales/index.d.ts +56 -0
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
- package/dist/src/views/hr/locales/index.d.ts +4 -4
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
- package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BPARQyvJ.js → useAppStore-BwUs5XGY.js} +1 -1
- package/dist/{useLoading-iPESFb6R.js → useLoading-DmAqc_Gx.js} +1 -1
- package/dist/useMessage-_ywT_N9X.js +17 -0
- package/dist/useReportPermissions-PEzIBX1U.js +80 -0
- package/dist/useSsoProviders-CwLbvOdH.js +41 -0
- package/package.json +5 -5
- package/dist/AuditLogList-C9C2emU9.js +0 -1950
- package/dist/MyPosProfile-BQCBFMFw.js +0 -301
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ZSREAS1r.js +0 -4243
- package/dist/TeamMemberList-C970Iqlj.js +0 -2086
- package/dist/TimesheetList-nxhr0EWj.js +0 -402
- package/dist/employee-BlfleiCU.js +0 -210
- package/dist/member-grant-CzZUdO_s.js +0 -55
- package/dist/restaurant-Dl6yx37M.js +0 -51
- package/dist/role-DfZi7Ssk.js +0 -93
- package/dist/rule-ChmhcGgA.js +0 -788
- package/dist/useReportPermissions-By-BoJZb.js +0 -82
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as h, watch as ue, resolveComponent as b, createBlock as de, openBlock as ee, unref as
|
|
2
|
-
import { useI18n as se
|
|
3
|
-
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as Z, ref as v, computed as h, watch as ue, resolveComponent as b, createBlock as de, openBlock as ee, unref as l, withCtx as k, createVNode as m, createElementVNode as P, toDisplayString as J, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
|
|
2
|
+
import { useI18n as se } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as Q } from "@feedmepos/ui-library";
|
|
4
|
+
import { h as X, u as he, _ as be, s as _e } from "./app-BGzac7xv.js";
|
|
5
5
|
import { _ as ge } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
import { u as ie,
|
|
8
|
-
import { l as
|
|
9
|
-
import { c as Ve } from "./
|
|
6
|
+
import { _ as ye } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
|
+
import { u as ie, P as W, a as ae, p as Y, $ as Pe, H as we, R as B, B as xe, x as Fe, T as ke, E as Ce, m as Ie } from "./rule-BLG5i_xT.js";
|
|
8
|
+
import { l as $ } from "./lodash-DNSDZgnL.js";
|
|
9
|
+
import { c as Ve } from "./index-CTqdA7gA.js";
|
|
10
10
|
import { u as Re } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
const
|
|
11
|
+
import { u as je } from "./useLoading-DmAqc_Gx.js";
|
|
12
|
+
import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JgrJvMly.js";
|
|
13
|
+
const $e = { class: "flex w-full items-center justify-between" }, Le = { class: "fm-typo-en-title-md-600" }, Te = { class: "fm-typo-en-title-sm-600 mt-24" }, Be = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
|
|
14
14
|
__name: "PermissionSetForm",
|
|
15
15
|
props: {
|
|
16
16
|
modelValue: {
|
|
@@ -18,26 +18,26 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
18
18
|
default: () => ({})
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const o =
|
|
21
|
+
setup(M, { expose: A }) {
|
|
22
|
+
const o = M, { t: i } = se(), f = v(!1), L = h(() => {
|
|
23
23
|
var e;
|
|
24
24
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
25
|
-
}),
|
|
25
|
+
}), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V = je(D), r = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), T = [(e) => !!e || i("permissionSet.form.nameRequired")], N = h(() => {
|
|
26
26
|
var e;
|
|
27
27
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
28
|
-
}),
|
|
29
|
-
() =>
|
|
28
|
+
}), q = h(
|
|
29
|
+
() => r.permissionSets.value.filter((e) => {
|
|
30
30
|
var s;
|
|
31
31
|
return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
|
|
32
32
|
}).map((e) => ({ label: e.name, value: e.id }))
|
|
33
|
-
),
|
|
34
|
-
() =>
|
|
33
|
+
), R = h(
|
|
34
|
+
() => W(a.value, r.permissionSets.value)
|
|
35
35
|
), {
|
|
36
36
|
fetchCustomReportPermissions: n,
|
|
37
37
|
customReportPermissions: t,
|
|
38
38
|
isLoaded: c
|
|
39
39
|
} = ae(), _ = new Set(
|
|
40
|
-
Y.filter((e) => e.subject.startsWith(
|
|
40
|
+
Y.filter((e) => e.subject.startsWith(Pe)).map((e) => e.subject)
|
|
41
41
|
), g = h(() => {
|
|
42
42
|
const e = new Set(_);
|
|
43
43
|
for (const s of t.value) e.add(s.subject);
|
|
@@ -45,19 +45,19 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
45
45
|
}), z = h(() => {
|
|
46
46
|
const e = /* @__PURE__ */ new Set();
|
|
47
47
|
for (const s of Y)
|
|
48
|
-
s.category ===
|
|
48
|
+
s.category === X.reports && e.add(s.subject);
|
|
49
49
|
for (const s of t.value)
|
|
50
|
-
s.category ===
|
|
50
|
+
s.category === X.reports && e.add(s.subject);
|
|
51
51
|
return e;
|
|
52
|
-
}),
|
|
53
|
-
async function
|
|
52
|
+
}), y = v({ name: "", permissionSetIds: [], userPermissions: [] });
|
|
53
|
+
async function O() {
|
|
54
54
|
var s, u;
|
|
55
55
|
await pe(), f.value = !f.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
56
56
|
const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
|
|
57
57
|
p.value = we(
|
|
58
|
-
|
|
58
|
+
B(R.value),
|
|
59
59
|
e
|
|
60
|
-
),
|
|
60
|
+
), y.value = {
|
|
61
61
|
name: d.value.name ?? "",
|
|
62
62
|
permissionSetIds: [...a.value],
|
|
63
63
|
userPermissions: Ve(p.value)
|
|
@@ -66,39 +66,39 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
66
66
|
ue(f, async (e) => {
|
|
67
67
|
e && await n();
|
|
68
68
|
});
|
|
69
|
-
const
|
|
70
|
-
() =>
|
|
69
|
+
const U = Re(
|
|
70
|
+
() => !$.isEqual(d.value.name ?? "", y.value.name) || !$.isEqual(a.value, y.value.permissionSetIds) || !$.isEqual(p.value, y.value.userPermissions),
|
|
71
71
|
() => {
|
|
72
72
|
f.value = !1;
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
|
-
function
|
|
76
|
-
const e =
|
|
75
|
+
function le() {
|
|
76
|
+
const e = B(R.value), s = c.value ? g.value : _, u = xe(p.value, s), x = Fe(u, z.value), F = ke(x);
|
|
77
77
|
return Ce(e, F);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
81
|
-
|
|
79
|
+
function K(e) {
|
|
80
|
+
return B(
|
|
81
|
+
W(e, r.permissionSets.value)
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
p.value =
|
|
84
|
+
function H(e) {
|
|
85
|
+
p.value = K(e);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function re(e) {
|
|
88
88
|
const s = [...e ?? []];
|
|
89
|
-
if (
|
|
90
|
-
const u =
|
|
89
|
+
if ($.isEqual(s, a.value)) return;
|
|
90
|
+
const u = !$.isEqual(
|
|
91
91
|
p.value,
|
|
92
|
-
|
|
92
|
+
K(a.value)
|
|
93
93
|
);
|
|
94
94
|
if (a.value = s, !u) {
|
|
95
|
-
|
|
95
|
+
H(s);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
w.open({
|
|
99
99
|
title: i("permissionSet.form.overrideInherited.title"),
|
|
100
100
|
message: i("permissionSet.form.overrideInherited.message"),
|
|
101
|
-
minWidth:
|
|
101
|
+
minWidth: I.value.lg ? 588 : 0,
|
|
102
102
|
primaryActions: {
|
|
103
103
|
text: i("permissionSet.form.overrideInherited.override"),
|
|
104
104
|
close: !1
|
|
@@ -108,103 +108,103 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
108
108
|
close: !0
|
|
109
109
|
}
|
|
110
110
|
}).onPrimary(() => {
|
|
111
|
-
|
|
111
|
+
H(s), w.close();
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
async function me() {
|
|
115
|
-
var u
|
|
116
|
-
const e = await ((u =
|
|
117
|
-
!(e != null && e.length) && s &&
|
|
118
|
-
var
|
|
119
|
-
const
|
|
120
|
-
if ((
|
|
121
|
-
const
|
|
115
|
+
var u;
|
|
116
|
+
const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = he().id.value;
|
|
117
|
+
!(e != null && e.length) && s && V.minor(async () => {
|
|
118
|
+
var F;
|
|
119
|
+
const x = le();
|
|
120
|
+
if ((F = o.modelValue) != null && F.id) {
|
|
121
|
+
const j = {
|
|
122
122
|
name: d.value.name,
|
|
123
|
-
permissions:
|
|
123
|
+
permissions: x,
|
|
124
124
|
permissionSetIds: a.value,
|
|
125
125
|
businessId: d.value.businessId
|
|
126
126
|
};
|
|
127
|
-
await
|
|
127
|
+
await r.updatePermissionSet(o.modelValue.id, j);
|
|
128
128
|
} else {
|
|
129
|
-
const
|
|
129
|
+
const j = {
|
|
130
130
|
name: d.value.name,
|
|
131
131
|
businessId: s,
|
|
132
|
-
permissions:
|
|
132
|
+
permissions: x,
|
|
133
133
|
permissionSetIds: a.value
|
|
134
134
|
};
|
|
135
|
-
await
|
|
135
|
+
await r.createPermissionSet(j);
|
|
136
136
|
}
|
|
137
137
|
f.value = !1;
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
return
|
|
141
|
-
trigger:
|
|
140
|
+
return A({
|
|
141
|
+
trigger: O
|
|
142
142
|
}), (e, s) => {
|
|
143
|
-
const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"),
|
|
143
|
+
const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"), j = b("FmForm"), G = b("FmButton"), ce = b("FmSideSheet");
|
|
144
144
|
return ee(), de(ce, {
|
|
145
145
|
modelValue: f.value,
|
|
146
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
146
|
+
"onUpdate:modelValue": s[2] || (s[2] = (E) => f.value = E),
|
|
147
147
|
"max-width": 960,
|
|
148
148
|
"close-button": !1,
|
|
149
|
-
"onOn:clickedAway":
|
|
149
|
+
"onOn:clickedAway": l(U)
|
|
150
150
|
}, {
|
|
151
|
-
"side-sheet-header":
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
"side-sheet-header": k(() => [
|
|
152
|
+
P("div", $e, [
|
|
153
|
+
P("p", Le, J(L.value), 1),
|
|
154
154
|
m(u, {
|
|
155
155
|
name: "close",
|
|
156
156
|
size: "md",
|
|
157
157
|
class: "cursor-pointer",
|
|
158
|
-
onClick:
|
|
158
|
+
onClick: l(U)
|
|
159
159
|
}, null, 8, ["onClick"])
|
|
160
160
|
])
|
|
161
161
|
]),
|
|
162
|
-
"side-sheet-footer":
|
|
163
|
-
|
|
164
|
-
m(
|
|
162
|
+
"side-sheet-footer": k(() => [
|
|
163
|
+
P("div", Be, [
|
|
164
|
+
m(G, {
|
|
165
165
|
label: N.value,
|
|
166
166
|
size: "md",
|
|
167
167
|
variant: "primary",
|
|
168
168
|
type: "submit",
|
|
169
169
|
onClick: me
|
|
170
170
|
}, null, 8, ["label"]),
|
|
171
|
-
m(
|
|
172
|
-
label:
|
|
171
|
+
m(G, {
|
|
172
|
+
label: l(i)("common.cancel"),
|
|
173
173
|
size: "md",
|
|
174
174
|
variant: "secondary",
|
|
175
|
-
onClick:
|
|
175
|
+
onClick: l(U)
|
|
176
176
|
}, null, 8, ["label", "onClick"])
|
|
177
177
|
])
|
|
178
178
|
]),
|
|
179
|
-
default:
|
|
180
|
-
m(
|
|
179
|
+
default: k(() => [
|
|
180
|
+
m(j, {
|
|
181
181
|
ref_key: "formRef",
|
|
182
|
-
ref:
|
|
182
|
+
ref: C
|
|
183
183
|
}, {
|
|
184
|
-
default:
|
|
184
|
+
default: k(() => [
|
|
185
185
|
m(x, {
|
|
186
186
|
modelValue: d.value.name,
|
|
187
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
188
|
-
label:
|
|
189
|
-
placeholder:
|
|
190
|
-
rules:
|
|
187
|
+
"onUpdate:modelValue": s[0] || (s[0] = (E) => d.value.name = E),
|
|
188
|
+
label: l(i)("permissionSet.form.name"),
|
|
189
|
+
placeholder: l(i)("permissionSet.form.namePlaceholder"),
|
|
190
|
+
rules: T
|
|
191
191
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
192
192
|
m(F, {
|
|
193
193
|
"model-value": a.value,
|
|
194
194
|
multiselect: "",
|
|
195
195
|
searchable: "",
|
|
196
196
|
"search-debounce": 300,
|
|
197
|
-
items:
|
|
198
|
-
label:
|
|
199
|
-
placeholder:
|
|
197
|
+
items: q.value,
|
|
198
|
+
label: l(i)("permissionSet.form.includedSets"),
|
|
199
|
+
placeholder: l(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
200
200
|
class: "mt-16",
|
|
201
|
-
"onUpdate:modelValue":
|
|
201
|
+
"onUpdate:modelValue": re
|
|
202
202
|
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
203
|
-
|
|
204
|
-
m(
|
|
203
|
+
P("div", Te, J(l(i)("team.memberForm.permissions.title")), 1),
|
|
204
|
+
m(Ee, {
|
|
205
205
|
modelValue: p.value,
|
|
206
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
207
|
-
"inherit-permissions":
|
|
206
|
+
"onUpdate:modelValue": s[1] || (s[1] = (E) => p.value = E),
|
|
207
|
+
"inherit-permissions": R.value,
|
|
208
208
|
class: "mt-16"
|
|
209
209
|
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
210
210
|
]),
|
|
@@ -215,24 +215,24 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
215
215
|
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
}), De = { class: "space-y-8" },
|
|
218
|
+
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, qe = { class: "flex flex-col h-full overflow-auto" }, Ze = /* @__PURE__ */ Z({
|
|
219
219
|
__name: "PermissionSetList",
|
|
220
|
-
setup(
|
|
221
|
-
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(),
|
|
220
|
+
setup(M, { expose: A }) {
|
|
221
|
+
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), L = oe(), C = te(), { breakpoints: D } = ne(), w = v(""), I = h(() => {
|
|
222
222
|
var n;
|
|
223
223
|
return (n = d.value) == null ? void 0 : n.filter((t) => {
|
|
224
224
|
const c = w.value.toLowerCase();
|
|
225
225
|
return t.name.toLowerCase().includes(c);
|
|
226
226
|
});
|
|
227
|
-
}),
|
|
228
|
-
() =>
|
|
227
|
+
}), V = v(), r = ie(), d = h(
|
|
228
|
+
() => r.permissionSets.value
|
|
229
229
|
), a = v();
|
|
230
230
|
async function p() {
|
|
231
|
-
await
|
|
231
|
+
await r.readPermissionSets();
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function T(n) {
|
|
234
234
|
var t;
|
|
235
|
-
a.value = n, (t =
|
|
235
|
+
a.value = n, (t = V.value) == null || t.trigger();
|
|
236
236
|
}
|
|
237
237
|
const N = [
|
|
238
238
|
{
|
|
@@ -244,27 +244,27 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
244
244
|
header: () => o("permissionSet.table.columns.permissions"),
|
|
245
245
|
enableSorting: !1,
|
|
246
246
|
cell(n) {
|
|
247
|
-
const t = n.row.original, c =
|
|
247
|
+
const t = n.row.original, c = W(
|
|
248
248
|
[t.id],
|
|
249
|
-
|
|
250
|
-
), _ =
|
|
249
|
+
r.permissionSets.value
|
|
250
|
+
), _ = B(c), g = _.length, z = Ie(
|
|
251
251
|
_,
|
|
252
252
|
i.value
|
|
253
253
|
);
|
|
254
254
|
return S("div", { class: "flex items-center gap-8" }, [
|
|
255
255
|
S("span", o("team.labels.allowed", { count: g })),
|
|
256
256
|
S(
|
|
257
|
-
|
|
257
|
+
Q.FmTooltip,
|
|
258
258
|
{ variant: "plain", placement: "top" },
|
|
259
259
|
{
|
|
260
|
-
default: () => S(
|
|
260
|
+
default: () => S(Q.FmIcon, {
|
|
261
261
|
name: "info",
|
|
262
262
|
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
263
263
|
}),
|
|
264
264
|
content: () => S("div", [
|
|
265
265
|
o("team.labels.permission"),
|
|
266
266
|
...z.map(
|
|
267
|
-
(
|
|
267
|
+
(y, O) => S("div", { key: `${y}-${O}` }, `- ${y}`)
|
|
268
268
|
)
|
|
269
269
|
])
|
|
270
270
|
}
|
|
@@ -288,12 +288,12 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
288
288
|
onClick: (c) => c.stopPropagation()
|
|
289
289
|
},
|
|
290
290
|
[
|
|
291
|
-
S(
|
|
291
|
+
S(ye, {
|
|
292
292
|
items: [
|
|
293
|
-
{ label: o("common.update"), onClick: () =>
|
|
293
|
+
{ label: o("common.update"), onClick: () => T(t) },
|
|
294
294
|
{
|
|
295
295
|
label: o("common.remove"),
|
|
296
|
-
onClick: () =>
|
|
296
|
+
onClick: () => R(t),
|
|
297
297
|
itemClass: "text-fm-color-typo-error"
|
|
298
298
|
}
|
|
299
299
|
]
|
|
@@ -304,15 +304,15 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
304
304
|
enableSorting: !1
|
|
305
305
|
}
|
|
306
306
|
];
|
|
307
|
-
function
|
|
307
|
+
function q() {
|
|
308
308
|
var n;
|
|
309
|
-
a.value = void 0, (n =
|
|
309
|
+
a.value = void 0, (n = V.value) == null || n.trigger();
|
|
310
310
|
}
|
|
311
|
-
async function
|
|
312
|
-
|
|
311
|
+
async function R(n) {
|
|
312
|
+
C.open({
|
|
313
313
|
title: o("permissionSet.form.delete.title"),
|
|
314
314
|
message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
315
|
-
minWidth:
|
|
315
|
+
minWidth: D.value.lg ? 588 : 0,
|
|
316
316
|
primaryActions: {
|
|
317
317
|
text: o("common.remove"),
|
|
318
318
|
close: !1,
|
|
@@ -321,7 +321,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
321
321
|
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
322
322
|
}).onPrimary(async () => {
|
|
323
323
|
try {
|
|
324
|
-
await
|
|
324
|
+
await r.deletePermissionSet(n.id), L.open({
|
|
325
325
|
message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
326
326
|
type: "success"
|
|
327
327
|
});
|
|
@@ -329,53 +329,53 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
329
329
|
const c = t instanceof _e && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
|
|
330
330
|
permissionSetName: n.name
|
|
331
331
|
}) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
|
|
332
|
-
|
|
332
|
+
L.open({ message: c, type: "error" });
|
|
333
333
|
}
|
|
334
|
-
|
|
334
|
+
C.close();
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
return fe(() => {
|
|
338
338
|
p(), f();
|
|
339
|
-
}),
|
|
340
|
-
create:
|
|
339
|
+
}), A({
|
|
340
|
+
create: q
|
|
341
341
|
}), (n, t) => {
|
|
342
342
|
const c = b("FmSearch"), _ = b("FmTable");
|
|
343
343
|
return ee(), ve(Se, null, [
|
|
344
344
|
m(Ae, {
|
|
345
345
|
ref_key: "permissionSetFormRef",
|
|
346
|
-
ref:
|
|
346
|
+
ref: V,
|
|
347
347
|
"model-value": a.value
|
|
348
348
|
}, null, 8, ["model-value"]),
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
P("div", De, [
|
|
350
|
+
P("div", Ne, [
|
|
351
351
|
m(c, {
|
|
352
352
|
modelValue: w.value,
|
|
353
353
|
"onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
|
|
354
354
|
class: "w-[320px] xs:w-full",
|
|
355
355
|
autofocus: "",
|
|
356
|
-
placeholder:
|
|
356
|
+
placeholder: l(o)("permissionSet.search.placeholder")
|
|
357
357
|
}, null, 8, ["modelValue", "placeholder"])
|
|
358
358
|
]),
|
|
359
359
|
m(be, null, {
|
|
360
|
-
default:
|
|
361
|
-
|
|
360
|
+
default: k(() => [
|
|
361
|
+
P("div", qe, [
|
|
362
362
|
m(ge, {
|
|
363
|
-
"is-loading": r
|
|
364
|
-
"is-empty":
|
|
363
|
+
"is-loading": l(r).isLoading.value,
|
|
364
|
+
"is-empty": I.value.length === 0,
|
|
365
365
|
"collapse-at": !1,
|
|
366
|
-
title:
|
|
367
|
-
subtitle:
|
|
366
|
+
title: l(o)("permissionSet.noData.title"),
|
|
367
|
+
subtitle: l(o)("permissionSet.noData.subtitle")
|
|
368
368
|
}, {
|
|
369
|
-
default:
|
|
369
|
+
default: k(() => [
|
|
370
370
|
m(_, {
|
|
371
371
|
"column-defs": N,
|
|
372
|
-
"row-data":
|
|
373
|
-
"page-size":
|
|
374
|
-
loading: r
|
|
372
|
+
"row-data": I.value,
|
|
373
|
+
"page-size": I.value.length,
|
|
374
|
+
loading: l(r).isLoading.value,
|
|
375
375
|
"pin-header-row": "",
|
|
376
376
|
"hide-footer": "",
|
|
377
377
|
"shrink-at": !1,
|
|
378
|
-
onRowClick: t[1] || (t[1] = (g) =>
|
|
378
|
+
onRowClick: t[1] || (t[1] = (g) => T(g.original))
|
|
379
379
|
}, null, 8, ["row-data", "page-size", "loading"])
|
|
380
380
|
]),
|
|
381
381
|
_: 1
|