@feedmepos/mf-hrm-portal 2.4.2-dev.2 → 2.4.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/{ApprovalCodeList-b8usXKo8.js → ApprovalCodeList-DGLPcQcv.js} +15 -14
- package/dist/{AuditLogList-DqbgzFAs.js → AuditLogList-ahJwTF7N.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-IPkyxwIF.js +438 -0
- package/dist/EmployeeList-B18mlY4V.js +776 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-Dvo9AiKf.js +45 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
- package/dist/{GrantUserList-B-p8Qghu.js → GrantUserList-C8BbP99C.js} +16 -15
- package/dist/{Main-D_EXStcl.js → Main-BA29_N_p.js} +2280 -2274
- package/dist/{Main-x6An4Vlq.js → Main-BN3b_yie.js} +5 -5
- package/dist/Main-Clux_qKN.js +96 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-D4Vdbk10.js → PermissionSetList-BSOJ8ftd.js} +108 -107
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Hz_rFmbH.js +4181 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BwuBk683.js +35 -0
- package/dist/RoleList-EnfxydGa.js +740 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DiWJzXvb.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-yIdd8r7y.js} +1 -1
- package/dist/{ScheduleGeneralPage-O7ohVH-K.js → ScheduleGeneralPage-CFUqm5-r.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DOkdX3vt.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BmPrGRG2.js} +186 -187
- package/dist/{SchedulePage-WT_Ttars.js → SchedulePage-DEFQwipO.js} +16 -16
- package/dist/{SchedulePositionPage-13qwxMn2.js → SchedulePositionPage-CM5NS5-F.js} +3 -3
- package/dist/{SelectFilter-DbE6YV-6.js → SelectFilter-DgjR5o5E.js} +1 -1
- package/dist/TeamMemberList-BKvhHLNG.js +1150 -0
- package/dist/TimesheetList-EQRMimP7.js +402 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-_tXql6vR.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BumkwWvb.js} +7 -7
- package/dist/{app-D-6Rxcbg.js → app-Bkc0pF3P.js} +3929 -7722
- package/dist/app.js +3 -3
- package/dist/{approval-code-Ba9JpPf4.js → approval-code-BKMu1GDn.js} +1 -1
- package/dist/{dayjs.min-dCnie4oC.js → dayjs.min-CkI2q2aC.js} +24 -24
- package/dist/employee-BfkxCdPL.js +209 -0
- package/dist/{grant-user-Dpla60s_.js → grant-user-ClN_vTOv.js} +1 -1
- package/dist/{index-D8G0ElDc.js → iteration-CsNIceUp.js} +558 -573
- package/dist/{lodash-CucBZWOa.js → lodash-BgraJgCc.js} +1 -1
- package/dist/restaurant-CRNgiIa4.js +2685 -0
- package/dist/role-CZYSdVn2.js +91 -0
- package/dist/rule-_4roLZrG.js +780 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
- package/dist/src/helpers/iteration.d.ts +2 -9
- package/dist/src/helpers/permission-set.d.ts +102 -1
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/helpers/string.d.ts +1 -10
- package/dist/src/router/shared.d.ts +1 -3
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +0 -30
- package/dist/src/types/team.d.ts +1 -17
- package/dist/src/views/audit-log/locales/index.d.ts +0 -12
- package/dist/src/views/hr/locales/index.d.ts +0 -20
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
- package/dist/src/views/team/locales/index.d.ts +0 -716
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
- package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
- package/dist/string-VNuQNweN.js +15 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-C_LStOtj.js → useAppStore-DYmF1kgk.js} +1 -1
- package/dist/{useLoading-CJ-DUrnR.js → useLoading-C2UKuAxD.js} +1 -1
- package/dist/{useReportPermissions-C7TLMKuR.js → useReportPermissions-BiaXRc0p.js} +22 -22
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-WeFI9muF.js +0 -459
- package/dist/EmployeeList-NM0guUbU.js +0 -896
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BCNKeDZY.js +0 -90
- package/dist/Main-BrhCJsik.js +0 -101
- package/dist/MyPosProfile-CG1PZ5p4.js +0 -360
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFyGZpKr.js +0 -4212
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CTxqUf16.js +0 -1797
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DUhqZaQv.js +0 -547
- package/dist/RoleList-DFcy90mE.js +0 -274
- package/dist/TeamMemberList-CWfXQcO3.js +0 -2082
- package/dist/TimesheetList-Bp2hRf7V.js +0 -408
- package/dist/employee-B5qCkaCi.js +0 -237
- package/dist/member-grant-CZILo1nC.js +0 -54
- package/dist/restaurant-CD6RZ8XG.js +0 -49
- package/dist/role-54DbS-Cy.js +0 -91
- package/dist/rule-DzTp1Kjh.js +0 -845
- package/dist/src/api/my-pos-profile/index.d.ts +0 -3
- package/dist/src/api/sso-provider/index.d.ts +0 -5
- package/dist/src/api/staff-invite/index.d.ts +0 -16
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
- package/dist/src/composables/useMenuAccess.d.ts +0 -56
- package/dist/src/composables/useSsoProviders.d.ts +0 -19
- package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
- package/dist/src/helpers/employee-merge.d.ts +0 -33
- package/dist/src/helpers/member-grant.d.ts +0 -36
- package/dist/src/helpers/my-pos-profile.d.ts +0 -37
- package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
- package/dist/src/helpers/restaurant-lookup.d.ts +0 -19
- package/dist/src/helpers/role-merge.d.ts +0 -11
- package/dist/src/helpers/staff-invite.d.ts +0 -54
- package/dist/src/router/menu-access-guard.d.ts +0 -17
- package/dist/src/types/my-pos-profile.d.ts +0 -24
- package/dist/src/types/sso-provider.d.ts +0 -10
- package/dist/src/types/staff-invite.d.ts +0 -100
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +0 -29
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +0 -2
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
- package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -236
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +0 -11
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
- package/dist/string-DZQ1uNjn.js +0 -22
- package/dist/useSsoProviders-DhmUc7LW.js +0 -41
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as
|
|
1
|
+
import { defineComponent as Z, ref as v, computed as b, watch as ue, resolveComponent as h, createBlock as de, openBlock as ee, unref as r, withCtx as k, createVNode as m, createElementVNode as y, toDisplayString as G, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
|
|
2
2
|
import { useI18n as se } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { u as ie,
|
|
8
|
-
import { l as
|
|
9
|
-
import { c as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
|
|
3
|
+
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as H } from "@feedmepos/ui-library";
|
|
4
|
+
import { d as Q, u as be, _ as he } from "./app-Bkc0pF3P.js";
|
|
5
|
+
import { _ as _e } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
6
|
+
import { _ as ge } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
|
+
import { u as ie, c as W, d as ae, p as Y, i as Pe, b as ye, m as A, n as we, o as xe, k as Fe, l as ke, v as Ce } from "./rule-_4roLZrG.js";
|
|
8
|
+
import { l as T } from "./lodash-BgraJgCc.js";
|
|
9
|
+
import { c as Ie } from "./iteration-CsNIceUp.js";
|
|
10
|
+
import { u as Ve } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
11
|
+
import { u as Re } from "./useLoading-C2UKuAxD.js";
|
|
12
|
+
import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Hz_rFmbH.js";
|
|
13
|
+
import { A as je } from "./restaurant-CRNgiIa4.js";
|
|
14
|
+
const Te = { class: "flex w-full items-center justify-between" }, $e = { class: "fm-typo-en-title-md-600" }, Le = { class: "fm-typo-en-title-sm-600 mt-24" }, Ae = { class: "flex items-center justify-start gap-8" }, Be = /* @__PURE__ */ Z({
|
|
14
15
|
__name: "PermissionSetForm",
|
|
15
16
|
props: {
|
|
16
17
|
modelValue: {
|
|
@@ -18,81 +19,81 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
18
19
|
default: () => ({})
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
|
-
setup(M, { expose:
|
|
22
|
-
const o = M, { t: i } = se(), f = v(!1),
|
|
22
|
+
setup(M, { expose: B }) {
|
|
23
|
+
const o = M, { t: i } = se(), f = v(!1), $ = b(() => {
|
|
23
24
|
var e;
|
|
24
25
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
25
|
-
}), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V =
|
|
26
|
+
}), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V = Re(D), l = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), L = [(e) => !!e || i("permissionSet.form.nameRequired")], N = b(() => {
|
|
26
27
|
var e;
|
|
27
28
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
28
|
-
}),
|
|
29
|
-
() =>
|
|
29
|
+
}), O = b(
|
|
30
|
+
() => l.permissionSets.value.filter((e) => {
|
|
30
31
|
var s;
|
|
31
32
|
return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
|
|
32
33
|
}).map((e) => ({ label: e.name, value: e.id }))
|
|
33
|
-
), R =
|
|
34
|
-
() => W(a.value,
|
|
34
|
+
), R = b(
|
|
35
|
+
() => W(a.value, l.permissionSets.value)
|
|
35
36
|
), {
|
|
36
37
|
fetchCustomReportPermissions: n,
|
|
37
38
|
customReportPermissions: t,
|
|
38
39
|
isLoaded: c
|
|
39
40
|
} = ae(), _ = new Set(
|
|
40
41
|
Y.filter((e) => e.subject.startsWith(Pe)).map((e) => e.subject)
|
|
41
|
-
), g =
|
|
42
|
+
), g = b(() => {
|
|
42
43
|
const e = new Set(_);
|
|
43
44
|
for (const s of t.value) e.add(s.subject);
|
|
44
45
|
return e;
|
|
45
|
-
}),
|
|
46
|
+
}), q = b(() => {
|
|
46
47
|
const e = /* @__PURE__ */ new Set();
|
|
47
48
|
for (const s of Y)
|
|
48
|
-
s.category ===
|
|
49
|
+
s.category === Q.reports && e.add(s.subject);
|
|
49
50
|
for (const s of t.value)
|
|
50
|
-
s.category ===
|
|
51
|
+
s.category === Q.reports && e.add(s.subject);
|
|
51
52
|
return e;
|
|
52
|
-
}),
|
|
53
|
-
async function
|
|
53
|
+
}), P = v({ name: "", permissionSetIds: [], userPermissions: [] });
|
|
54
|
+
async function z() {
|
|
54
55
|
var s, u;
|
|
55
56
|
await pe(), f.value = !f.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
56
57
|
const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
|
|
57
|
-
p.value =
|
|
58
|
-
|
|
58
|
+
p.value = ye(
|
|
59
|
+
A(R.value),
|
|
59
60
|
e
|
|
60
|
-
),
|
|
61
|
+
), P.value = {
|
|
61
62
|
name: d.value.name ?? "",
|
|
62
63
|
permissionSetIds: [...a.value],
|
|
63
|
-
userPermissions:
|
|
64
|
+
userPermissions: Ie(p.value)
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
ue(f, async (e) => {
|
|
67
68
|
e && await n();
|
|
68
69
|
});
|
|
69
|
-
const U =
|
|
70
|
-
() =>
|
|
70
|
+
const U = Ve(
|
|
71
|
+
() => !T.isEqual(d.value.name ?? "", P.value.name) || !T.isEqual(a.value, P.value.permissionSetIds) || !T.isEqual(p.value, P.value.userPermissions),
|
|
71
72
|
() => {
|
|
72
73
|
f.value = !1;
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
|
-
function
|
|
76
|
-
const e =
|
|
77
|
-
return
|
|
76
|
+
function re() {
|
|
77
|
+
const e = A(R.value), s = c.value ? g.value : _, u = we(p.value, s), x = xe(u, q.value), F = Fe(x);
|
|
78
|
+
return ke(e, F);
|
|
78
79
|
}
|
|
79
80
|
function K(e) {
|
|
80
|
-
return
|
|
81
|
-
W(e,
|
|
81
|
+
return A(
|
|
82
|
+
W(e, l.permissionSets.value)
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function J(e) {
|
|
85
86
|
p.value = K(e);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function le(e) {
|
|
88
89
|
const s = [...e ?? []];
|
|
89
|
-
if (
|
|
90
|
-
const u =
|
|
90
|
+
if (T.isEqual(s, a.value)) return;
|
|
91
|
+
const u = !T.isEqual(
|
|
91
92
|
p.value,
|
|
92
93
|
K(a.value)
|
|
93
94
|
);
|
|
94
95
|
if (a.value = s, !u) {
|
|
95
|
-
|
|
96
|
+
J(s);
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
99
|
w.open({
|
|
@@ -108,102 +109,102 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
108
109
|
close: !0
|
|
109
110
|
}
|
|
110
111
|
}).onPrimary(() => {
|
|
111
|
-
|
|
112
|
+
J(s), w.close();
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
async function me() {
|
|
115
116
|
var u;
|
|
116
|
-
const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s =
|
|
117
|
+
const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = be().id.value;
|
|
117
118
|
!(e != null && e.length) && s && V.minor(async () => {
|
|
118
119
|
var F;
|
|
119
|
-
const x =
|
|
120
|
+
const x = re();
|
|
120
121
|
if ((F = o.modelValue) != null && F.id) {
|
|
121
|
-
const
|
|
122
|
+
const E = {
|
|
122
123
|
name: d.value.name,
|
|
123
124
|
permissions: x,
|
|
124
125
|
permissionSetIds: a.value,
|
|
125
126
|
businessId: d.value.businessId
|
|
126
127
|
};
|
|
127
|
-
await
|
|
128
|
+
await l.updatePermissionSet(o.modelValue.id, E);
|
|
128
129
|
} else {
|
|
129
|
-
const
|
|
130
|
+
const E = {
|
|
130
131
|
name: d.value.name,
|
|
131
132
|
businessId: s,
|
|
132
133
|
permissions: x,
|
|
133
134
|
permissionSetIds: a.value
|
|
134
135
|
};
|
|
135
|
-
await
|
|
136
|
+
await l.createPermissionSet(E);
|
|
136
137
|
}
|
|
137
138
|
f.value = !1;
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
return
|
|
141
|
-
trigger:
|
|
141
|
+
return B({
|
|
142
|
+
trigger: z
|
|
142
143
|
}), (e, s) => {
|
|
143
|
-
const u =
|
|
144
|
+
const u = h("FmIcon"), x = h("FmTextField"), F = h("FmSelect"), E = h("FmForm"), X = h("FmButton"), ce = h("FmSideSheet");
|
|
144
145
|
return ee(), de(ce, {
|
|
145
146
|
modelValue: f.value,
|
|
146
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
147
|
+
"onUpdate:modelValue": s[2] || (s[2] = (j) => f.value = j),
|
|
147
148
|
"max-width": 960,
|
|
148
149
|
"close-button": !1,
|
|
149
|
-
"onOn:clickedAway":
|
|
150
|
+
"onOn:clickedAway": r(U)
|
|
150
151
|
}, {
|
|
151
152
|
"side-sheet-header": k(() => [
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
y("div", Te, [
|
|
154
|
+
y("p", $e, G($.value), 1),
|
|
154
155
|
m(u, {
|
|
155
156
|
name: "close",
|
|
156
157
|
size: "md",
|
|
157
158
|
class: "cursor-pointer",
|
|
158
|
-
onClick:
|
|
159
|
+
onClick: r(U)
|
|
159
160
|
}, null, 8, ["onClick"])
|
|
160
161
|
])
|
|
161
162
|
]),
|
|
162
163
|
"side-sheet-footer": k(() => [
|
|
163
|
-
|
|
164
|
-
m(
|
|
164
|
+
y("div", Ae, [
|
|
165
|
+
m(X, {
|
|
165
166
|
label: N.value,
|
|
166
167
|
size: "md",
|
|
167
168
|
variant: "primary",
|
|
168
169
|
type: "submit",
|
|
169
170
|
onClick: me
|
|
170
171
|
}, null, 8, ["label"]),
|
|
171
|
-
m(
|
|
172
|
-
label:
|
|
172
|
+
m(X, {
|
|
173
|
+
label: r(i)("common.cancel"),
|
|
173
174
|
size: "md",
|
|
174
175
|
variant: "secondary",
|
|
175
|
-
onClick:
|
|
176
|
+
onClick: r(U)
|
|
176
177
|
}, null, 8, ["label", "onClick"])
|
|
177
178
|
])
|
|
178
179
|
]),
|
|
179
180
|
default: k(() => [
|
|
180
|
-
m(
|
|
181
|
+
m(E, {
|
|
181
182
|
ref_key: "formRef",
|
|
182
183
|
ref: C
|
|
183
184
|
}, {
|
|
184
185
|
default: k(() => [
|
|
185
186
|
m(x, {
|
|
186
187
|
modelValue: d.value.name,
|
|
187
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
188
|
-
label:
|
|
189
|
-
placeholder:
|
|
190
|
-
rules:
|
|
188
|
+
"onUpdate:modelValue": s[0] || (s[0] = (j) => d.value.name = j),
|
|
189
|
+
label: r(i)("permissionSet.form.name"),
|
|
190
|
+
placeholder: r(i)("permissionSet.form.namePlaceholder"),
|
|
191
|
+
rules: L
|
|
191
192
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
192
193
|
m(F, {
|
|
193
194
|
"model-value": a.value,
|
|
194
195
|
multiselect: "",
|
|
195
196
|
searchable: "",
|
|
196
197
|
"search-debounce": 300,
|
|
197
|
-
items:
|
|
198
|
-
label:
|
|
199
|
-
placeholder:
|
|
198
|
+
items: O.value,
|
|
199
|
+
label: r(i)("permissionSet.form.includedSets"),
|
|
200
|
+
placeholder: r(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
200
201
|
class: "mt-16",
|
|
201
|
-
"onUpdate:modelValue":
|
|
202
|
+
"onUpdate:modelValue": le
|
|
202
203
|
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
203
|
-
|
|
204
|
+
y("div", Le, G(r(i)("team.memberForm.permissions.title")), 1),
|
|
204
205
|
m(Ee, {
|
|
205
206
|
modelValue: p.value,
|
|
206
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
207
|
+
"onUpdate:modelValue": s[1] || (s[1] = (j) => p.value = j),
|
|
207
208
|
"inherit-permissions": R.value,
|
|
208
209
|
class: "mt-16"
|
|
209
210
|
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
@@ -215,22 +216,22 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
215
216
|
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
216
217
|
};
|
|
217
218
|
}
|
|
218
|
-
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" },
|
|
219
|
+
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, Oe = { class: "flex flex-col h-full overflow-auto" }, es = /* @__PURE__ */ Z({
|
|
219
220
|
__name: "PermissionSetList",
|
|
220
|
-
setup(M, { expose:
|
|
221
|
-
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(),
|
|
221
|
+
setup(M, { expose: B }) {
|
|
222
|
+
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), $ = oe(), C = te(), { breakpoints: D } = ne(), w = v(""), I = b(() => {
|
|
222
223
|
var n;
|
|
223
224
|
return (n = d.value) == null ? void 0 : n.filter((t) => {
|
|
224
225
|
const c = w.value.toLowerCase();
|
|
225
226
|
return t.name.toLowerCase().includes(c);
|
|
226
227
|
});
|
|
227
|
-
}), V = v(),
|
|
228
|
-
() =>
|
|
228
|
+
}), V = v(), l = ie(), d = b(
|
|
229
|
+
() => l.permissionSets.value
|
|
229
230
|
), a = v();
|
|
230
231
|
async function p() {
|
|
231
|
-
await
|
|
232
|
+
await l.readPermissionSets();
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
+
function L(n) {
|
|
234
235
|
var t;
|
|
235
236
|
a.value = n, (t = V.value) == null || t.trigger();
|
|
236
237
|
}
|
|
@@ -246,25 +247,25 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
246
247
|
cell(n) {
|
|
247
248
|
const t = n.row.original, c = W(
|
|
248
249
|
[t.id],
|
|
249
|
-
|
|
250
|
-
), _ =
|
|
250
|
+
l.permissionSets.value
|
|
251
|
+
), _ = A(c), g = _.length, q = Ce(
|
|
251
252
|
_,
|
|
252
253
|
i.value
|
|
253
254
|
);
|
|
254
255
|
return S("div", { class: "flex items-center gap-8" }, [
|
|
255
256
|
S("span", o("team.labels.allowed", { count: g })),
|
|
256
257
|
S(
|
|
257
|
-
|
|
258
|
+
H.FmTooltip,
|
|
258
259
|
{ variant: "plain", placement: "top" },
|
|
259
260
|
{
|
|
260
|
-
default: () => S(
|
|
261
|
+
default: () => S(H.FmIcon, {
|
|
261
262
|
name: "info",
|
|
262
263
|
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
263
264
|
}),
|
|
264
265
|
content: () => S("div", [
|
|
265
266
|
o("team.labels.permission"),
|
|
266
|
-
...
|
|
267
|
-
(
|
|
267
|
+
...q.map(
|
|
268
|
+
(P, z) => S("div", { key: `${P}-${z}` }, `- ${P}`)
|
|
268
269
|
)
|
|
269
270
|
])
|
|
270
271
|
}
|
|
@@ -288,9 +289,9 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
288
289
|
onClick: (c) => c.stopPropagation()
|
|
289
290
|
},
|
|
290
291
|
[
|
|
291
|
-
S(
|
|
292
|
+
S(ge, {
|
|
292
293
|
items: [
|
|
293
|
-
{ label: o("common.update"), onClick: () =>
|
|
294
|
+
{ label: o("common.update"), onClick: () => L(t) },
|
|
294
295
|
{
|
|
295
296
|
label: o("common.remove"),
|
|
296
297
|
onClick: () => R(t),
|
|
@@ -304,7 +305,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
304
305
|
enableSorting: !1
|
|
305
306
|
}
|
|
306
307
|
];
|
|
307
|
-
function
|
|
308
|
+
function O() {
|
|
308
309
|
var n;
|
|
309
310
|
a.value = void 0, (n = V.value) == null || n.trigger();
|
|
310
311
|
}
|
|
@@ -321,61 +322,61 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
321
322
|
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
322
323
|
}).onPrimary(async () => {
|
|
323
324
|
try {
|
|
324
|
-
await
|
|
325
|
+
await l.deletePermissionSet(n.id), $.open({
|
|
325
326
|
message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
326
327
|
type: "success"
|
|
327
328
|
});
|
|
328
329
|
} catch (t) {
|
|
329
|
-
const c = t instanceof
|
|
330
|
+
const c = t instanceof je && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
|
|
330
331
|
permissionSetName: n.name
|
|
331
332
|
}) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
|
|
332
|
-
|
|
333
|
+
$.open({ message: c, type: "error" });
|
|
333
334
|
}
|
|
334
335
|
C.close();
|
|
335
336
|
});
|
|
336
337
|
}
|
|
337
338
|
return fe(() => {
|
|
338
339
|
p(), f();
|
|
339
|
-
}),
|
|
340
|
-
create:
|
|
340
|
+
}), B({
|
|
341
|
+
create: O
|
|
341
342
|
}), (n, t) => {
|
|
342
|
-
const c =
|
|
343
|
+
const c = h("FmSearch"), _ = h("FmTable");
|
|
343
344
|
return ee(), ve(Se, null, [
|
|
344
|
-
m(
|
|
345
|
+
m(Be, {
|
|
345
346
|
ref_key: "permissionSetFormRef",
|
|
346
347
|
ref: V,
|
|
347
348
|
"model-value": a.value
|
|
348
349
|
}, null, 8, ["model-value"]),
|
|
349
|
-
|
|
350
|
-
|
|
350
|
+
y("div", De, [
|
|
351
|
+
y("div", Ne, [
|
|
351
352
|
m(c, {
|
|
352
353
|
modelValue: w.value,
|
|
353
354
|
"onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
|
|
354
355
|
class: "w-[320px] xs:w-full",
|
|
355
356
|
autofocus: "",
|
|
356
|
-
placeholder:
|
|
357
|
+
placeholder: r(o)("permissionSet.search.placeholder")
|
|
357
358
|
}, null, 8, ["modelValue", "placeholder"])
|
|
358
359
|
]),
|
|
359
|
-
m(
|
|
360
|
+
m(he, null, {
|
|
360
361
|
default: k(() => [
|
|
361
|
-
|
|
362
|
-
m(
|
|
363
|
-
"is-loading": l
|
|
362
|
+
y("div", Oe, [
|
|
363
|
+
m(_e, {
|
|
364
|
+
"is-loading": r(l).isLoading.value,
|
|
364
365
|
"is-empty": I.value.length === 0,
|
|
365
366
|
"collapse-at": !1,
|
|
366
|
-
title:
|
|
367
|
-
subtitle:
|
|
367
|
+
title: r(o)("permissionSet.noData.title"),
|
|
368
|
+
subtitle: r(o)("permissionSet.noData.subtitle")
|
|
368
369
|
}, {
|
|
369
370
|
default: k(() => [
|
|
370
371
|
m(_, {
|
|
371
372
|
"column-defs": N,
|
|
372
373
|
"row-data": I.value,
|
|
373
374
|
"page-size": I.value.length,
|
|
374
|
-
loading: l
|
|
375
|
+
loading: r(l).isLoading.value,
|
|
375
376
|
"pin-header-row": "",
|
|
376
377
|
"hide-footer": "",
|
|
377
378
|
"shrink-at": !1,
|
|
378
|
-
onRowClick: t[1] || (t[1] = (g) =>
|
|
379
|
+
onRowClick: t[1] || (t[1] = (g) => L(g.original))
|
|
379
380
|
}, null, 8, ["row-data", "page-size", "loading"])
|
|
380
381
|
]),
|
|
381
382
|
_: 1
|
|
@@ -390,5 +391,5 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
390
391
|
}
|
|
391
392
|
});
|
|
392
393
|
export {
|
|
393
|
-
|
|
394
|
+
es as default
|
|
394
395
|
};
|