@feedmepos/mf-hrm-portal 2.4.1 → 2.4.2-dev
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-BgnhS8P1.js → ApprovalCodeList-DpNF0wL7.js} +14 -15
- package/dist/{AuditLogList-BMEw3z3C.js → AuditLogList-D2bUFsuK.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BjEJErcL.js +459 -0
- package/dist/EmployeeList-CBYU0R2j.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DsPLbLwQ.js +90 -0
- package/dist/{GrantUserList-DePGsJq1.js → GrantUserList-ClliuQ8h.js} +15 -16
- package/dist/{Main-hUOeiddV.js → Main-CBuOW87D.js} +2274 -2280
- package/dist/Main-D9MQo2l1.js +101 -0
- package/dist/{Main-BX2dD-ti.js → Main-DlPdGefL.js} +5 -5
- package/dist/MyPosProfile-IAPSqlBP.js +360 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BHOjAjHj.js → PermissionSetList-Dd0fkW0L.js} +107 -108
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CjQCbJRu.js +4212 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DJnIFlKq.js +1797 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-hE2OZwfO.js +547 -0
- package/dist/RoleList-zZHpt079.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B8dH021B.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-yJwTtFyF.js} +1 -1
- package/dist/{ScheduleGeneralPage-WJu4dwH_.js → ScheduleGeneralPage-_cqIJY8R.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DvcZjDJA.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C6M76KUA.js} +187 -186
- package/dist/{SchedulePage-BOiSyw9s.js → SchedulePage-DHkWe1KO.js} +16 -16
- package/dist/{SchedulePositionPage-NR8GaPxx.js → SchedulePositionPage-5JUJwlJc.js} +3 -3
- package/dist/{SelectFilter-xIFxmOuf.js → SelectFilter-DWRvb1Yl.js} +1 -1
- package/dist/TeamMemberList-C_4f5Djs.js +2082 -0
- package/dist/TimesheetList-B3Yx8cwt.js +408 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-fDOF4GYa.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-Co2GtU1N.js} +7 -7
- package/dist/{app-DJOt_dse.js → app-BA3UHSk0.js} +7680 -3886
- package/dist/app.js +3 -3
- package/dist/{approval-code-D3J-F40I.js → approval-code-BR4FD3sx.js} +1 -1
- package/dist/{dayjs.min-YpmHqmB1.js → dayjs.min-JyaQ6PUU.js} +34 -34
- package/dist/employee-n31b7QEp.js +237 -0
- package/dist/{grant-user-kU9gjiVw.js → grant-user-DKUZdzrY.js} +1 -1
- package/dist/{iteration-RLqokZ_t.js → index-CkC2sfPK.js} +573 -558
- package/dist/{lodash-C6YpC6VN.js → lodash-BJMVlo9i.js} +1 -1
- package/dist/member-grant-B1V9g0Sb.js +54 -0
- package/dist/restaurant-BbSg6yOm.js +49 -0
- package/dist/role-iTqgtFqf.js +91 -0
- package/dist/rule-BJhti6BZ.js +845 -0
- package/dist/src/api/my-pos-profile/index.d.ts +3 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +16 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
- package/dist/src/composables/useMenuAccess.d.ts +56 -0
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
- package/dist/src/helpers/employee-merge.d.ts +33 -0
- package/dist/src/helpers/iteration.d.ts +9 -2
- package/dist/src/helpers/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- 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/helpers/staff-invite.d.ts +54 -0
- package/dist/src/helpers/string.d.ts +10 -1
- package/dist/src/router/menu-access-guard.d.ts +17 -0
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +30 -0
- package/dist/src/types/my-pos-profile.d.ts +24 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/staff-invite.d.ts +100 -0
- package/dist/src/types/team.d.ts +17 -1
- package/dist/src/views/audit-log/locales/index.d.ts +12 -0
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
- 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 +11 -0
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
- package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
- package/dist/src/views/team/locales/index.d.ts +716 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
- package/dist/string-DZQ1uNjn.js +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-HpBmohxh.js → useAppStore-DiGaOhje.js} +1 -1
- package/dist/{useLoading-WAX5d520.js → useLoading-DOcoObCD.js} +1 -1
- package/dist/{useReportPermissions-C2eS3P4D.js → useReportPermissions-c9KGuXQq.js} +22 -22
- package/dist/useSsoProviders-CkhHtzRQ.js +41 -0
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DNA8eHc4.js +0 -438
- package/dist/EmployeeList-BXO4vI9g.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-D69N78Sp.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-DNViVR_m.js +0 -96
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bu7YDHSf.js +0 -4181
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-e6wGaXo3.js +0 -35
- package/dist/RoleList-Dx7Bstb_.js +0 -740
- package/dist/TeamMemberList-Dro66DME.js +0 -1150
- package/dist/TimesheetList-DO3uT60w.js +0 -402
- package/dist/employee-DfoS6h1_.js +0 -209
- package/dist/restaurant-D30tjUi3.js +0 -2685
- package/dist/role-DzH4jGCM.js +0 -91
- package/dist/rule-8KZ8d8qL.js +0 -780
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as
|
|
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
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
|
-
|
|
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({
|
|
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-BA3UHSk0.js";
|
|
5
|
+
import { _ as ge } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
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-BJhti6BZ.js";
|
|
8
|
+
import { l as $ } from "./lodash-BJMVlo9i.js";
|
|
9
|
+
import { c as Ve } from "./index-CkC2sfPK.js";
|
|
10
|
+
import { u as Re } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
11
|
+
import { u as je } from "./useLoading-DOcoObCD.js";
|
|
12
|
+
import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CjQCbJRu.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({
|
|
15
14
|
__name: "PermissionSetForm",
|
|
16
15
|
props: {
|
|
17
16
|
modelValue: {
|
|
@@ -19,81 +18,81 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
19
18
|
default: () => ({})
|
|
20
19
|
}
|
|
21
20
|
},
|
|
22
|
-
setup(M, { expose:
|
|
23
|
-
const o = M, { t: i } = se(), f = v(!1),
|
|
21
|
+
setup(M, { expose: A }) {
|
|
22
|
+
const o = M, { t: i } = se(), f = v(!1), L = h(() => {
|
|
24
23
|
var e;
|
|
25
24
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
26
|
-
}), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V =
|
|
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(() => {
|
|
27
26
|
var e;
|
|
28
27
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
29
|
-
}),
|
|
30
|
-
() =>
|
|
28
|
+
}), q = h(
|
|
29
|
+
() => r.permissionSets.value.filter((e) => {
|
|
31
30
|
var s;
|
|
32
31
|
return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
|
|
33
32
|
}).map((e) => ({ label: e.name, value: e.id }))
|
|
34
|
-
), R =
|
|
35
|
-
() => W(a.value,
|
|
33
|
+
), R = h(
|
|
34
|
+
() => W(a.value, r.permissionSets.value)
|
|
36
35
|
), {
|
|
37
36
|
fetchCustomReportPermissions: n,
|
|
38
37
|
customReportPermissions: t,
|
|
39
38
|
isLoaded: c
|
|
40
39
|
} = ae(), _ = new Set(
|
|
41
40
|
Y.filter((e) => e.subject.startsWith(Pe)).map((e) => e.subject)
|
|
42
|
-
), g =
|
|
41
|
+
), g = h(() => {
|
|
43
42
|
const e = new Set(_);
|
|
44
43
|
for (const s of t.value) e.add(s.subject);
|
|
45
44
|
return e;
|
|
46
|
-
}),
|
|
45
|
+
}), z = h(() => {
|
|
47
46
|
const e = /* @__PURE__ */ new Set();
|
|
48
47
|
for (const s of Y)
|
|
49
|
-
s.category ===
|
|
48
|
+
s.category === X.reports && e.add(s.subject);
|
|
50
49
|
for (const s of t.value)
|
|
51
|
-
s.category ===
|
|
50
|
+
s.category === X.reports && e.add(s.subject);
|
|
52
51
|
return e;
|
|
53
|
-
}),
|
|
54
|
-
async function
|
|
52
|
+
}), y = v({ name: "", permissionSetIds: [], userPermissions: [] });
|
|
53
|
+
async function O() {
|
|
55
54
|
var s, u;
|
|
56
55
|
await pe(), f.value = !f.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
57
56
|
const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
|
|
58
|
-
p.value =
|
|
59
|
-
|
|
57
|
+
p.value = we(
|
|
58
|
+
B(R.value),
|
|
60
59
|
e
|
|
61
|
-
),
|
|
60
|
+
), y.value = {
|
|
62
61
|
name: d.value.name ?? "",
|
|
63
62
|
permissionSetIds: [...a.value],
|
|
64
|
-
userPermissions:
|
|
63
|
+
userPermissions: Ve(p.value)
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
ue(f, async (e) => {
|
|
68
67
|
e && await n();
|
|
69
68
|
});
|
|
70
|
-
const U =
|
|
71
|
-
() =>
|
|
69
|
+
const U = Re(
|
|
70
|
+
() => !$.isEqual(d.value.name ?? "", y.value.name) || !$.isEqual(a.value, y.value.permissionSetIds) || !$.isEqual(p.value, y.value.userPermissions),
|
|
72
71
|
() => {
|
|
73
72
|
f.value = !1;
|
|
74
73
|
}
|
|
75
74
|
);
|
|
76
|
-
function
|
|
77
|
-
const e =
|
|
78
|
-
return
|
|
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
|
+
return Ce(e, F);
|
|
79
78
|
}
|
|
80
79
|
function K(e) {
|
|
81
|
-
return
|
|
82
|
-
W(e,
|
|
80
|
+
return B(
|
|
81
|
+
W(e, r.permissionSets.value)
|
|
83
82
|
);
|
|
84
83
|
}
|
|
85
|
-
function
|
|
84
|
+
function H(e) {
|
|
86
85
|
p.value = K(e);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
87
|
+
function re(e) {
|
|
89
88
|
const s = [...e ?? []];
|
|
90
|
-
if (
|
|
91
|
-
const u =
|
|
89
|
+
if ($.isEqual(s, a.value)) return;
|
|
90
|
+
const u = !$.isEqual(
|
|
92
91
|
p.value,
|
|
93
92
|
K(a.value)
|
|
94
93
|
);
|
|
95
94
|
if (a.value = s, !u) {
|
|
96
|
-
|
|
95
|
+
H(s);
|
|
97
96
|
return;
|
|
98
97
|
}
|
|
99
98
|
w.open({
|
|
@@ -109,102 +108,102 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
109
108
|
close: !0
|
|
110
109
|
}
|
|
111
110
|
}).onPrimary(() => {
|
|
112
|
-
|
|
111
|
+
H(s), w.close();
|
|
113
112
|
});
|
|
114
113
|
}
|
|
115
114
|
async function me() {
|
|
116
115
|
var u;
|
|
117
|
-
const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s =
|
|
116
|
+
const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = he().id.value;
|
|
118
117
|
!(e != null && e.length) && s && V.minor(async () => {
|
|
119
118
|
var F;
|
|
120
|
-
const x =
|
|
119
|
+
const x = le();
|
|
121
120
|
if ((F = o.modelValue) != null && F.id) {
|
|
122
|
-
const
|
|
121
|
+
const j = {
|
|
123
122
|
name: d.value.name,
|
|
124
123
|
permissions: x,
|
|
125
124
|
permissionSetIds: a.value,
|
|
126
125
|
businessId: d.value.businessId
|
|
127
126
|
};
|
|
128
|
-
await
|
|
127
|
+
await r.updatePermissionSet(o.modelValue.id, j);
|
|
129
128
|
} else {
|
|
130
|
-
const
|
|
129
|
+
const j = {
|
|
131
130
|
name: d.value.name,
|
|
132
131
|
businessId: s,
|
|
133
132
|
permissions: x,
|
|
134
133
|
permissionSetIds: a.value
|
|
135
134
|
};
|
|
136
|
-
await
|
|
135
|
+
await r.createPermissionSet(j);
|
|
137
136
|
}
|
|
138
137
|
f.value = !1;
|
|
139
138
|
});
|
|
140
139
|
}
|
|
141
|
-
return
|
|
142
|
-
trigger:
|
|
140
|
+
return A({
|
|
141
|
+
trigger: O
|
|
143
142
|
}), (e, s) => {
|
|
144
|
-
const u =
|
|
143
|
+
const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"), j = b("FmForm"), G = b("FmButton"), ce = b("FmSideSheet");
|
|
145
144
|
return ee(), de(ce, {
|
|
146
145
|
modelValue: f.value,
|
|
147
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
146
|
+
"onUpdate:modelValue": s[2] || (s[2] = (E) => f.value = E),
|
|
148
147
|
"max-width": 960,
|
|
149
148
|
"close-button": !1,
|
|
150
|
-
"onOn:clickedAway":
|
|
149
|
+
"onOn:clickedAway": l(U)
|
|
151
150
|
}, {
|
|
152
151
|
"side-sheet-header": k(() => [
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
P("div", $e, [
|
|
153
|
+
P("p", Le, J(L.value), 1),
|
|
155
154
|
m(u, {
|
|
156
155
|
name: "close",
|
|
157
156
|
size: "md",
|
|
158
157
|
class: "cursor-pointer",
|
|
159
|
-
onClick:
|
|
158
|
+
onClick: l(U)
|
|
160
159
|
}, null, 8, ["onClick"])
|
|
161
160
|
])
|
|
162
161
|
]),
|
|
163
162
|
"side-sheet-footer": k(() => [
|
|
164
|
-
|
|
165
|
-
m(
|
|
163
|
+
P("div", Be, [
|
|
164
|
+
m(G, {
|
|
166
165
|
label: N.value,
|
|
167
166
|
size: "md",
|
|
168
167
|
variant: "primary",
|
|
169
168
|
type: "submit",
|
|
170
169
|
onClick: me
|
|
171
170
|
}, null, 8, ["label"]),
|
|
172
|
-
m(
|
|
173
|
-
label:
|
|
171
|
+
m(G, {
|
|
172
|
+
label: l(i)("common.cancel"),
|
|
174
173
|
size: "md",
|
|
175
174
|
variant: "secondary",
|
|
176
|
-
onClick:
|
|
175
|
+
onClick: l(U)
|
|
177
176
|
}, null, 8, ["label", "onClick"])
|
|
178
177
|
])
|
|
179
178
|
]),
|
|
180
179
|
default: k(() => [
|
|
181
|
-
m(
|
|
180
|
+
m(j, {
|
|
182
181
|
ref_key: "formRef",
|
|
183
182
|
ref: C
|
|
184
183
|
}, {
|
|
185
184
|
default: k(() => [
|
|
186
185
|
m(x, {
|
|
187
186
|
modelValue: d.value.name,
|
|
188
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
189
|
-
label:
|
|
190
|
-
placeholder:
|
|
191
|
-
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
|
|
192
191
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
193
192
|
m(F, {
|
|
194
193
|
"model-value": a.value,
|
|
195
194
|
multiselect: "",
|
|
196
195
|
searchable: "",
|
|
197
196
|
"search-debounce": 300,
|
|
198
|
-
items:
|
|
199
|
-
label:
|
|
200
|
-
placeholder:
|
|
197
|
+
items: q.value,
|
|
198
|
+
label: l(i)("permissionSet.form.includedSets"),
|
|
199
|
+
placeholder: l(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
201
200
|
class: "mt-16",
|
|
202
|
-
"onUpdate:modelValue":
|
|
201
|
+
"onUpdate:modelValue": re
|
|
203
202
|
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
204
|
-
|
|
203
|
+
P("div", Te, J(l(i)("team.memberForm.permissions.title")), 1),
|
|
205
204
|
m(Ee, {
|
|
206
205
|
modelValue: p.value,
|
|
207
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
|
206
|
+
"onUpdate:modelValue": s[1] || (s[1] = (E) => p.value = E),
|
|
208
207
|
"inherit-permissions": R.value,
|
|
209
208
|
class: "mt-16"
|
|
210
209
|
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
@@ -216,22 +215,22 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
216
215
|
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
217
216
|
};
|
|
218
217
|
}
|
|
219
|
-
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" },
|
|
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({
|
|
220
219
|
__name: "PermissionSetList",
|
|
221
|
-
setup(M, { expose:
|
|
222
|
-
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(() => {
|
|
223
222
|
var n;
|
|
224
223
|
return (n = d.value) == null ? void 0 : n.filter((t) => {
|
|
225
224
|
const c = w.value.toLowerCase();
|
|
226
225
|
return t.name.toLowerCase().includes(c);
|
|
227
226
|
});
|
|
228
|
-
}), V = v(),
|
|
229
|
-
() =>
|
|
227
|
+
}), V = v(), r = ie(), d = h(
|
|
228
|
+
() => r.permissionSets.value
|
|
230
229
|
), a = v();
|
|
231
230
|
async function p() {
|
|
232
|
-
await
|
|
231
|
+
await r.readPermissionSets();
|
|
233
232
|
}
|
|
234
|
-
function
|
|
233
|
+
function T(n) {
|
|
235
234
|
var t;
|
|
236
235
|
a.value = n, (t = V.value) == null || t.trigger();
|
|
237
236
|
}
|
|
@@ -247,25 +246,25 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
247
246
|
cell(n) {
|
|
248
247
|
const t = n.row.original, c = W(
|
|
249
248
|
[t.id],
|
|
250
|
-
|
|
251
|
-
), _ =
|
|
249
|
+
r.permissionSets.value
|
|
250
|
+
), _ = B(c), g = _.length, z = Ie(
|
|
252
251
|
_,
|
|
253
252
|
i.value
|
|
254
253
|
);
|
|
255
254
|
return S("div", { class: "flex items-center gap-8" }, [
|
|
256
255
|
S("span", o("team.labels.allowed", { count: g })),
|
|
257
256
|
S(
|
|
258
|
-
|
|
257
|
+
Q.FmTooltip,
|
|
259
258
|
{ variant: "plain", placement: "top" },
|
|
260
259
|
{
|
|
261
|
-
default: () => S(
|
|
260
|
+
default: () => S(Q.FmIcon, {
|
|
262
261
|
name: "info",
|
|
263
262
|
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
264
263
|
}),
|
|
265
264
|
content: () => S("div", [
|
|
266
265
|
o("team.labels.permission"),
|
|
267
|
-
...
|
|
268
|
-
(
|
|
266
|
+
...z.map(
|
|
267
|
+
(y, O) => S("div", { key: `${y}-${O}` }, `- ${y}`)
|
|
269
268
|
)
|
|
270
269
|
])
|
|
271
270
|
}
|
|
@@ -289,9 +288,9 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
289
288
|
onClick: (c) => c.stopPropagation()
|
|
290
289
|
},
|
|
291
290
|
[
|
|
292
|
-
S(
|
|
291
|
+
S(ye, {
|
|
293
292
|
items: [
|
|
294
|
-
{ label: o("common.update"), onClick: () =>
|
|
293
|
+
{ label: o("common.update"), onClick: () => T(t) },
|
|
295
294
|
{
|
|
296
295
|
label: o("common.remove"),
|
|
297
296
|
onClick: () => R(t),
|
|
@@ -305,7 +304,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
305
304
|
enableSorting: !1
|
|
306
305
|
}
|
|
307
306
|
];
|
|
308
|
-
function
|
|
307
|
+
function q() {
|
|
309
308
|
var n;
|
|
310
309
|
a.value = void 0, (n = V.value) == null || n.trigger();
|
|
311
310
|
}
|
|
@@ -322,61 +321,61 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
322
321
|
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
323
322
|
}).onPrimary(async () => {
|
|
324
323
|
try {
|
|
325
|
-
await
|
|
324
|
+
await r.deletePermissionSet(n.id), L.open({
|
|
326
325
|
message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
327
326
|
type: "success"
|
|
328
327
|
});
|
|
329
328
|
} catch (t) {
|
|
330
|
-
const c = t instanceof
|
|
329
|
+
const c = t instanceof _e && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
|
|
331
330
|
permissionSetName: n.name
|
|
332
331
|
}) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
|
|
333
|
-
|
|
332
|
+
L.open({ message: c, type: "error" });
|
|
334
333
|
}
|
|
335
334
|
C.close();
|
|
336
335
|
});
|
|
337
336
|
}
|
|
338
337
|
return fe(() => {
|
|
339
338
|
p(), f();
|
|
340
|
-
}),
|
|
341
|
-
create:
|
|
339
|
+
}), A({
|
|
340
|
+
create: q
|
|
342
341
|
}), (n, t) => {
|
|
343
|
-
const c =
|
|
342
|
+
const c = b("FmSearch"), _ = b("FmTable");
|
|
344
343
|
return ee(), ve(Se, null, [
|
|
345
|
-
m(
|
|
344
|
+
m(Ae, {
|
|
346
345
|
ref_key: "permissionSetFormRef",
|
|
347
346
|
ref: V,
|
|
348
347
|
"model-value": a.value
|
|
349
348
|
}, null, 8, ["model-value"]),
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
P("div", De, [
|
|
350
|
+
P("div", Ne, [
|
|
352
351
|
m(c, {
|
|
353
352
|
modelValue: w.value,
|
|
354
353
|
"onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
|
|
355
354
|
class: "w-[320px] xs:w-full",
|
|
356
355
|
autofocus: "",
|
|
357
|
-
placeholder:
|
|
356
|
+
placeholder: l(o)("permissionSet.search.placeholder")
|
|
358
357
|
}, null, 8, ["modelValue", "placeholder"])
|
|
359
358
|
]),
|
|
360
|
-
m(
|
|
359
|
+
m(be, null, {
|
|
361
360
|
default: k(() => [
|
|
362
|
-
|
|
363
|
-
m(
|
|
364
|
-
"is-loading": r
|
|
361
|
+
P("div", qe, [
|
|
362
|
+
m(ge, {
|
|
363
|
+
"is-loading": l(r).isLoading.value,
|
|
365
364
|
"is-empty": I.value.length === 0,
|
|
366
365
|
"collapse-at": !1,
|
|
367
|
-
title:
|
|
368
|
-
subtitle:
|
|
366
|
+
title: l(o)("permissionSet.noData.title"),
|
|
367
|
+
subtitle: l(o)("permissionSet.noData.subtitle")
|
|
369
368
|
}, {
|
|
370
369
|
default: k(() => [
|
|
371
370
|
m(_, {
|
|
372
371
|
"column-defs": N,
|
|
373
372
|
"row-data": I.value,
|
|
374
373
|
"page-size": I.value.length,
|
|
375
|
-
loading: r
|
|
374
|
+
loading: l(r).isLoading.value,
|
|
376
375
|
"pin-header-row": "",
|
|
377
376
|
"hide-footer": "",
|
|
378
377
|
"shrink-at": !1,
|
|
379
|
-
onRowClick: t[1] || (t[1] = (g) =>
|
|
378
|
+
onRowClick: t[1] || (t[1] = (g) => T(g.original))
|
|
380
379
|
}, null, 8, ["row-data", "page-size", "loading"])
|
|
381
380
|
]),
|
|
382
381
|
_: 1
|
|
@@ -391,5 +390,5 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
391
390
|
}
|
|
392
391
|
});
|
|
393
392
|
export {
|
|
394
|
-
|
|
393
|
+
Ze as default
|
|
395
394
|
};
|