@feedmepos/mf-hrm-portal 2.0.18-dev → 2.0.18-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 (66) hide show
  1. package/dist/AuditLogList-CPG5uNyJ.js +980 -0
  2. package/dist/EmployeeList-CyF7_ax8.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-CvW6Vu8N.js → Main-BwMCrfKS.js} +761 -758
  6. package/dist/Main-S5kR_LNV.js +85 -0
  7. package/dist/{Main-CleutFvF.js → Main-y2ea2vuC.js} +176 -183
  8. package/dist/PermissionSetList-C5oGIsQP.js +341 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-VaY4Fg_h.js +3480 -0
  10. package/dist/RoleList-C95uKJ8O.js +530 -0
  11. package/dist/TeamMemberList-CEqYCWn6.js +1114 -0
  12. package/dist/TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-DJ-znUI3.js +34 -0
  13. package/dist/{TimesheetList-WqqoKPbg.js → TimesheetList-DXtxCeNh.js} +126 -132
  14. package/dist/{app-R5EioPr4.js → app-BwtXEFgW.js} +711 -759
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-CN15Ft3o.js → dayjs.min-uVMAR_wK.js} +1 -1
  17. package/dist/employee-ImeXt_Q7.js +204 -0
  18. package/dist/{iteration-UBGGRoxQ.js → iteration-BjJgU8cS.js} +4688 -4732
  19. package/dist/{lodash-CC6qHVUo.js → lodash-CSw3Ei7_.js} +1 -1
  20. package/dist/{rule-B519XbW6.js → rule-B6wBPpcM.js} +265 -263
  21. package/dist/src/api/account/index.d.ts +4 -0
  22. package/dist/src/api/audit-log/index.d.ts +0 -9
  23. package/dist/src/api/index.d.ts +1 -0
  24. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  25. package/dist/src/components/CollapsibleWrapper.vue.d.ts +0 -2
  26. package/dist/src/composables/useBasePermission.d.ts +0 -1
  27. package/dist/src/composables/useRestaurantMap.d.ts +329 -2
  28. package/dist/src/composables/useSupportedCountries.d.ts +5 -0
  29. package/dist/src/stores/role.d.ts +7 -7
  30. package/dist/src/stores/team.d.ts +6 -6
  31. package/dist/src/types/restaurant.d.ts +0 -11
  32. package/dist/src/types/team.d.ts +1 -1
  33. package/dist/src/views/hr/locales/index.d.ts +0 -16
  34. package/dist/src/views/team/components/BasePermission.vue.d.ts +7 -3
  35. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
  36. package/dist/src/views/team/locales/index.d.ts +0 -32
  37. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -5
  38. package/dist/style.css +1 -1
  39. package/dist/{timesheet-BylrXRfd.js → timesheet-D1f9XDxj.js} +2 -2
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/useAppStore-D7jswOfq.js +171 -0
  42. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  43. package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
  44. package/dist/{useLoading-rbrVwWuj.js → useLoading-kFlAIf6Y.js} +1 -1
  45. package/dist/{useReportPermissions-BOEZU86S.js → useReportPermissions-ClWD1GSr.js} +3 -3
  46. package/dist/useSearch-B6WK1LBB.js +15 -0
  47. package/package.json +1 -1
  48. package/dist/AuditLogList-CaoW9uYd.js +0 -1011
  49. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  50. package/dist/EmployeeList-DcMvF9U5.js +0 -839
  51. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CoorkndT.js +0 -34
  52. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  53. package/dist/Main-D7k57uq5.js +0 -87
  54. package/dist/PermissionSetList-CM7kbWkO.js +0 -347
  55. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ces9YwYB.js +0 -3443
  56. package/dist/RoleList-DR3eVJ9f.js +0 -545
  57. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  58. package/dist/TeamMemberList-CZZv4Pu5.js +0 -1038
  59. package/dist/employee-DwQlWLkL.js +0 -204
  60. package/dist/src/api/restaurant/index.d.ts +0 -5
  61. package/dist/src/components/Skeleton.vue.d.ts +0 -7
  62. package/dist/src/stores/restaurant.d.ts +0 -181
  63. package/dist/team-BGLhgx5P.js +0 -33
  64. package/dist/useAppStore-Akl8AoVN.js +0 -171
  65. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
  66. package/dist/useSearch-BAPEUu1R.js +0 -15
