@feedmepos/mf-hrm-portal 2.0.17-dev.3 → 2.0.17-dev.4

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