@feedmepos/mf-hrm-portal 2.0.17-dev.2 → 2.0.17-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 (50) hide show
  1. package/dist/{AuditLogList-DQOiwup5.js → AuditLogList-CV82_8fj.js} +350 -324
  2. package/dist/EmployeeList-dE0So94R.js +736 -0
  3. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
  4. package/dist/HorizontalSplitter-o860F4xM.js +12 -0
  5. package/dist/{Main-5nIpv-Sp.js → Main-BAx-c_oZ.js} +9 -9
  6. package/dist/{Main-2uJvk5L7.js → Main-CfAQYaaW.js} +14 -15
  7. package/dist/{Main-C8ja5xs6.js → Main-CyReTP3K.js} +8 -8
  8. package/dist/PermissionSetList-DmsJnW2i.js +341 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BbcY9q1x.js +3480 -0
  10. package/dist/RoleList-CKB8L-BW.js +530 -0
  11. package/dist/TeamMemberList-CszlbmAX.js +1108 -0
  12. package/dist/{TimesheetList-D1ByiuwP.js → TimesheetList-NRUfSiYL.js} +6 -6
  13. package/dist/{app-hS6MBhCw.js → app-B0bANDrM.js} +1891 -1404
  14. package/dist/app.js +1 -1
  15. package/dist/{dayjs.min-DFcH-XYr.js → dayjs.min-DdUO0d-2.js} +1 -1
  16. package/dist/{employee-fBtBUEwZ.js → employee-DJDUT0Wj.js} +3 -3
  17. package/dist/{iteration-D23fqAQH.js → iteration-DqYIXL4P.js} +1 -1
  18. package/dist/{lodash-Cqc7y4P5.js → lodash-BBQT31li.js} +1 -1
  19. package/dist/rule-T7VKkRdN.js +996 -0
  20. package/dist/src/api/report-query/index.d.ts +2 -2
  21. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  22. package/dist/src/components/CollapsibleWrapper.vue.d.ts +0 -2
  23. package/dist/src/composables/useBasePermission.d.ts +1 -1
  24. package/dist/src/views/hr/locales/index.d.ts +172 -16
  25. package/dist/src/views/team/components/BasePermission.vue.d.ts +6 -2
  26. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
  27. package/dist/src/views/team/locales/index.d.ts +312 -32
  28. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -3
  29. package/dist/style.css +1 -1
  30. package/dist/{timesheet-OfLQjuvO.js → timesheet-DjtuB4we.js} +2 -2
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/{useAppStore-Du6PRBq0.js → useAppStore-CBb-dugK.js} +1 -1
  33. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  34. package/dist/{useLoading-DkTCR5A7.js → useLoading-BCOj8y-t.js} +1 -1
  35. package/dist/useReportPermissions-DyzhBpi8.js +70 -0
  36. package/dist/useSearch-B6WK1LBB.js +15 -0
  37. package/package.json +2 -2
  38. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  39. package/dist/EmployeeList-oERrzrAd.js +0 -828
  40. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CoorkndT.js +0 -34
  41. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  42. package/dist/PermissionSetList-CtpaWlVM.js +0 -323
  43. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B-hvBqE0.js +0 -3439
  44. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +0 -132
  45. package/dist/RoleList-CDBP2W5v.js +0 -544
  46. package/dist/TeamMemberList-DSzNjP4y.js +0 -996
  47. package/dist/rule-BBJzenE1.js +0 -990
  48. package/dist/team-Dq3VcGNH.js +0 -33
  49. package/dist/useReportPermissions-DhhjBwPs.js +0 -60
  50. package/dist/useSearch-BAPEUu1R.js +0 -15
