@feedmepos/mf-hrm-portal 2.1.1-dev.2 → 2.1.1-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/ApprovalCodeList-B0PLZwav.js +758 -0
  2. package/dist/{AuditLogList-DHiqs9G0.js → AuditLogList-CRXwPImZ.js} +5 -5
  3. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-CWqNWNdD.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-zJwkM_Xb.js} +2 -2
  4. package/dist/{EmployeeList-CUd3VH5h.js → EmployeeList-DN2pnXcS.js} +7 -7
  5. package/dist/GrantUserList-DoyxknJZ.js +464 -0
  6. package/dist/{Main-DgemO-iy.js → Main-B5BKGpLg.js} +13 -11
  7. package/dist/Main-BGONIxo8.js +122 -0
  8. package/dist/{Main-B_L5flWT.js → Main-DQj4xtkB.js} +10 -8
  9. package/dist/{PermissionSetList-BaC4lKV5.js → PermissionSetList-4uIU9FvN.js} +13 -12
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D0luaKDb.js +4122 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-DbPzVpnG.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -1
  12. package/dist/{RoleList-CThb6VEd.js → RoleList-Bj5Y5jd_.js} +12 -11
  13. package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
  14. package/dist/TeamMemberList-Byjlca2Y.js +1216 -0
  15. package/dist/{TimesheetList-C_IMtsTH.js → TimesheetList-DwIcsOM-.js} +47 -46
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DGwteHIL.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B9qlQ6KG.js} +14 -13
  17. package/dist/{app-BW91YDke.js → app-BZwE2coe.js} +2512 -2035
  18. package/dist/app.js +1 -1
  19. package/dist/approval-code-Q4666xp5.js +58 -0
  20. package/dist/{dayjs.min-DwQTpnVK.js → dayjs.min-BXBPls4m.js} +1 -1
  21. package/dist/{employee-yM0kdY70.js → employee-CJTbs1f7.js} +27 -26
  22. package/dist/grant-user-CQZaTzVt.js +67 -0
  23. package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
  24. package/dist/iteration-BCbIbdHR.js +7682 -0
  25. package/dist/{lodash-DLReQyP0.js → lodash-CUIS1iIz.js} +1 -1
  26. package/dist/restaurant-YOVMuuFY.js +1876 -0
  27. package/dist/role-CzXchcSS.js +82 -0
  28. package/dist/{rule-BJ-o-PKi.js → rule-BO6xj2Xa.js} +37 -36
  29. package/dist/src/api/approval-code/index.d.ts +7 -0
  30. package/dist/src/router/shared.d.ts +3 -1
  31. package/dist/src/stores/approval-code.d.ts +140 -0
  32. package/dist/src/types/approval-code.d.ts +114 -0
  33. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
  34. package/dist/src/views/approval-code/components/ApprovalCodeCreatedDialog.vue.d.ts +9 -0
  35. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +22 -0
  36. package/dist/src/views/approval-code/locales/index.d.ts +360 -0
  37. package/dist/src/views/pos-access/locales/index.d.ts +48 -0
  38. package/dist/src/views/team/locales/index.d.ts +8 -0
  39. package/dist/style.css +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/useAppStore-DNTlIeMv.js +93 -0
  42. package/dist/{useLoading-B89K5XKO.js → useLoading-BH02lYns.js} +1 -1
  43. package/dist/{useReportPermissions-Bjfhr6FD.js → useReportPermissions-Q-xLwz5N.js} +3 -3
  44. package/package.json +1 -1
  45. package/dist/Main-DUbLeLlK.js +0 -577
  46. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DddOxcG_.js +0 -4121
  47. package/dist/TeamMemberList-CAw4jr1b.js +0 -1186
  48. package/dist/iteration-Dj50K6I7.js +0 -9556
  49. package/dist/useAppStore-CHkGWiai.js +0 -169
  50. /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
