@feedmepos/mf-hrm-portal 2.1.1-dev → 2.1.1-dev.3
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-BH5sgVMU.js +638 -0
- package/dist/AuditLogList-Q4L5Te8O.js +1145 -0
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
- package/dist/EmployeeList-GtKmJZbf.js +899 -0
- package/dist/GrantUserList-CnLjOi5_.js +468 -0
- package/dist/Main-Cn7Dawg4.js +120 -0
- package/dist/{Main-mTxcltDY.js → Main-DLlpEU3j.js} +11 -9
- package/dist/{Main-BLRr_ORG.js → Main-cskEZ3k_.js} +1033 -1035
- package/dist/PermissionSetList-C2fK2pTz.js +357 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js +3458 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-Czo3FLbc.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js} +1 -2
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
- package/dist/RoleList-CcuT1ERb.js +567 -0
- package/dist/TeamMemberList-Dfs2iNdC.js +1131 -0
- package/dist/{TimesheetList-D21j4zLV.js → TimesheetList-B1H_6zfP.js} +136 -141
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CRmmIfTk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js} +14 -13
- package/dist/{app-CX-St7pv.js → app-DX-PG6wx.js} +2725 -5281
- package/dist/app.js +1 -1
- package/dist/approval-code-Q4666xp5.js +58 -0
- package/dist/{dayjs.min-MDoe5X-P.js → dayjs.min-BJrHE7oz.js} +1 -1
- package/dist/{employee-B2cdx2t4.js → employee-BJcqtqLM.js} +27 -26
- package/dist/grant-user-CQZaTzVt.js +67 -0
- package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
- package/dist/iteration-Cfaqt-0s.js +7682 -0
- package/dist/{lodash-DZAGPZLQ.js → lodash-ClKqCmlZ.js} +1 -1
- package/dist/restaurant-YOVMuuFY.js +1876 -0
- package/dist/role-CR_-nBDY.js +82 -0
- package/dist/rule-BB-3S-2R.js +996 -0
- package/dist/src/api/approval-code/index.d.ts +7 -0
- package/dist/src/api/audit-log/index.d.ts +0 -6
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +1 -7
- package/dist/src/components/table/TableEmptyState.vue.d.ts +15 -7
- package/dist/src/composables/useBasePermission.d.ts +1 -2
- package/dist/src/helpers/permission-set.d.ts +4 -8
- package/dist/src/helpers/rule.d.ts +1 -2
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/approval-code.d.ts +140 -0
- package/dist/src/stores/permission-set.d.ts +3 -12
- package/dist/src/types/approval-code.d.ts +99 -0
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
- package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +17 -0
- package/dist/src/views/approval-code/locales/index.d.ts +320 -0
- package/dist/src/views/audit-log/locales/index.d.ts +0 -296
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +0 -1
- package/dist/src/views/pos-access/locales/index.d.ts +48 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -13
- package/dist/src/views/team/locales/index.d.ts +0 -72
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-DNTlIeMv.js +93 -0
- package/dist/useDebounce-CWb5QR9G.js +28 -0
- package/dist/{useLoading-qgSjOzRD.js → useLoading-BH02lYns.js} +1 -1
- package/dist/{useReportPermissions-CIhkjN3B.js → useReportPermissions-ybHA26cJ.js} +3 -3
- package/package.json +2 -2
- package/dist/AuditLogList-Cvp-5_0y.js +0 -1608
- package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js +0 -387
- package/dist/EmployeeList-DgrD3Hjm.js +0 -884
- package/dist/Main-G3am-0Xi.js +0 -577
- package/dist/PermissionSetList-OzyfE-Yg.js +0 -392
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js +0 -4121
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +0 -42
- package/dist/RoleList-DOZ5RJ6A.js +0 -684
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
- package/dist/TeamMemberList-CAqLUyQK.js +0 -1186
- package/dist/iteration-B38iapI_.js +0 -9556
- package/dist/rule-DftQBR76.js +0 -1057
- package/dist/src/composables/useConditionDraft.d.ts +0 -40
- package/dist/src/composables/useCoverConditionOverride.d.ts +0 -61
- package/dist/src/helpers/business-timezone.d.ts +0 -22
- package/dist/src/helpers/filter.d.ts +0 -15
- package/dist/src/helpers/permission-reconcile.d.ts +0 -15
- package/dist/src/helpers/permission-reconcile.test.d.ts +0 -1
- package/dist/src/views/audit-log/event-line.d.ts +0 -13
- package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
- package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +0 -22
- package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +0 -23
- package/dist/src/views/team/condition-builders/component-map.d.ts +0 -4
- package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +0 -23
- package/dist/useAppStore-BBsP5C3E.js +0 -169
- package/dist/useDebounce-B8ZPVS5C.js +0 -15
- /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as f, computed as h, watch as ue, resolveComponent as _, 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
|
-
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as H } from "@feedmepos/ui-library";
|
|
4
|
-
import { v as Q, _ as _e } from "./app-CX-St7pv.js";
|
|
5
|
-
import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js";
|
|
6
|
-
import { u as ge, _ as Pe } from "./useDiscardConfirm-DPhEV6v0.js";
|
|
7
|
-
import { u as ie, c as M, i as ae, p as Y, j as ye, d as we, m as L, n as xe, o as Fe, s as ke, q as Ce, w as Ie } from "./rule-DftQBR76.js";
|
|
8
|
-
import { l as j } from "./lodash-DZAGPZLQ.js";
|
|
9
|
-
import { d as Re, A as Ve } from "./iteration-B38iapI_.js";
|
|
10
|
-
import { u as Ee } from "./useLoading-qgSjOzRD.js";
|
|
11
|
-
import { _ as je } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js";
|
|
12
|
-
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({
|
|
13
|
-
__name: "PermissionSetForm",
|
|
14
|
-
props: {
|
|
15
|
-
modelValue: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default: () => ({})
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(K, { expose: A }) {
|
|
21
|
-
const o = K, { t: i } = se(), v = f(!1), T = h(() => {
|
|
22
|
-
var e;
|
|
23
|
-
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
24
|
-
}), I = f(), D = oe(), w = te(), { breakpoints: R } = ne(), V = Ee(D), l = ie(), d = f({ ...o.modelValue }), a = f([]), p = f([]), $ = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
|
|
25
|
-
var e;
|
|
26
|
-
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
27
|
-
}), N = h(
|
|
28
|
-
() => l.permissionSets.value.filter((e) => {
|
|
29
|
-
var s;
|
|
30
|
-
return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
|
|
31
|
-
}).map((e) => ({ label: e.name, value: e.id }))
|
|
32
|
-
), E = h(
|
|
33
|
-
() => M(a.value, l.permissionSets.value)
|
|
34
|
-
), {
|
|
35
|
-
fetchCustomReportPermissions: n,
|
|
36
|
-
customReportPermissions: t,
|
|
37
|
-
isLoaded: c
|
|
38
|
-
} = ae(), b = new Set(
|
|
39
|
-
Y.filter((e) => e.subject.startsWith(ye)).map((e) => e.subject)
|
|
40
|
-
), g = h(() => {
|
|
41
|
-
const e = new Set(b);
|
|
42
|
-
for (const s of t.value) e.add(s.subject);
|
|
43
|
-
return e;
|
|
44
|
-
}), O = h(() => {
|
|
45
|
-
const e = /* @__PURE__ */ new Set();
|
|
46
|
-
for (const s of Y)
|
|
47
|
-
s.category === Q.reports && e.add(s.subject);
|
|
48
|
-
for (const s of t.value)
|
|
49
|
-
s.category === Q.reports && e.add(s.subject);
|
|
50
|
-
return e;
|
|
51
|
-
}), P = f({ name: "", permissionSetIds: [], userPermissions: [] });
|
|
52
|
-
async function z() {
|
|
53
|
-
var s, u;
|
|
54
|
-
await pe(), v.value = !v.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
55
|
-
const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
|
|
56
|
-
p.value = we(
|
|
57
|
-
L(E.value),
|
|
58
|
-
e
|
|
59
|
-
), P.value = {
|
|
60
|
-
name: d.value.name ?? "",
|
|
61
|
-
permissionSetIds: [...a.value],
|
|
62
|
-
userPermissions: Re(p.value)
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
ue(v, async (e) => {
|
|
66
|
-
e && await n();
|
|
67
|
-
});
|
|
68
|
-
const U = ge(
|
|
69
|
-
() => !j.isEqual(d.value.name ?? "", P.value.name) || !j.isEqual(a.value, P.value.permissionSetIds) || !j.isEqual(p.value, P.value.userPermissions),
|
|
70
|
-
() => {
|
|
71
|
-
v.value = !1;
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
function re() {
|
|
75
|
-
const e = L(E.value), s = c.value ? g.value : b, u = xe(p.value, s), x = Fe(u, O.value), F = ke(x);
|
|
76
|
-
return Ce(e, F);
|
|
77
|
-
}
|
|
78
|
-
function J(e) {
|
|
79
|
-
return L(
|
|
80
|
-
M(e, l.permissionSets.value)
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function X(e) {
|
|
84
|
-
p.value = J(e);
|
|
85
|
-
}
|
|
86
|
-
function le(e) {
|
|
87
|
-
const s = [...e ?? []];
|
|
88
|
-
if (j.isEqual(s, a.value)) return;
|
|
89
|
-
const u = !j.isEqual(
|
|
90
|
-
p.value,
|
|
91
|
-
J(a.value)
|
|
92
|
-
);
|
|
93
|
-
if (a.value = s, !u) {
|
|
94
|
-
X(s);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
w.open({
|
|
98
|
-
title: i("permissionSet.form.overrideInherited.title"),
|
|
99
|
-
message: i("permissionSet.form.overrideInherited.message"),
|
|
100
|
-
minWidth: R.value.lg ? 588 : 0,
|
|
101
|
-
primaryActions: {
|
|
102
|
-
text: i("permissionSet.form.overrideInherited.override"),
|
|
103
|
-
close: !1
|
|
104
|
-
},
|
|
105
|
-
secondaryActions: {
|
|
106
|
-
text: i("permissionSet.form.overrideInherited.keepCurrent"),
|
|
107
|
-
close: !0
|
|
108
|
-
}
|
|
109
|
-
}).onPrimary(() => {
|
|
110
|
-
X(s), w.close();
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
async function me() {
|
|
114
|
-
var u, x;
|
|
115
|
-
const e = await ((u = I.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = (x = he().currentBusiness.value) == null ? void 0 : x.id;
|
|
116
|
-
!(e != null && e.length) && s && V.minor(async () => {
|
|
117
|
-
var B;
|
|
118
|
-
const F = re();
|
|
119
|
-
if ((B = o.modelValue) != null && B.id) {
|
|
120
|
-
const k = {
|
|
121
|
-
name: d.value.name,
|
|
122
|
-
permissions: F,
|
|
123
|
-
permissionSetIds: a.value,
|
|
124
|
-
businessId: d.value.businessId
|
|
125
|
-
};
|
|
126
|
-
await l.updatePermissionSet(o.modelValue.id, k);
|
|
127
|
-
} else {
|
|
128
|
-
const k = {
|
|
129
|
-
name: d.value.name,
|
|
130
|
-
businessId: s,
|
|
131
|
-
permissions: F,
|
|
132
|
-
permissionSetIds: a.value
|
|
133
|
-
};
|
|
134
|
-
await l.createPermissionSet(k);
|
|
135
|
-
}
|
|
136
|
-
v.value = !1;
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
return A({
|
|
140
|
-
trigger: z
|
|
141
|
-
}), (e, s) => {
|
|
142
|
-
const u = _("FmIcon"), x = _("FmTextField"), F = _("FmSelect"), B = _("FmForm"), k = _("FmButton"), ce = _("FmSideSheet");
|
|
143
|
-
return ee(), de(ce, {
|
|
144
|
-
"model-value": v.value,
|
|
145
|
-
"max-width": 960,
|
|
146
|
-
"close-button": !1,
|
|
147
|
-
"onOn:clickedAway": r(U)
|
|
148
|
-
}, {
|
|
149
|
-
"side-sheet-header": C(() => [
|
|
150
|
-
y("div", Te, [
|
|
151
|
-
y("p", $e, G(T.value), 1),
|
|
152
|
-
m(u, {
|
|
153
|
-
name: "close",
|
|
154
|
-
size: "md",
|
|
155
|
-
class: "cursor-pointer",
|
|
156
|
-
onClick: r(U)
|
|
157
|
-
}, null, 8, ["onClick"])
|
|
158
|
-
])
|
|
159
|
-
]),
|
|
160
|
-
"side-sheet-footer": C(() => [
|
|
161
|
-
y("div", Le, [
|
|
162
|
-
m(k, {
|
|
163
|
-
label: q.value,
|
|
164
|
-
size: "md",
|
|
165
|
-
variant: "primary",
|
|
166
|
-
type: "submit",
|
|
167
|
-
onClick: me
|
|
168
|
-
}, null, 8, ["label"]),
|
|
169
|
-
m(k, {
|
|
170
|
-
label: r(i)("common.cancel"),
|
|
171
|
-
size: "md",
|
|
172
|
-
variant: "secondary",
|
|
173
|
-
onClick: r(U)
|
|
174
|
-
}, null, 8, ["label", "onClick"])
|
|
175
|
-
])
|
|
176
|
-
]),
|
|
177
|
-
default: C(() => [
|
|
178
|
-
m(B, {
|
|
179
|
-
ref_key: "formRef",
|
|
180
|
-
ref: I
|
|
181
|
-
}, {
|
|
182
|
-
default: C(() => [
|
|
183
|
-
m(x, {
|
|
184
|
-
modelValue: d.value.name,
|
|
185
|
-
"onUpdate:modelValue": s[0] || (s[0] = (W) => d.value.name = W),
|
|
186
|
-
label: r(i)("permissionSet.form.name"),
|
|
187
|
-
placeholder: r(i)("permissionSet.form.namePlaceholder"),
|
|
188
|
-
rules: $
|
|
189
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
190
|
-
m(F, {
|
|
191
|
-
"model-value": a.value,
|
|
192
|
-
multiselect: "",
|
|
193
|
-
searchable: "",
|
|
194
|
-
"search-debounce": 300,
|
|
195
|
-
items: N.value,
|
|
196
|
-
label: r(i)("permissionSet.form.includedSets"),
|
|
197
|
-
placeholder: r(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
198
|
-
class: "mt-16",
|
|
199
|
-
"onUpdate:modelValue": le
|
|
200
|
-
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
201
|
-
y("div", Be, G(r(i)("team.memberForm.permissions.title")), 1),
|
|
202
|
-
m(je, {
|
|
203
|
-
modelValue: p.value,
|
|
204
|
-
"onUpdate:modelValue": s[1] || (s[1] = (W) => p.value = W),
|
|
205
|
-
"inherit-permissions": E.value,
|
|
206
|
-
class: "mt-16"
|
|
207
|
-
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
}, 512)
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}, 8, ["model-value", "onOn:clickedAway"]);
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
}), De = { class: "space-y-8" }, qe = { class: "flex justify-end xs:px-16" }, Ne = { class: "flex flex-col h-full overflow-auto" }, Ye = /* @__PURE__ */ Z({
|
|
217
|
-
__name: "PermissionSetList",
|
|
218
|
-
setup(K, { expose: A }) {
|
|
219
|
-
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: v } = ae(), T = oe(), I = te(), { breakpoints: D } = ne(), w = f(""), R = h(() => {
|
|
220
|
-
var n;
|
|
221
|
-
return (n = d.value) == null ? void 0 : n.filter((t) => {
|
|
222
|
-
const c = w.value.toLowerCase();
|
|
223
|
-
return t.name.toLowerCase().includes(c);
|
|
224
|
-
});
|
|
225
|
-
}), V = f(), l = ie(), d = h(
|
|
226
|
-
() => l.permissionSets.value
|
|
227
|
-
), a = f();
|
|
228
|
-
async function p() {
|
|
229
|
-
await l.readPermissionSets();
|
|
230
|
-
}
|
|
231
|
-
function $(n) {
|
|
232
|
-
var t;
|
|
233
|
-
a.value = n, (t = V.value) == null || t.trigger();
|
|
234
|
-
}
|
|
235
|
-
const q = [
|
|
236
|
-
{
|
|
237
|
-
accessorKey: "name",
|
|
238
|
-
header: () => o("permissionSet.table.columns.name")
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
accessorKey: "permission",
|
|
242
|
-
header: () => o("permissionSet.table.columns.permissions"),
|
|
243
|
-
enableSorting: !1,
|
|
244
|
-
cell(n) {
|
|
245
|
-
const t = n.row.original, c = M(
|
|
246
|
-
[t.id],
|
|
247
|
-
l.permissionSets.value
|
|
248
|
-
), b = L(c), g = b.length, O = Ie(
|
|
249
|
-
b,
|
|
250
|
-
i.value
|
|
251
|
-
);
|
|
252
|
-
return S("div", { class: "flex items-center gap-8" }, [
|
|
253
|
-
S("span", o("team.labels.allowed", { count: g })),
|
|
254
|
-
S(
|
|
255
|
-
H.FmTooltip,
|
|
256
|
-
{ variant: "plain", placement: "top" },
|
|
257
|
-
{
|
|
258
|
-
default: () => S(H.FmIcon, {
|
|
259
|
-
name: "info",
|
|
260
|
-
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
261
|
-
}),
|
|
262
|
-
content: () => S("div", [
|
|
263
|
-
o("team.labels.permission"),
|
|
264
|
-
...O.map(
|
|
265
|
-
(P, z) => S("div", { key: `${P}-${z}` }, `- ${P}`)
|
|
266
|
-
)
|
|
267
|
-
])
|
|
268
|
-
}
|
|
269
|
-
)
|
|
270
|
-
]);
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
id: "action",
|
|
275
|
-
size: 52,
|
|
276
|
-
meta: {
|
|
277
|
-
cellClass: "pl-16",
|
|
278
|
-
headerContentClass: "-mx-16"
|
|
279
|
-
},
|
|
280
|
-
cell(n) {
|
|
281
|
-
const t = n.row.original;
|
|
282
|
-
return S(
|
|
283
|
-
"div",
|
|
284
|
-
{
|
|
285
|
-
class: "flex w-full items-center justify-end",
|
|
286
|
-
onClick: (c) => c.stopPropagation()
|
|
287
|
-
},
|
|
288
|
-
[
|
|
289
|
-
S(Pe, {
|
|
290
|
-
items: [
|
|
291
|
-
{ label: o("common.update"), onClick: () => $(t) },
|
|
292
|
-
{
|
|
293
|
-
label: o("common.remove"),
|
|
294
|
-
onClick: () => E(t),
|
|
295
|
-
itemClass: "text-fm-color-typo-error"
|
|
296
|
-
}
|
|
297
|
-
]
|
|
298
|
-
})
|
|
299
|
-
]
|
|
300
|
-
);
|
|
301
|
-
},
|
|
302
|
-
enableSorting: !1
|
|
303
|
-
}
|
|
304
|
-
];
|
|
305
|
-
function N() {
|
|
306
|
-
var n;
|
|
307
|
-
a.value = void 0, (n = V.value) == null || n.trigger();
|
|
308
|
-
}
|
|
309
|
-
async function E(n) {
|
|
310
|
-
I.open({
|
|
311
|
-
title: o("permissionSet.form.delete.title"),
|
|
312
|
-
message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
313
|
-
minWidth: D.value.lg ? 588 : 0,
|
|
314
|
-
primaryActions: {
|
|
315
|
-
text: o("common.remove"),
|
|
316
|
-
close: !1,
|
|
317
|
-
variant: "destructive"
|
|
318
|
-
},
|
|
319
|
-
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
320
|
-
}).onPrimary(async () => {
|
|
321
|
-
try {
|
|
322
|
-
await l.deletePermissionSet(n.id), T.open({
|
|
323
|
-
message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
324
|
-
type: "success"
|
|
325
|
-
});
|
|
326
|
-
} catch (t) {
|
|
327
|
-
const c = t instanceof Ve && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
|
|
328
|
-
permissionSetName: n.name
|
|
329
|
-
}) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
|
|
330
|
-
T.open({ message: c, type: "error" });
|
|
331
|
-
}
|
|
332
|
-
I.close();
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
return fe(() => {
|
|
336
|
-
p(), v();
|
|
337
|
-
}), A({
|
|
338
|
-
create: N
|
|
339
|
-
}), (n, t) => {
|
|
340
|
-
const c = _("FmSearch"), b = _("FmTable");
|
|
341
|
-
return ee(), ve(Se, null, [
|
|
342
|
-
m(Ae, {
|
|
343
|
-
ref_key: "permissionSetFormRef",
|
|
344
|
-
ref: V,
|
|
345
|
-
"model-value": a.value
|
|
346
|
-
}, null, 8, ["model-value"]),
|
|
347
|
-
y("div", De, [
|
|
348
|
-
y("div", qe, [
|
|
349
|
-
m(c, {
|
|
350
|
-
modelValue: w.value,
|
|
351
|
-
"onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
|
|
352
|
-
class: "w-[320px] xs:w-full",
|
|
353
|
-
autofocus: "",
|
|
354
|
-
placeholder: r(o)("permissionSet.search.placeholder")
|
|
355
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
356
|
-
]),
|
|
357
|
-
m(_e, null, {
|
|
358
|
-
default: C(() => [
|
|
359
|
-
y("div", Ne, [
|
|
360
|
-
m(be, {
|
|
361
|
-
"is-loading": r(l).isLoading.value,
|
|
362
|
-
"is-empty": R.value.length === 0,
|
|
363
|
-
"collapse-at": !1,
|
|
364
|
-
title: r(o)("permissionSet.noData.title"),
|
|
365
|
-
subtitle: r(o)("permissionSet.noData.subtitle")
|
|
366
|
-
}, {
|
|
367
|
-
default: C(() => [
|
|
368
|
-
m(b, {
|
|
369
|
-
"column-defs": q,
|
|
370
|
-
"row-data": R.value,
|
|
371
|
-
"page-size": R.value.length,
|
|
372
|
-
loading: r(l).isLoading.value,
|
|
373
|
-
"pin-header-row": "",
|
|
374
|
-
"hide-footer": "",
|
|
375
|
-
"shrink-at": !1,
|
|
376
|
-
onRowClick: t[1] || (t[1] = (g) => $(g.original))
|
|
377
|
-
}, null, 8, ["row-data", "page-size", "loading"])
|
|
378
|
-
]),
|
|
379
|
-
_: 1
|
|
380
|
-
}, 8, ["is-loading", "is-empty", "title", "subtitle"])
|
|
381
|
-
])
|
|
382
|
-
]),
|
|
383
|
-
_: 1
|
|
384
|
-
})
|
|
385
|
-
])
|
|
386
|
-
], 64);
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
export {
|
|
391
|
-
Ye as default
|
|
392
|
-
};
|