@feedmepos/mf-hrm-portal 2.3.2-dev.3 → 2.3.2-dev.4
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-D3U4nvlF.js → ApprovalCodeList-BPTnWcra.js} +14 -15
- package/dist/{AuditLogList-qGCW7tf0.js → AuditLogList-CvEF4bit.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CPX0sv64.js +459 -0
- package/dist/EmployeeList-CANPsrQY.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js +90 -0
- package/dist/{GrantUserList-C71pal0N.js → GrantUserList-DPj_6Wsg.js} +15 -16
- package/dist/{Main-CCdTWngg.js → Main-BWRMirTY.js} +11 -11
- package/dist/{Main-BWJPyEU1.js → Main-Cob4hcf-.js} +5 -5
- package/dist/Main-DXcSgkhR.js +101 -0
- package/dist/MyPosProfile-Bp7-pATz.js +301 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BS-oBunI.js → PermissionSetList-DvAW1q0c.js} +45 -46
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js +4243 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js +1831 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-Bq8-aBSv.js +547 -0
- package/dist/RoleList-DsrHgU4s.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRR18xmB.js} +1 -1
- package/dist/{ScheduleGeneralPage-DpNvWNGs.js → ScheduleGeneralPage-C_Kj9wmp.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-3oQ6lE86.js} +187 -186
- package/dist/{SchedulePage-QW-cYvu2.js → SchedulePage-9dFXxWwZ.js} +13 -13
- package/dist/{SchedulePositionPage-BtFfVo2N.js → SchedulePositionPage-Dea5X8Sa.js} +3 -3
- package/dist/{SelectFilter-BXeVKgHN.js → SelectFilter-Dr9lB6Ta.js} +1 -1
- package/dist/TeamMemberList-Bu9QNP9W.js +2086 -0
- package/dist/{TimesheetList-D-bESKe5.js → TimesheetList-B98l028z.js} +9 -9
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js} +3 -3
- package/dist/{app-D-MUq9Ab.js → app-BHQJX4L4.js} +6398 -3459
- package/dist/app.js +3 -3
- package/dist/{approval-code-BXUiojPH.js → approval-code-w0rZJeYU.js} +1 -1
- package/dist/{dayjs.min-BZ1pM-6M.js → dayjs.min-C4H4diN8.js} +34 -34
- package/dist/{employee-HQEU8fjb.js → employee-BEwUmdt6.js} +48 -47
- package/dist/{grant-user-CBJ3gEgW.js → grant-user-DdxPMH5_.js} +1 -1
- package/dist/{iteration-ogxW2-Tv.js → iteration-DBHifssn.js} +1 -1
- package/dist/{lodash-Def4gaas.js → lodash-DqZsWm-0.js} +1 -1
- package/dist/member-grant-DOigVnBR.js +55 -0
- package/dist/restaurant-2xCb2x26.js +51 -0
- package/dist/{role-JDoDFVd9.js → role-C8STcmLJ.js} +5 -4
- package/dist/{rule-DPtqlnz-.js → rule-BkL34-Ma.js} +105 -100
- package/dist/src/api/my-pos-profile/index.d.ts +5 -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/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- 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 +25 -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/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- 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 +200 -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-DZCdxlCd.js → useAppStore-BUmFt2dT.js} +1 -1
- package/dist/{useLoading-Nygx2zn8.js → useLoading-oHRj4RgU.js} +1 -1
- package/dist/{useReportPermissions-CxV7Dz1B.js → useReportPermissions-CpcyfEuV.js} +5 -5
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +0 -438
- package/dist/EmployeeList-Bd73xDCX.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-DGf0bQvy.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-CkOAT-oX.js +0 -4167
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +0 -35
- package/dist/RoleList-B_7UnVNb.js +0 -740
- package/dist/TeamMemberList-DoisBYnk.js +0 -1154
- package/dist/restaurant-D2mfKHaH.js +0 -1880
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as c, createElementBlock as s, openBlock as m, normalizeStyle as b, resolveComponent as u, Fragment as p, createVNode as r, createCommentVNode as g, toDisplayString as y, createElementVNode as v } from "vue";
|
|
2
|
+
const B = /* @__PURE__ */ c({
|
|
3
|
+
__name: "Skeleton",
|
|
4
|
+
props: {
|
|
5
|
+
width: { default: "160px" }
|
|
6
|
+
},
|
|
7
|
+
setup(t) {
|
|
8
|
+
return (l, n) => (m(), s("div", {
|
|
9
|
+
class: "h-16 animate-pulse rounded bg-fm-color-neutral-gray-200",
|
|
10
|
+
style: b({ width: t.width })
|
|
11
|
+
}, null, 4));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function f(t) {
|
|
15
|
+
return t.map((l) => l.restaurantId).filter(Boolean);
|
|
16
|
+
}
|
|
17
|
+
function x(t, l, n) {
|
|
18
|
+
const o = f(l);
|
|
19
|
+
return t.filter((e) => e.managable || e._id === n).map((e) => ({
|
|
20
|
+
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
21
|
+
value: e._id,
|
|
22
|
+
disabled: o.includes(e._id) && e._id !== n
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
function k(t, l, n, o) {
|
|
26
|
+
return l ? t.filter((e) => e.restaurants.some((a) => a.id == l)).map((e) => ({
|
|
27
|
+
label: e.name,
|
|
28
|
+
value: e._id,
|
|
29
|
+
disabled: !o.isRoleUsable(e, l) && e._id !== n
|
|
30
|
+
})) : [];
|
|
31
|
+
}
|
|
32
|
+
function V(t, l, n, o) {
|
|
33
|
+
var a, i;
|
|
34
|
+
const e = k(t, l, n, o);
|
|
35
|
+
return ((a = e.find((d) => d.value === n && !d.disabled)) == null ? void 0 : a.value) ?? ((i = e.find((d) => !d.disabled)) == null ? void 0 : i.value) ?? "";
|
|
36
|
+
}
|
|
37
|
+
function C(t, l) {
|
|
38
|
+
const n = f(l), o = t.some(
|
|
39
|
+
(a) => a.managable && !n.includes(a._id)
|
|
40
|
+
), e = l.every((a) => a.restaurantId && a.roleId);
|
|
41
|
+
return o && e;
|
|
42
|
+
}
|
|
43
|
+
function R(t, l, n, o) {
|
|
44
|
+
var a;
|
|
45
|
+
const e = ((a = t[l]) == null ? void 0 : a.restaurantId) ?? "";
|
|
46
|
+
return o.isRestaurantLocked(e) ? t : t.length === 1 ? [n()] : t.filter((i, d) => d !== l);
|
|
47
|
+
}
|
|
48
|
+
const F = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "fm-typo-body-sm-400 text-fm-color-typo-secondary"
|
|
51
|
+
}, I = /* @__PURE__ */ c({
|
|
52
|
+
__name: "PasscodeGenerateButton",
|
|
53
|
+
props: {
|
|
54
|
+
label: {},
|
|
55
|
+
hint: {},
|
|
56
|
+
disabled: { type: Boolean, default: !1 },
|
|
57
|
+
loading: { type: Boolean, default: !1 }
|
|
58
|
+
},
|
|
59
|
+
emits: ["click"],
|
|
60
|
+
setup(t) {
|
|
61
|
+
return (l, n) => {
|
|
62
|
+
const o = u("FmButton");
|
|
63
|
+
return m(), s(p, null, [
|
|
64
|
+
r(o, {
|
|
65
|
+
variant: "secondary",
|
|
66
|
+
"text-color": "primary",
|
|
67
|
+
"border-color": "primary",
|
|
68
|
+
label: t.label,
|
|
69
|
+
size: "md",
|
|
70
|
+
loading: t.loading,
|
|
71
|
+
disabled: t.disabled,
|
|
72
|
+
onClick: n[0] || (n[0] = (e) => l.$emit("click"))
|
|
73
|
+
}, null, 8, ["label", "loading", "disabled"]),
|
|
74
|
+
t.disabled ? (m(), s("div", F, y(t.hint), 1)) : g("", !0)
|
|
75
|
+
], 64);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}), _ = { class: "flex items-center gap-8" }, $ = ["aria-label"], P = /* @__PURE__ */ c({
|
|
79
|
+
__name: "PasscodePinField",
|
|
80
|
+
props: {
|
|
81
|
+
modelValue: {},
|
|
82
|
+
masked: { type: Boolean },
|
|
83
|
+
length: { default: 4 },
|
|
84
|
+
toggleLabel: {}
|
|
85
|
+
},
|
|
86
|
+
emits: ["update:modelValue", "update:masked", "complete"],
|
|
87
|
+
setup(t, { emit: l }) {
|
|
88
|
+
const n = l;
|
|
89
|
+
return (o, e) => {
|
|
90
|
+
const a = u("FmPinField"), i = u("FmIcon");
|
|
91
|
+
return m(), s("div", _, [
|
|
92
|
+
r(a, {
|
|
93
|
+
"model-value": t.modelValue,
|
|
94
|
+
length: t.length,
|
|
95
|
+
masked: t.masked,
|
|
96
|
+
"onUpdate:modelValue": e[0] || (e[0] = (d) => n("update:modelValue", d)),
|
|
97
|
+
onComplete: e[1] || (e[1] = (d) => n("complete", d)),
|
|
98
|
+
onFocus: e[2] || (e[2] = (d) => n("update:masked", !1))
|
|
99
|
+
}, null, 8, ["model-value", "length", "masked"]),
|
|
100
|
+
v("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
class: "flex items-center justify-center rounded-full p-4 hover:bg-fm-color-neutral-gray-100",
|
|
103
|
+
"aria-label": t.toggleLabel,
|
|
104
|
+
onClick: e[3] || (e[3] = (d) => n("update:masked", !t.masked))
|
|
105
|
+
}, [
|
|
106
|
+
r(i, {
|
|
107
|
+
name: t.masked ? "visibility" : "visibility_off",
|
|
108
|
+
size: "md",
|
|
109
|
+
class: "text-fm-color-neutral-gray-300"
|
|
110
|
+
}, null, 8, ["name"])
|
|
111
|
+
], 8, $)
|
|
112
|
+
]);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
P as _,
|
|
118
|
+
k as a,
|
|
119
|
+
x as b,
|
|
120
|
+
C as c,
|
|
121
|
+
I as d,
|
|
122
|
+
B as e,
|
|
123
|
+
V as p,
|
|
124
|
+
R as r,
|
|
125
|
+
f as s
|
|
126
|
+
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as v, computed as
|
|
2
|
-
import { useI18n as se, useCoreStore 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 r, withCtx as C, 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
|
+
import { useI18n as se, useCoreStore as he } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as H } from "@feedmepos/ui-library";
|
|
4
|
-
import { v as Q, _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { u as ie, c as M,
|
|
8
|
-
import { l as T } from "./lodash-
|
|
9
|
-
import { c as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { A as je } from "./restaurant-D2mfKHaH.js";
|
|
4
|
+
import { v as Q, _ as be, n as _e } from "./app-BHQJX4L4.js";
|
|
5
|
+
import { _ as ge } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
6
|
+
import { _ as Pe } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
|
+
import { u as ie, c as M, a as ae, p as Y, R as ye, g as we, m as A, l as xe, n as Fe, o as ke, q as Ce, v as Ie } from "./rule-BkL34-Ma.js";
|
|
8
|
+
import { l as T } from "./lodash-DqZsWm-0.js";
|
|
9
|
+
import { c as Ve } from "./iteration-DBHifssn.js";
|
|
10
|
+
import { u as Re } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
11
|
+
import { u as Ee } from "./useLoading-oHRj4RgU.js";
|
|
12
|
+
import { _ as je } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js";
|
|
14
13
|
const Te = { class: "flex w-full items-center justify-between" }, $e = { class: "fm-typo-en-title-md-600" }, Be = { class: "fm-typo-en-title-sm-600 mt-24" }, Le = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
|
|
15
14
|
__name: "PermissionSetForm",
|
|
16
15
|
props: {
|
|
@@ -20,30 +19,30 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
20
19
|
}
|
|
21
20
|
},
|
|
22
21
|
setup(K, { expose: D }) {
|
|
23
|
-
const o = K, { t: i } = se(), f = v(!1), $ =
|
|
22
|
+
const o = K, { t: i } = se(), f = v(!1), $ = 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
|
-
}), I = v(),
|
|
25
|
+
}), I = v(), q = oe(), w = te(), { breakpoints: V } = ne(), R = Ee(q), l = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), B = [(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
|
-
}),
|
|
28
|
+
}), O = h(
|
|
30
29
|
() => l.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
|
-
), E =
|
|
33
|
+
), E = h(
|
|
35
34
|
() => M(a.value, l.permissionSets.value)
|
|
36
35
|
), {
|
|
37
36
|
fetchCustomReportPermissions: n,
|
|
38
37
|
customReportPermissions: t,
|
|
39
38
|
isLoaded: c
|
|
40
39
|
} = ae(), _ = new Set(
|
|
41
|
-
Y.filter((e) => e.subject.startsWith(
|
|
42
|
-
), g =
|
|
40
|
+
Y.filter((e) => e.subject.startsWith(ye)).map((e) => e.subject)
|
|
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
|
-
}), z =
|
|
45
|
+
}), z = h(() => {
|
|
47
46
|
const e = /* @__PURE__ */ new Set();
|
|
48
47
|
for (const s of Y)
|
|
49
48
|
s.category === Q.reports && e.add(s.subject);
|
|
@@ -55,27 +54,27 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
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 =
|
|
57
|
+
p.value = we(
|
|
59
58
|
A(E.value),
|
|
60
59
|
e
|
|
61
60
|
), P.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 W =
|
|
69
|
+
const W = Re(
|
|
71
70
|
() => !T.isEqual(d.value.name ?? "", P.value.name) || !T.isEqual(a.value, P.value.permissionSetIds) || !T.isEqual(p.value, P.value.userPermissions),
|
|
72
71
|
() => {
|
|
73
72
|
f.value = !1;
|
|
74
73
|
}
|
|
75
74
|
);
|
|
76
75
|
function re() {
|
|
77
|
-
const e = A(E.value), s = c.value ? g.value : _, u =
|
|
78
|
-
return
|
|
76
|
+
const e = A(E.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 J(e) {
|
|
81
80
|
return A(
|
|
@@ -114,7 +113,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
114
113
|
}
|
|
115
114
|
async function me() {
|
|
116
115
|
var u, x;
|
|
117
|
-
const e = await ((u = I.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = (x =
|
|
116
|
+
const e = await ((u = I.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = (x = he().currentBusiness.value) == null ? void 0 : x.id;
|
|
118
117
|
!(e != null && e.length) && s && R.minor(async () => {
|
|
119
118
|
var L;
|
|
120
119
|
const F = re();
|
|
@@ -141,7 +140,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
141
140
|
return D({
|
|
142
141
|
trigger: U
|
|
143
142
|
}), (e, s) => {
|
|
144
|
-
const u =
|
|
143
|
+
const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"), L = b("FmForm"), k = b("FmButton"), ce = b("FmSideSheet");
|
|
145
144
|
return ee(), de(ce, {
|
|
146
145
|
modelValue: f.value,
|
|
147
146
|
"onUpdate:modelValue": s[2] || (s[2] = (j) => f.value = j),
|
|
@@ -163,7 +162,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
163
162
|
"side-sheet-footer": C(() => [
|
|
164
163
|
y("div", Le, [
|
|
165
164
|
m(k, {
|
|
166
|
-
label:
|
|
165
|
+
label: N.value,
|
|
167
166
|
size: "md",
|
|
168
167
|
variant: "primary",
|
|
169
168
|
type: "submit",
|
|
@@ -195,14 +194,14 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
195
194
|
multiselect: "",
|
|
196
195
|
searchable: "",
|
|
197
196
|
"search-debounce": 300,
|
|
198
|
-
items:
|
|
197
|
+
items: O.value,
|
|
199
198
|
label: r(i)("permissionSet.form.includedSets"),
|
|
200
199
|
placeholder: r(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
201
200
|
class: "mt-16",
|
|
202
201
|
"onUpdate:modelValue": le
|
|
203
202
|
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
204
203
|
y("div", Be, G(r(i)("team.memberForm.permissions.title")), 1),
|
|
205
|
-
m(
|
|
204
|
+
m(je, {
|
|
206
205
|
modelValue: p.value,
|
|
207
206
|
"onUpdate:modelValue": s[1] || (s[1] = (j) => p.value = j),
|
|
208
207
|
"inherit-permissions": E.value,
|
|
@@ -216,16 +215,16 @@ 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" },
|
|
218
|
+
}), De = { class: "space-y-8" }, qe = { class: "flex justify-end xs:px-16" }, Ne = { class: "flex flex-col h-full overflow-auto" }, Ze = /* @__PURE__ */ Z({
|
|
220
219
|
__name: "PermissionSetList",
|
|
221
220
|
setup(K, { expose: D }) {
|
|
222
|
-
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), $ = oe(), I = te(), { breakpoints:
|
|
221
|
+
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), $ = oe(), I = te(), { breakpoints: q } = ne(), w = v(""), V = 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
|
-
}), R = v(), l = ie(), d =
|
|
227
|
+
}), R = v(), l = ie(), d = h(
|
|
229
228
|
() => l.permissionSets.value
|
|
230
229
|
), a = v();
|
|
231
230
|
async function p() {
|
|
@@ -235,7 +234,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
235
234
|
var t;
|
|
236
235
|
a.value = n, (t = R.value) == null || t.trigger();
|
|
237
236
|
}
|
|
238
|
-
const
|
|
237
|
+
const N = [
|
|
239
238
|
{
|
|
240
239
|
accessorKey: "name",
|
|
241
240
|
header: () => o("permissionSet.table.columns.name")
|
|
@@ -248,7 +247,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
248
247
|
const t = n.row.original, c = M(
|
|
249
248
|
[t.id],
|
|
250
249
|
l.permissionSets.value
|
|
251
|
-
), _ = A(c), g = _.length, z =
|
|
250
|
+
), _ = A(c), g = _.length, z = Ie(
|
|
252
251
|
_,
|
|
253
252
|
i.value
|
|
254
253
|
);
|
|
@@ -289,7 +288,7 @@ 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(Pe, {
|
|
293
292
|
items: [
|
|
294
293
|
{ label: o("common.update"), onClick: () => B(t) },
|
|
295
294
|
{
|
|
@@ -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 O() {
|
|
309
308
|
var n;
|
|
310
309
|
a.value = void 0, (n = R.value) == null || n.trigger();
|
|
311
310
|
}
|
|
@@ -313,7 +312,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
313
312
|
I.open({
|
|
314
313
|
title: o("permissionSet.form.delete.title"),
|
|
315
314
|
message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
316
|
-
minWidth:
|
|
315
|
+
minWidth: q.value.lg ? 588 : 0,
|
|
317
316
|
primaryActions: {
|
|
318
317
|
text: o("common.remove"),
|
|
319
318
|
close: !1,
|
|
@@ -327,7 +326,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
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
|
$.open({ message: c, type: "error" });
|
|
@@ -338,9 +337,9 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
338
337
|
return fe(() => {
|
|
339
338
|
p(), f();
|
|
340
339
|
}), D({
|
|
341
|
-
create:
|
|
340
|
+
create: O
|
|
342
341
|
}), (n, t) => {
|
|
343
|
-
const c =
|
|
342
|
+
const c = b("FmSearch"), _ = b("FmTable");
|
|
344
343
|
return ee(), ve(Se, null, [
|
|
345
344
|
m(Ae, {
|
|
346
345
|
ref_key: "permissionSetFormRef",
|
|
@@ -348,7 +347,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
348
347
|
"model-value": a.value
|
|
349
348
|
}, null, 8, ["model-value"]),
|
|
350
349
|
y("div", De, [
|
|
351
|
-
y("div",
|
|
350
|
+
y("div", qe, [
|
|
352
351
|
m(c, {
|
|
353
352
|
modelValue: w.value,
|
|
354
353
|
"onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
|
|
@@ -357,10 +356,10 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
357
356
|
placeholder: r(o)("permissionSet.search.placeholder")
|
|
358
357
|
}, null, 8, ["modelValue", "placeholder"])
|
|
359
358
|
]),
|
|
360
|
-
m(
|
|
359
|
+
m(be, null, {
|
|
361
360
|
default: C(() => [
|
|
362
|
-
y("div",
|
|
363
|
-
m(
|
|
361
|
+
y("div", Ne, [
|
|
362
|
+
m(ge, {
|
|
364
363
|
"is-loading": r(l).isLoading.value,
|
|
365
364
|
"is-empty": V.value.length === 0,
|
|
366
365
|
"collapse-at": !1,
|
|
@@ -369,7 +368,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
|
|
|
369
368
|
}, {
|
|
370
369
|
default: C(() => [
|
|
371
370
|
m(_, {
|
|
372
|
-
"column-defs":
|
|
371
|
+
"column-defs": N,
|
|
373
372
|
"row-data": V.value,
|
|
374
373
|
"page-size": V.value.length,
|
|
375
374
|
loading: r(l).isLoading.value,
|
|
@@ -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
|
};
|