@feedmepos/mf-hrm-portal 1.1.3-dev.7 → 1.1.3-dev.8

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 (25) hide show
  1. package/dist/{AuditLogList-n6xAYZGv.js → AuditLogList-CVOicxwC.js} +90 -76
  2. package/dist/{EmployeeList-D9rLxXo5.js → EmployeeList-CSBiU32b.js} +5 -5
  3. package/dist/{Main-zQF3GD9j.js → Main-BTCSW3JL.js} +8 -8
  4. package/dist/{Main-BCa8A1rV.js → Main-D9xZDqBk.js} +5 -5
  5. package/dist/PermissionSetList-r1ZvAW01.js +323 -0
  6. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BA1LS-wd.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DXsl8Y5d.js} +169 -169
  7. package/dist/{RoleList-Cfv9wKaN.js → RoleList-Ca2gg1OL.js} +6 -6
  8. package/dist/{TeamMemberList-HkvCqzPj.js → TeamMemberList-D__tUUst.js} +196 -196
  9. package/dist/{TimesheetList-B0e-Muws.js → TimesheetList-DGRLp8ZY.js} +6 -6
  10. package/dist/{app-DKSPx49S.js → app-c-GiPrdn.js} +12 -4
  11. package/dist/app.js +1 -1
  12. package/dist/{dayjs.min-DZJQ_JpV.js → dayjs.min-CJ2WQsea.js} +1 -1
  13. package/dist/{employee-DKRqMph9.js → employee-8oXtifwK.js} +3 -3
  14. package/dist/{index-BwyUbhZj.js → index-AdCh0qd6.js} +1 -1
  15. package/dist/{index-D09s817L.js → index-DSwL5tAm.js} +3 -3
  16. package/dist/{lodash-CL6AaeJB.js → lodash-C7JpKSnW.js} +1 -1
  17. package/dist/{team-DEjtUFVl.js → team-Fs4KPQg5.js} +1 -1
  18. package/dist/{timesheet-B0usAfjL.js → timesheet-D05cQ6a7.js} +2 -2
  19. package/dist/tsconfig.app.tsbuildinfo +1 -1
  20. package/dist/{useAppStore-DfaKfSuR.js → useAppStore-D1eLjzj4.js} +1 -1
  21. package/dist/{useLoading-D2AX24ph.js → useLoading-DB77wFeJ.js} +1 -1
  22. package/dist/{useReportPermissions-CwsHq61C.js → useReportPermissions-p2VZ4ugv.js} +2 -2
  23. package/dist/views/audit-log/locales/index.d.ts +8 -0
  24. package/package.json +2 -2
  25. package/dist/PermissionSetList-EsoA_anf.js +0 -338
@@ -1,7 +1,7 @@
1
1
  import { defineStore as f, storeToRefs as v } from "pinia";
2
2
  import { ref as b } from "vue";
3
3
  import { useCoreStore as I, baseClientInstance as w } from "@feedmepos/mf-common";
