@feedmepos/mf-hrm-portal 1.1.3-dev.1 → 1.1.3-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 (35) hide show
  1. package/dist/AuditLogList-kZBi77lv.js +435 -0
  2. package/dist/{EmployeeList-BWDsSFoY.js → EmployeeList-Cg-mhdLv.js} +5 -5
  3. package/dist/{Main-VjhiuuHr.js → Main-BHF7vXlD.js} +28 -27
  4. package/dist/{Main-D5YEKOpl.js → Main-CC9_bKTG.js} +7 -7
  5. package/dist/PermissionSetList-C0FOYrQ6.js +283 -0
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CS4B-7AU.js +3084 -0
  7. package/dist/{RoleList-CfPD_Gk_.js → RoleList-D2NTVZa_.js} +5 -5
  8. package/dist/{TeamMemberList-DEYo6_pS.js → TeamMemberList-DC0Gxjin.js} +325 -322
  9. package/dist/{TimesheetList-BTTBjTrO.js → TimesheetList-CksRCsTc.js} +6 -6
  10. package/dist/api/index.d.ts +4 -0
  11. package/dist/api/team/index.d.ts +2 -2
  12. package/dist/{app-CfIHEA52.js → app-kKq54h9D.js} +606 -504
  13. package/dist/app.js +3 -3
  14. package/dist/{dayjs.min-C8cBXLt-.js → dayjs.min-CGTR0SS0.js} +1 -1
  15. package/dist/{employee-ChJpkvUF.js → employee-CRKx3zN0.js} +3 -3
  16. package/dist/helpers/permission-set.d.ts +15 -0
  17. package/dist/{index-CgbDOn3W.js → index-DRoNwfyW.js} +2153 -2053
  18. package/dist/index-TP4vQCyq.js +827 -0
  19. package/dist/{lodash-0EOIqOEG.js → lodash-CeWi5dyp.js} +1 -1
  20. package/dist/stores/team.d.ts +4 -1
  21. package/dist/team-CuLNHjGN.js +29 -0
  22. package/dist/{timesheet-DTI6G4DD.js → timesheet-V636ISlI.js} +2 -2
  23. package/dist/tsconfig.app.tsbuildinfo +1 -1
  24. package/dist/{useAppStore-DCpMNDxE.js → useAppStore-DoX0IUFz.js} +1 -1
  25. package/dist/{useLoading-ChLCiMQj.js → useLoading-1yy1KHsE.js} +1 -1
  26. package/dist/views/audit-log/locales/index.d.ts +40 -8
  27. package/dist/views/team/locales/index.d.ts +12 -8
  28. package/package.json +3 -2
  29. package/dist/AuditLogList-qGKeg-cd.js +0 -384
  30. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-yghfcQRF.js +0 -3050
  31. package/dist/RolePermissionList-Cu1KTuuI.js +0 -285
  32. package/dist/team-C2muObo8.js +0 -26
  33. package/dist/types/permission.d.ts +0 -1
  34. /package/dist/views/team/{role/RolePermissionForm.vue.d.ts → permission-set/PermissionSetForm.vue.d.ts} +0 -0
  35. /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 { w as Y, u as z } from "./index-CgbDOn3W.js";
6
- import { u as Z } from "./useLoading-ChLCiMQj.js";
7
- import { a as ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-yghfcQRF.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
- };
@@ -1,26 +0,0 @@
1
- import { defineStore as c } from "pinia";
2
- import { ref as t, computed as i } from "vue";
3
- import { t as u } from "./index-CgbDOn3W.js";
4
- const p = c("team", () => {
5
- const r = t([]), a = t(!1), m = i(
6
- () => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.name]))
7
- );
8
- async function s() {
9
- try {
10
- a.value = !0;
11
- const e = await u.readTeamMembers();
12
- r.value = e.sort((o, n) => o.doc.isOwner ? -1 : o.name.localeCompare(n.name));
13
- } finally {
14
- a.value = !1;
15
- }
16
- }
17
- return {
18
- members: r,
19
- isLoading: a,
20
- userIdToName: m,
21
- readTeamMembers: s
22
- };
23
- });
24
- export {
25
- p as u
26
- };
@@ -1 +0,0 @@
1
- export { Permission, FullPortalPermissions, FullPosPermissions, LegacyPermissionMapping, PermissionCategory, PortalPermissionCategories, type PermissionCategoryValue, type AbilityConstructOption, type PermissionLevelDetail, type IFdtoPortalPermission, type IPermissionUser, } from '@feedmepos/hrm-permission';