@feedmepos/mf-hrm-portal 1.1.3-dev.4 → 1.1.3-dev.7
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-BeigpKv1.js → AuditLogList-n6xAYZGv.js} +127 -139
- package/dist/EmployeeList-D9rLxXo5.js +626 -0
- package/dist/{Main-iC9TGp41.js → Main-BCa8A1rV.js} +5 -5
- package/dist/{Main-DWnVJGpe.js → Main-zQF3GD9j.js} +10 -9
- package/dist/PermissionSetList-EsoA_anf.js +338 -0
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DqWrIJPe.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BA1LS-wd.js} +454 -447
- package/dist/RoleList-Cfv9wKaN.js +494 -0
- package/dist/TeamMemberList-HkvCqzPj.js +945 -0
- package/dist/{TimesheetList-C4_i17S7.js → TimesheetList-B0e-Muws.js} +25 -24
- package/dist/api/index.d.ts +1 -0
- package/dist/api/report-query/index.d.ts +5 -0
- package/dist/{app-BRpUSeEf.js → app-DKSPx49S.js} +1449 -867
- package/dist/app.js +1 -1
- package/dist/composables/useReportPermissions.d.ts +14 -0
- package/dist/{dayjs.min-Dfq8fN9X.js → dayjs.min-DZJQ_JpV.js} +1 -1
- package/dist/employee-DKRqMph9.js +144 -0
- package/dist/helpers/permission-set.d.ts +22 -0
- package/dist/helpers/rule.d.ts +1 -1
- package/dist/{index-CvpJyEnB.js → index-BwyUbhZj.js} +1 -1
- package/dist/{index-nVxD4_on.js → index-D09s817L.js} +5017 -3187
- package/dist/{lodash-Cbt71kLf.js → lodash-CL6AaeJB.js} +1 -1
- package/dist/stores/permission-set.d.ts +15 -0
- package/dist/{team-CZZo-waE.js → team-DEjtUFVl.js} +1 -1
- package/dist/{timesheet-DuYLbiJ_.js → timesheet-B0usAfjL.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/permission-set.d.ts +4 -0
- package/dist/types/report-query.d.ts +6 -0
- package/dist/{useAppStore-Dt1nUJ4t.js → useAppStore-DfaKfSuR.js} +34 -46
- package/dist/{useLoading-CjyXOp7A.js → useLoading-D2AX24ph.js} +1 -1
- package/dist/useReportPermissions-CwsHq61C.js +65 -0
- package/dist/views/team/locales/index.d.ts +12 -0
- package/package.json +2 -2
- package/dist/EmployeeList-pCs8sKuU.js +0 -607
- package/dist/PermissionSetList-BLmeu-lo.js +0 -283
- package/dist/RoleList-DyOF2uRf.js +0 -496
- package/dist/TeamMemberList-Ck2gpjCC.js +0 -952
- package/dist/employee-BZxYvY4n.js +0 -172
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, computed as V, resolveComponent as c, createElementBlock as w, openBlock as _, createElementVNode as g, createVNode as i, toDisplayString as C, unref as u, withCtx as S, createTextVNode as z, Fragment as A, renderList as M, ref as F, createBlock as D, nextTick as U, onMounted as q, h as I } from "vue";
|
|
2
|
-
import { useI18n as R, useCoreStore as K } from "@feedmepos/mf-common";
|
|
3
|
-
import { useSnackbar as E, useDialog as G, useBreakpoints as O, components as H, FmButtonColorThemeVariant as J, FmButtonVariant as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as X } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
5
|
-
import { x as Y, u as W, A as Z } from "./index-nVxD4_on.js";
|
|
6
|
-
import { u as ee } from "./useLoading-CjyXOp7A.js";
|
|
7
|
-
import { a as te } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DqWrIJPe.js";
|
|
8
|
-
const oe = { class: "flex flex-row items-center gap-8" }, se = /* @__PURE__ */ N({
|
|
9
|
-
__name: "PermissionWithTooltip",
|
|
10
|
-
props: {
|
|
11
|
-
modelValue: {
|
|
12
|
-
type: Array,
|
|
13
|
-
required: !0
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
setup(k) {
|
|
17
|
-
const b = k, o = V(() => Y(b.modelValue)), { t: n } = R();
|
|
18
|
-
return (r, P) => {
|
|
19
|
-
const d = c("FmIcon"), h = c("FmTooltip");
|
|
20
|
-
return _(), w("div", oe, [
|
|
21
|
-
g("span", null, C(u(n)("team.labels.allowed", { count: o.value.length })), 1),
|
|
22
|
-
i(h, {
|
|
23
|
-
variant: "plain",
|
|
24
|
-
placement: "top"
|
|
25
|
-
}, {
|
|
26
|
-
content: S(() => [
|
|
27
|
-
g("div", null, [
|
|
28
|
-
z(C(u(n)("team.labels.permission")) + " ", 1),
|
|
29
|
-
(_(!0), w(A, null, M(o.value, (p, f) => (_(), w("div", {
|
|
30
|
-
key: `${p}-${f}`
|
|
31
|
-
}, " - " + C(p), 1))), 128))
|
|
32
|
-
])
|
|
33
|
-
]),
|
|
34
|
-
default: S(() => [
|
|
35
|
-
i(d, {
|
|
36
|
-
name: "info",
|
|
37
|
-
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
38
|
-
})
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
})
|
|
42
|
-
]);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}), ne = { class: "fm-typo-en-title-md-600" }, ae = { class: "flex items-center justify-start gap-8" }, le = /* @__PURE__ */ N({
|
|
46
|
-
__name: "PermissionSetForm",
|
|
47
|
-
props: {
|
|
48
|
-
modelValue: {
|
|
49
|
-
type: Object,
|
|
50
|
-
default: () => ({})
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
setup(k, { expose: b }) {
|
|
54
|
-
const o = k, { t: n } = R(), r = F(!1), P = V(() => {
|
|
55
|
-
var s;
|
|
56
|
-
return (s = o.modelValue) != null && s.id ? n("permissionSet.form.update.title") : n("permissionSet.form.create.title");
|
|
57
|
-
}), d = F(), h = E(), p = ee(h), f = W(), l = F({ ...o.modelValue }), x = [(s) => !!s || "Permission set name is required"], B = V(() => {
|
|
58
|
-
var s;
|
|
59
|
-
return (s = o.modelValue) != null && s.id ? n("permissionSet.form.update.confirmButtonLabel") : n("permissionSet.form.create.confirmButtonLabel");
|
|
60
|
-
});
|
|
61
|
-
async function T() {
|
|
62
|
-
await U(), r.value = !r.value, l.value = {
|
|
63
|
-
...o.modelValue
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function $(s) {
|
|
67
|
-
l.value = {
|
|
68
|
-
...l.value,
|
|
69
|
-
permissions: s
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
async function L() {
|
|
73
|
-
var t, m;
|
|
74
|
-
const s = await ((t = d.value) == null ? void 0 : t.validateInputsWithoutSubmit()), e = (m = K().currentBusiness.value) == null ? void 0 : m.id;
|
|
75
|
-
!(s != null && s.length) && e && p.minor(async () => {
|
|
76
|
-
var v;
|
|
77
|
-
if ((v = o.modelValue) != null && v.id) {
|
|
78
|
-
const { id: y, ...a } = l.value, j = a;
|
|
79
|
-
await f.updatePermissionSet(o.modelValue.id, j);
|
|
80
|
-
} else {
|
|
81
|
-
const y = {
|
|
82
|
-
...l.value,
|
|
83
|
-
businessId: e
|
|
84
|
-
};
|
|
85
|
-
await f.createPermissionSet(y);
|
|
86
|
-
}
|
|
87
|
-
r.value = !1;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return b({
|
|
91
|
-
trigger: T
|
|
92
|
-
}), (s, e) => {
|
|
93
|
-
const t = c("FmTextField"), m = c("FmForm"), v = c("FmButton"), y = c("FmSideSheet");
|
|
94
|
-
return _(), D(y, {
|
|
95
|
-
modelValue: r.value,
|
|
96
|
-
"onUpdate:modelValue": e[3] || (e[3] = (a) => r.value = a),
|
|
97
|
-
"max-width": 560,
|
|
98
|
-
"dismiss-away": ""
|
|
99
|
-
}, {
|
|
100
|
-
"side-sheet-header": S(() => [
|
|
101
|
-
g("p", ne, C(P.value), 1)
|
|
102
|
-
]),
|
|
103
|
-
"side-sheet-footer": S(() => [
|
|
104
|
-
g("div", ae, [
|
|
105
|
-
i(v, {
|
|
106
|
-
label: B.value,
|
|
107
|
-
size: "md",
|
|
108
|
-
variant: "primary",
|
|
109
|
-
type: "submit",
|
|
110
|
-
onClick: L
|
|
111
|
-
}, null, 8, ["label"]),
|
|
112
|
-
i(v, {
|
|
113
|
-
label: u(n)("common.cancel"),
|
|
114
|
-
size: "md",
|
|
115
|
-
variant: "secondary",
|
|
116
|
-
onClick: e[2] || (e[2] = (a) => r.value = !1)
|
|
117
|
-
}, null, 8, ["label"])
|
|
118
|
-
])
|
|
119
|
-
]),
|
|
120
|
-
default: S(() => [
|
|
121
|
-
i(m, {
|
|
122
|
-
ref_key: "formRef",
|
|
123
|
-
ref: d
|
|
124
|
-
}, {
|
|
125
|
-
default: S(() => [
|
|
126
|
-
i(t, {
|
|
127
|
-
modelValue: l.value.name,
|
|
128
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => l.value.name = a),
|
|
129
|
-
label: u(n)("permissionSet.form.name"),
|
|
130
|
-
placeholder: u(n)("permissionSet.form.namePlaceholder"),
|
|
131
|
-
rules: x
|
|
132
|
-
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
133
|
-
i(te, {
|
|
134
|
-
"model-value": l.value.permissions,
|
|
135
|
-
class: "mt-24",
|
|
136
|
-
onPermissionChanged: e[1] || (e[1] = (a) => $(a))
|
|
137
|
-
}, null, 8, ["model-value"])
|
|
138
|
-
]),
|
|
139
|
-
_: 1
|
|
140
|
-
}, 512)
|
|
141
|
-
]),
|
|
142
|
-
_: 1
|
|
143
|
-
}, 8, ["modelValue"]);
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}), ie = { class: "space-y-8" }, re = { class: "flex justify-end xs:px-16" }, me = {
|
|
147
|
-
key: 0,
|
|
148
|
-
class: "overflow-auto"
|
|
149
|
-
}, ce = { class: "pb-64" }, ge = /* @__PURE__ */ N({
|
|
150
|
-
__name: "PermissionSetList",
|
|
151
|
-
setup(k, { expose: b }) {
|
|
152
|
-
const { t: o } = R(), n = E(), r = G(), { breakpoints: P } = O(), d = F(""), h = V(() => {
|
|
153
|
-
var e;
|
|
154
|
-
return (e = l.value) == null ? void 0 : e.filter((t) => {
|
|
155
|
-
const m = d.value.toLowerCase();
|
|
156
|
-
return t.name.toLowerCase().includes(m);
|
|
157
|
-
});
|
|
158
|
-
}), p = F(), f = W(), l = V(
|
|
159
|
-
() => f.permissionSets.value
|
|
160
|
-
), x = F();
|
|
161
|
-
async function B() {
|
|
162
|
-
await f.readPermissionSets();
|
|
163
|
-
}
|
|
164
|
-
function T(e) {
|
|
165
|
-
var t;
|
|
166
|
-
x.value = e, (t = p.value) == null || t.trigger();
|
|
167
|
-
}
|
|
168
|
-
const $ = [
|
|
169
|
-
{
|
|
170
|
-
accessorKey: "name",
|
|
171
|
-
header: () => o("permissionSet.table.columns.name")
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
accessorKey: "permission",
|
|
175
|
-
header: () => o("permissionSet.table.columns.permissions"),
|
|
176
|
-
enableSorting: !1,
|
|
177
|
-
cell(e) {
|
|
178
|
-
const t = e.row.original.permissions;
|
|
179
|
-
return I(se, { modelValue: t });
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
id: "action",
|
|
184
|
-
meta: {
|
|
185
|
-
cellClass: "pl-16",
|
|
186
|
-
headerContentClass: "-mx-16"
|
|
187
|
-
},
|
|
188
|
-
cell(e) {
|
|
189
|
-
return I("div", { class: "w-full flex justify-end items-center" }, [
|
|
190
|
-
I(H.FmButton, {
|
|
191
|
-
prependIcon: "delete",
|
|
192
|
-
variant: Q.Tertiary,
|
|
193
|
-
textColor: J.NeutralGray400,
|
|
194
|
-
class: "flex flex-end",
|
|
195
|
-
onClick: (t) => {
|
|
196
|
-
t.stopPropagation(), s(e.row.original);
|
|
197
|
-
}
|
|
198
|
-
})
|
|
199
|
-
]);
|
|
200
|
-
},
|
|
201
|
-
enableSorting: !1
|
|
202
|
-
}
|
|
203
|
-
];
|
|
204
|
-
function L() {
|
|
205
|
-
var e;
|
|
206
|
-
x.value = void 0, (e = p.value) == null || e.trigger();
|
|
207
|
-
}
|
|
208
|
-
async function s(e) {
|
|
209
|
-
r.open({
|
|
210
|
-
title: o("permissionSet.form.delete.title"),
|
|
211
|
-
message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: e.name }),
|
|
212
|
-
minWidth: P.value.lg ? 588 : 0,
|
|
213
|
-
primaryActions: {
|
|
214
|
-
text: o("common.remove"),
|
|
215
|
-
close: !1,
|
|
216
|
-
variant: "destructive"
|
|
217
|
-
},
|
|
218
|
-
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
219
|
-
}).onPrimary(async () => {
|
|
220
|
-
try {
|
|
221
|
-
await f.deletePermissionSet(e.id), n.open({
|
|
222
|
-
message: o("permissionSet.form.delete.successMessage", { permissionSetName: e.name }),
|
|
223
|
-
type: "success"
|
|
224
|
-
});
|
|
225
|
-
} catch (t) {
|
|
226
|
-
const m = t instanceof Z && t.status === 409 ? o("permissionSet.form.delete.conflictError", { permissionSetName: e.name }) : t instanceof Error ? t.message : `${t}`;
|
|
227
|
-
n.open({ message: m, type: "error" });
|
|
228
|
-
}
|
|
229
|
-
r.close();
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
return q(() => {
|
|
233
|
-
B();
|
|
234
|
-
}), b({
|
|
235
|
-
create: L
|
|
236
|
-
}), (e, t) => {
|
|
237
|
-
const m = c("FmSearch"), v = c("FmTable"), y = c("FullWrapper");
|
|
238
|
-
return _(), w(A, null, [
|
|
239
|
-
i(le, {
|
|
240
|
-
ref_key: "permissionSetFormRef",
|
|
241
|
-
ref: p,
|
|
242
|
-
"model-value": x.value
|
|
243
|
-
}, null, 8, ["model-value"]),
|
|
244
|
-
g("div", ie, [
|
|
245
|
-
g("div", re, [
|
|
246
|
-
i(m, {
|
|
247
|
-
modelValue: d.value,
|
|
248
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) => d.value = a),
|
|
249
|
-
class: "w-[320px] xs:w-full",
|
|
250
|
-
autofocus: "",
|
|
251
|
-
placeholder: u(o)("permissionSet.search.placeholder")
|
|
252
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
253
|
-
]),
|
|
254
|
-
l.value.length > 0 ? (_(), w("div", me, [
|
|
255
|
-
g("div", ce, [
|
|
256
|
-
i(y, null, {
|
|
257
|
-
default: S(() => [
|
|
258
|
-
i(v, {
|
|
259
|
-
"column-defs": $,
|
|
260
|
-
"row-data": h.value,
|
|
261
|
-
"page-size": h.value.length,
|
|
262
|
-
"pin-header-row": "",
|
|
263
|
-
"hide-footer": "",
|
|
264
|
-
"shrink-at": !1,
|
|
265
|
-
onRowClick: t[1] || (t[1] = (a) => T(a.original))
|
|
266
|
-
}, null, 8, ["row-data", "page-size"])
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
})
|
|
270
|
-
])
|
|
271
|
-
])) : (_(), D(u(X), {
|
|
272
|
-
key: 1,
|
|
273
|
-
title: u(o)("permissionSet.noData.title"),
|
|
274
|
-
subtitle: u(o)("permissionSet.noData.subtitle")
|
|
275
|
-
}, null, 8, ["title", "subtitle"]))
|
|
276
|
-
])
|
|
277
|
-
], 64);
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
export {
|
|
282
|
-
ge as default
|
|
283
|
-
};
|