@feedmepos/mf-hrm-portal 2.0.11-dev → 2.0.11-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/AuditLogList-E_BtUYs7.js +915 -0
- package/dist/EmployeeList-D758_PXx.js +621 -0
- package/dist/{Main-6td6JhCb.js → Main-Bqx0FFmH.js} +1054 -1055
- package/dist/{Main-BhNhmkn8.js → Main-DjCFRKkP.js} +4 -4
- package/dist/{Main-Bu-UNnSQ.js → Main-eVW0teSe.js} +6 -6
- package/dist/{PermissionSetList-IG15Aj5D.js → PermissionSetList-DL5AL3mB.js} +128 -124
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CDA9oDkd.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMcQnqyK.js} +693 -693
- package/dist/RoleList-DuXjqXwQ.js +499 -0
- package/dist/TeamMemberList-BHpOC5vA.js +989 -0
- package/dist/{TimesheetList-D_JT5iyS.js → TimesheetList-Bz9ZMpHA.js} +74 -74
- package/dist/{app-h2mRYtCE.js → app-BhCUAF8K.js} +705 -712
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-QbzmY4D1.js → dayjs.min-Cxe5QOx7.js} +1 -1
- package/dist/employee--8czm9KP.js +145 -0
- package/dist/{index-CBgvOHm7.js → index-CyJwEUuG.js} +1 -1
- package/dist/{index-BLm_-G4e.js → index-GgFsP7rK.js} +85 -108
- package/dist/{iteration-J_5O7DIo.js → iteration-BljyZld9.js} +1 -1
- package/dist/{lodash-btS1GWf0.js → lodash-D2-GJ54o.js} +1 -1
- package/dist/src/api/employee/index.d.ts +3 -4
- package/dist/src/api/team/index.d.ts +1 -3
- package/dist/src/stores/employee.d.ts +6 -515
- package/dist/src/stores/team.d.ts +0 -6
- package/dist/src/types/employee.d.ts +1 -35
- package/dist/src/types/team.d.ts +2 -18
- package/dist/src/views/hr/employee/EmployeeForm.vue.d.ts +2 -6
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +0 -3
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +0 -9
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +5 -5
- package/dist/style.css +1 -1
- package/dist/team-C7-0IiCm.js +33 -0
- package/dist/{timesheet-B4Vja79b.js → timesheet-C_WtQDqh.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CEidzV7L.js → useAppStore-B7R116Aw.js} +1 -1
- package/dist/{useLoading-fH82N_CS.js → useLoading-CwSP2H00.js} +1 -1
- package/dist/{useReportPermissions-BZS4zPhT.js → useReportPermissions-DVOIk2oR.js} +3 -3
- package/package.json +2 -2
- package/dist/AuditLogList-C7QcWwHq.js +0 -941
- package/dist/EmployeeList-CQzS4gXV.js +0 -690
- package/dist/RoleList-Cziztrpo.js +0 -519
- package/dist/TeamMemberList-DwxhZcrA.js +0 -1081
- package/dist/employee-CY4sYUu8.js +0 -232
- package/dist/src/components/table/TablePagination.vue.d.ts +0 -14
- package/dist/src/composables/useDebounce.d.ts +0 -9
- package/dist/useDebounce-Cnv3r01W.js +0 -83
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ref as S, defineComponent as J, computed as F, watch as ce, resolveComponent as h, createElementBlock as D, openBlock as I, Fragment as W, renderSlot as ge, createVNode as n, unref as s, withCtx as x, createElementVNode as l, toDisplayString as k, createBlock as K, isRef as ae, renderList as fe, createCommentVNode as ve, withModifiers as se, createTextVNode as re, normalizeClass as _e, h as _ } from "vue";
|
|
2
2
|
import { useCoreStore as Q, useI18n as X, RestaurantSelector as oe } from "@feedmepos/mf-common";
|
|
3
3
|
import { _ as ye } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
4
|
-
import { u as Y } from "./useAppStore-
|
|
4
|
+
import { u as Y } from "./useAppStore-B7R116Aw.js";
|
|
5
5
|
import { defineStore as Ue } from "pinia";
|
|
6
|
-
import { g as z, a as he, b as O } from "./iteration-
|
|
6
|
+
import { g as z, a as he, b as O } from "./iteration-BljyZld9.js";
|
|
7
7
|
import { useSnackbar as ie, components as E, useDialog as xe, useBreakpoints as be, FmButtonVariant as q } from "@feedmepos/ui-library";
|
|
8
8
|
import { S as ne } from "./SelectFilter-DUj7GBtT.js";
|
|
9
|
-
import { _ as we } from "./app-
|
|
9
|
+
import { _ as we } from "./app-BhCUAF8K.js";
|
|
10
10
|
import { H as ke } from "./HorizontalSplitter-o860F4xM.js";
|
|
11
11
|
import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
12
12
|
import { u as Fe } from "./useSearch-B6WK1LBB.js";
|
|
13
|
-
import { u as ue } from "./useLoading-
|
|
13
|
+
import { u as ue } from "./useLoading-CwSP2H00.js";
|
|
14
14
|
import { _ as Ie, a as le } from "./FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js";
|
|
15
15
|
const H = {
|
|
16
16
|
async getGrantUsers() {
|
|
@@ -4,14 +4,14 @@ import { useI18n as N } from "@feedmepos/mf-common";
|
|
|
4
4
|
import { _ as g } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
5
|
import { _ as h } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
6
|
import "@feedmepos/ui-library";
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./iteration-
|
|
9
|
-
import { R as v } from "./app-
|
|
10
|
-
import "./useAppStore-
|
|
11
|
-
import "./index-
|
|
7
|
+
import "./index-GgFsP7rK.js";
|
|
8
|
+
import "./iteration-BljyZld9.js";
|
|
9
|
+
import { R as v } from "./app-BhCUAF8K.js";
|
|
10
|
+
import "./useAppStore-B7R116Aw.js";
|
|
11
|
+
import "./index-CyJwEUuG.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
/* empty css */
|
|
14
13
|
/* empty css */
|
|
14
|
+
import "./team-C7-0IiCm.js";
|
|
15
15
|
const w = { class: "space-y-24" }, Q = /* @__PURE__ */ V({
|
|
16
16
|
__name: "Main",
|
|
17
17
|
setup(x) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useSnackbar as Q, useDialog as
|
|
1
|
+
import { defineComponent as q, computed as S, resolveComponent as u, createElementBlock as $, openBlock as g, createElementVNode as y, createVNode as r, toDisplayString as N, unref as c, withCtx as P, createTextVNode as te, Fragment as X, renderList as oe, ref as b, createBlock as H, nextTick as ne, onMounted as ie, h as z } from "vue";
|
|
2
|
+
import { useI18n as M, useCoreStore as ae } from "@feedmepos/mf-common";
|
|
3
|
+
import { useSnackbar as Q, useDialog as le, useBreakpoints as re, components as me, FmButtonColorThemeVariant as ce, FmButtonVariant as ue } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
5
|
-
import { j as
|
|
6
|
-
import { A as
|
|
7
|
-
import { u as
|
|
8
|
-
import { p as
|
|
9
|
-
import { a as ye } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */
|
|
5
|
+
import { j as K, w as pe, u as Y, c as Z, p as G, k as fe, d as ve, m as A, n as Se, o as _e, s as be, q as he } from "./index-GgFsP7rK.js";
|
|
6
|
+
import { A as Pe } from "./iteration-BljyZld9.js";
|
|
7
|
+
import { u as ge } from "./useLoading-CwSP2H00.js";
|
|
8
|
+
import { p as J } from "./app-BhCUAF8K.js";
|
|
9
|
+
import { a as ye } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMcQnqyK.js";
|
|
10
|
+
const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ q({
|
|
11
11
|
__name: "PermissionWithTooltip",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: {
|
|
@@ -15,26 +15,26 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
15
15
|
required: !0
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const { customReportPermissions: k } =
|
|
18
|
+
setup(E) {
|
|
19
|
+
const { customReportPermissions: k } = K(), t = E, i = S(() => pe(t.modelValue, k.value)), { t: l } = M();
|
|
20
20
|
return (R, C) => {
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const h = u("FmIcon"), F = u("FmTooltip");
|
|
22
|
+
return g(), $("div", Fe, [
|
|
23
|
+
y("span", null, N(c(l)("team.labels.allowed", { count: i.value.length })), 1),
|
|
24
|
+
r(F, {
|
|
25
25
|
variant: "plain",
|
|
26
26
|
placement: "top"
|
|
27
27
|
}, {
|
|
28
|
-
content:
|
|
29
|
-
|
|
30
|
-
te(N(
|
|
31
|
-
(
|
|
32
|
-
key: `${
|
|
33
|
-
}, " - " + N(
|
|
28
|
+
content: P(() => [
|
|
29
|
+
y("div", null, [
|
|
30
|
+
te(N(c(l)("team.labels.permission")) + " ", 1),
|
|
31
|
+
(g(!0), $(X, null, oe(i.value, (m, a) => (g(), $("div", {
|
|
32
|
+
key: `${m}-${a}`
|
|
33
|
+
}, " - " + N(m), 1))), 128))
|
|
34
34
|
])
|
|
35
35
|
]),
|
|
36
|
-
default:
|
|
37
|
-
|
|
36
|
+
default: P(() => [
|
|
37
|
+
r(h, {
|
|
38
38
|
name: "info",
|
|
39
39
|
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
40
40
|
})
|
|
@@ -44,7 +44,7 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
44
44
|
]);
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
}), we = { class: "fm-typo-en-title-md-600" }, xe = { class: "flex items-center justify-start gap-8" }, ke = /* @__PURE__ */
|
|
47
|
+
}), we = { class: "fm-typo-en-title-md-600" }, xe = { class: "flex items-center justify-start gap-8" }, ke = /* @__PURE__ */ q({
|
|
48
48
|
__name: "PermissionSetForm",
|
|
49
49
|
props: {
|
|
50
50
|
modelValue: {
|
|
@@ -52,137 +52,137 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
52
52
|
default: () => ({})
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
setup(
|
|
56
|
-
const t =
|
|
55
|
+
setup(E, { expose: k }) {
|
|
56
|
+
const t = E, { t: i } = M(), l = b(!1), R = S(() => {
|
|
57
57
|
var e;
|
|
58
58
|
return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
59
|
-
}), C =
|
|
59
|
+
}), C = b(), h = Q(), F = ge(h), m = Y(), a = b({ ...t.modelValue }), d = b([]), p = b([]), D = [(e) => !!e || "Permission set name is required"], U = S(() => {
|
|
60
60
|
var e;
|
|
61
61
|
return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
62
62
|
}), W = S(
|
|
63
|
-
() =>
|
|
63
|
+
() => m.permissionSets.value.filter((e) => {
|
|
64
64
|
var s;
|
|
65
65
|
return e.id !== ((s = t.modelValue) == null ? void 0 : s.id);
|
|
66
66
|
}).map((e) => ({ label: e.name, value: e.id }))
|
|
67
|
-
),
|
|
68
|
-
() => Z(d.value,
|
|
69
|
-
), { customReportPermissions:
|
|
70
|
-
|
|
67
|
+
), V = S(
|
|
68
|
+
() => Z(d.value, m.permissionSets.value)
|
|
69
|
+
), { customReportPermissions: L, isLoaded: n } = K(), o = new Set(
|
|
70
|
+
G.filter((e) => e.subject.startsWith(fe)).map((e) => e.subject)
|
|
71
71
|
), f = S(() => {
|
|
72
72
|
const e = new Set(o);
|
|
73
|
-
for (const s of
|
|
73
|
+
for (const s of L.value) e.add(s.subject);
|
|
74
74
|
return e;
|
|
75
75
|
}), j = S(() => {
|
|
76
76
|
const e = /* @__PURE__ */ new Set();
|
|
77
|
-
for (const s of
|
|
78
|
-
s.category ===
|
|
79
|
-
for (const s of
|
|
80
|
-
s.category ===
|
|
77
|
+
for (const s of G)
|
|
78
|
+
s.category === J.reports && e.add(s.subject);
|
|
79
|
+
for (const s of L.value)
|
|
80
|
+
s.category === J.reports && e.add(s.subject);
|
|
81
81
|
return e;
|
|
82
82
|
});
|
|
83
83
|
async function O() {
|
|
84
84
|
var s, v;
|
|
85
|
-
await ne(),
|
|
85
|
+
await ne(), l.value = !l.value, a.value = { ...t.modelValue }, d.value = ((s = t.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
86
86
|
const e = ((v = t.modelValue) == null ? void 0 : v.permissions) ?? [];
|
|
87
87
|
p.value = ve(
|
|
88
|
-
A(
|
|
88
|
+
A(V.value),
|
|
89
89
|
e
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
function I() {
|
|
93
|
-
const e = A(
|
|
94
|
-
return
|
|
93
|
+
const e = A(V.value), s = n.value ? f.value : o, v = Se(p.value, s), w = _e(v, j.value), x = be(w);
|
|
94
|
+
return he(e, x);
|
|
95
95
|
}
|
|
96
96
|
function ee() {
|
|
97
|
-
p.value = A(
|
|
97
|
+
p.value = A(V.value);
|
|
98
98
|
}
|
|
99
99
|
async function se() {
|
|
100
|
-
var v,
|
|
101
|
-
const e = await ((v = C.value) == null ? void 0 : v.validateInputsWithoutSubmit()), s = (
|
|
102
|
-
!(e != null && e.length) && s &&
|
|
100
|
+
var v, w;
|
|
101
|
+
const e = await ((v = C.value) == null ? void 0 : v.validateInputsWithoutSubmit()), s = (w = ae().currentBusiness.value) == null ? void 0 : w.id;
|
|
102
|
+
!(e != null && e.length) && s && F.minor(async () => {
|
|
103
103
|
var T;
|
|
104
|
-
const
|
|
104
|
+
const x = I();
|
|
105
105
|
if ((T = t.modelValue) != null && T.id) {
|
|
106
106
|
const B = {
|
|
107
107
|
name: a.value.name,
|
|
108
|
-
permissions:
|
|
108
|
+
permissions: x,
|
|
109
109
|
permissionSetIds: d.value,
|
|
110
110
|
businessId: a.value.businessId
|
|
111
111
|
};
|
|
112
|
-
await
|
|
112
|
+
await m.updatePermissionSet(t.modelValue.id, B);
|
|
113
113
|
} else {
|
|
114
114
|
const B = {
|
|
115
115
|
name: a.value.name,
|
|
116
116
|
businessId: s,
|
|
117
|
-
permissions:
|
|
117
|
+
permissions: x,
|
|
118
118
|
permissionSetIds: d.value
|
|
119
119
|
};
|
|
120
|
-
await
|
|
120
|
+
await m.createPermissionSet(B);
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
l.value = !1;
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
return k({
|
|
126
126
|
trigger: O
|
|
127
127
|
}), (e, s) => {
|
|
128
|
-
const v =
|
|
129
|
-
return
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue": s[4] || (s[4] = (
|
|
128
|
+
const v = u("FmTextField"), w = u("FmSelect"), x = u("FmForm"), T = u("FmButton"), B = u("FmSideSheet");
|
|
129
|
+
return g(), H(B, {
|
|
130
|
+
modelValue: l.value,
|
|
131
|
+
"onUpdate:modelValue": s[4] || (s[4] = (_) => l.value = _),
|
|
132
132
|
"max-width": 560,
|
|
133
133
|
"dismiss-away": ""
|
|
134
134
|
}, {
|
|
135
|
-
"side-sheet-header":
|
|
136
|
-
|
|
135
|
+
"side-sheet-header": P(() => [
|
|
136
|
+
y("p", we, N(R.value), 1)
|
|
137
137
|
]),
|
|
138
|
-
"side-sheet-footer":
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
"side-sheet-footer": P(() => [
|
|
139
|
+
y("div", xe, [
|
|
140
|
+
r(T, {
|
|
141
141
|
label: U.value,
|
|
142
142
|
size: "md",
|
|
143
143
|
variant: "primary",
|
|
144
144
|
type: "submit",
|
|
145
145
|
onClick: se
|
|
146
146
|
}, null, 8, ["label"]),
|
|
147
|
-
|
|
148
|
-
label:
|
|
147
|
+
r(T, {
|
|
148
|
+
label: c(i)("common.cancel"),
|
|
149
149
|
size: "md",
|
|
150
150
|
variant: "secondary",
|
|
151
|
-
onClick: s[3] || (s[3] = (
|
|
151
|
+
onClick: s[3] || (s[3] = (_) => l.value = !1)
|
|
152
152
|
}, null, 8, ["label"])
|
|
153
153
|
])
|
|
154
154
|
]),
|
|
155
|
-
default:
|
|
156
|
-
|
|
155
|
+
default: P(() => [
|
|
156
|
+
r(x, {
|
|
157
157
|
ref_key: "formRef",
|
|
158
158
|
ref: C
|
|
159
159
|
}, {
|
|
160
|
-
default:
|
|
161
|
-
|
|
160
|
+
default: P(() => [
|
|
161
|
+
r(v, {
|
|
162
162
|
modelValue: a.value.name,
|
|
163
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
164
|
-
label:
|
|
165
|
-
placeholder:
|
|
163
|
+
"onUpdate:modelValue": s[0] || (s[0] = (_) => a.value.name = _),
|
|
164
|
+
label: c(i)("permissionSet.form.name"),
|
|
165
|
+
placeholder: c(i)("permissionSet.form.namePlaceholder"),
|
|
166
166
|
rules: D
|
|
167
167
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
168
|
-
|
|
168
|
+
r(w, {
|
|
169
169
|
modelValue: d.value,
|
|
170
170
|
"onUpdate:modelValue": [
|
|
171
|
-
s[1] || (s[1] = (
|
|
171
|
+
s[1] || (s[1] = (_) => d.value = _),
|
|
172
172
|
ee
|
|
173
173
|
],
|
|
174
174
|
multiselect: "",
|
|
175
175
|
searchable: "",
|
|
176
176
|
"search-debounce": 300,
|
|
177
177
|
items: W.value,
|
|
178
|
-
label:
|
|
179
|
-
placeholder:
|
|
178
|
+
label: c(i)("permissionSet.form.includedSets"),
|
|
179
|
+
placeholder: c(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
180
180
|
class: "mt-16"
|
|
181
181
|
}, null, 8, ["modelValue", "items", "label", "placeholder"]),
|
|
182
|
-
|
|
182
|
+
r(ye, {
|
|
183
183
|
modelValue: p.value,
|
|
184
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
|
185
|
-
"inherit-permissions":
|
|
184
|
+
"onUpdate:modelValue": s[2] || (s[2] = (_) => p.value = _),
|
|
185
|
+
"inherit-permissions": V.value,
|
|
186
186
|
class: "mt-24"
|
|
187
187
|
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
188
188
|
]),
|
|
@@ -193,24 +193,27 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
193
193
|
}, 8, ["modelValue"]);
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
}), Re = { class: "space-y-8" }, Ce = { class: "flex justify-end xs:px-16" },
|
|
196
|
+
}), Re = { class: "space-y-8" }, Ce = { class: "flex justify-end xs:px-16" }, je = {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "overflow-auto"
|
|
199
|
+
}, Ie = { class: "pb-64" }, We = /* @__PURE__ */ q({
|
|
197
200
|
__name: "PermissionSetList",
|
|
198
|
-
setup(
|
|
199
|
-
const { t } =
|
|
201
|
+
setup(E, { expose: k }) {
|
|
202
|
+
const { t } = M(), { fetchCustomReportPermissions: i } = K(), l = Q(), R = le(), { breakpoints: C } = re(), h = b(""), F = S(() => {
|
|
200
203
|
var n;
|
|
201
204
|
return (n = d.value) == null ? void 0 : n.filter((o) => {
|
|
202
|
-
const f =
|
|
205
|
+
const f = h.value.toLowerCase();
|
|
203
206
|
return o.name.toLowerCase().includes(f);
|
|
204
207
|
});
|
|
205
|
-
}),
|
|
208
|
+
}), m = b(), a = Y(), d = S(
|
|
206
209
|
() => a.permissionSets.value
|
|
207
|
-
), p =
|
|
210
|
+
), p = b();
|
|
208
211
|
async function D() {
|
|
209
212
|
await a.readPermissionSets();
|
|
210
213
|
}
|
|
211
214
|
function U(n) {
|
|
212
215
|
var o;
|
|
213
|
-
p.value = n, (o =
|
|
216
|
+
p.value = n, (o = m.value) == null || o.trigger();
|
|
214
217
|
}
|
|
215
218
|
const W = [
|
|
216
219
|
{
|
|
@@ -239,11 +242,11 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
239
242
|
return z("div", { class: "w-full flex justify-end items-center" }, [
|
|
240
243
|
z(me.FmButton, {
|
|
241
244
|
prependIcon: "delete",
|
|
242
|
-
variant:
|
|
243
|
-
textColor:
|
|
245
|
+
variant: ue.Tertiary,
|
|
246
|
+
textColor: ce.NeutralGray400,
|
|
244
247
|
class: "flex flex-end",
|
|
245
248
|
onClick: (o) => {
|
|
246
|
-
o.stopPropagation(),
|
|
249
|
+
o.stopPropagation(), L(n.row.original);
|
|
247
250
|
}
|
|
248
251
|
})
|
|
249
252
|
]);
|
|
@@ -251,11 +254,11 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
251
254
|
enableSorting: !1
|
|
252
255
|
}
|
|
253
256
|
];
|
|
254
|
-
function
|
|
257
|
+
function V() {
|
|
255
258
|
var n;
|
|
256
|
-
p.value = void 0, (n =
|
|
259
|
+
p.value = void 0, (n = m.value) == null || n.trigger();
|
|
257
260
|
}
|
|
258
|
-
async function
|
|
261
|
+
async function L(n) {
|
|
259
262
|
R.open({
|
|
260
263
|
title: t("permissionSet.form.delete.title"),
|
|
261
264
|
message: t("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
@@ -268,15 +271,15 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
268
271
|
secondaryActions: { text: t("common.cancel"), close: !0 }
|
|
269
272
|
}).onPrimary(async () => {
|
|
270
273
|
try {
|
|
271
|
-
await a.deletePermissionSet(n.id),
|
|
274
|
+
await a.deletePermissionSet(n.id), l.open({
|
|
272
275
|
message: t("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
273
276
|
type: "success"
|
|
274
277
|
});
|
|
275
278
|
} catch (o) {
|
|
276
|
-
const f = o instanceof
|
|
279
|
+
const f = o instanceof Pe && o.status === 409 ? o.message.includes("referenced by") ? t("permissionSet.form.delete.setReferencedConflictError", {
|
|
277
280
|
permissionSetName: n.name
|
|
278
281
|
}) : t("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : o instanceof Error ? o.message : `${o}`;
|
|
279
|
-
|
|
282
|
+
l.open({ message: f, type: "error" });
|
|
280
283
|
}
|
|
281
284
|
R.close();
|
|
282
285
|
});
|
|
@@ -284,45 +287,46 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
284
287
|
return ie(() => {
|
|
285
288
|
D(), i();
|
|
286
289
|
}), k({
|
|
287
|
-
create:
|
|
290
|
+
create: V
|
|
288
291
|
}), (n, o) => {
|
|
289
|
-
const f =
|
|
290
|
-
return
|
|
291
|
-
|
|
292
|
+
const f = u("FmSearch"), j = u("FmTable"), O = u("FullWrapper");
|
|
293
|
+
return g(), $(X, null, [
|
|
294
|
+
r(ke, {
|
|
292
295
|
ref_key: "permissionSetFormRef",
|
|
293
|
-
ref:
|
|
296
|
+
ref: m,
|
|
294
297
|
"model-value": p.value
|
|
295
298
|
}, null, 8, ["model-value"]),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
modelValue:
|
|
300
|
-
"onUpdate:modelValue": o[0] || (o[0] = (I) =>
|
|
299
|
+
y("div", Re, [
|
|
300
|
+
y("div", Ce, [
|
|
301
|
+
r(f, {
|
|
302
|
+
modelValue: h.value,
|
|
303
|
+
"onUpdate:modelValue": o[0] || (o[0] = (I) => h.value = I),
|
|
301
304
|
class: "w-[320px] xs:w-full",
|
|
302
305
|
autofocus: "",
|
|
303
|
-
placeholder:
|
|
306
|
+
placeholder: c(t)("permissionSet.search.placeholder")
|
|
304
307
|
}, null, 8, ["modelValue", "placeholder"])
|
|
305
308
|
]),
|
|
306
|
-
d.value.length > 0 ? (
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
309
|
+
d.value.length > 0 ? (g(), $("div", je, [
|
|
310
|
+
y("div", Ie, [
|
|
311
|
+
r(O, null, {
|
|
312
|
+
default: P(() => [
|
|
313
|
+
r(j, {
|
|
314
|
+
"column-defs": W,
|
|
315
|
+
"row-data": F.value,
|
|
316
|
+
"page-size": F.value.length,
|
|
317
|
+
"pin-header-row": "",
|
|
318
|
+
"hide-footer": "",
|
|
319
|
+
"shrink-at": !1,
|
|
320
|
+
onRowClick: o[1] || (o[1] = (I) => U(I.original))
|
|
321
|
+
}, null, 8, ["row-data", "page-size"])
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
324
|
+
})
|
|
325
|
+
])
|
|
326
|
+
])) : (g(), H(c(de), {
|
|
323
327
|
key: 1,
|
|
324
|
-
title:
|
|
325
|
-
subtitle:
|
|
328
|
+
title: c(t)("permissionSet.noData.title"),
|
|
329
|
+
subtitle: c(t)("permissionSet.noData.subtitle")
|
|
326
330
|
}, null, 8, ["title", "subtitle"]))
|
|
327
331
|
])
|
|
328
332
|
], 64);
|
|
@@ -330,5 +334,5 @@ const Fe = { class: "flex flex-row items-center gap-8" }, Ve = /* @__PURE__ */ M
|
|
|
330
334
|
}
|
|
331
335
|
});
|
|
332
336
|
export {
|
|
333
|
-
|
|
337
|
+
We as default
|
|
334
338
|
};
|