@feedmepos/mf-hrm-portal 2.0.25 → 2.1.0-dev.2

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