@feedmepos/mf-hrm-portal 2.0.15-dev → 2.0.15-dev.3

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 (36) hide show
  1. package/dist/{AuditLogList-DBIsI4YF.js → AuditLogList-eyzJecZc.js} +4 -4
  2. package/dist/EmployeeList-QibdsTN-.js +736 -0
  3. package/dist/{Main-BAZAQTWi.js → Main-B_QCpWOx.js} +4 -4
  4. package/dist/{Main-D7yzD5SW.js → Main-Bjfm9a6M.js} +5 -5
  5. package/dist/{Main-B3YiMuFq.js → Main-DX1aet8y.js} +1298 -1294
  6. package/dist/{PermissionSetList-DBT9LtfT.js → PermissionSetList-fE9Zfrl6.js} +30 -30
  7. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BfqnjeTK.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JpCfRxA9.js} +500 -500
  8. package/dist/RoleList-ByXZemFz.js +528 -0
  9. package/dist/{TeamMemberList-BCv5Vixx.js → TeamMemberList-D-_icv19.js} +327 -324
  10. package/dist/{TimesheetList-DpMBgVtY.js → TimesheetList-DVvz6id4.js} +7 -7
  11. package/dist/{app-pvHHFjbx.js → app-DJG3HGqG.js} +220 -261
  12. package/dist/app.js +2 -2
  13. package/dist/{dayjs.min-BK_bM9xY.js → dayjs.min-CN6o-ax9.js} +1 -1
  14. package/dist/{employee-DhkixwiI.js → employee-CU-G-rAZ.js} +71 -74
  15. package/dist/{index-DK4fVbTF.js → index-ynxje0mm.js} +1 -1
  16. package/dist/{iteration-Bk3cnP07.js → iteration-C6Km_Rno.js} +1 -1
  17. package/dist/{lodash-TrOlqj07.js → lodash-DZvG4gEx.js} +1 -1
  18. package/dist/rule-X41LxaES.js +991 -0
  19. package/dist/src/helpers/rule.d.ts +1 -1
  20. package/dist/src/stores/employee.d.ts +124 -19
  21. package/dist/src/types/employee.d.ts +3 -0
  22. package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +4 -0
  23. package/dist/style.css +1 -1
  24. package/dist/{timesheet-DSQeCVfL.js → timesheet-DUtxTIA4.js} +9 -9
  25. package/dist/tsconfig.app.tsbuildinfo +1 -1
  26. package/dist/useAppStore-CrUYEAtX.js +171 -0
  27. package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
  28. package/dist/{useLoading-fEAOlgoV.js → useLoading-hGUqfW4U.js} +1 -1
  29. package/dist/{useReportPermissions-CkOk_2tl.js → useReportPermissions-BgTdISQy.js} +3 -3
  30. package/dist/utils-BZkjJbju.js +17 -0
  31. package/package.json +1 -1
  32. package/dist/EmployeeList-BOSxLZbY.js +0 -702
  33. package/dist/RoleList-DeE5tN-5.js +0 -519
  34. package/dist/index-Bckj5jnu.js +0 -998
  35. package/dist/useAppStore-DwfwjZpc.js +0 -168
  36. package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
