@feedmepos/mf-hrm-portal 2.0.17-dev.2 → 2.0.17-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-DQOiwup5.js → AuditLogList-C6qAeY5g.js} +5 -5
- package/dist/{EmployeeList-oERrzrAd.js → EmployeeList-COtXtTqG.js} +16 -17
- package/dist/{Main-C8ja5xs6.js → Main--tejoyEP.js} +4 -4
- package/dist/{Main-2uJvk5L7.js → Main-BNXKItvX.js} +8 -7
- package/dist/{Main-5nIpv-Sp.js → Main-Dkr5lzbv.js} +9 -9
- package/dist/PermissionSetList-B_Sdvbu7.js +340 -0
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B-hvBqE0.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBsaxaXu.js} +575 -575
- package/dist/{RoleList-CDBP2W5v.js → RoleList-SZCgvYvC.js} +17 -18
- package/dist/TeamMemberList-Dk5HeFfQ.js +1008 -0
- package/dist/{TimesheetList-D1ByiuwP.js → TimesheetList-D-3k0Uad.js} +6 -6
- package/dist/{app-hS6MBhCw.js → app-BjXuSCis.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DFcH-XYr.js → dayjs.min-z-vrgFCL.js} +1 -1
- package/dist/{employee-fBtBUEwZ.js → employee-DAqAMupR.js} +3 -3
- package/dist/{iteration-D23fqAQH.js → iteration-Cp1eSTJA.js} +1 -1
- package/dist/{lodash-Cqc7y4P5.js → lodash-CXLZQQp8.js} +1 -1
- package/dist/{rule-BBJzenE1.js → rule-vBxopbM_.js} +2 -2
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +2 -0
- package/dist/{team-Dq3VcGNH.js → team-CnQ_rIx2.js} +1 -1
- package/dist/{timesheet-OfLQjuvO.js → timesheet-BlPhOifI.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Du6PRBq0.js → useAppStore-BVnrWyPF.js} +1 -1
- package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
- package/dist/{useLoading-DkTCR5A7.js → useLoading-7ia-Bps7.js} +1 -1
- package/dist/{useReportPermissions-DhhjBwPs.js → useReportPermissions-C8HMek35.js} +3 -3
- package/package.json +1 -1
- package/dist/PermissionSetList-CtpaWlVM.js +0 -323
- package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +0 -132
- package/dist/TeamMemberList-DSzNjP4y.js +0 -996
- package/dist/useDiscardConfirm-BHni0LNu.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as I, storeToRefs as Q } from "pinia";
|
|
2
2
|
import { ref as w } from "vue";
|
|
3
3
|
import { useCoreStore as x, baseClientInstance as S } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as l, b as g, s as h } from "./iteration-
|
|
4
|
+
import { g as l, b as g, s as h } from "./iteration-Cp1eSTJA.js";
|
|
5
5
|
const y = {
|
|
6
6
|
async readRoles() {
|
|
7
7
|
return l(await g().get("/pos-roles"));
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { defineComponent as x, ref as M, resolveComponent as l, createBlock as a, openBlock as t, withCtx as i, createElementVNode as g, renderSlot as b, createCommentVNode as k, withModifiers as $, nextTick as I, createElementBlock as f, normalizeClass as h, createTextVNode as V, toDisplayString as C, computed as w, Fragment as B, renderList as F, createVNode as S } from "vue";
|
|
2
|
+
import { useBreakpoints as z, useDialog as D } from "@feedmepos/ui-library";
|
|
3
|
+
import { useI18n as N } from "@feedmepos/mf-common";
|
|
4
|
+
const A = /* @__PURE__ */ x({
|
|
5
|
+
__name: "BottomSheetMenu",
|
|
6
|
+
setup(o) {
|
|
7
|
+
const e = M(!1);
|
|
8
|
+
async function r() {
|
|
9
|
+
await I(), e.value = !e.value;
|
|
10
|
+
}
|
|
11
|
+
return (n, s) => {
|
|
12
|
+
const y = l("FmButton"), _ = l("FmBottomSheet");
|
|
13
|
+
return t(), a(_, {
|
|
14
|
+
modelValue: e.value,
|
|
15
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => e.value = d),
|
|
16
|
+
"dismiss-away": "",
|
|
17
|
+
"no-header": "",
|
|
18
|
+
"z-index": 110
|
|
19
|
+
}, {
|
|
20
|
+
"bottom-sheet-button": i(() => [
|
|
21
|
+
n.$slots.button ? k("", !0) : (t(), a(y, {
|
|
22
|
+
key: 0,
|
|
23
|
+
icon: "more_vert",
|
|
24
|
+
variant: "tertiary",
|
|
25
|
+
onClick: $(r, ["stop"])
|
|
26
|
+
})),
|
|
27
|
+
b(n.$slots, "button")
|
|
28
|
+
]),
|
|
29
|
+
default: i(() => [
|
|
30
|
+
g("div", {
|
|
31
|
+
onClick: s[0] || (s[0] = (d) => e.value = !1)
|
|
32
|
+
}, [
|
|
33
|
+
b(n.$slots, "default")
|
|
34
|
+
])
|
|
35
|
+
]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 8, ["modelValue"]);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}), E = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, T = /* @__PURE__ */ x({
|
|
41
|
+
__name: "BottomSheetMenuItem",
|
|
42
|
+
props: {
|
|
43
|
+
label: {},
|
|
44
|
+
icon: {},
|
|
45
|
+
disabled: { type: Boolean },
|
|
46
|
+
itemClass: {}
|
|
47
|
+
},
|
|
48
|
+
setup(o) {
|
|
49
|
+
const e = o;
|
|
50
|
+
return (r, n) => {
|
|
51
|
+
const s = l("FmIcon");
|
|
52
|
+
return t(), f("div", E, [
|
|
53
|
+
r.$slots.content ? k("", !0) : (t(), f("div", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: h(["flex items-center", {
|
|
56
|
+
"text-fm-color-typo-disabled": e.disabled,
|
|
57
|
+
"cursor-pointer": !e.disabled,
|
|
58
|
+
"cursor-not-allowed": e.disabled,
|
|
59
|
+
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
60
|
+
}])
|
|
61
|
+
}, [
|
|
62
|
+
o.icon ? (t(), a(s, {
|
|
63
|
+
key: 0,
|
|
64
|
+
name: o.icon
|
|
65
|
+
}, null, 8, ["name"])) : k("", !0),
|
|
66
|
+
V(" " + C(o.label), 1)
|
|
67
|
+
], 2)),
|
|
68
|
+
b(r.$slots, "content")
|
|
69
|
+
]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}), U = /* @__PURE__ */ x({
|
|
73
|
+
__name: "ResponsiveContextMenu",
|
|
74
|
+
props: {
|
|
75
|
+
items: {}
|
|
76
|
+
},
|
|
77
|
+
setup(o) {
|
|
78
|
+
const e = z(), r = w(() => e.breakpoints.value.xs);
|
|
79
|
+
return (n, s) => {
|
|
80
|
+
const y = l("FmButton"), _ = l("FmMenuItem"), d = l("FmMenu");
|
|
81
|
+
return r.value ? (t(), a(A, { key: 0 }, {
|
|
82
|
+
default: i(() => [
|
|
83
|
+
(t(!0), f(B, null, F(o.items, ({ icon: c, label: m, disabled: p, itemClass: u, onClick: v }) => (t(), a(T, {
|
|
84
|
+
key: m,
|
|
85
|
+
icon: c,
|
|
86
|
+
label: m,
|
|
87
|
+
disabled: p,
|
|
88
|
+
itemClass: u,
|
|
89
|
+
onClick: () => {
|
|
90
|
+
!p && (v == null || v());
|
|
91
|
+
}
|
|
92
|
+
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
})) : (t(), a(d, {
|
|
96
|
+
key: 1,
|
|
97
|
+
"stop-click-propagation": "",
|
|
98
|
+
shift: !0
|
|
99
|
+
}, {
|
|
100
|
+
"menu-button": i(() => [
|
|
101
|
+
S(y, {
|
|
102
|
+
type: "button",
|
|
103
|
+
variant: "tertiary",
|
|
104
|
+
icon: "more_vert",
|
|
105
|
+
"text-color": "neutral-gray-400",
|
|
106
|
+
size: "md"
|
|
107
|
+
})
|
|
108
|
+
]),
|
|
109
|
+
default: i(() => [
|
|
110
|
+
(t(!0), f(B, null, F(o.items, ({ label: c, disabled: m, itemClass: p, onClick: u }) => (t(), a(_, {
|
|
111
|
+
key: c,
|
|
112
|
+
disabled: m,
|
|
113
|
+
label: c,
|
|
114
|
+
onClick: () => {
|
|
115
|
+
!m && (u == null || u());
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
label: i(() => [
|
|
119
|
+
g("span", {
|
|
120
|
+
class: h(m ? "text-fm-color-typo-disabled" : p)
|
|
121
|
+
}, C(c), 3)
|
|
122
|
+
]),
|
|
123
|
+
_: 2
|
|
124
|
+
}, 1032, ["disabled", "label", "onClick"]))), 128))
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
function j(o, e) {
|
|
132
|
+
const r = D(), { t: n } = N();
|
|
133
|
+
function s() {
|
|
134
|
+
o() ? r.open({
|
|
135
|
+
title: n("portalCommon.dismiss.title"),
|
|
136
|
+
message: n("portalCommon.dismiss.message"),
|
|
137
|
+
zIndex: 200,
|
|
138
|
+
primaryActions: {
|
|
139
|
+
text: n("portalCommon.dismiss.primaryActions"),
|
|
140
|
+
variant: "primary",
|
|
141
|
+
close: !0
|
|
142
|
+
},
|
|
143
|
+
secondaryActions: {
|
|
144
|
+
text: n("common.cancel"),
|
|
145
|
+
variant: "tertiary",
|
|
146
|
+
close: !0
|
|
147
|
+
}
|
|
148
|
+
}).onPrimary(() => {
|
|
149
|
+
e();
|
|
150
|
+
}) : e();
|
|
151
|
+
}
|
|
152
|
+
return s;
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
U as _,
|
|
156
|
+
j as u
|
|
157
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as I, isRef as L, watch as M } from "vue";
|
|
2
2
|
import { SnackbarPosition as y } from "@feedmepos/ui-library";
|
|
3
|
-
import { a as w, v } from "./useAppStore-
|
|
3
|
+
import { a as w, v } from "./useAppStore-BVnrWyPF.js";
|
|
4
4
|
const E = (r) => {
|
|
5
5
|
async function d(u, e) {
|
|
6
6
|
var l, a;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as u, ref as r } from "vue";
|
|
2
|
-
import { e as l } from "./iteration-
|
|
2
|
+
import { e as l } from "./iteration-Cp1eSTJA.js";
|
|
3
3
|
import { useCoreStore as y } from "@feedmepos/mf-common";
|
|
4
|
-
import { e as R, R as h } from "./rule-
|
|
5
|
-
import "./app-
|
|
4
|
+
import { e as R, R as h } from "./rule-vBxopbM_.js";
|
|
5
|
+
import "./app-BjXuSCis.js";
|
|
6
6
|
const n = r([]), c = r(!1), t = r(!1), m = r(null);
|
|
7
7
|
function L() {
|
|
8
8
|
const d = y();
|
package/package.json
CHANGED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, ref as b, computed as S, resolveComponent as g, createBlock as W, openBlock as L, withCtx as I, createVNode as c, unref as u, createElementVNode as A, toDisplayString as ee, nextTick as se, onMounted as te, createElementBlock as oe, Fragment as ne, h as v } from "vue";
|
|
2
|
-
import { useI18n as G, useCoreStore as ie } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as H, useDialog as ae, useBreakpoints as le, components as q } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
5
|
-
import { _ as me } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
6
|
-
import { u as Q, c as Y, d as Z, p as K, i as ce, b as ue, m as N, k as de, l as pe, s as fe, n as ve, q as Se } from "./rule-BBJzenE1.js";
|
|
7
|
-
import { A as be } from "./iteration-D23fqAQH.js";
|
|
8
|
-
import { u as ge } from "./useLoading-DkTCR5A7.js";
|
|
9
|
-
import { p as J } from "./app-hS6MBhCw.js";
|
|
10
|
-
import { _ as Pe } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B-hvBqE0.js";
|
|
11
|
-
const _e = { class: "fm-typo-en-title-md-600" }, he = { class: "flex items-center justify-start gap-8" }, ye = /* @__PURE__ */ X({
|
|
12
|
-
__name: "PermissionSetForm",
|
|
13
|
-
props: {
|
|
14
|
-
modelValue: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => ({})
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
setup(M, { expose: D }) {
|
|
20
|
-
const t = M, { t: i } = G(), d = b(!1), $ = S(() => {
|
|
21
|
-
var e;
|
|
22
|
-
return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
23
|
-
}), V = b(), U = H(), x = ge(U), P = Q(), r = b({ ...t.modelValue }), a = b([]), p = b([]), k = [(e) => !!e || "Permission set name is required"], z = S(() => {
|
|
24
|
-
var e;
|
|
25
|
-
return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
26
|
-
}), E = S(
|
|
27
|
-
() => P.permissionSets.value.filter((e) => {
|
|
28
|
-
var s;
|
|
29
|
-
return e.id !== ((s = t.modelValue) == null ? void 0 : s.id);
|
|
30
|
-
}).map((e) => ({ label: e.name, value: e.id }))
|
|
31
|
-
), h = S(
|
|
32
|
-
() => Y(a.value, P.permissionSets.value)
|
|
33
|
-
), { customReportPermissions: B, isLoaded: O } = Z(), n = new Set(
|
|
34
|
-
K.filter((e) => e.subject.startsWith(ce)).map((e) => e.subject)
|
|
35
|
-
), o = S(() => {
|
|
36
|
-
const e = new Set(n);
|
|
37
|
-
for (const s of B.value) e.add(s.subject);
|
|
38
|
-
return e;
|
|
39
|
-
}), l = S(() => {
|
|
40
|
-
const e = /* @__PURE__ */ new Set();
|
|
41
|
-
for (const s of K)
|
|
42
|
-
s.category === J.reports && e.add(s.subject);
|
|
43
|
-
for (const s of B.value)
|
|
44
|
-
s.category === J.reports && e.add(s.subject);
|
|
45
|
-
return e;
|
|
46
|
-
});
|
|
47
|
-
async function y() {
|
|
48
|
-
var s, m;
|
|
49
|
-
await se(), d.value = !d.value, r.value = { ...t.modelValue }, a.value = ((s = t.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
|
|
50
|
-
const e = ((m = t.modelValue) == null ? void 0 : m.permissions) ?? [];
|
|
51
|
-
p.value = ue(
|
|
52
|
-
N(h.value),
|
|
53
|
-
e
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
function C() {
|
|
57
|
-
const e = N(h.value), s = O.value ? o.value : n, m = de(p.value, s), w = pe(m, l.value), F = fe(w);
|
|
58
|
-
return ve(e, F);
|
|
59
|
-
}
|
|
60
|
-
function _() {
|
|
61
|
-
p.value = N(h.value);
|
|
62
|
-
}
|
|
63
|
-
async function T() {
|
|
64
|
-
var m, w;
|
|
65
|
-
const e = await ((m = V.value) == null ? void 0 : m.validateInputsWithoutSubmit()), s = (w = ie().currentBusiness.value) == null ? void 0 : w.id;
|
|
66
|
-
!(e != null && e.length) && s && x.minor(async () => {
|
|
67
|
-
var R;
|
|
68
|
-
const F = C();
|
|
69
|
-
if ((R = t.modelValue) != null && R.id) {
|
|
70
|
-
const j = {
|
|
71
|
-
name: r.value.name,
|
|
72
|
-
permissions: F,
|
|
73
|
-
permissionSetIds: a.value,
|
|
74
|
-
businessId: r.value.businessId
|
|
75
|
-
};
|
|
76
|
-
await P.updatePermissionSet(t.modelValue.id, j);
|
|
77
|
-
} else {
|
|
78
|
-
const j = {
|
|
79
|
-
name: r.value.name,
|
|
80
|
-
businessId: s,
|
|
81
|
-
permissions: F,
|
|
82
|
-
permissionSetIds: a.value
|
|
83
|
-
};
|
|
84
|
-
await P.createPermissionSet(j);
|
|
85
|
-
}
|
|
86
|
-
d.value = !1;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
return D({
|
|
90
|
-
trigger: y
|
|
91
|
-
}), (e, s) => {
|
|
92
|
-
const m = g("FmTextField"), w = g("FmSelect"), F = g("FmForm"), R = g("FmButton"), j = g("FmSideSheet");
|
|
93
|
-
return L(), W(j, {
|
|
94
|
-
modelValue: d.value,
|
|
95
|
-
"onUpdate:modelValue": s[4] || (s[4] = (f) => d.value = f),
|
|
96
|
-
"max-width": 960,
|
|
97
|
-
"dismiss-away": ""
|
|
98
|
-
}, {
|
|
99
|
-
"side-sheet-header": I(() => [
|
|
100
|
-
A("p", _e, ee($.value), 1)
|
|
101
|
-
]),
|
|
102
|
-
"side-sheet-footer": I(() => [
|
|
103
|
-
A("div", he, [
|
|
104
|
-
c(R, {
|
|
105
|
-
label: z.value,
|
|
106
|
-
size: "md",
|
|
107
|
-
variant: "primary",
|
|
108
|
-
type: "submit",
|
|
109
|
-
onClick: T
|
|
110
|
-
}, null, 8, ["label"]),
|
|
111
|
-
c(R, {
|
|
112
|
-
label: u(i)("common.cancel"),
|
|
113
|
-
size: "md",
|
|
114
|
-
variant: "secondary",
|
|
115
|
-
onClick: s[3] || (s[3] = (f) => d.value = !1)
|
|
116
|
-
}, null, 8, ["label"])
|
|
117
|
-
])
|
|
118
|
-
]),
|
|
119
|
-
default: I(() => [
|
|
120
|
-
c(F, {
|
|
121
|
-
ref_key: "formRef",
|
|
122
|
-
ref: V
|
|
123
|
-
}, {
|
|
124
|
-
default: I(() => [
|
|
125
|
-
c(m, {
|
|
126
|
-
modelValue: r.value.name,
|
|
127
|
-
"onUpdate:modelValue": s[0] || (s[0] = (f) => r.value.name = f),
|
|
128
|
-
label: u(i)("permissionSet.form.name"),
|
|
129
|
-
placeholder: u(i)("permissionSet.form.namePlaceholder"),
|
|
130
|
-
rules: k
|
|
131
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
132
|
-
c(w, {
|
|
133
|
-
modelValue: a.value,
|
|
134
|
-
"onUpdate:modelValue": [
|
|
135
|
-
s[1] || (s[1] = (f) => a.value = f),
|
|
136
|
-
_
|
|
137
|
-
],
|
|
138
|
-
multiselect: "",
|
|
139
|
-
searchable: "",
|
|
140
|
-
"search-debounce": 300,
|
|
141
|
-
items: E.value,
|
|
142
|
-
label: u(i)("permissionSet.form.includedSets"),
|
|
143
|
-
placeholder: u(i)("permissionSet.form.includedSetsPlaceholder"),
|
|
144
|
-
class: "mt-16"
|
|
145
|
-
}, null, 8, ["modelValue", "items", "label", "placeholder"]),
|
|
146
|
-
c(Pe, {
|
|
147
|
-
modelValue: p.value,
|
|
148
|
-
"onUpdate:modelValue": s[2] || (s[2] = (f) => p.value = f),
|
|
149
|
-
"inherit-permissions": h.value,
|
|
150
|
-
class: "mt-24"
|
|
151
|
-
}, null, 8, ["modelValue", "inherit-permissions"])
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
}, 512)
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
157
|
-
}, 8, ["modelValue"]);
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
}), we = { class: "space-y-8" }, Fe = { class: "flex justify-end xs:px-16" }, Te = /* @__PURE__ */ X({
|
|
161
|
-
__name: "PermissionSetList",
|
|
162
|
-
setup(M, { expose: D }) {
|
|
163
|
-
const { t } = G(), { customReportPermissions: i, fetchCustomReportPermissions: d } = Z(), $ = H(), V = ae(), { breakpoints: U } = le(), x = b(""), P = S(() => {
|
|
164
|
-
var n;
|
|
165
|
-
return (n = p.value) == null ? void 0 : n.filter((o) => {
|
|
166
|
-
const l = x.value.toLowerCase();
|
|
167
|
-
return o.name.toLowerCase().includes(l);
|
|
168
|
-
});
|
|
169
|
-
}), r = b(), a = Q(), p = S(
|
|
170
|
-
() => a.permissionSets.value
|
|
171
|
-
), k = b();
|
|
172
|
-
async function z() {
|
|
173
|
-
await a.readPermissionSets();
|
|
174
|
-
}
|
|
175
|
-
function E(n) {
|
|
176
|
-
var o;
|
|
177
|
-
k.value = n, (o = r.value) == null || o.trigger();
|
|
178
|
-
}
|
|
179
|
-
const h = [
|
|
180
|
-
{
|
|
181
|
-
accessorKey: "name",
|
|
182
|
-
header: () => t("permissionSet.table.columns.name")
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
accessorKey: "permission",
|
|
186
|
-
header: () => t("permissionSet.table.columns.permissions"),
|
|
187
|
-
enableSorting: !1,
|
|
188
|
-
cell(n) {
|
|
189
|
-
const o = n.row.original, l = Y(
|
|
190
|
-
[o.id],
|
|
191
|
-
a.permissionSets.value
|
|
192
|
-
), y = N(l), C = y.length, _ = Se(y, i.value);
|
|
193
|
-
return v("div", { class: "flex items-center gap-8" }, [
|
|
194
|
-
v("span", t("team.labels.allowedCount", { count: C })),
|
|
195
|
-
v(
|
|
196
|
-
q.FmTooltip,
|
|
197
|
-
{ variant: "plain", placement: "top" },
|
|
198
|
-
{
|
|
199
|
-
default: () => v(q.FmIcon, {
|
|
200
|
-
name: "info",
|
|
201
|
-
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
202
|
-
}),
|
|
203
|
-
content: () => v("div", [
|
|
204
|
-
t("team.labels.permission"),
|
|
205
|
-
..._.map(
|
|
206
|
-
(T, e) => v("div", { key: `${T}-${e}` }, `- ${T}`)
|
|
207
|
-
)
|
|
208
|
-
])
|
|
209
|
-
}
|
|
210
|
-
)
|
|
211
|
-
]);
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
id: "action",
|
|
216
|
-
size: 52,
|
|
217
|
-
meta: {
|
|
218
|
-
cellClass: "pl-16",
|
|
219
|
-
headerContentClass: "-mx-16"
|
|
220
|
-
},
|
|
221
|
-
cell(n) {
|
|
222
|
-
const o = n.row.original;
|
|
223
|
-
return v(
|
|
224
|
-
"div",
|
|
225
|
-
{ class: "flex w-full items-center justify-end", onClick: (l) => l.stopPropagation() },
|
|
226
|
-
[
|
|
227
|
-
v(me, {
|
|
228
|
-
items: [
|
|
229
|
-
{ label: t("common.update"), onClick: () => E(o) },
|
|
230
|
-
{
|
|
231
|
-
label: t("common.remove"),
|
|
232
|
-
onClick: () => O(o),
|
|
233
|
-
itemClass: "text-fm-color-typo-error"
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
})
|
|
237
|
-
]
|
|
238
|
-
);
|
|
239
|
-
},
|
|
240
|
-
enableSorting: !1
|
|
241
|
-
}
|
|
242
|
-
];
|
|
243
|
-
function B() {
|
|
244
|
-
var n;
|
|
245
|
-
k.value = void 0, (n = r.value) == null || n.trigger();
|
|
246
|
-
}
|
|
247
|
-
async function O(n) {
|
|
248
|
-
V.open({
|
|
249
|
-
title: t("permissionSet.form.delete.title"),
|
|
250
|
-
message: t("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
|
|
251
|
-
minWidth: U.value.lg ? 588 : 0,
|
|
252
|
-
primaryActions: {
|
|
253
|
-
text: t("common.remove"),
|
|
254
|
-
close: !1,
|
|
255
|
-
variant: "destructive"
|
|
256
|
-
},
|
|
257
|
-
secondaryActions: { text: t("common.cancel"), close: !0 }
|
|
258
|
-
}).onPrimary(async () => {
|
|
259
|
-
try {
|
|
260
|
-
await a.deletePermissionSet(n.id), $.open({
|
|
261
|
-
message: t("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
262
|
-
type: "success"
|
|
263
|
-
});
|
|
264
|
-
} catch (o) {
|
|
265
|
-
const l = o instanceof be && o.status === 409 ? o.message.includes("referenced by") ? t("permissionSet.form.delete.setReferencedConflictError", {
|
|
266
|
-
permissionSetName: n.name
|
|
267
|
-
}) : t("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : o instanceof Error ? o.message : `${o}`;
|
|
268
|
-
$.open({ message: l, type: "error" });
|
|
269
|
-
}
|
|
270
|
-
V.close();
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
return te(() => {
|
|
274
|
-
z(), d();
|
|
275
|
-
}), D({
|
|
276
|
-
create: B
|
|
277
|
-
}), (n, o) => {
|
|
278
|
-
const l = g("FmSearch"), y = g("FmTable"), C = g("FullWrapper");
|
|
279
|
-
return L(), oe(ne, null, [
|
|
280
|
-
c(ye, {
|
|
281
|
-
ref_key: "permissionSetFormRef",
|
|
282
|
-
ref: r,
|
|
283
|
-
"model-value": k.value
|
|
284
|
-
}, null, 8, ["model-value"]),
|
|
285
|
-
A("div", we, [
|
|
286
|
-
A("div", Fe, [
|
|
287
|
-
c(l, {
|
|
288
|
-
modelValue: x.value,
|
|
289
|
-
"onUpdate:modelValue": o[0] || (o[0] = (_) => x.value = _),
|
|
290
|
-
class: "w-[320px] xs:w-full",
|
|
291
|
-
autofocus: "",
|
|
292
|
-
placeholder: u(t)("permissionSet.search.placeholder")
|
|
293
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
294
|
-
]),
|
|
295
|
-
p.value.length > 0 ? (L(), W(C, {
|
|
296
|
-
key: 0,
|
|
297
|
-
class: "overflow-auto"
|
|
298
|
-
}, {
|
|
299
|
-
default: I(() => [
|
|
300
|
-
c(y, {
|
|
301
|
-
"column-defs": h,
|
|
302
|
-
"row-data": P.value,
|
|
303
|
-
"page-size": P.value.length,
|
|
304
|
-
"pin-header-row": "",
|
|
305
|
-
"hide-footer": "",
|
|
306
|
-
"shrink-at": !1,
|
|
307
|
-
onRowClick: o[1] || (o[1] = (_) => E(_.original))
|
|
308
|
-
}, null, 8, ["row-data", "page-size"])
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
})) : (L(), W(u(re), {
|
|
312
|
-
key: 1,
|
|
313
|
-
title: u(t)("permissionSet.noData.title"),
|
|
314
|
-
subtitle: u(t)("permissionSet.noData.subtitle")
|
|
315
|
-
}, null, 8, ["title", "subtitle"]))
|
|
316
|
-
])
|
|
317
|
-
], 64);
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
export {
|
|
322
|
-
Te as default
|
|
323
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, ref as C, resolveComponent as m, createBlock as s, openBlock as t, withCtx as l, createElementVNode as x, renderSlot as v, createCommentVNode as k, withModifiers as $, nextTick as V, createElementBlock as _, normalizeClass as M, createTextVNode as w, toDisplayString as g, computed as S, Fragment as F, renderList as h, createVNode as I } from "vue";
|
|
2
|
-
import { useBreakpoints as N } from "@feedmepos/ui-library";
|
|
3
|
-
const z = /* @__PURE__ */ B({
|
|
4
|
-
__name: "BottomSheetMenu",
|
|
5
|
-
setup(o) {
|
|
6
|
-
const e = C(!1);
|
|
7
|
-
async function r() {
|
|
8
|
-
await V(), e.value = !e.value;
|
|
9
|
-
}
|
|
10
|
-
return (u, n) => {
|
|
11
|
-
const f = m("FmButton"), y = m("FmBottomSheet");
|
|
12
|
-
return t(), s(y, {
|
|
13
|
-
modelValue: e.value,
|
|
14
|
-
"onUpdate:modelValue": n[1] || (n[1] = (d) => e.value = d),
|
|
15
|
-
"dismiss-away": "",
|
|
16
|
-
"no-header": "",
|
|
17
|
-
"z-index": 110
|
|
18
|
-
}, {
|
|
19
|
-
"bottom-sheet-button": l(() => [
|
|
20
|
-
u.$slots.button ? k("", !0) : (t(), s(f, {
|
|
21
|
-
key: 0,
|
|
22
|
-
icon: "more_vert",
|
|
23
|
-
variant: "tertiary",
|
|
24
|
-
onClick: $(r, ["stop"])
|
|
25
|
-
})),
|
|
26
|
-
v(u.$slots, "button")
|
|
27
|
-
]),
|
|
28
|
-
default: l(() => [
|
|
29
|
-
x("div", {
|
|
30
|
-
onClick: n[0] || (n[0] = (d) => e.value = !1)
|
|
31
|
-
}, [
|
|
32
|
-
v(u.$slots, "default")
|
|
33
|
-
])
|
|
34
|
-
]),
|
|
35
|
-
_: 3
|
|
36
|
-
}, 8, ["modelValue"]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}), E = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, T = /* @__PURE__ */ B({
|
|
40
|
-
__name: "BottomSheetMenuItem",
|
|
41
|
-
props: {
|
|
42
|
-
label: {},
|
|
43
|
-
icon: {},
|
|
44
|
-
disabled: { type: Boolean },
|
|
45
|
-
itemClass: {}
|
|
46
|
-
},
|
|
47
|
-
setup(o) {
|
|
48
|
-
const e = o;
|
|
49
|
-
return (r, u) => {
|
|
50
|
-
const n = m("FmIcon");
|
|
51
|
-
return t(), _("div", E, [
|
|
52
|
-
r.$slots.content ? k("", !0) : (t(), _("div", {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: M(["flex items-center", {
|
|
55
|
-
"text-fm-color-typo-disabled": e.disabled,
|
|
56
|
-
"cursor-pointer": !e.disabled,
|
|
57
|
-
"cursor-not-allowed": e.disabled,
|
|
58
|
-
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
59
|
-
}])
|
|
60
|
-
}, [
|
|
61
|
-
o.icon ? (t(), s(n, {
|
|
62
|
-
key: 0,
|
|
63
|
-
name: o.icon
|
|
64
|
-
}, null, 8, ["name"])) : k("", !0),
|
|
65
|
-
w(" " + g(o.label), 1)
|
|
66
|
-
], 2)),
|
|
67
|
-
v(r.$slots, "content")
|
|
68
|
-
]);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}), R = /* @__PURE__ */ B({
|
|
72
|
-
__name: "ResponsiveContextMenu",
|
|
73
|
-
props: {
|
|
74
|
-
items: {}
|
|
75
|
-
},
|
|
76
|
-
setup(o) {
|
|
77
|
-
const e = N(), r = S(() => e.breakpoints.value.xs);
|
|
78
|
-
return (u, n) => {
|
|
79
|
-
const f = m("FmButton"), y = m("FmMenuItem"), d = m("FmMenu");
|
|
80
|
-
return r.value ? (t(), s(z, { key: 0 }, {
|
|
81
|
-
default: l(() => [
|
|
82
|
-
(t(!0), _(F, null, h(o.items, ({ icon: i, label: a, disabled: p, itemClass: c, onClick: b }) => (t(), s(T, {
|
|
83
|
-
key: a,
|
|
84
|
-
icon: i,
|
|
85
|
-
label: a,
|
|
86
|
-
disabled: p,
|
|
87
|
-
itemClass: c,
|
|
88
|
-
onClick: () => {
|
|
89
|
-
!p && (b == null || b());
|
|
90
|
-
}
|
|
91
|
-
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
})) : (t(), s(d, {
|
|
95
|
-
key: 1,
|
|
96
|
-
"stop-click-propagation": "",
|
|
97
|
-
shift: !0
|
|
98
|
-
}, {
|
|
99
|
-
"menu-button": l(() => [
|
|
100
|
-
I(f, {
|
|
101
|
-
type: "button",
|
|
102
|
-
variant: "tertiary",
|
|
103
|
-
icon: "more_vert",
|
|
104
|
-
"text-color": "neutral-gray-400",
|
|
105
|
-
size: "md"
|
|
106
|
-
})
|
|
107
|
-
]),
|
|
108
|
-
default: l(() => [
|
|
109
|
-
(t(!0), _(F, null, h(o.items, ({ label: i, disabled: a, itemClass: p, onClick: c }) => (t(), s(y, {
|
|
110
|
-
key: i,
|
|
111
|
-
disabled: a,
|
|
112
|
-
label: i,
|
|
113
|
-
onClick: () => {
|
|
114
|
-
!a && (c == null || c());
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
label: l(() => [
|
|
118
|
-
x("span", {
|
|
119
|
-
class: M(a ? "text-fm-color-typo-disabled" : p)
|
|
120
|
-
}, g(i), 3)
|
|
121
|
-
]),
|
|
122
|
-
_: 2
|
|
123
|
-
}, 1032, ["disabled", "label", "onClick"]))), 128))
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
}));
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
export {
|
|
131
|
-
R as _
|
|
132
|
-
};
|