@feedmepos/mf-hrm-portal 2.1.1-dev.4 → 2.1.1-dev.5

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