@@ -1,34 +0,0 @@
1
- import { createElementBlock as s, openBlock as n, createElementVNode as o, defineComponent as l, renderSlot as r, createCommentVNode as i, toDisplayString as c } from "vue";
2
- import { _ as a } from "./SelectFilter-DUj7GBtT.js";
3
- const d = {};
4
- function m(t, e) {
5
- return n(), s("div", null, [...e[0] || (e[0] = [
6
- o("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
7
- ])]);
8
- }
9
- const x = /* @__PURE__ */ a(d, [["render", m]]), p = { class: "space-y-8" }, _ = { class: "flex items-center justify-between" }, f = { class: "space-y-8" }, u = { class: "fm-typo-en-body-lg-600" }, y = {
10
- key: 0,
11
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
12
- }, g = /* @__PURE__ */ l({
13
- __name: "FormItem",
14
- props: {
15
- label: {},
16
- description: {}
17
- },
18
- setup(t) {
19
- return (e, b) => (n(), s("div", p, [
20
- o("div", _, [
21
- o("div", f, [
22
- o("p", u, c(t.label), 1),
23
- t.description ? (n(), s("p", y, c(t.description), 1)) : i("", !0)
24
- ]),
25
- r(e.$slots, "append")
26
- ]),
27
- r(e.$slots, "default")
28
- ]));
29
- }
30
- });
31
- export {
32
- x as H,
33
- g as _
34
- };
@@ -1,49 +0,0 @@
1
- import { defineComponent as c, createElementBlock as s, openBlock as l, normalizeClass as r, renderSlot as n, createCommentVNode as o, createVNode as d, createElementVNode as a, toDisplayString as i, withCtx as f } from "vue";
2
- const h = /* @__PURE__ */ c({
3
- __name: "FormColumn",
4
- props: {
5
- shrinkable: { type: Boolean }
6
- },
7
- setup(e) {
8
- return (t, m) => (l(), s("div", {
9
- class: r(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
10
- }, [
11
- n(t.$slots, "default")
12
- ], 2));
13
- }
14
- }), u = {
15
- key: 0,
16
- class: "flex flex-row justify-between items-center"
17
- }, y = { class: "space-y-4" }, p = { class: "fm-typo-en-title-sm-600" }, b = {
18
- key: 0,
19
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
20
- }, x = /* @__PURE__ */ c({
21
- __name: "FormSection",
22
- props: {
23
- title: {},
24
- subTitle: {},
25
- shrinkable: { type: Boolean }
26
- },
27
- setup(e) {
28
- return (t, m) => (l(), s("div", {
29
- class: r(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
30
- }, [
31
- e.title ? (l(), s("div", u, [
32
- a("div", y, [
33
- a("p", p, i(e.title), 1),
34
- e.subTitle ? (l(), s("p", b, i(e.subTitle), 1)) : o("", !0)
35
- ]),
36
- n(t.$slots, "append-title")
37
- ])) : o("", !0),
38
- d(h, { shrinkable: e.shrinkable }, {
39
- default: f(() => [
40
- n(t.$slots, "default")
41
- ]),
42
- _: 3
43
- }, 8, ["shrinkable"])
44
- ], 2));
45
- }
46
- });
47
- export {
48
- x as _
49
- };
@@ -1,323 +0,0 @@
1
- import { defineComponent as X, ref as b, computed as S, resolveComponent as g, createBlock as W, openBlock as L, withCtx as I, createVNode as c, unref as u, createElementVNode as A, toDisplayString as ee, nextTick as se, onMounted as te, createElementBlock as oe, Fragment as ne, h as v } from "vue";
2
- import { useI18n as G, useCoreStore as ie } from "@feedmepos/mf-common";
3
- import { useSnackbar as H, useDialog as ae, useBreakpoints as le, components as q } from "@feedmepos/ui-library";
4
- import { _ as re } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
5
- import { _ as me } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
6
- import { u as Q, c as Y, d as Z, p as K, i as ce, b as ue, m as N, k as de, l as pe, s as fe, n as ve, q as Se } from "./rule-BBJzenE1.js";
7
- import { A as be } from "./iteration-D23fqAQH.js";
8
- import { u as ge } from "./useLoading-DkTCR5A7.js";
9
- import { p as J } from "./app-hS6MBhCw.js";
10
- import { _ as Pe } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B-hvBqE0.js";
11
- const _e = { class: "fm-typo-en-title-md-600" }, he = { class: "flex items-center justify-start gap-8" }, ye = /* @__PURE__ */ X({
12
- __name: "PermissionSetForm",
13
- props: {
14
- modelValue: {
15
- type: Object,
16
- default: () => ({})
17
- }
18
- },
19
- setup(M, { expose: D }) {
20
- const t = M, { t: i } = G(), d = b(!1), $ = S(() => {
21
- var e;
22
- return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
23
- }), V = b(), U = H(), x = ge(U), P = Q(), r = b({ ...t.modelValue }), a = b([]), p = b([]), k = [(e) => !!e || "Permission set name is required"], z = S(() => {
24
- var e;
25
- return (e = t.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
26
- }), E = S(
27
- () => P.permissionSets.value.filter((e) => {
28
- var s;
29
- return e.id !== ((s = t.modelValue) == null ? void 0 : s.id);
30
- }).map((e) => ({ label: e.name, value: e.id }))
31
- ), h = S(
32
- () => Y(a.value, P.permissionSets.value)
33
- ), { customReportPermissions: B, isLoaded: O } = Z(), n = new Set(
34
- K.filter((e) => e.subject.startsWith(ce)).map((e) => e.subject)
35
- ), o = S(() => {
36
- const e = new Set(n);
37
- for (const s of B.value) e.add(s.subject);
38
- return e;
39
- }), l = S(() => {
40
- const e = /* @__PURE__ */ new Set();
41
- for (const s of K)
42
- s.category === J.reports && e.add(s.subject);
43
- for (const s of B.value)
44
- s.category === J.reports && e.add(s.subject);
45
- return e;
46
- });
47
- async function y() {
48
- var s, m;
49
- await se(), d.value = !d.value, r.value = { ...t.modelValue }, a.value = ((s = t.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
50
- const e = ((m = t.modelValue) == null ? void 0 : m.permissions) ?? [];
51
- p.value = ue(
52
- N(h.value),
53
- e
54
- );
55
- }
56
- function C() {
57
- const e = N(h.value), s = O.value ? o.value : n, m = de(p.value, s), w = pe(m, l.value), F = fe(w);
58
- return ve(e, F);
59
- }
60
- function _() {
61
- p.value = N(h.value);
62
- }
63
- async function T() {
64
- var m, w;
65
- const e = await ((m = V.value) == null ? void 0 : m.validateInputsWithoutSubmit()), s = (w = ie().currentBusiness.value) == null ? void 0 : w.id;
66
- !(e != null && e.length) && s && x.minor(async () => {
67
- var R;
68
- const F = C();
69
- if ((R = t.modelValue) != null && R.id) {
70
- const j = {
71
- name: r.value.name,
72
- permissions: F,
73
- permissionSetIds: a.value,
74
- businessId: r.value.businessId
75
- };
76
- await P.updatePermissionSet(t.modelValue.id, j);
77
- } else {
78
- const j = {
79
- name: r.value.name,
80
- businessId: s,
81
- permissions: F,
82
- permissionSetIds: a.value
83
- };
84
- await P.createPermissionSet(j);
85
- }
86
- d.value = !1;
87
- });
88
- }
89
- return D({
90
- trigger: y
91
- }), (e, s) => {
92
- const m = g("FmTextField"), w = g("FmSelect"), F = g("FmForm"), R = g("FmButton"), j = g("FmSideSheet");
93
- return L(), W(j, {
94
- modelValue: d.value,
95
- "onUpdate:modelValue": s[4] || (s[4] = (f) => d.value = f),
96
- "max-width": 960,
97
- "dismiss-away": ""
98
- }, {
99
- "side-sheet-header": I(() => [
100
- A("p", _e, ee($.value), 1)
101
- ]),
102
- "side-sheet-footer": I(() => [
103
- A("div", he, [
104
- c(R, {
105
- label: z.value,
106
- size: "md",
107
- variant: "primary",
108
- type: "submit",
109
- onClick: T
110
- }, null, 8, ["label"]),
111
- c(R, {
112
- label: u(i)("common.cancel"),
113
- size: "md",
114
- variant: "secondary",
115
- onClick: s[3] || (s[3] = (f) => d.value = !1)
116
- }, null, 8, ["label"])
117
- ])
118
- ]),
119
- default: I(() => [
120
- c(F, {
121
- ref_key: "formRef",
122
- ref: V
123
- }, {
124
- default: I(() => [
125
- c(m, {
126
- modelValue: r.value.name,
127
- "onUpdate:modelValue": s[0] || (s[0] = (f) => r.value.name = f),
128
- label: u(i)("permissionSet.form.name"),
129
- placeholder: u(i)("permissionSet.form.namePlaceholder"),
130
- rules: k
131
- }, null, 8, ["modelValue", "label", "placeholder"]),
132
- c(w, {
133
- modelValue: a.value,
134
- "onUpdate:modelValue": [
135
- s[1] || (s[1] = (f) => a.value = f),
136
- _
137
- ],
138
- multiselect: "",
139
- searchable: "",
140
- "search-debounce": 300,
141
- items: E.value,
142
- label: u(i)("permissionSet.form.includedSets"),
143
- placeholder: u(i)("permissionSet.form.includedSetsPlaceholder"),
144
- class: "mt-16"
145
- }, null, 8, ["modelValue", "items", "label", "placeholder"]),
146
- c(Pe, {
147
- modelValue: p.value,
148
- "onUpdate:modelValue": s[2] || (s[2] = (f) => p.value = f),
149
- "inherit-permissions": h.value,
150
- class: "mt-24"
151
- }, null, 8, ["modelValue", "inherit-permissions"])
152
- ]),
153
- _: 1
154
- }, 512)
155
- ]),
156
- _: 1
157
- }, 8, ["modelValue"]);
158
- };
159
- }
160
- }), we = { class: "space-y-8" }, Fe = { class: "flex justify-end xs:px-16" }, Te = /* @__PURE__ */ X({
161
- __name: "PermissionSetList",
162
- setup(M, { expose: D }) {
163
- const { t } = G(), { customReportPermissions: i, fetchCustomReportPermissions: d } = Z(), $ = H(), V = ae(), { breakpoints: U } = le(), x = b(""), P = S(() => {
164
- var n;
165
- return (n = p.value) == null ? void 0 : n.filter((o) => {
166
- const l = x.value.toLowerCase();
167
- return o.name.toLowerCase().includes(l);
168
- });
169
- }), r = b(), a = Q(), p = S(
170
- () => a.permissionSets.value
171
- ), k = b();
172
- async function z() {
173
- await a.readPermissionSets();
174
- }
175
- function E(n) {
176
- var o;
177
- k.value = n, (o = r.value) == null || o.trigger();
178
- }
179
- const h = [
180
- {
181
- accessorKey: "name",
182
- header: () => t("permissionSet.table.columns.name")
183
- },
184
- {
185
- accessorKey: "permission",
186
- header: () => t("permissionSet.table.columns.permissions"),
187
- enableSorting: !1,
188
- cell(n) {
189
- const o = n.row.original, l = Y(
190
- [o.id],
191
- a.permissionSets.value
192
- ), y = N(l), C = y.length, _ = Se(y, i.value);
193
- return v("div", { class: "flex items-center gap-8" }, [
194
- v("span", t("team.labels.allowedCount", { count: C })),
195
- v(
196
- q.FmTooltip,
197
- { variant: "plain", placement: "top" },
198
- {
199
- default: () => v(q.FmIcon, {
200
- name: "info",
201
- class: "cursor-pointer text-fm-color-neutral-gray-300"
202
- }),
203
- content: () => v("div", [
204
- t("team.labels.permission"),
205
- ..._.map(
206
- (T, e) => v("div", { key: `${T}-${e}` }, `- ${T}`)
207
- )
208
- ])
209
- }
210
- )
211
- ]);
212
- }
213
- },
214
- {
215
- id: "action",
216
- size: 52,
217
- meta: {
218
- cellClass: "pl-16",
219
- headerContentClass: "-mx-16"
220
- },
221
- cell(n) {
222
- const o = n.row.original;
223
- return v(
224
- "div",
225
- { class: "flex w-full items-center justify-end", onClick: (l) => l.stopPropagation() },
226
- [
227
- v(me, {
228
- items: [
229
- { label: t("common.update"), onClick: () => E(o) },
230
- {
231
- label: t("common.remove"),
232
- onClick: () => O(o),
233
- itemClass: "text-fm-color-typo-error"
234
- }
235
- ]
236
- })
237
- ]
238
- );
239
- },
240
- enableSorting: !1
241
- }
242
- ];
243
- function B() {
244
- var n;
245
- k.value = void 0, (n = r.value) == null || n.trigger();
246
- }
247
- async function O(n) {
248
- V.open({
249
- title: t("permissionSet.form.delete.title"),
250
- message: t("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
251
- minWidth: U.value.lg ? 588 : 0,
252
- primaryActions: {
253
- text: t("common.remove"),
254
- close: !1,
255
- variant: "destructive"
256
- },
257
- secondaryActions: { text: t("common.cancel"), close: !0 }
258
- }).onPrimary(async () => {
259
- try {
260
- await a.deletePermissionSet(n.id), $.open({
261
- message: t("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
262
- type: "success"
263
- });
264
- } catch (o) {
265
- const l = o instanceof be && o.status === 409 ? o.message.includes("referenced by") ? t("permissionSet.form.delete.setReferencedConflictError", {
266
- permissionSetName: n.name
267
- }) : t("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : o instanceof Error ? o.message : `${o}`;
268
- $.open({ message: l, type: "error" });
269
- }
270
- V.close();
271
- });
272
- }
273
- return te(() => {
274
- z(), d();
275
- }), D({
276
- create: B
277
- }), (n, o) => {
278
- const l = g("FmSearch"), y = g("FmTable"), C = g("FullWrapper");
279
- return L(), oe(ne, null, [
280
- c(ye, {
281
- ref_key: "permissionSetFormRef",
282
- ref: r,
283
- "model-value": k.value
284
- }, null, 8, ["model-value"]),
285
- A("div", we, [
286
- A("div", Fe, [
287
- c(l, {
288
- modelValue: x.value,
289
- "onUpdate:modelValue": o[0] || (o[0] = (_) => x.value = _),
290
- class: "w-[320px] xs:w-full",
291
- autofocus: "",
292
- placeholder: u(t)("permissionSet.search.placeholder")
293
- }, null, 8, ["modelValue", "placeholder"])
294
- ]),
295
- p.value.length > 0 ? (L(), W(C, {
296
- key: 0,
297
- class: "overflow-auto"
298
- }, {
299
- default: I(() => [
300
- c(y, {
301
- "column-defs": h,
302
- "row-data": P.value,
303
- "page-size": P.value.length,
304
- "pin-header-row": "",
305
- "hide-footer": "",
306
- "shrink-at": !1,
307
- onRowClick: o[1] || (o[1] = (_) => E(_.original))
308
- }, null, 8, ["row-data", "page-size"])
309
- ]),
310
- _: 1
311
- })) : (L(), W(u(re), {
312
- key: 1,
313
- title: u(t)("permissionSet.noData.title"),
314
- subtitle: u(t)("permissionSet.noData.subtitle")
315
- }, null, 8, ["title", "subtitle"]))
316
- ])
317
- ], 64);
318
- };
319
- }
320
- });
321
- export {
322
- Te as default
323
- };