@@ -1,169 +0,0 @@
1
- import { defineStore as x, storeToRefs as U } from "pinia";
2
- import { ref as R } from "vue";
3
- import { useCoreStore as D, baseClientInstance as v } from "@feedmepos/mf-common";
4
- import { g as c, b as g, u as Q, s as f } from "./iteration-Dj50K6I7.js";
5
- const y = {
6
- async readRoles() {
7
- return c(await g().get("/pos-roles"));
8
- },
9
- async createRole(e) {
10
- return c(await g().post("/pos-roles", e));
11
- },
12
- async updateRole(e, t) {
13
- return c(await g().put(`/pos-roles/${e}`, t));
14
- },
15
- async deleteRole(e) {
16
- return c(
17
- await g().put(`/pos-roles/${e._id}`, {
18
- restaurantIds: [],
19
- role: e
20
- })
21
- );
22
- }
23
- };
24
- async function m(e) {
25
- const { restaurants: t } = Q(), s = e.reduce((n, r) => {
26
- var p;
27
- const l = n.findIndex((o) => o._id === r._id), d = {
28
- id: r.restaurantId,
29
- name: ((p = t.value.find((o) => o._id === r.restaurantId)) == null ? void 0 : p.profile.name) || ""
30
- };
31
- return l < 0 ? n.push({
32
- ...r,
33
- restaurants: [d]
34
- }) : n[l].restaurants.some((o) => o.id === r.restaurantId) || (n[l].restaurants = f([...n[l].restaurants, d], { selector: "name" })), n;
35
- }, []);
36
- return f(s, { selector: "name" });
37
- }
38
- const A = x("role", () => {
39
- const { currentBusiness: e } = D(), t = Q(), s = R([]), n = R(!1), r = R(null);
40
- async function l() {
41
- var i;
42
- const u = ((i = e.value) == null ? void 0 : i._id) ?? null;
43
- if (r.value !== u)
44
- try {
45
- n.value = !0, await t.readRestaurants();
46
- const w = await y.readRoles();
47
- s.value = await m(w), r.value = u;
48
- } finally {
49
- n.value = !1;
50
- }
51
- }
52
- async function d(u) {
53
- const i = await y.createRole(u);
54
- s.value = await m(i);
55
- }
56
- async function p(u, i) {
57
- const w = await y.updateRole(u, i);
58
- s.value = await m(w);
59
- }
60
- async function o(u) {
61
- const i = await y.deleteRole(u);
62
- s.value = await m(i);
63
- }
64
- return {
65
- roles: s,
66
- isLoading: n,
67
- readRoles: l,
68
- createRole: d,
69
- updateRole: p,
70
- deleteRole: o
71
- };
72
- }), E = () => {
73
- const e = A();
74
- return {
75
- ...e,
76
- ...U(e)
77
- };
78
- };
79
- var a = [];
80
- for (var S = 0; S < 256; ++S)
81
- a.push((S + 256).toString(16).slice(1));
82
- function _(e, t = 0) {
83
- return (a[e[t + 0]] + a[e[t + 1]] + a[e[t + 2]] + a[e[t + 3]] + "-" + a[e[t + 4]] + a[e[t + 5]] + "-" + a[e[t + 6]] + a[e[t + 7]] + "-" + a[e[t + 8]] + a[e[t + 9]] + "-" + a[e[t + 10]] + a[e[t + 11]] + a[e[t + 12]] + a[e[t + 13]] + a[e[t + 14]] + a[e[t + 15]]).toLowerCase();
84
- }
85
- var b, L = new Uint8Array(16);
86
- function C() {
87
- if (!b && (b = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !b))
88
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
89
- return b(L);
90
- }
91
- var V = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
92
- const h = {
93
- randomUUID: V
94
- };
95
- function P(e, t, s) {
96
- if (h.randomUUID && !e)
97
- return h.randomUUID();
98
- e = e || {};
99
- var n = e.random || (e.rng || C)();
100
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, _(n);
101
- }
102
- const I = {
103
- async read() {
104
- return c(await v("/").get("/public-setting"));
105
- },
106
- async update(e) {
107
- return c(await v("/").put("/public-setting", e));
108
- }
109
- };
110
- function B() {
111
- return {
112
- loadingQueue: [],
113
- publicSetting: {
114
- delivery: {
115
- feedMe: {
116
- areas: [],
117
- enable: !1,
118
- maxDistance: 0
119
- }
120
- },
121
- sms: {
122
- firebase: !1
123
- },
124
- assets: {
125
- groups: []
126
- },
127
- aiSettings: {
128
- remy: { enable: !1 }
129
- }
130
- }
131
- };
132
- }
133
- const H = x("portal-app-store", {
134
- state: () => B(),
135
- actions: {
136
- addLoadingQueues(e) {
137
- this.loadingQueue = [...this.loadingQueue, ...e];
138
- },
139
- clearLoadingQueue() {
140
- this.loadingQueue = [];
141
- },
142
- resolveQueues(e) {
143
- this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
144
- },
145
- async promise(e, t = !0) {
146
- const s = P();
147
- try {
148
- const n = [{ id: s, isGlobal: t }];
149
- return this.addLoadingQueues(n), await e();
150
- } finally {
151
- this.resolveQueues([s]);
152
- }
153
- },
154
- async getPublicSetting() {
155
- return this.publicSetting = await I.read(), this.publicSetting;
156
- },
157
- async updatePublicSetting(e) {
158
- return this.publicSetting = await I.update({
159
- ...this.publicSetting,
160
- ...e
161
- }), this.publicSetting;
162
- }
163
- }
164
- });
165
- export {
166
- H as a,
167
- E as u,
168
- P as v
169
- };