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