@feedmepos/mf-hrm-portal 2.0.19 → 2.0.20-dev.1
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/AuditLogList-Bsj-qg8n.js +1037 -0
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
- package/dist/EmployeeList-Cy2ayCko.js +824 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js +45 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
- package/dist/{Main-BPM7QyFL.js → Main-BGc6kNaR.js} +758 -761
- package/dist/{Main-BC20s7cs.js → Main-CSMAtoMj.js} +181 -175
- package/dist/Main-D7bV8EuC.js +86 -0
- package/dist/PermissionSetList-CuHhDqWl.js +347 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CdWgTjZw.js +3443 -0
- package/dist/RoleList-e0WUqt4Y.js +545 -0
- package/dist/TeamMemberList-CpPa1KyV.js +1097 -0
- package/dist/{TimesheetList-CdWXksIf.js → TimesheetList-tFjvFHqH.js} +132 -126
- package/dist/{app-D6OxaCEx.js → app-CL7rUfL3.js} +552 -504
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-C0I-OiL6.js → dayjs.min-ChdFPuFV.js} +1 -1
- package/dist/employee-kKV7UnHU.js +204 -0
- package/dist/{iteration-CcZFMm5X.js → iteration-BbD0nOgO.js} +9253 -9209
- package/dist/{lodash-CW7MBjcM.js → lodash-CDf3aG6G.js} +1 -1
- package/dist/{rule-6Lg9M_3I.js → rule-BJ-y3Sp8.js} +263 -265
- package/dist/src/api/audit-log/index.d.ts +9 -0
- package/dist/src/api/index.d.ts +0 -1
- package/dist/src/api/restaurant/index.d.ts +5 -0
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +2 -0
- package/dist/src/components/Skeleton.vue.d.ts +7 -0
- package/dist/src/composables/useBasePermission.d.ts +1 -0
- package/dist/src/composables/useRestaurantMap.d.ts +2 -329
- package/dist/src/stores/restaurant.d.ts +181 -0
- package/dist/src/stores/role.d.ts +7 -7
- package/dist/src/stores/team.d.ts +6 -6
- package/dist/src/types/restaurant.d.ts +11 -0
- package/dist/src/types/team.d.ts +1 -1
- package/dist/src/views/hr/locales/index.d.ts +16 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +3 -7
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
- package/dist/src/views/team/locales/index.d.ts +32 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +5 -3
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{timesheet-CaSIm-Rv.js → timesheet-BmV02Rkz.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-D8QAGZ02.js +171 -0
- package/dist/useDebounce-CWb5QR9G.js +28 -0
- package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
- package/dist/{useLoading-cnpr1-pP.js → useLoading-KpcQw0p4.js} +1 -1
- package/dist/{useReportPermissions-CNr0AdOf.js → useReportPermissions-CmGJAz_N.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-Bw3sRBhW.js +0 -980
- package/dist/EmployeeList-C4tVWPJE.js +0 -736
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +0 -71
- package/dist/HorizontalSplitter-o860F4xM.js +0 -12
- package/dist/Main-eN8MDWpv.js +0 -85
- package/dist/PermissionSetList-CPSRrCsu.js +0 -341
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CXt721Zo.js +0 -3480
- package/dist/RoleList-tRu19xyl.js +0 -530
- package/dist/TeamMemberList-CvitYIKw.js +0 -1114
- package/dist/TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-BDjrD45a.js +0 -34
- package/dist/employee-yT17VCCS.js +0 -204
- package/dist/src/api/account/index.d.ts +0 -4
- package/dist/src/composables/useSupportedCountries.d.ts +0 -5
- package/dist/useAppStore-CONZvtGc.js +0 -171
- package/dist/useDebounce-B8ZPVS5C.js +0 -15
- package/dist/useDiscardConfirm-BHni0LNu.js +0 -28
- package/dist/useSearch-B6WK1LBB.js +0 -15
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, createElementBlock as s, openBlock as o, createElementVNode as l, renderSlot as n, createCommentVNode as c, toDisplayString as a, normalizeClass as d, createVNode as m, withCtx as f } from "vue";
|
|
2
|
-
const p = { class: "space-y-8" }, y = { class: "flex items-center justify-between" }, h = { class: "space-y-8" }, u = { class: "fm-typo-en-body-lg-600" }, _ = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
5
|
-
}, w = /* @__PURE__ */ i({
|
|
6
|
-
__name: "FormItem",
|
|
7
|
-
props: {
|
|
8
|
-
label: {},
|
|
9
|
-
description: {}
|
|
10
|
-
},
|
|
11
|
-
setup(e) {
|
|
12
|
-
return (t, r) => (o(), s("div", p, [
|
|
13
|
-
l("div", y, [
|
|
14
|
-
l("div", h, [
|
|
15
|
-
l("p", u, a(e.label), 1),
|
|
16
|
-
e.description ? (o(), s("p", _, a(e.description), 1)) : c("", !0)
|
|
17
|
-
]),
|
|
18
|
-
n(t.$slots, "append")
|
|
19
|
-
]),
|
|
20
|
-
n(t.$slots, "default")
|
|
21
|
-
]));
|
|
22
|
-
}
|
|
23
|
-
}), b = /* @__PURE__ */ i({
|
|
24
|
-
__name: "FormColumn",
|
|
25
|
-
props: {
|
|
26
|
-
shrinkable: { type: Boolean }
|
|
27
|
-
},
|
|
28
|
-
setup(e) {
|
|
29
|
-
return (t, r) => (o(), s("div", {
|
|
30
|
-
class: d(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
|
|
31
|
-
}, [
|
|
32
|
-
n(t.$slots, "default")
|
|
33
|
-
], 2));
|
|
34
|
-
}
|
|
35
|
-
}), k = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "flex flex-row justify-between items-center"
|
|
38
|
-
}, $ = { class: "space-y-4" }, x = { class: "fm-typo-en-title-sm-600" }, v = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
41
|
-
}, B = /* @__PURE__ */ i({
|
|
42
|
-
__name: "FormSection",
|
|
43
|
-
props: {
|
|
44
|
-
title: {},
|
|
45
|
-
subTitle: {},
|
|
46
|
-
shrinkable: { type: Boolean }
|
|
47
|
-
},
|
|
48
|
-
setup(e) {
|
|
49
|
-
return (t, r) => (o(), s("div", {
|
|
50
|
-
class: d(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
|
|
51
|
-
}, [
|
|
52
|
-
e.title ? (o(), s("div", k, [
|
|
53
|
-
l("div", $, [
|
|
54
|
-
l("p", x, a(e.title), 1),
|
|
55
|
-
e.subTitle ? (o(), s("p", v, a(e.subTitle), 1)) : c("", !0)
|
|
56
|
-
]),
|
|
57
|
-
n(t.$slots, "append-title")
|
|
58
|
-
])) : c("", !0),
|
|
59
|
-
m(b, { shrinkable: e.shrinkable }, {
|
|
60
|
-
default: f(() => [
|
|
61
|
-
n(t.$slots, "default")
|
|
62
|
-
]),
|
|
63
|
-
_: 3
|
|
64
|
-
}, 8, ["shrinkable"])
|
|
65
|
-
], 2));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
export {
|
|
69
|
-
B as _,
|
|
70
|
-
w as a
|
|
71
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, openBlock as o, createElementVNode as t } from "vue";
|
|
2
|
-
import { _ as l } from "./SelectFilter-DUj7GBtT.js";
|
|
3
|
-
const n = {};
|
|
4
|
-
function c(s, r) {
|
|
5
|
-
return o(), e("div", null, [...r[0] || (r[0] = [
|
|
6
|
-
t("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
7
|
-
])]);
|
|
8
|
-
}
|
|
9
|
-
const i = /* @__PURE__ */ l(n, [["render", c]]);
|
|
10
|
-
export {
|
|
11
|
-
i as H
|
|
12
|
-
};
|
package/dist/Main-eN8MDWpv.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, ref as u, computed as B, watch as A, resolveComponent as i, createBlock as s, openBlock as c, withCtx as p, createElementVNode as C, createVNode as d, resolveDynamicComponent as T, createCommentVNode as S } from "vue";
|
|
2
|
-
import { useRouter as k, useRoute as F } from "vue-router";
|
|
3
|
-
import { useI18n as N } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as g } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { _ as h } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import "@feedmepos/ui-library";
|
|
7
|
-
import "./rule-6Lg9M_3I.js";
|
|
8
|
-
import "./iteration-CcZFMm5X.js";
|
|
9
|
-
import { R as v } from "./app-D6OxaCEx.js";
|
|
10
|
-
import "./useAppStore-CONZvtGc.js";
|
|
11
|
-
/* empty css */
|
|
12
|
-
import "./TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-BDjrD45a.js";
|
|
13
|
-
const w = { class: "space-y-24" }, K = /* @__PURE__ */ V({
|
|
14
|
-
__name: "Main",
|
|
15
|
-
setup(x) {
|
|
16
|
-
const { t: a } = N(), f = k(), R = F(), _ = u(), b = u(), t = u("member");
|
|
17
|
-
R.name === v.TEAM_ROLE ? t.value = "role" : t.value = "member";
|
|
18
|
-
const l = B(() => n.value.find((e) => e.value === t.value) || n.value[0]);
|
|
19
|
-
A(t, (e) => {
|
|
20
|
-
e === "member" ? f.replace({ name: v.TEAM_MEMBER }) : e === "role" && f.replace({ name: v.TEAM_ROLE });
|
|
21
|
-
});
|
|
22
|
-
const n = B(() => [
|
|
23
|
-
{
|
|
24
|
-
label: a("team.title"),
|
|
25
|
-
value: "member",
|
|
26
|
-
createButtonLabel: a("team.actions.addMember"),
|
|
27
|
-
createButtonAction: () => {
|
|
28
|
-
var e;
|
|
29
|
-
(e = _.value) == null || e.create();
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: a("permissionSet.title"),
|
|
34
|
-
value: "role",
|
|
35
|
-
createButtonLabel: a("permissionSet.createButtonLabel"),
|
|
36
|
-
createButtonAction: () => {
|
|
37
|
-
var e;
|
|
38
|
-
(e = b.value) == null || e.create();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]);
|
|
42
|
-
return (e, r) => {
|
|
43
|
-
const L = i("FmSpacer"), E = i("FmTabs"), M = i("RouterView");
|
|
44
|
-
return c(), s(h, {
|
|
45
|
-
heading: l.value.label
|
|
46
|
-
}, {
|
|
47
|
-
"append-heading": p(() => {
|
|
48
|
-
var o;
|
|
49
|
-
return [
|
|
50
|
-
d(L),
|
|
51
|
-
(o = l.value) != null && o.createButtonLabel ? (c(), s(g, {
|
|
52
|
-
key: 0,
|
|
53
|
-
icon: "add",
|
|
54
|
-
label: l.value.createButtonLabel,
|
|
55
|
-
onClick: r[0] || (r[0] = (m) => l.value.createButtonAction())
|
|
56
|
-
}, null, 8, ["label"])) : S("", !0)
|
|
57
|
-
];
|
|
58
|
-
}),
|
|
59
|
-
default: p(() => [
|
|
60
|
-
C("div", w, [
|
|
61
|
-
d(E, {
|
|
62
|
-
modelValue: t.value,
|
|
63
|
-
"onUpdate:modelValue": r[1] || (r[1] = (o) => t.value = o),
|
|
64
|
-
items: n.value
|
|
65
|
-
}, null, 8, ["modelValue", "items"]),
|
|
66
|
-
d(M, null, {
|
|
67
|
-
default: p(({ Component: o }) => [
|
|
68
|
-
(c(), s(T(o), {
|
|
69
|
-
ref: (m) => {
|
|
70
|
-
t.value === "member" && (_.value = m), t.value === "role" && (b.value = m);
|
|
71
|
-
}
|
|
72
|
-
}, null, 512))
|
|
73
|
-
]),
|
|
74
|
-
_: 1
|
|
75
|
-
})
|
|
76
|
-
])
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 8, ["heading"]);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
export {
|
|
84
|
-
K as default
|
|
85
|
-
};
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, computed as S, resolveComponent as d, createElementBlock as $, openBlock as P, createElementVNode as x, createVNode as m, toDisplayString as L, unref as c, withCtx as h, createTextVNode as oe, Fragment as H, renderList as ne, ref as _, watch as ae, createBlock as q, nextTick as ie, onMounted as re, h as z } from "vue";
|
|
2
|
-
import { useI18n as K, useCoreStore as le } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as Q, useDialog as me, useBreakpoints as ce, components as ue, FmButtonColorThemeVariant as de, FmButtonVariant as pe } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
5
|
-
import { d as G, q as ve, u as Y, c as Z, p as J, i as Se, b as be, m as N, k as _e, l as ge, s as he, n as Pe } from "./rule-6Lg9M_3I.js";
|
|
6
|
-
import { A as ye } from "./iteration-CcZFMm5X.js";
|
|
7
|
-
import { u as Fe } from "./useLoading-cnpr1-pP.js";
|
|
8
|
-
import { b as X } from "./app-D6OxaCEx.js";
|
|
9
|
-
import { a as Ve } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CXt721Zo.js";
|
|
10
|
-
const we = { class: "flex flex-row items-center gap-8" }, xe = /* @__PURE__ */ M({
|
|
11
|
-
__name: "PermissionWithTooltip",
|
|
12
|
-
props: {
|
|
13
|
-
modelValue: {
|
|
14
|
-
type: Array,
|
|
15
|
-
required: !0
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
setup(E) {
|
|
19
|
-
const { customReportPermissions: R } = G(), t = E, a = S(() => ve(t.modelValue, R.value)), { t: i } = K();
|
|
20
|
-
return (k, C) => {
|
|
21
|
-
const g = d("FmIcon"), y = d("FmTooltip");
|
|
22
|
-
return P(), $("div", we, [
|
|
23
|
-
x("span", null, L(c(i)("team.labels.allowed", { count: a.value.length })), 1),
|
|
24
|
-
m(y, {
|
|
25
|
-
variant: "plain",
|
|
26
|
-
placement: "top"
|
|
27
|
-
}, {
|
|
28
|
-
content: h(() => [
|
|
29
|
-
x("div", null, [
|
|
30
|
-
oe(L(c(i)("team.labels.permission")) + " ", 1),
|
|
31
|
-
(P(!0), $(H, null, ne(a.value, (l, r) => (P(), $("div", {
|
|
32
|
-
key: `${l}-${r}`
|
|
33
|
-
}, " - " + L(l), 1))), 128))
|
|
34
|
-
])
|
|
35
|
-
]),
|
|
36
|
-
default: h(() => [
|
|
37
|
-
m(g, {
|
|
38
|
-
name: "info",
|
|
39
|
-
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
40
|
-
})
|
|
41
|
-
]),
|
|
42
|
-
_: 1
|
|
43
|
-
})
|
|
44
|
-
]);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}), Re = { class: "fm-typo-en-title-md-600" }, ke = { class: "flex items-center justify-start gap-8" }, Ce = /* @__PURE__ */ M({
|
|
48
|
-
__name: "PermissionSetForm",
|
|
49
|
-
props: {
|
|
50
|
-
modelValue: {
|
|
51
|
-
type: Object,
|
|
52
|
-
default: () => ({})
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
setup(E, { expose: R }) {
|
|
56
|
-
const t = E, { t: a } = K(), i = _(!1), k = S(() => {
|
|
57
|
-
var e;
|
|
58
|
-
return (e = t.modelValue) != null && e.id ? a("permissionSet.form.update.title") : a("permissionSet.form.create.title");
|
|
59
|
-
}), C = _(), g = Q(), y = Fe(g), l = Y(), r = _({ ...t.modelValue }), p = _([]), f = _([]), A = [(e) => !!e || a("permissionSet.form.nameRequired")], D = S(() => {
|
|
60
|
-
var e;
|
|
61
|
-
return (e = t.modelValue) != null && e.id ? a("permissionSet.form.update.confirmButtonLabel") : a("permissionSet.form.create.confirmButtonLabel");
|
|
62
|
-
}), U = S(
|
|
63
|
-
() => l.permissionSets.value.filter((e) => {
|
|
64
|
-
var s;
|
|
65
|
-
return e.id !== ((s = t.modelValue) == null ? void 0 : s.id);
|
|
66
|
-
}).map((e) => ({ label: e.name, value: e.id }))
|
|
67
|
-
), F = S(
|
|
68
|
-
() => Z(p.value, l.permissionSets.value)
|
|
69
|
-
), {
|
|
70
|
-
fetchCustomReportPermissions: W,
|
|
71
|
-
customReportPermissions: n,
|
|
72
|
-
isLoaded: o
|
|
73
|
-
} = G(), u = new Set(
|
|
74
|
-
J.filter((e) => e.subject.startsWith(Se)).map((e) => e.subject)
|
|
75
|
-
), I = S(() => {
|
|
76
|
-
const e = new Set(u);
|
|
77
|
-
for (const s of n.value) e.add(s.subject);
|
|
78
|
-
return e;
|
|
79
|
-
}), O = S(() => {
|
|
80
|
-
const e = /* @__PURE__ */ new Set();
|
|
81
|
-
for (const s of J)
|
|
82
|
-
s.category === X.reports && e.add(s.subject);
|
|
83
|
-
for (const s of n.value)
|
|
84
|
-
s.category === X.reports && e.add(s.subject);
|
|
85
|
-
return e;
|
|
86
|
-
});
|
|
87
|
-
async function T() {
|
|
88
|
-
var s, v;
|
|
89
|
-
await ie(), i.value = !i.value, r.value = { ...t.modelValue }, p.value = ((s = t.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
90
|
-
const e = ((v = t.modelValue) == null ? void 0 : v.permissions) ?? [];
|
|
91
|
-
f.value = be(
|
|
92
|
-
N(F.value),
|
|
93
|
-
e
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
ae(i, async (e) => {
|
|
97
|
-
e && await W();
|
|
98
|
-
});
|
|
99
|
-
function ee() {
|
|
100
|
-
const e = N(F.value), s = o.value ? I.value : u, v = _e(f.value, s), V = ge(v, O.value), w = he(V);
|
|
101
|
-
return Pe(e, w);
|
|
102
|
-
}
|
|
103
|
-
function se() {
|
|
104
|
-
f.value = N(F.value);
|
|
105
|
-
}
|
|
106
|
-
async function te() {
|
|
107
|
-
var v, V;
|
|
108
|
-
const e = await ((v = C.value) == null ? void 0 : v.validateInputsWithoutSubmit()), s = (V = le().currentBusiness.value) == null ? void 0 : V.id;
|
|
109
|
-
!(e != null && e.length) && s && y.minor(async () => {
|
|
110
|
-
var j;
|
|
111
|
-
const w = ee();
|
|
112
|
-
if ((j = t.modelValue) != null && j.id) {
|
|
113
|
-
const B = {
|
|
114
|
-
name: r.value.name,
|
|
115
|
-
permissions: w,
|
|
116
|
-
permissionSetIds: p.value,
|
|
117
|
-
businessId: r.value.businessId
|
|
118
|
-
};
|
|
119
|
-
await l.updatePermissionSet(t.modelValue.id, B);
|
|
120
|
-
} else {
|
|
121
|
-
const B = {
|
|
122
|
-
name: r.value.name,
|
|
123
|
-
businessId: s,
|
|
124
|
-
permissions: w,
|
|
125
|
-
permissionSetIds: p.value
|
|
126
|
-
};
|
|
127
|
-
await l.createPermissionSet(B);
|
|
128
|
-
}
|
|
129
|
-
i.value = !1;
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
return R({
|
|
133
|
-
trigger: T
|
|
134
|
-
}), (e, s) => {
|
|
135
|
-
const v = d("FmTextField"), V = d("FmSelect"), w = d("FmForm"), j = d("FmButton"), B = d("FmSideSheet");
|
|
136
|
-
return P(), q(B, {
|
|
137
|
-
modelValue: i.value,
|
|
138
|
-
"onUpdate:modelValue": s[4] || (s[4] = (b) => i.value = b),
|
|
139
|
-
"max-width": 560,
|
|
140
|
-
"dismiss-away": ""
|
|
141
|
-
}, {
|
|
142
|
-
"side-sheet-header": h(() => [
|
|
143
|
-
x("p", Re, L(k.value), 1)
|
|
144
|
-
]),
|
|
145
|
-
"side-sheet-footer": h(() => [
|
|
146
|
-
x("div", ke, [
|
|
147
|
-
m(j, {
|
|
148
|
-
label: D.value,
|
|
149
|
-
size: "md",
|
|
150
|
-
variant: "primary",
|
|
151
|
-
type: "submit",
|
|
152
|
-
onClick: te
|
|
153
|
-
}, null, 8, ["label"]),
|
|
154
|
-
m(j, {
|
|
155
|
-
label: c(a)("common.cancel"),
|
|
156
|
-
size: "md",
|
|
157
|
-
variant: "secondary",
|
|
158
|
-
onClick: s[3] || (s[3] = (b) => i.value = !1)
|
|
159
|
-
}, null, 8, ["label"])
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
default: h(() => [
|
|
163
|
-
m(w, {
|
|
164
|
-
ref_key: "formRef",
|
|
165
|
-
ref: C
|
|
166
|
-
}, {
|
|
167
|
-
default: h(() => [
|
|
168
|
-
m(v, {
|
|
169
|
-
modelValue: r.value.name,
|
|
170
|
-
"onUpdate:modelValue": s[0] || (s[0] = (b) => r.value.name = b),
|
|
171
|
-
label: c(a)("permissionSet.form.name"),
|
|
172
|
-
placeholder: c(a)("permissionSet.form.namePlaceholder"),
|
|
173
|
-
rules: A
|
|
174
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
175
|
-
m(V, {
|
|
176
|
-
modelValue: p.value,
|
|
177
|
-
"onUpdate:modelValue": [
|
|
178
|
-
s[1] || (s[1] = (b) => p.value = b),
|
|
179
|
-
se
|
|
180
|
-
],
|
|
181
|
-
multiselect: "",
|
|
182
|
-
searchable: "",
|
|
183
|
-
"search-debounce": 300,
|
|
184
|
-
items: U.value,
|
|
185
|
-
label: c(a)("permissionSet.form.includedSets"),
|
|
186
|
-
placeholder: c(a)("permissionSet.form.includedSetsPlaceholder"),
|
|
187
|
-
class: "mt-16"
|
|
188
|
-
}, null, 8, ["modelValue", "items", "label", "placeholder"]),
|
|
189
|
-
m(Ve, {
|
|
190
|
-
modelValue: f.value,
|
|
191
|
-
"onUpdate:modelValue": s[2] || (s[2] = (b) => f.value = b),
|
|
192
|
-
"inherit-permissions": F.value,
|
|
193
|
-
class: "mt-24"
|
|
194
|
-
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 512)
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
}, 8, ["modelValue"]);
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
}), Ie = { class: "space-y-8" }, Te = { class: "flex justify-end xs:px-16" }, We = /* @__PURE__ */ M({
|
|
204
|
-
__name: "PermissionSetList",
|
|
205
|
-
setup(E, { expose: R }) {
|
|
206
|
-
const { t } = K(), { fetchCustomReportPermissions: a } = G(), i = Q(), k = me(), { breakpoints: C } = ce(), g = _(""), y = S(() => {
|
|
207
|
-
var n;
|
|
208
|
-
return (n = p.value) == null ? void 0 : n.filter((o) => {
|
|
209
|
-
const u = g.value.toLowerCase();
|
|
210
|
-
return o.name.toLowerCase().includes(u);
|
|
211
|
-
});
|
|
212
|
-
}), l = _(), r = Y(), p = S(
|
|
213
|
-
() => r.permissionSets.value
|
|
214
|
-
), f = _();
|
|
215
|
-
async function A() {
|
|
216
|
-
await r.readPermissionSets();
|
|
217
|
-
}
|
|
218
|
-
function D(n) {
|
|
219
|
-
var o;
|
|
220
|
-
f.value = n, (o = l.value) == null || o.trigger();
|
|
221
|
-
}
|
|
222
|
-
const U = [
|
|
223
|
-
{
|
|
224
|
-
accessorKey: "name",
|
|
225
|
-
header: () => t("permissionSet.table.columns.name")
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
accessorKey: "permission",
|
|
229
|
-
header: () => t("permissionSet.table.columns.permissions"),
|
|
230
|
-
enableSorting: !1,
|
|
231
|
-
cell(n) {
|
|
232
|
-
const o = n.row.original, u = Z(
|
|
233
|
-
[o.id],
|
|
234
|
-
r.permissionSets.value
|
|
235
|
-
), I = N(u);
|
|
236
|
-
return z(xe, { modelValue: I });
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
id: "action",
|
|
241
|
-
meta: {
|
|
242
|
-
cellClass: "pl-16",
|
|
243
|
-
headerContentClass: "-mx-16"
|
|
244
|
-
},
|
|
245
|
-
cell(n) {
|
|
246
|
-
return z("div", { class: "w-full flex justify-end items-center" }, [
|
|
247
|
-
z(ue.FmButton, {
|
|
248
|
-
prependIcon: "delete",
|
|
249
|
-
variant: pe.Tertiary,
|
|
250
|
-
textColor: de.NeutralGray400,
|
|
251
|
-
class: "flex flex-end",
|
|
252
|
-
onClick: (o) => {
|
|
253
|
-
o.stopPropagation(), W(n.row.original);
|
|
254
|
-
}
|
|
255
|
-
})
|
|
256
|
-
]);
|
|
257
|
-
},
|
|
258
|
-
enableSorting: !1
|
|
259
|
-
}
|
|
260
|
-
];
|
|
261
|
-
function F() {
|
|
262
|
-
var n;
|
|
263
|
-
f.value = void 0, (n = l.value) == null || n.trigger();
|
|
264
|
-
}
|
|
265
|
-
async function W(n) {
|
|
266
|
-
k.open({
|
|
267
|
-
title: t("permissionSet.form.delete.title"),
|
|
268
|
-
message: t("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
269
|
-
minWidth: C.value.lg ? 588 : 0,
|
|
270
|
-
primaryActions: {
|
|
271
|
-
text: t("common.remove"),
|
|
272
|
-
close: !1,
|
|
273
|
-
variant: "destructive"
|
|
274
|
-
},
|
|
275
|
-
secondaryActions: { text: t("common.cancel"), close: !0 }
|
|
276
|
-
}).onPrimary(async () => {
|
|
277
|
-
try {
|
|
278
|
-
await r.deletePermissionSet(n.id), i.open({
|
|
279
|
-
message: t("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
280
|
-
type: "success"
|
|
281
|
-
});
|
|
282
|
-
} catch (o) {
|
|
283
|
-
const u = o instanceof ye && o.status === 409 ? o.message.includes("referenced by") ? t("permissionSet.form.delete.setReferencedConflictError", {
|
|
284
|
-
permissionSetName: n.name
|
|
285
|
-
}) : t("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : o instanceof Error ? o.message : `${o}`;
|
|
286
|
-
i.open({ message: u, type: "error" });
|
|
287
|
-
}
|
|
288
|
-
k.close();
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
return re(() => {
|
|
292
|
-
A(), a();
|
|
293
|
-
}), R({
|
|
294
|
-
create: F
|
|
295
|
-
}), (n, o) => {
|
|
296
|
-
const u = d("FmSearch"), I = d("FmTable"), O = d("FullWrapper");
|
|
297
|
-
return P(), $(H, null, [
|
|
298
|
-
m(Ce, {
|
|
299
|
-
ref_key: "permissionSetFormRef",
|
|
300
|
-
ref: l,
|
|
301
|
-
"model-value": f.value
|
|
302
|
-
}, null, 8, ["model-value"]),
|
|
303
|
-
x("div", Ie, [
|
|
304
|
-
x("div", Te, [
|
|
305
|
-
m(u, {
|
|
306
|
-
modelValue: g.value,
|
|
307
|
-
"onUpdate:modelValue": o[0] || (o[0] = (T) => g.value = T),
|
|
308
|
-
class: "w-[320px] xs:w-full",
|
|
309
|
-
autofocus: "",
|
|
310
|
-
placeholder: c(t)("permissionSet.search.placeholder")
|
|
311
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
312
|
-
]),
|
|
313
|
-
p.value.length > 0 ? (P(), q(O, {
|
|
314
|
-
key: 0,
|
|
315
|
-
class: "overflow-auto"
|
|
316
|
-
}, {
|
|
317
|
-
default: h(() => [
|
|
318
|
-
m(I, {
|
|
319
|
-
"column-defs": U,
|
|
320
|
-
"row-data": y.value,
|
|
321
|
-
"page-size": y.value.length,
|
|
322
|
-
"pin-header-row": "",
|
|
323
|
-
"hide-footer": "",
|
|
324
|
-
"shrink-at": !1,
|
|
325
|
-
onRowClick: o[1] || (o[1] = (T) => D(T.original))
|
|
326
|
-
}, null, 8, ["row-data", "page-size"])
|
|
327
|
-
]),
|
|
328
|
-
_: 1
|
|
329
|
-
})) : (P(), q(c(fe), {
|
|
330
|
-
key: 1,
|
|
331
|
-
title: c(t)("permissionSet.noData.title"),
|
|
332
|
-
subtitle: c(t)("permissionSet.noData.subtitle")
|
|
333
|
-
}, null, 8, ["title", "subtitle"]))
|
|
334
|
-
])
|
|
335
|
-
], 64);
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
export {
|
|
340
|
-
We as default
|
|
341
|
-
};
|