@feedmepos/mf-hrm-portal 1.1.3-dev → 1.1.3-dev.10

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