4
- import { g as l, b as d, s as R } from "./index-D09s817L.js";
4
+ import { g as l, b as d, s as R } from "./index-DSwL5tAm.js";
5
5
  const p = {
6
6
  async readRoles() {
7
7
  return l(await d().get("/pos-roles"));
@@ -1,6 +1,6 @@
1
1
  import { computed as I, isRef as L, watch as M } from "vue";
2
2
  import { SnackbarPosition as y } from "@feedmepos/ui-library";
3
- import { a as w, v } from "./useAppStore-DfaKfSuR.js";
3
+ import { a as w, v } from "./useAppStore-D1eLjzj4.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -1,7 +1,7 @@
1
1
  import { computed as u, ref as r } from "vue";
2
- import { g as v, q as R, e as h, a as m } from "./index-D09s817L.js";
2
+ import { g as v, q as R, e as h, a as m } from "./index-DSwL5tAm.js";
3
3
  import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import "./app-DKSPx49S.js";
4
+ import "./app-c-GiPrdn.js";
5
5
  const P = {
6
6
  async fetchReportPermissions(i) {
7
7
  return v(
@@ -31,6 +31,7 @@ export declare const i18nMessages: {
31
31
  user: string;
32
32
  subject: string;
33
33
  action: string;
34
+ operation: string;
34
35
  outcome: string;
35
36
  };
36
37
  outcome: {
@@ -53,6 +54,7 @@ export declare const i18nMessages: {
53
54
  user: string;
54
55
  email: string;
55
56
  action: string;
57
+ operation: string;
56
58
  subject: string;
57
59
  field: string;
58
60
  outcome: string;
@@ -101,6 +103,7 @@ export declare const i18nMessages: {
101
103
  user: string;
102
104
  subject: string;
103
105
  action: string;
106
+ operation: string;
104
107
  outcome: string;
105
108
  };
106
109
  outcome: {
@@ -123,6 +126,7 @@ export declare const i18nMessages: {
123
126
  user: string;
124
127
  email: string;
125
128
  action: string;
129
+ operation: string;
126
130
  subject: string;
127
131
  field: string;
128
132
  outcome: string;
@@ -172,6 +176,7 @@ export declare const i18nMessages: {
172
176
  user: string;
173
177
  subject: string;
174
178
  action: string;
179
+ operation: string;
175
180
  outcome: string;
176
181
  };
177
182
  outcome: {
@@ -194,6 +199,7 @@ export declare const i18nMessages: {
194
199
  user: string;
195
200
  email: string;
196
201
  action: string;
202
+ operation: string;
197
203
  subject: string;
198
204
  field: string;
199
205
  outcome: string;
@@ -243,6 +249,7 @@ export declare const i18nMessages: {
243
249
  user: string;
244
250
  subject: string;
245
251
  action: string;
252
+ operation: string;
246
253
  outcome: string;
247
254
  };
248
255
  outcome: {
@@ -265,6 +272,7 @@ export declare const i18nMessages: {
265
272
  user: string;
266
273
  email: string;
267
274
  action: string;
275
+ operation: string;
268
276
  subject: string;
269
277
  field: string;
270
278
  outcome: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "1.1.3-dev.7",
3
+ "version": "1.1.3-dev.8",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,7 +29,7 @@
29
29
  "vue-router": "^4.3.2",
30
30
  "vue3-lottie": "^3.3.0",
31
31
  "xlsx": "^0.18.5",
32
- "@feedmepos/hrm-permission": "0.0.4-dev.8"
32
+ "@feedmepos/hrm-permission": "0.0.4-dev.9"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@casl/ability": "^3.4.0",
@@ -1,338 +0,0 @@
1
- import { defineComponent as j, computed as h, resolveComponent as p, createElementBlock as B, openBlock as P, createElementVNode as F, createVNode as r, toDisplayString as E, unref as u, withCtx as y, createTextVNode as Q, Fragment as q, renderList as X, ref as b, createBlock as K, nextTick as Y, onMounted as Z, h as z } from "vue";
2
- import { useI18n as O, useCoreStore as ee } from "@feedmepos/mf-common";
3
- import { useSnackbar as G, useDialog as se, useBreakpoints as te, components as oe, FmButtonColorThemeVariant as ne, FmButtonVariant as ie } from "@feedmepos/ui-library";
4
- import { _ as le } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
5
- import { z as ae, u as H, m as W, n as J, o as U, w as re, x as me, A as M, B as ue } from "./index-D09s817L.js";
6
- import { u as ce } from "./useLoading-D2AX24ph.js";
7
- import { a as de } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BA1LS-wd.js";
8
- import "./app-DKSPx49S.js";
9
- const pe = { class: "flex flex-row items-center gap-8" }, fe = /* @__PURE__ */ j({
10
- __name: "PermissionWithTooltip",
11
- props: {
12
- modelValue: {
13
- type: Array,
14
- required: !0
15
- }
16
- },
17
- setup(T) {
18
- const I = T, s = h(() => ae(I.modelValue)), { t: i } = O();
19
- return (c, N) => {
20
- const v = p("FmIcon"), V = p("FmTooltip");
21
- return P(), B("div", pe, [
22
- F("span", null, E(u(i)("team.labels.allowed", { count: s.value.length })), 1),
23
- r(V, {
24
- variant: "plain",
25
- placement: "top"
26
- }, {
27
- content: y(() => [
28
- F("div", null, [
29
- Q(E(u(i)("team.labels.permission")) + " ", 1),
30
- (P(!0), B(q, null, X(s.value, (S, a) => (P(), B("div", {
31
- key: `${S}-${a}`
32
- }, " - " + E(S), 1))), 128))
33
- ])
34
- ]),
35
- default: y(() => [
36
- r(v, {
37
- name: "info",
38
- class: "cursor-pointer text-fm-color-neutral-gray-300"
39
- })
40
- ]),
41
- _: 1
42
- })
43
- ]);
44
- };
45
- }
46
- }), ve = { class: "fm-typo-en-title-md-600" }, Se = { class: "flex items-center justify-start gap-8" }, _e = /* @__PURE__ */ j({
47
- __name: "PermissionSetForm",
48
- props: {
49
- modelValue: {
50
- type: Object,
51
- default: () => ({})
52
- }
53
- },
54
- setup(T, { expose: I }) {
55
- const s = T, { t: i } = O(), c = b(!1), N = h(() => {
56
- var e;
57
- return (e = s.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
58
- }), v = b(), V = G(), S = ce(V), a = H(), f = b({ ...s.modelValue }), d = b([]), g = b([]), L = [(e) => !!e || "Permission set name is required"], R = h(() => {
59
- var e;
60
- return (e = s.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
61
- }), A = h(
62
- () => a.permissionSets.value.filter((e) => {
63
- var t;
64
- return e.id !== ((t = s.modelValue) == null ? void 0 : t.id);
65
- }).map((e) => ({ label: e.name, value: e.id }))
66
- ), x = h(
67
- () => W(d.value, a.permissionSets.value)
68
- );
69
- async function D() {
70
- var t, l;
71
- await Y(), c.value = !c.value, f.value = { ...s.modelValue }, d.value = ((t = s.modelValue) == null ? void 0 : t.permissionSetIds) ?? [];
72
- const e = ((l = s.modelValue) == null ? void 0 : l.permissions) ?? [];
73
- g.value = J(
74
- U(x.value),
75
- e
76
- );
77
- }
78
- function o() {
79
- const e = U(x.value), t = re(g.value);
80
- return me(e, t);
81
- }
82
- function n() {
83
- g.value = U(x.value);
84
- }
85
- async function m() {
86
- var l, w;
87
- const e = await ((l = v.value) == null ? void 0 : l.validateInputsWithoutSubmit()), t = (w = ee().currentBusiness.value) == null ? void 0 : w.id;
88
- !(e != null && e.length) && t && S.minor(async () => {
89
- var k;
90
- const $ = o();
91
- if ((k = s.modelValue) != null && k.id) {
92
- const C = {
93
- name: f.value.name,
94
- permissions: $,
95
- permissionSetIds: d.value,
96
- businessId: f.value.businessId
97
- };
98
- await a.updatePermissionSet(s.modelValue.id, C);
99
- } else {
100
- const C = {
101
- name: f.value.name,
102
- businessId: t,
103
- permissions: $,
104
- permissionSetIds: d.value
105
- };
106
- await a.createPermissionSet(C);
107
- }
108
- c.value = !1;
109
- });
110
- }
111
- return I({
112
- trigger: D
113
- }), (e, t) => {
114
- const l = p("FmTextField"), w = p("FmSelect"), $ = p("FmForm"), k = p("FmButton"), C = p("FmSideSheet");
115
- return P(), K(C, {
116
- modelValue: c.value,
117
- "onUpdate:modelValue": t[4] || (t[4] = (_) => c.value = _),
118
- "max-width": 560,
119
- "dismiss-away": ""
120
- }, {
121
- "side-sheet-header": y(() => [
122
- F("p", ve, E(N.value), 1)
123
- ]),
124
- "side-sheet-footer": y(() => [
125
- F("div", Se, [
126
- r(k, {
127
- label: R.value,
128
- size: "md",
129
- variant: "primary",
130
- type: "submit",
131
- onClick: m
132
- }, null, 8, ["label"]),
133
- r(k, {
134
- label: u(i)("common.cancel"),
135
- size: "md",
136
- variant: "secondary",
137
- onClick: t[3] || (t[3] = (_) => c.value = !1)
138
- }, null, 8, ["label"])
139
- ])
140
- ]),
141
- default: y(() => [
142
- r($, {
143
- ref_key: "formRef",
144
- ref: v
145
- }, {
146
- default: y(() => [
147
- r(l, {
148
- modelValue: f.value.name,
149
- "onUpdate:modelValue": t[0] || (t[0] = (_) => f.value.name = _),
150
- label: u(i)("permissionSet.form.name"),
151
- placeholder: u(i)("permissionSet.form.namePlaceholder"),
152
- rules: L
153
- }, null, 8, ["modelValue", "label", "placeholder"]),
154
- r(w, {
155
- modelValue: d.value,
156
- "onUpdate:modelValue": [
157
- t[1] || (t[1] = (_) => d.value = _),
158
- n
159
- ],
160
- multiselect: "",
161
- searchable: "",
162
- "search-debounce": 300,
163
- items: A.value,
164
- label: u(i)("permissionSet.form.includedSets"),
165
- placeholder: u(i)("permissionSet.form.includedSetsPlaceholder"),
166
- class: "mt-16"
167
- }, null, 8, ["modelValue", "items", "label", "placeholder"]),
168
- r(de, {
169
- modelValue: g.value,
170
- "onUpdate:modelValue": t[2] || (t[2] = (_) => g.value = _),
171
- "inherit-permissions": x.value,
172
- class: "mt-24"
173
- }, null, 8, ["modelValue", "inherit-permissions"])
174
- ]),
175
- _: 1
176
- }, 512)
177
- ]),
178
- _: 1
179
- }, 8, ["modelValue"]);
180
- };
181
- }
182
- }), be = { class: "space-y-8" }, ge = { class: "flex justify-end xs:px-16" }, he = {
183
- key: 0,
184
- class: "overflow-auto"
185
- }, ye = { class: "pb-64" }, Be = /* @__PURE__ */ j({
186
- __name: "PermissionSetList",
187
- setup(T, { expose: I }) {
188
- const { t: s } = O(), i = G(), c = se(), { breakpoints: N } = te(), v = b(""), V = h(() => {
189
- var o;
190
- return (o = f.value) == null ? void 0 : o.filter((n) => {
191
- const m = v.value.toLowerCase();
192
- return n.name.toLowerCase().includes(m);
193
- });
194
- }), S = b(), a = H(), f = h(
195
- () => a.permissionSets.value
196
- ), d = b();
197
- async function g() {
198
- await a.readPermissionSets();
199
- }
200
- function L(o) {
201
- const n = W(
202
- o.permissionSetIds ?? [],
203
- a.permissionSets.value
204
- ), m = M(n).map(
205
- ({ setNames: e, setId: t, ...l }) => l
206
- );
207
- return {
208
- ...o,
209
- permissions: J(m, o.permissions)
210
- };
211
- }
212
- function R(o) {
213
- var n;
214
- d.value = L(o), (n = S.value) == null || n.trigger();
215
- }
216
- const A = [
217
- {
218
- accessorKey: "name",
219
- header: () => s("permissionSet.table.columns.name")
220
- },
221
- {
222
- accessorKey: "permission",
223
- header: () => s("permissionSet.table.columns.permissions"),
224
- enableSorting: !1,
225
- cell(o) {
226
- const n = o.row.original, m = W(
227
- [n.id],
228
- a.permissionSets.value
229
- ), e = M(m).map(
230
- ({ setNames: t, setId: l, ...w }) => w
231
- );
232
- return z(fe, { modelValue: e });
233
- }
234
- },
235
- {
236
- id: "action",
237
- meta: {
238
- cellClass: "pl-16",
239
- headerContentClass: "-mx-16"
240
- },
241
- cell(o) {
242
- return z("div", { class: "w-full flex justify-end items-center" }, [
243
- z(oe.FmButton, {
244
- prependIcon: "delete",
245
- variant: ie.Tertiary,
246
- textColor: ne.NeutralGray400,
247
- class: "flex flex-end",
248
- onClick: (n) => {
249
- n.stopPropagation(), D(o.row.original);
250
- }
251
- })
252
- ]);
253
- },
254
- enableSorting: !1
255
- }
256
- ];
257
- function x() {
258
- var o;
259
- d.value = void 0, (o = S.value) == null || o.trigger();
260
- }
261
- async function D(o) {
262
- c.open({
263
- title: s("permissionSet.form.delete.title"),
264
- message: s("permissionSet.form.delete.confirmationMessage", { permissionSetName: o.name }),
265
- minWidth: N.value.lg ? 588 : 0,
266
- primaryActions: {
267
- text: s("common.remove"),
268
- close: !1,
269
- variant: "destructive"
270
- },
271
- secondaryActions: { text: s("common.cancel"), close: !0 }
272
- }).onPrimary(async () => {
273
- try {
274
- await a.deletePermissionSet(o.id), i.open({
275
- message: s("permissionSet.form.delete.successMessage", { permissionSetName: o.name }),
276
- type: "success"
277
- });
278
- } catch (n) {
279
- const m = n instanceof ue && n.status === 409 ? n.message.includes("referenced by") ? s("permissionSet.form.delete.setReferencedConflictError", {
280
- permissionSetName: o.name
281
- }) : s("permissionSet.form.delete.conflictError", { permissionSetName: o.name }) : n instanceof Error ? n.message : `${n}`;
282
- i.open({ message: m, type: "error" });
283
- }
284
- c.close();
285
- });
286
- }
287
- return Z(() => {
288
- g();
289
- }), I({
290
- create: x
291
- }), (o, n) => {
292
- const m = p("FmSearch"), e = p("FmTable"), t = p("FullWrapper");
293
- return P(), B(q, null, [
294
- r(_e, {
295
- ref_key: "permissionSetFormRef",
296
- ref: S,
297
- "model-value": d.value
298
- }, null, 8, ["model-value"]),
299
- F("div", be, [
300
- F("div", ge, [
301
- r(m, {
302
- modelValue: v.value,
303
- "onUpdate:modelValue": n[0] || (n[0] = (l) => v.value = l),
304
- class: "w-[320px] xs:w-full",
305
- autofocus: "",
306
- placeholder: u(s)("permissionSet.search.placeholder")
307
- }, null, 8, ["modelValue", "placeholder"])
308
- ]),
309
- f.value.length > 0 ? (P(), B("div", he, [
310
- F("div", ye, [
311
- r(t, null, {
312
- default: y(() => [
313
- r(e, {
314
- "column-defs": A,
315
- "row-data": V.value,
316
- "page-size": V.value.length,
317
- "pin-header-row": "",
318
- "hide-footer": "",
319
- "shrink-at": !1,
320
- onRowClick: n[1] || (n[1] = (l) => R(l.original))
321
- }, null, 8, ["row-data", "page-size"])
322
- ]),
323
- _: 1
324
- })
325
- ])
326
- ])) : (P(), K(u(le), {
327
- key: 1,
328
- title: u(s)("permissionSet.noData.title"),
329
- subtitle: u(s)("permissionSet.noData.subtitle")
330
- }, null, 8, ["title", "subtitle"]))
331
- ])
332
- ], 64);
333
- };
334
- }
335
- });
336
- export {
337
- Be as default
338
- };