@@ -1,204 +0,0 @@
1
- import { d as M } from "./dayjs.min-CN15Ft3o.js";
2
- import { defineStore as U, storeToRefs as $ } from "pinia";
3
- import { ref as m } from "vue";
4
- import { b as p, g as f, u as g, s as E } from "./iteration-UBGGRoxQ.js";
5
- import { i as v } from "./utils-BZkjJbju.js";
6
- import { u as _ } from "./useAppStore-Akl8AoVN.js";
7
- const n = {
8
- async readEmployees() {
9
- return f(await p().get("/pos-users"));
10
- },
11
- async readEmployeesPage(e) {
12
- var s, i;
13
- return f(
14
- await p().get("/pos-users/paged", {
15
- params: {
16
- limit: e.limit,
17
- offset: e.offset,
18
- search: e.search,
19
- restaurantIds: (s = e.restaurantIds) != null && s.length ? e.restaurantIds : void 0,
20
- roleIds: (i = e.roleIds) != null && i.length ? e.roleIds : void 0
21
- }
22
- })
23
- );
24
- },
25
- async createEmployee(e) {
26
- await p().post("/pos-users", e);
27
- },
28
- async createMasterEmployee(e) {
29
- await p().post("/pos-users/master-user", e);
30
- },
31
- async migrateToMasterEmployee(e, s) {
32
- await p().put(`/pos-users/migrate/${e}`, s);
33
- },
34
- async updateEmployee(e, s) {
35
- await p().put(`/pos-users/${e}`, s);
36
- },
37
- async updateMasterEmployee(e, s) {
38
- await p().put(`/pos-users/master-user/${e}`, s);
39
- },
40
- async deleteEmployee(e) {
41
- await p().put(`/pos-users/${e._id}`, {
42
- user: e,
43
- roles: [],
44
- previousRoles: e.restaurants.map((s) => ({
45
- restaurantId: s.restaurantId,
46
- roleId: s.roleId
47
- }))
48
- });
49
- },
50
- async deleteMasterEmployee(e) {
51
- await p().put(`/pos-users/master-user/${e._id}`, {
52
- user: e,
53
- roles: [],
54
- previousRoles: e.restaurants.map((s) => ({
55
- restaurantId: s.restaurantId,
56
- roleId: s.roleId
57
- }))
58
- });
59
- },
60
- async generateEmployeePasscode() {
61
- return `${f(
62
- await p().get("/pos-users/generate-passcode")
63
- )}`;
64
- },
65
- async syncUsersMeta() {
66
- await p().post("/pos-users/create-users-meta");
67
- }
68
- };
69
- async function T(e) {
70
- const s = _().roles.value, { restaurants: i } = g(), u = new Map(
71
- i.value.map((a) => [a._id, a.profile.name])
72
- ), c = new Map(s.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
73
- for (const a of e) {
74
- const l = {
75
- restaurantId: a.restaurantId,
76
- restaurantName: u.get(a.restaurantId) || "",
77
- roleId: a.role,
78
- roleName: c.get(a.role) || ""
79
- }, d = r.get(a._id);
80
- if (!d) {
81
- r.set(a._id, {
82
- ...a,
83
- isRestricted: !1,
84
- since: M(v(a._id)).format("DD/MM/YYYY"),
85
- restaurants: [l]
86
- });
87
- continue;
88
- }
89
- d.restaurants.some((y) => y.restaurantId === a.restaurantId) || (d.restaurants = E([...d.restaurants, l], {
90
- selector: "restaurantName"
91
- }));
92
- }
93
- return E([...r.values()], { selector: "name" });
94
- }
95
- function I(e) {
96
- const { restaurants: s } = g(), i = _().roles.value, u = new Map(
97
- s.value.map((a) => [a._id, a])
98
- ), c = new Map(i.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
99
- return {
100
- _id: e._id,
101
- name: e.name,
102
- code: e.code,
103
- passcode: e.passcode,
104
- isMasterUser: e.isMasterUser,
105
- isRestricted: e.isRestricted,
106
- restaurantId: (r == null ? void 0 : r.restaurantId) || "",
107
- role: (r == null ? void 0 : r.roleId) || "",
108
- since: M(v(e._id)).format("DD/MM/YYYY"),
109
- restaurants: E(
110
- e.restaurantRole.map((a) => {
111
- const l = u.get(a.restaurantId);
112
- return {
113
- restaurantId: a.restaurantId,
114
- restaurantName: (l == null ? void 0 : l.profile.name) || "",
115
- restaurantCode: (l == null ? void 0 : l.profile.code) ?? void 0,
116
- roleId: a.roleId,
117
- roleName: c.get(a.roleId) || ""
118
- };
119
- }),
120
- { selector: "restaurantName" }
121
- )
122
- };
123
- }
124
- const R = U("employee", () => {
125
- const e = g(), s = m([]), i = m([]), u = m(0), c = m(!1);
126
- async function r() {
127
- try {
128
- c.value = !0, await e.readRestaurants();
129
- const t = await n.readEmployees();
130
- s.value = await T(t);
131
- } catch (t) {
132
- console.log("Error reading employees:", t);
133
- } finally {
134
- c.value = !1;
135
- }
136
- }
137
- async function a(t) {
138
- try {
139
- c.value = !0, await e.readRestaurants();
140
- const o = await n.readEmployeesPage(t);
141
- i.value = o.items.map(I), u.value = o.total;
142
- } catch (o) {
143
- console.log("Error reading employee page:", o);
144
- } finally {
145
- c.value = !1;
146
- }
147
- }
148
- async function l(t, o) {
149
- await e.readRestaurants();
150
- const w = o ?? (await n.readEmployeesPage({ ...t, limit: 1, offset: 0 })).total;
151
- return w === 0 ? [] : (await n.readEmployeesPage({ ...t, limit: w, offset: 0 })).items.map(I);
152
- }
153
- async function d(t) {
154
- await n.createEmployee(t);
155
- }
156
- async function y(t, o) {
157
- await n.updateEmployee(t, o);
158
- }
159
- async function P(t) {
160
- await n.deleteEmployee(t);
161
- }
162
- async function Y(t) {
163
- await n.deleteMasterEmployee(t);
164
- }
165
- async function N(t) {
166
- await n.createMasterEmployee(t);
167
- }
168
- async function S(t, o) {
169
- await n.updateMasterEmployee(t, o);
170
- }
171
- async function h(t, o) {
172
- await n.migrateToMasterEmployee(t, o);
173
- }
174
- async function D() {
175
- await n.syncUsersMeta();
176
- }
177
- return {
178
- employees: s,
179
- listEmployees: i,
180
- totalEmployees: u,
181
- isLoading: c,
182
- readEmployees: r,
183
- readEmployeesPage: a,
184
- readAllEmployeesPage: l,
185
- createEmployee: d,
186
- updateEmployee: y,
187
- deleteEmployee: P,
188
- createMasterEmployee: N,
189
- updateMasterEmployee: S,
190
- deleteMasterEmployee: Y,
191
- migrateToMasterUser: h,
192
- syncUsersMeta: D
193
- };
194
- }), k = () => {
195
- const e = R();
196
- return {
197
- ...e,
198
- ...$(e)
199
- };
200
- };
201
- export {
202
- n as E,
203
- k as u
204
- };
@@ -1,5 +0,0 @@
1
- import type { HrmRestaurant } from '@/types/restaurant';
2
- declare const RestaurantAPI: {
3
- readRestaurants(): Promise<HrmRestaurant[]>;
4
- };
5
- export default RestaurantAPI;
@@ -1,7 +0,0 @@
1
- type __VLS_Props = {
2
- width?: string;
3
- };
4
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
- width: string;
6
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
- export default _default;
@@ -1,181 +0,0 @@
1
- import type { HrmRestaurant } from '@/types/restaurant';
2
- export declare const useRestaurantStore: () => {
3
- restaurants: import("vue").Ref<{
4
- _id: string;
5
- businessId: string;
6
- profile: {
7
- name: string;
8
- code?: string | undefined;
9
- legalName: string;
10
- };
11
- managable: boolean;
12
- }[], HrmRestaurant[] | {
13
- _id: string;
14
- businessId: string;
15
- profile: {
16
- name: string;
17
- code?: string | undefined;
18
- legalName: string;
19
- };
20
- managable: boolean;
21
- }[]>;
22
- isLoading: import("vue").Ref<boolean, boolean>;
23
- $state: {
24
- restaurants: {
25
- _id: string;
26
- businessId: string;
27
- profile: {
28
- name: string;
29
- code?: string | undefined;
30
- legalName: string;
31
- };
32
- managable: boolean;
33
- }[];
34
- isLoading: boolean;
35
- } & import("pinia").PiniaCustomStateProperties<Pick<{
36
- restaurants: import("vue").Ref<{
37
- _id: string;
38
- businessId: string;
39
- profile: {
40
- name: string;
41
- code?: string | undefined;
42
- legalName: string;
43
- };
44
- managable: boolean;
45
- }[], HrmRestaurant[] | {
46
- _id: string;
47
- businessId: string;
48
- profile: {
49
- name: string;
50
- code?: string | undefined;
51
- legalName: string;
52
- };
53
- managable: boolean;
54
- }[]>;
55
- isLoading: import("vue").Ref<boolean, boolean>;
56
- readRestaurants: (force?: boolean) => Promise<void>;
57
- }, "restaurants" | "isLoading">>;
58
- $patch(partialState: import("pinia")._DeepPartial<{
59
- restaurants: {
60
- _id: string;
61
- businessId: string;
62
- profile: {
63
- name: string;
64
- code?: string | undefined;
65
- legalName: string;
66
- };
67
- managable: boolean;
68
- }[];
69
- isLoading: boolean;
70
- }>): void;
71
- $patch<F extends (state: {
72
- restaurants: {
73
- _id: string;
74
- businessId: string;
75
- profile: {
76
- name: string;
77
- code?: string | undefined;
78
- legalName: string;
79
- };
80
- managable: boolean;
81
- }[];
82
- isLoading: boolean;
83
- }) => any>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void;
84
- $reset(): void;
85
- $subscribe(callback: import("pinia").SubscriptionCallback<Pick<{
86
- restaurants: import("vue").Ref<{
87
- _id: string;
88
- businessId: string;
89
- profile: {
90
- name: string;
91
- code?: string | undefined;
92
- legalName: string;
93
- };
94
- managable: boolean;
95
- }[], HrmRestaurant[] | {
96
- _id: string;
97
- businessId: string;
98
- profile: {
99
- name: string;
100
- code?: string | undefined;
101
- legalName: string;
102
- };
103
- managable: boolean;
104
- }[]>;
105
- isLoading: import("vue").Ref<boolean, boolean>;
106
- readRestaurants: (force?: boolean) => Promise<void>;
107
- }, "restaurants" | "isLoading">>, options?: {
108
- detached?: boolean;
109
- } & import("vue").WatchOptions): () => void;
110
- $onAction(callback: import("pinia").StoreOnActionListener<"restaurant", Pick<{
111
- restaurants: import("vue").Ref<{
112
- _id: string;
113
- businessId: string;
114
- profile: {
115
- name: string;
116
- code?: string | undefined;
117
- legalName: string;
118
- };
119
- managable: boolean;
120
- }[], HrmRestaurant[] | {
121
- _id: string;
122
- businessId: string;
123
- profile: {
124
- name: string;
125
- code?: string | undefined;
126
- legalName: string;
127
- };
128
- managable: boolean;
129
- }[]>;
130
- isLoading: import("vue").Ref<boolean, boolean>;
131
- readRestaurants: (force?: boolean) => Promise<void>;
132
- }, "restaurants" | "isLoading">, Pick<{
133
- restaurants: import("vue").Ref<{
134
- _id: string;
135
- businessId: string;
136
- profile: {
137
- name: string;
138
- code?: string | undefined;
139
- legalName: string;
140
- };
141
- managable: boolean;
142
- }[], HrmRestaurant[] | {
143
- _id: string;
144
- businessId: string;
145
- profile: {
146
- name: string;
147
- code?: string | undefined;
148
- legalName: string;
149
- };
150
- managable: boolean;
151
- }[]>;
152
- isLoading: import("vue").Ref<boolean, boolean>;
153
- readRestaurants: (force?: boolean) => Promise<void>;
154
- }, never>, Pick<{
155
- restaurants: import("vue").Ref<{
156
- _id: string;
157
- businessId: string;
158
- profile: {
159
- name: string;
160
- code?: string | undefined;
161
- legalName: string;
162
- };
163
- managable: boolean;
164
- }[], HrmRestaurant[] | {
165
- _id: string;
166
- businessId: string;
167
- profile: {
168
- name: string;
169
- code?: string | undefined;
170
- legalName: string;
171
- };
172
- managable: boolean;
173
- }[]>;
174
- isLoading: import("vue").Ref<boolean, boolean>;
175
- readRestaurants: (force?: boolean) => Promise<void>;
176
- }, "readRestaurants">>, detached?: boolean): () => void;
177
- $dispose(): void;
178
- $id: "restaurant";
179
- _customProperties: Set<string>;
180
- readRestaurants: (force?: boolean) => Promise<void>;
181
- };
@@ -1,33 +0,0 @@
1
- import { defineStore as d } from "pinia";
2
- import { ref as s, computed as o } from "vue";
3
- import { t as f } from "./rule-B519XbW6.js";
4
- const I = d("team", () => {
5
- const r = s([]), a = s(!1), m = o(
6
- () => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.name]))
7
- ), n = o(
8
- () => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.email]))
9
- ), u = o(
10
- () => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.phoneNumber]))
11
- );
12
- async function c({ force: e = !1 } = {}) {
13
- if (!(!e && r.value.length > 0))
14
- try {
15
- a.value = !0;
16
- const i = await f.readTeamMembers();
17
- r.value = i.sort((t, l) => t.doc.isOwner ? -1 : t.name.localeCompare(l.name));
18
- } finally {
19
- a.value = !1;
20
- }
21
- }
22
- return {
23
- members: r,
24
- isLoading: a,
25
- userIdToName: m,
26
- userIdToEmail: n,
27
- userIdToPhone: u,
28
- readTeamMembers: c
29
- };
30
- });
31
- export {
32
- I as u
33
- };
@@ -1,171 +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 h } from "@feedmepos/mf-common";
4
- import { g as c, b as y, u as Q, s as v } from "./iteration-UBGGRoxQ.js";
5
- const m = {
6
- async readRoles() {
7
- return c(await y().get("/pos-roles"));
8
- },
9
- async createRole(e) {
10
- return c(await y().post("/pos-roles", e));
11
- },
12
- async updateRole(e, t) {
13
- return c(await y().put(`/pos-roles/${e}`, t));
14
- },
15
- async deleteRole(e) {
16
- return c(
17
- await y().put(`/pos-roles/${e._id}`, {
18
- restaurantIds: [],
19
- role: e
20
- })
21
- );
22
- }
23
- };
24
- async function b(e) {
25
- const { restaurants: t } = Q(), s = e.reduce((n, r) => {
26
- var g;
27
- const l = n.findIndex((o) => o._id === r._id), p = {
28
- id: r.restaurantId,
29
- name: ((g = t.value.find((o) => o._id === r.restaurantId)) == null ? void 0 : g.profile.name) || ""
30
- };
31
- return l < 0 ? n.push({
32
- ...r,
33
- restaurants: [p]
34
- }) : n[l].restaurants.some((o) => o.id === r.restaurantId) || (n[l].restaurants = v([...n[l].restaurants, p], { selector: "name" })), n;
35
- }, []);
36
- return v(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 d = await m.readRoles();
47
- s.value = await b(d), r.value = u;
48
- } catch (d) {
49
- console.log("Error reading roles:", d);
50
- } finally {
51
- n.value = !1;
52
- }
53
- }
54
- async function p(u) {
55
- const i = await m.createRole(u);
56
- s.value = await b(i);
57
- }
58
- async function g(u, i) {
59
- const d = await m.updateRole(u, i);
60
- s.value = await b(d);
61
- }
62
- async function o(u) {
63
- const i = await m.deleteRole(u);
64
- s.value = await b(i);
65
- }
66
- return {
67
- roles: s,
68
- isLoading: n,
69
- readRoles: l,
70
- createRole: p,
71
- updateRole: g,
72
- deleteRole: o
73
- };
74
- }), q = () => {
75
- const e = A();
76
- return {
77
- ...e,
78
- ...U(e)
79
- };
80
- };
81
- var a = [];
82
- for (var S = 0; S < 256; ++S)
83
- a.push((S + 256).toString(16).slice(1));
84
- function _(e, t = 0) {
85
- 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();
86
- }
87
- var w, L = new Uint8Array(16);
88
- function C() {
89
- if (!w && (w = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !w))
90
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
91
- return w(L);
92
- }
93
- var V = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
94
- const f = {
95
- randomUUID: V
96
- };
97
- function P(e, t, s) {
98
- if (f.randomUUID && !e)
99
- return f.randomUUID();
100
- e = e || {};
101
- var n = e.random || (e.rng || C)();
102
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, _(n);
103
- }
104
- const I = {
105
- async read() {
106
- return c(await h("/").get("/public-setting"));
107
- },
108
- async update(e) {
109
- return c(await h("/").put("/public-setting", e));
110
- }
111
- };
112
- function B() {
113
- return {
114
- loadingQueue: [],
115
- publicSetting: {
116
- delivery: {
117
- feedMe: {
118
- areas: [],
119
- enable: !1,
120
- maxDistance: 0
121
- }
122
- },
123
- sms: {
124
- firebase: !1
125
- },
126
- assets: {
127
- groups: []
128
- },
129
- aiSettings: {
130
- remy: { enable: !1 }
131
- }
132
- }
133
- };
134
- }
135
- const H = x("portal-app-store", {
136
- state: () => B(),
137
- actions: {
138
- addLoadingQueues(e) {
139
- this.loadingQueue = [...this.loadingQueue, ...e];
140
- },
141
- clearLoadingQueue() {
142
- this.loadingQueue = [];
143
- },
144
- resolveQueues(e) {
145
- this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
146
- },
147
- async promise(e, t = !0) {
148
- const s = P();
149
- try {
150
- const n = [{ id: s, isGlobal: t }];
151
- return this.addLoadingQueues(n), await e();
152
- } finally {
153
- this.resolveQueues([s]);
154
- }
155
- },
156
- async getPublicSetting() {
157
- return this.publicSetting = await I.read(), this.publicSetting;
158
- },
159
- async updatePublicSetting(e) {
160
- return this.publicSetting = await I.update({
161
- ...this.publicSetting,
162
- ...e
163
- }), this.publicSetting;
164
- }
165
- }
166
- });
167
- export {
168
- H as a,
169
- q as u,
170
- P as v
171
- };