@@ -1,168 +0,0 @@
1
- import { defineStore as f, storeToRefs as v } from "pinia";
2
- import { ref as b } from "vue";
3
- import { useCoreStore as I, baseClientInstance as w } from "@feedmepos/mf-common";
4
- import { g as l, b as d, s as R } from "./iteration-Bk3cnP07.js";
5
- const p = {
6
- async readRoles() {
7
- return l(await d().get("/pos-roles"));
8
- },
9
- async createRole(e) {
10
- return l(await d().post("/pos-roles", e));
11
- },
12
- async updateRole(e, t) {
13
- return l(await d().put(`/pos-roles/${e}`, t));
14
- },
15
- async deleteRole(e) {
16
- return l(
17
- await d().put(`/pos-roles/${e._id}`, {
18
- restaurantIds: [],
19
- role: e
20
- })
21
- );
22
- }
23
- };
24
- async function g(e) {
25
- const { restaurants: t } = I(), i = e.reduce((a, u) => {
26
- var r;
27
- const c = a.findIndex((o) => o._id === u._id), s = {
28
- id: u.restaurantId,
29
- name: ((r = t.value.find((o) => o._id === u.restaurantId)) == null ? void 0 : r.profile.name) || ""
30
- };
31
- return c < 0 ? a.push({
32
- ...u,
33
- restaurants: [s]
34
- }) : a[c].restaurants.some((o) => o.id === u.restaurantId) || (a[c].restaurants = R([...a[c].restaurants, s], { selector: "name" })), a;
35
- }, []);
36
- return R(i, { selector: "name" });
37
- }
38
- const x = f("role", () => {
39
- const e = b([]), t = b(!1);
40
- async function i() {
41
- try {
42
- t.value = !0;
43
- const s = await p.readRoles();
44
- e.value = await g(s);
45
- } catch (s) {
46
- console.log("Error reading roles:", s);
47
- } finally {
48
- t.value = !1;
49
- }
50
- }
51
- async function a(s) {
52
- const r = await p.createRole(s);
53
- e.value = await g(r);
54
- }
55
- async function u(s, r) {
56
- const o = await p.updateRole(s, r);
57
- e.value = await g(o);
58
- }
59
- async function c(s) {
60
- const r = await p.deleteRole(s);
61
- e.value = await g(r);
62
- }
63
- return {
64
- roles: e,
65
- isLoading: t,
66
- readRoles: i,
67
- createRole: a,
68
- updateRole: u,
69
- deleteRole: c
70
- };
71
- }), T = () => {
72
- const e = x();
73
- return {
74
- ...e,
75
- ...v(e)
76
- };
77
- };
78
- var n = [];
79
- for (var m = 0; m < 256; ++m)
80
- n.push((m + 256).toString(16).slice(1));
81
- function Q(e, t = 0) {
82
- return (n[e[t + 0]] + n[e[t + 1]] + n[e[t + 2]] + n[e[t + 3]] + "-" + n[e[t + 4]] + n[e[t + 5]] + "-" + n[e[t + 6]] + n[e[t + 7]] + "-" + n[e[t + 8]] + n[e[t + 9]] + "-" + n[e[t + 10]] + n[e[t + 11]] + n[e[t + 12]] + n[e[t + 13]] + n[e[t + 14]] + n[e[t + 15]]).toLowerCase();
83
- }
84
- var y, U = new Uint8Array(16);
85
- function D() {
86
- if (!y && (y = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !y))
87
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
88
- return y(U);
89
- }
90
- var A = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
91
- const S = {
92
- randomUUID: A
93
- };
94
- function L(e, t, i) {
95
- if (S.randomUUID && !e)
96
- return S.randomUUID();
97
- e = e || {};
98
- var a = e.random || (e.rng || D)();
99
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Q(a);
100
- }
101
- const h = {
102
- async read() {
103
- return l(await w("/").get("/public-setting"));
104
- },
105
- async update(e) {
106
- return l(await w("/").put("/public-setting", e));
107
- }
108
- };
109
- function C() {
110
- return {
111
- loadingQueue: [],
112
- publicSetting: {
113
- delivery: {
114
- feedMe: {
115
- areas: [],
116
- enable: !1,
117
- maxDistance: 0
118
- }
119
- },
120
- sms: {
121
- firebase: !1
122
- },
123
- assets: {
124
- groups: []
125
- },
126
- aiSettings: {
127
- remy: { enable: !1 }
128
- }
129
- }
130
- };
131
- }
132
- const $ = f("portal-app-store", {
133
- state: () => C(),
134
- actions: {
135
- addLoadingQueues(e) {
136
- this.loadingQueue = [...this.loadingQueue, ...e];
137
- },
138
- clearLoadingQueue() {
139
- this.loadingQueue = [];
140
- },
141
- resolveQueues(e) {
142
- this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
143
- },
144
- async promise(e, t = !0) {
145
- const i = L();
146
- try {
147
- const a = [{ id: i, isGlobal: t }];
148
- return this.addLoadingQueues(a), await e();
149
- } finally {
150
- this.resolveQueues([i]);
151
- }
152
- },
153
- async getPublicSetting() {
154
- return this.publicSetting = await h.read(), this.publicSetting;
155
- },
156
- async updatePublicSetting(e) {
157
- return this.publicSetting = await h.update({
158
- ...this.publicSetting,
159
- ...e
160
- }), this.publicSetting;
161
- }
162
- }
163
- });
164
- export {
165
- $ as a,
166
- T as u,
167
- L as v
168
- };
@@ -1,39 +0,0 @@
1
- import { useI18n as a, useCoreStore as n } from "@feedmepos/mf-common";
2
- import { useDialog as i } from "@feedmepos/ui-library";
3
- import { computed as m } from "vue";
4
- function l(o, s) {
5
- const r = i(), { t } = a();
6
- function e() {
7
- o() ? r.open({
8
- title: t("portalCommon.dismiss.title"),
9
- message: t("portalCommon.dismiss.message"),
10
- zIndex: 200,
11
- primaryActions: {
12
- text: t("portalCommon.dismiss.primaryActions"),
13
- variant: "primary",
14
- close: !0
15
- },
16
- secondaryActions: {
17
- text: t("common.cancel"),
18
- variant: "tertiary",
19
- close: !0
20
- }
21
- }).onPrimary(() => {
22
- s();
23
- }) : s();
24
- }
25
- return e;
26
- }
27
- function d() {
28
- const o = n();
29
- return m(() => {
30
- const r = {};
31
- return o.restaurants.value.forEach((t) => {
32
- r[t._id] = t;
33
- }), r;
34
- });
35
- }
36
- export {
37
- d as a,
38
- l as u
39
- };