@fctc/interface-logic 5.2.4 → 5.2.6
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.
- package/dist/{chunk-Q5YXX4OR.js → chunk-CCTDGAMA.js} +52 -51
- package/dist/{chunk-WBGK2SHU.js → chunk-COC7NGXP.js} +20 -19
- package/dist/{chunk-6ARYI77N.mjs → chunk-F2VAAEVB.mjs} +12 -3
- package/dist/{chunk-OV7EKGYM.mjs → chunk-F4RE57FT.mjs} +1394 -640
- package/dist/{chunk-C5QQGBN4.js → chunk-FWBYTZIV.js} +23 -18
- package/dist/chunk-GGNOJ77I.js +1 -2
- package/dist/{chunk-BPJZ3QRN.mjs → chunk-HQVNK2EW.mjs} +128 -770
- package/dist/{chunk-VBYRP2P7.mjs → chunk-Q3Y6RCJ4.mjs} +19 -1
- package/dist/{chunk-5STZNSW4.js → chunk-U2COUTK5.js} +1663 -1087
- package/dist/{chunk-JDXUTKMX.js → chunk-U4Q3MW45.js} +170 -852
- package/dist/{chunk-QOXPJWSN.mjs → chunk-VBVNP77T.mjs} +6 -2
- package/dist/chunk-WAXGOBY2.mjs +0 -1
- package/dist/chunk-WTPKTZQC.js +118 -0
- package/dist/{chunk-ACSPOGTI.mjs → chunk-ZDXEWQQD.mjs} +14 -7
- package/dist/configs.js +4 -9
- package/dist/configs.mjs +7 -3
- package/dist/constants.d.mts +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +36 -70
- package/dist/constants.mjs +36 -1
- package/dist/environment.d.mts +1 -1
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +8 -17
- package/dist/environment.mjs +12 -4
- package/dist/hooks.d.mts +7 -23
- package/dist/hooks.d.ts +7 -23
- package/dist/hooks.js +312 -635
- package/dist/hooks.mjs +312 -6
- package/dist/index.d.mts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +433 -1257
- package/dist/index.mjs +433 -8
- package/dist/{local-storage-BPvoMGYJ.d.mts → local-storage-AbiOQTLK.d.mts} +1 -1
- package/dist/{local-storage-BPvoMGYJ.d.ts → local-storage-AbiOQTLK.d.ts} +1 -1
- package/dist/models.js +4 -8
- package/dist/models.mjs +7 -2
- package/dist/provider.d.mts +4 -12
- package/dist/provider.d.ts +4 -12
- package/dist/provider.js +26 -51
- package/dist/provider.mjs +26 -6
- package/dist/services.d.mts +6 -10
- package/dist/services.d.ts +6 -10
- package/dist/services.js +30 -55
- package/dist/services.mjs +30 -6
- package/dist/types.js +1 -4
- package/dist/types.mjs +1 -1
- package/dist/utils.d.mts +33 -61
- package/dist/utils.d.ts +33 -61
- package/dist/utils.js +36 -139
- package/dist/utils.mjs +36 -2
- package/package.json +15 -29
- package/dist/chunk-6LSKTACC.js +0 -687
- package/dist/chunk-B432GFRR.mjs +0 -606
- package/dist/chunk-RPWKWEMA.js +0 -116
- package/dist/store.d.mts +0 -382
- package/dist/store.d.ts +0 -382
- package/dist/store.js +0 -326
- package/dist/store.mjs +0 -1
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
axiosClient
|
|
3
|
+
} from "./chunk-ZDXEWQQD.mjs";
|
|
4
|
+
import {
|
|
5
|
+
cleanObject,
|
|
6
|
+
localStorageUtils,
|
|
7
|
+
sessionStorageUtils,
|
|
8
|
+
toQueryString
|
|
9
|
+
} from "./chunk-HQVNK2EW.mjs";
|
|
10
|
+
import {
|
|
11
|
+
BaseModel
|
|
12
|
+
} from "./chunk-VBVNP77T.mjs";
|
|
13
|
+
import {
|
|
14
|
+
LoadDataModel,
|
|
15
|
+
MODEL_TO_TABLE,
|
|
16
|
+
UriConstants
|
|
17
|
+
} from "./chunk-Q3Y6RCJ4.mjs";
|
|
11
18
|
|
|
19
|
+
// src/provider/react-query-provider.tsx
|
|
20
|
+
import { useState } from "react";
|
|
21
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
22
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
23
|
var ReactQueryProvider = ({ children }) => {
|
|
13
24
|
const [queryClient] = useState(
|
|
14
25
|
() => new QueryClient({
|
|
@@ -24,15 +35,153 @@ var ReactQueryProvider = ({ children }) => {
|
|
|
24
35
|
);
|
|
25
36
|
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children });
|
|
26
37
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
38
|
+
|
|
39
|
+
// src/provider/main-provider.tsx
|
|
40
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
30
41
|
var MainProvider = ({ children }) => {
|
|
31
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsx2(ReactQueryProvider, { children });
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/provider/env-provider.tsx
|
|
46
|
+
import { createContext, useContext, useState as useState2, useCallback } from "react";
|
|
47
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
48
|
+
var initialEnvState = {
|
|
49
|
+
env: null,
|
|
50
|
+
baseUrl: "",
|
|
51
|
+
requests: null,
|
|
52
|
+
companies: [],
|
|
53
|
+
user: {},
|
|
54
|
+
config: null,
|
|
55
|
+
envFile: null,
|
|
56
|
+
defaultCompany: {
|
|
57
|
+
id: null,
|
|
58
|
+
logo: "",
|
|
59
|
+
secondary_color: "",
|
|
60
|
+
primary_color: "",
|
|
61
|
+
secondary_logo: ""
|
|
62
|
+
},
|
|
63
|
+
context: {
|
|
64
|
+
uid: null,
|
|
65
|
+
lang: "vi_VN",
|
|
66
|
+
tz: "Asia/Saigon"
|
|
67
|
+
},
|
|
68
|
+
excludeLanguages: [],
|
|
69
|
+
isSupaMode: false
|
|
32
70
|
};
|
|
71
|
+
var EnvContext = createContext(null);
|
|
72
|
+
function EnvProvider({
|
|
73
|
+
children,
|
|
74
|
+
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
75
|
+
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
76
|
+
}) {
|
|
77
|
+
const [env, setEnvState] = useState2({
|
|
78
|
+
...initialEnvState,
|
|
79
|
+
localStorageUtils: localStorageUtil,
|
|
80
|
+
sessionStorageUtils: sessionStorageUtil
|
|
81
|
+
});
|
|
82
|
+
const setupEnv = useCallback(
|
|
83
|
+
(envConfig) => {
|
|
84
|
+
const updatedEnv = {
|
|
85
|
+
...env,
|
|
86
|
+
...envConfig,
|
|
87
|
+
localStorageUtils: localStorageUtil,
|
|
88
|
+
sessionStorageUtils: sessionStorageUtil
|
|
89
|
+
};
|
|
90
|
+
const requests = axiosClient.init(updatedEnv);
|
|
91
|
+
setEnvState({ ...updatedEnv, requests });
|
|
92
|
+
return updatedEnv;
|
|
93
|
+
},
|
|
94
|
+
[env, localStorageUtil, sessionStorageUtil]
|
|
95
|
+
);
|
|
96
|
+
const setUid = useCallback((uid) => {
|
|
97
|
+
setEnvState((prev) => ({
|
|
98
|
+
...prev,
|
|
99
|
+
context: { ...prev.context, uid }
|
|
100
|
+
}));
|
|
101
|
+
}, []);
|
|
102
|
+
const setLang = useCallback((lang) => {
|
|
103
|
+
setEnvState((prev) => ({
|
|
104
|
+
...prev,
|
|
105
|
+
context: { ...prev.context, lang }
|
|
106
|
+
}));
|
|
107
|
+
}, []);
|
|
108
|
+
const setAllowCompanies = useCallback((allowed_company_ids) => {
|
|
109
|
+
setEnvState((prev) => ({
|
|
110
|
+
...prev,
|
|
111
|
+
context: { ...prev.context, allowed_company_ids }
|
|
112
|
+
}));
|
|
113
|
+
}, []);
|
|
114
|
+
const setCompanies = useCallback((companies) => {
|
|
115
|
+
setEnvState((prev) => ({
|
|
116
|
+
...prev,
|
|
117
|
+
companies
|
|
118
|
+
}));
|
|
119
|
+
}, []);
|
|
120
|
+
const setDefaultCompany = useCallback(
|
|
121
|
+
(defaultCompany) => {
|
|
122
|
+
setEnvState((prev) => ({
|
|
123
|
+
...prev,
|
|
124
|
+
defaultCompany
|
|
125
|
+
}));
|
|
126
|
+
},
|
|
127
|
+
[]
|
|
128
|
+
);
|
|
129
|
+
const setUserInfo = useCallback((user) => {
|
|
130
|
+
setEnvState((prev) => ({
|
|
131
|
+
...prev,
|
|
132
|
+
user
|
|
133
|
+
}));
|
|
134
|
+
}, []);
|
|
135
|
+
const setConfig = useCallback((config) => {
|
|
136
|
+
setEnvState((prev) => ({
|
|
137
|
+
...prev,
|
|
138
|
+
config
|
|
139
|
+
}));
|
|
140
|
+
}, []);
|
|
141
|
+
const setEnvFile = useCallback((envFile) => {
|
|
142
|
+
setEnvState((prev) => ({
|
|
143
|
+
...prev,
|
|
144
|
+
envFile
|
|
145
|
+
}));
|
|
146
|
+
}, []);
|
|
147
|
+
return /* @__PURE__ */ jsx3(
|
|
148
|
+
EnvContext.Provider,
|
|
149
|
+
{
|
|
150
|
+
value: {
|
|
151
|
+
env,
|
|
152
|
+
setupEnv,
|
|
153
|
+
setUid,
|
|
154
|
+
setLang,
|
|
155
|
+
setAllowCompanies,
|
|
156
|
+
setCompanies,
|
|
157
|
+
setDefaultCompany,
|
|
158
|
+
setUserInfo,
|
|
159
|
+
setConfig,
|
|
160
|
+
setEnvFile
|
|
161
|
+
},
|
|
162
|
+
children
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function useEnv() {
|
|
167
|
+
const context = useContext(EnvContext);
|
|
168
|
+
if (!context) {
|
|
169
|
+
throw new Error("useEnv must be used within an EnvProvider");
|
|
170
|
+
}
|
|
171
|
+
return context;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// src/provider/service-provider.tsx
|
|
175
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
176
|
+
|
|
177
|
+
// src/hooks/auth/use-forgot-password.ts
|
|
178
|
+
import { useMutation } from "@tanstack/react-query";
|
|
179
|
+
|
|
180
|
+
// src/services/action-service/index.ts
|
|
181
|
+
import { useCallback as useCallback2 } from "react";
|
|
33
182
|
function useActionService() {
|
|
34
183
|
const { env } = useEnv();
|
|
35
|
-
const loadAction =
|
|
184
|
+
const loadAction = useCallback2(
|
|
36
185
|
async ({
|
|
37
186
|
idAction,
|
|
38
187
|
context,
|
|
@@ -56,7 +205,7 @@ function useActionService() {
|
|
|
56
205
|
},
|
|
57
206
|
[env]
|
|
58
207
|
);
|
|
59
|
-
const callButton =
|
|
208
|
+
const callButton = useCallback2(
|
|
60
209
|
async ({
|
|
61
210
|
model,
|
|
62
211
|
ids = [],
|
|
@@ -90,7 +239,7 @@ function useActionService() {
|
|
|
90
239
|
},
|
|
91
240
|
[env]
|
|
92
241
|
);
|
|
93
|
-
const removeRows =
|
|
242
|
+
const removeRows = useCallback2(
|
|
94
243
|
async ({
|
|
95
244
|
model,
|
|
96
245
|
ids,
|
|
@@ -116,7 +265,7 @@ function useActionService() {
|
|
|
116
265
|
},
|
|
117
266
|
[env]
|
|
118
267
|
);
|
|
119
|
-
const duplicateRecord =
|
|
268
|
+
const duplicateRecord = useCallback2(
|
|
120
269
|
async ({
|
|
121
270
|
model,
|
|
122
271
|
id,
|
|
@@ -142,7 +291,7 @@ function useActionService() {
|
|
|
142
291
|
},
|
|
143
292
|
[env]
|
|
144
293
|
);
|
|
145
|
-
const getPrintReportName =
|
|
294
|
+
const getPrintReportName = useCallback2(
|
|
146
295
|
async ({ id }) => {
|
|
147
296
|
const jsonData = {
|
|
148
297
|
model: "ir.actions.report",
|
|
@@ -160,7 +309,7 @@ function useActionService() {
|
|
|
160
309
|
},
|
|
161
310
|
[env]
|
|
162
311
|
);
|
|
163
|
-
const print =
|
|
312
|
+
const print = useCallback2(
|
|
164
313
|
async ({ id, report, db }) => {
|
|
165
314
|
const jsonData = {
|
|
166
315
|
report,
|
|
@@ -178,7 +327,7 @@ function useActionService() {
|
|
|
178
327
|
},
|
|
179
328
|
[env]
|
|
180
329
|
);
|
|
181
|
-
const runAction =
|
|
330
|
+
const runAction = useCallback2(
|
|
182
331
|
async ({
|
|
183
332
|
idAction,
|
|
184
333
|
context,
|
|
@@ -205,7 +354,7 @@ function useActionService() {
|
|
|
205
354
|
},
|
|
206
355
|
[env]
|
|
207
356
|
);
|
|
208
|
-
const generateSerialNumber =
|
|
357
|
+
const generateSerialNumber = useCallback2(
|
|
209
358
|
async ({
|
|
210
359
|
kwargs,
|
|
211
360
|
context,
|
|
@@ -230,27 +379,13 @@ function useActionService() {
|
|
|
230
379
|
},
|
|
231
380
|
[env]
|
|
232
381
|
);
|
|
233
|
-
const actionServerHome =
|
|
382
|
+
const actionServerHome = useCallback2(async () => {
|
|
234
383
|
return await env.requests.get("/action_server_home" /* ACTION_SERVER_HOME */, {
|
|
235
384
|
headers: {
|
|
236
385
|
"Content-Type": "application/json"
|
|
237
386
|
}
|
|
238
387
|
});
|
|
239
388
|
}, [env]);
|
|
240
|
-
const actionOpenHome = useCallback(
|
|
241
|
-
async ({ model, method }) => {
|
|
242
|
-
const jsonData = {
|
|
243
|
-
model,
|
|
244
|
-
method
|
|
245
|
-
};
|
|
246
|
-
return await env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
247
|
-
headers: {
|
|
248
|
-
"Content-Type": "application/json"
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
[env]
|
|
253
|
-
);
|
|
254
389
|
return {
|
|
255
390
|
loadAction,
|
|
256
391
|
callButton,
|
|
@@ -260,11 +395,18 @@ function useActionService() {
|
|
|
260
395
|
print,
|
|
261
396
|
runAction,
|
|
262
397
|
generateSerialNumber,
|
|
263
|
-
actionServerHome
|
|
264
|
-
actionOpenHome
|
|
398
|
+
actionServerHome
|
|
265
399
|
};
|
|
266
400
|
}
|
|
267
|
-
|
|
401
|
+
|
|
402
|
+
// src/services/auth-service/index.ts
|
|
403
|
+
import { useCallback as useCallback3 } from "react";
|
|
404
|
+
|
|
405
|
+
// src/provider/supabase-provider.tsx
|
|
406
|
+
import { createContext as createContext2, useContext as useContext2, useMemo } from "react";
|
|
407
|
+
import { createClient } from "@supabase/supabase-js";
|
|
408
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
409
|
+
var SupabaseContext = createContext2(null);
|
|
268
410
|
var SupabaseProvider = ({
|
|
269
411
|
supabaseUrl,
|
|
270
412
|
supabaseKey,
|
|
@@ -281,10 +423,10 @@ var SupabaseProvider = ({
|
|
|
281
423
|
}
|
|
282
424
|
});
|
|
283
425
|
}, [supabaseUrl, supabaseKey, tenantId]);
|
|
284
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ jsx4(SupabaseContext.Provider, { value: supabase, children });
|
|
285
427
|
};
|
|
286
428
|
var useSupabase = () => {
|
|
287
|
-
const context =
|
|
429
|
+
const context = useContext2(SupabaseContext);
|
|
288
430
|
if (!context) {
|
|
289
431
|
throw new Error(
|
|
290
432
|
"useSupabase must be used within a SupabaseProvider or check your env config"
|
|
@@ -293,14 +435,14 @@ var useSupabase = () => {
|
|
|
293
435
|
return context;
|
|
294
436
|
};
|
|
295
437
|
var useSupabaseOptional = () => {
|
|
296
|
-
return
|
|
438
|
+
return useContext2(SupabaseContext);
|
|
297
439
|
};
|
|
298
440
|
|
|
299
441
|
// src/services/auth-service/index.ts
|
|
300
442
|
function useAuthService() {
|
|
301
443
|
const { env } = useEnv();
|
|
302
|
-
useSupabaseOptional();
|
|
303
|
-
const login =
|
|
444
|
+
const supabase = useSupabaseOptional();
|
|
445
|
+
const login = useCallback3(
|
|
304
446
|
async (body) => {
|
|
305
447
|
const payload = Object.fromEntries(
|
|
306
448
|
Object.entries({
|
|
@@ -317,9 +459,7 @@ function useAuthService() {
|
|
|
317
459
|
encodedData,
|
|
318
460
|
{
|
|
319
461
|
headers: {
|
|
320
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
321
|
-
service: "emenu",
|
|
322
|
-
"x-node": "2032919254WSCunipay_89234578"
|
|
462
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
323
463
|
}
|
|
324
464
|
},
|
|
325
465
|
body.service
|
|
@@ -327,7 +467,7 @@ function useAuthService() {
|
|
|
327
467
|
},
|
|
328
468
|
[env]
|
|
329
469
|
);
|
|
330
|
-
const loginTenantUser =
|
|
470
|
+
const loginTenantUser = useCallback3(
|
|
331
471
|
async (body) => {
|
|
332
472
|
const payload = {
|
|
333
473
|
email: body.email,
|
|
@@ -342,7 +482,7 @@ function useAuthService() {
|
|
|
342
482
|
},
|
|
343
483
|
[env]
|
|
344
484
|
);
|
|
345
|
-
const forgotPassword =
|
|
485
|
+
const forgotPassword = useCallback3(
|
|
346
486
|
async (email) => {
|
|
347
487
|
const bodyData = {
|
|
348
488
|
login: email,
|
|
@@ -356,7 +496,7 @@ function useAuthService() {
|
|
|
356
496
|
},
|
|
357
497
|
[env]
|
|
358
498
|
);
|
|
359
|
-
const forgotPasswordSSO =
|
|
499
|
+
const forgotPasswordSSO = useCallback3(
|
|
360
500
|
async ({
|
|
361
501
|
email,
|
|
362
502
|
with_context,
|
|
@@ -379,7 +519,7 @@ function useAuthService() {
|
|
|
379
519
|
},
|
|
380
520
|
[env]
|
|
381
521
|
);
|
|
382
|
-
const resetPassword =
|
|
522
|
+
const resetPassword = useCallback3(
|
|
383
523
|
async (data, token) => {
|
|
384
524
|
const bodyData = {
|
|
385
525
|
token,
|
|
@@ -394,7 +534,7 @@ function useAuthService() {
|
|
|
394
534
|
},
|
|
395
535
|
[env]
|
|
396
536
|
);
|
|
397
|
-
const resetPasswordSSO =
|
|
537
|
+
const resetPasswordSSO = useCallback3(
|
|
398
538
|
async ({
|
|
399
539
|
method,
|
|
400
540
|
password,
|
|
@@ -417,7 +557,7 @@ function useAuthService() {
|
|
|
417
557
|
},
|
|
418
558
|
[env]
|
|
419
559
|
);
|
|
420
|
-
const updatePassword =
|
|
560
|
+
const updatePassword = useCallback3(
|
|
421
561
|
async (data, token) => {
|
|
422
562
|
const bodyData = {
|
|
423
563
|
token,
|
|
@@ -432,7 +572,7 @@ function useAuthService() {
|
|
|
432
572
|
},
|
|
433
573
|
[env]
|
|
434
574
|
);
|
|
435
|
-
const isValidToken =
|
|
575
|
+
const isValidToken = useCallback3(
|
|
436
576
|
async (token) => {
|
|
437
577
|
const bodyData = {
|
|
438
578
|
token
|
|
@@ -445,7 +585,7 @@ function useAuthService() {
|
|
|
445
585
|
},
|
|
446
586
|
[env]
|
|
447
587
|
);
|
|
448
|
-
const isValidActionToken =
|
|
588
|
+
const isValidActionToken = useCallback3(
|
|
449
589
|
async (actionToken) => {
|
|
450
590
|
const bodyData = {};
|
|
451
591
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -458,7 +598,7 @@ function useAuthService() {
|
|
|
458
598
|
},
|
|
459
599
|
[env]
|
|
460
600
|
);
|
|
461
|
-
const loginSocial =
|
|
601
|
+
const loginSocial = useCallback3(
|
|
462
602
|
async ({
|
|
463
603
|
db,
|
|
464
604
|
state,
|
|
@@ -476,13 +616,13 @@ function useAuthService() {
|
|
|
476
616
|
},
|
|
477
617
|
[env]
|
|
478
618
|
);
|
|
479
|
-
const getProviders =
|
|
619
|
+
const getProviders = useCallback3(
|
|
480
620
|
async (db) => {
|
|
481
621
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
482
622
|
},
|
|
483
623
|
[env]
|
|
484
624
|
);
|
|
485
|
-
const getAccessByCode =
|
|
625
|
+
const getAccessByCode = useCallback3(
|
|
486
626
|
async (code) => {
|
|
487
627
|
const data = new URLSearchParams();
|
|
488
628
|
data.append("code", code);
|
|
@@ -502,7 +642,7 @@ function useAuthService() {
|
|
|
502
642
|
},
|
|
503
643
|
[env]
|
|
504
644
|
);
|
|
505
|
-
const logout =
|
|
645
|
+
const logout = useCallback3(
|
|
506
646
|
async (service) => {
|
|
507
647
|
return env?.requests?.post(
|
|
508
648
|
"/logout" /* LOGOUT */,
|
|
@@ -519,7 +659,7 @@ function useAuthService() {
|
|
|
519
659
|
},
|
|
520
660
|
[env]
|
|
521
661
|
);
|
|
522
|
-
const getTenantMapping =
|
|
662
|
+
const getTenantMapping = useCallback3(
|
|
523
663
|
async ({ shortName, service }) => {
|
|
524
664
|
const bodyData = {
|
|
525
665
|
short_name: shortName
|
|
@@ -537,7 +677,7 @@ function useAuthService() {
|
|
|
537
677
|
},
|
|
538
678
|
[env]
|
|
539
679
|
);
|
|
540
|
-
const getToken =
|
|
680
|
+
const getToken = useCallback3(
|
|
541
681
|
async ({
|
|
542
682
|
phone,
|
|
543
683
|
name,
|
|
@@ -580,9 +720,12 @@ function useAuthService() {
|
|
|
580
720
|
getToken
|
|
581
721
|
};
|
|
582
722
|
}
|
|
723
|
+
|
|
724
|
+
// src/services/company-service/index.ts
|
|
725
|
+
import { useCallback as useCallback4 } from "react";
|
|
583
726
|
function useCompanyService() {
|
|
584
727
|
const { env } = useEnv();
|
|
585
|
-
const getCurrentCompany =
|
|
728
|
+
const getCurrentCompany = useCallback4(
|
|
586
729
|
async (service, extraHeaders) => {
|
|
587
730
|
return await env.requests.get(
|
|
588
731
|
"/company" /* COMPANY_PATH */,
|
|
@@ -599,7 +742,7 @@ function useCompanyService() {
|
|
|
599
742
|
},
|
|
600
743
|
[env]
|
|
601
744
|
);
|
|
602
|
-
const getInfoCompany =
|
|
745
|
+
const getInfoCompany = useCallback4(
|
|
603
746
|
async (id, service) => {
|
|
604
747
|
const jsonData = {
|
|
605
748
|
ids: [id],
|
|
@@ -633,9 +776,12 @@ function useCompanyService() {
|
|
|
633
776
|
getInfoCompany
|
|
634
777
|
};
|
|
635
778
|
}
|
|
779
|
+
|
|
780
|
+
// src/services/excel-service/index.ts
|
|
781
|
+
import { useCallback as useCallback5 } from "react";
|
|
636
782
|
function useExcelService() {
|
|
637
783
|
const { env } = useEnv();
|
|
638
|
-
const uploadFileExcel =
|
|
784
|
+
const uploadFileExcel = useCallback5(
|
|
639
785
|
async ({
|
|
640
786
|
formData,
|
|
641
787
|
service,
|
|
@@ -652,7 +798,7 @@ function useExcelService() {
|
|
|
652
798
|
},
|
|
653
799
|
[env]
|
|
654
800
|
);
|
|
655
|
-
const uploadIdFile =
|
|
801
|
+
const uploadIdFile = useCallback5(
|
|
656
802
|
async ({
|
|
657
803
|
formData,
|
|
658
804
|
service,
|
|
@@ -669,7 +815,7 @@ function useExcelService() {
|
|
|
669
815
|
},
|
|
670
816
|
[env]
|
|
671
817
|
);
|
|
672
|
-
const parsePreview =
|
|
818
|
+
const parsePreview = useCallback5(
|
|
673
819
|
async ({
|
|
674
820
|
id,
|
|
675
821
|
selectedSheet,
|
|
@@ -718,7 +864,7 @@ function useExcelService() {
|
|
|
718
864
|
},
|
|
719
865
|
[env]
|
|
720
866
|
);
|
|
721
|
-
const executeImport =
|
|
867
|
+
const executeImport = useCallback5(
|
|
722
868
|
async ({
|
|
723
869
|
columns,
|
|
724
870
|
fields,
|
|
@@ -752,7 +898,7 @@ function useExcelService() {
|
|
|
752
898
|
},
|
|
753
899
|
[env]
|
|
754
900
|
);
|
|
755
|
-
const getFileExcel =
|
|
901
|
+
const getFileExcel = useCallback5(
|
|
756
902
|
async ({
|
|
757
903
|
model,
|
|
758
904
|
service,
|
|
@@ -776,7 +922,7 @@ function useExcelService() {
|
|
|
776
922
|
},
|
|
777
923
|
[env]
|
|
778
924
|
);
|
|
779
|
-
const getFieldExport =
|
|
925
|
+
const getFieldExport = useCallback5(
|
|
780
926
|
async ({
|
|
781
927
|
ids,
|
|
782
928
|
model,
|
|
@@ -816,7 +962,7 @@ function useExcelService() {
|
|
|
816
962
|
},
|
|
817
963
|
[env]
|
|
818
964
|
);
|
|
819
|
-
const exportExcel =
|
|
965
|
+
const exportExcel = useCallback5(
|
|
820
966
|
async ({
|
|
821
967
|
model,
|
|
822
968
|
domain,
|
|
@@ -862,9 +1008,12 @@ function useExcelService() {
|
|
|
862
1008
|
exportExcel
|
|
863
1009
|
};
|
|
864
1010
|
}
|
|
1011
|
+
|
|
1012
|
+
// src/services/form-service/index.ts
|
|
1013
|
+
import { useCallback as useCallback6 } from "react";
|
|
865
1014
|
function useFormService() {
|
|
866
1015
|
const { env } = useEnv();
|
|
867
|
-
const getComment =
|
|
1016
|
+
const getComment = useCallback6(
|
|
868
1017
|
async ({ data }) => {
|
|
869
1018
|
const jsonData = {
|
|
870
1019
|
thread_id: data.thread_id,
|
|
@@ -882,7 +1031,7 @@ function useFormService() {
|
|
|
882
1031
|
},
|
|
883
1032
|
[env]
|
|
884
1033
|
);
|
|
885
|
-
const getThreadData =
|
|
1034
|
+
const getThreadData = useCallback6(
|
|
886
1035
|
async ({
|
|
887
1036
|
data,
|
|
888
1037
|
xNode,
|
|
@@ -909,7 +1058,7 @@ function useFormService() {
|
|
|
909
1058
|
},
|
|
910
1059
|
[env]
|
|
911
1060
|
);
|
|
912
|
-
const getThreadMessages =
|
|
1061
|
+
const getThreadMessages = useCallback6(
|
|
913
1062
|
async ({
|
|
914
1063
|
data,
|
|
915
1064
|
xNode,
|
|
@@ -935,7 +1084,7 @@ function useFormService() {
|
|
|
935
1084
|
},
|
|
936
1085
|
[env]
|
|
937
1086
|
);
|
|
938
|
-
const sentComment =
|
|
1087
|
+
const sentComment = useCallback6(
|
|
939
1088
|
async ({ data }) => {
|
|
940
1089
|
const jsonData = {
|
|
941
1090
|
context: {
|
|
@@ -963,7 +1112,7 @@ function useFormService() {
|
|
|
963
1112
|
},
|
|
964
1113
|
[env]
|
|
965
1114
|
);
|
|
966
|
-
const deleteComment =
|
|
1115
|
+
const deleteComment = useCallback6(
|
|
967
1116
|
async ({ data }) => {
|
|
968
1117
|
const jsonData = {
|
|
969
1118
|
attachment_ids: [],
|
|
@@ -979,7 +1128,7 @@ function useFormService() {
|
|
|
979
1128
|
},
|
|
980
1129
|
[env]
|
|
981
1130
|
);
|
|
982
|
-
const getImage =
|
|
1131
|
+
const getImage = useCallback6(
|
|
983
1132
|
async ({ data }) => {
|
|
984
1133
|
return env.requests.get(
|
|
985
1134
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -992,7 +1141,7 @@ function useFormService() {
|
|
|
992
1141
|
},
|
|
993
1142
|
[env]
|
|
994
1143
|
);
|
|
995
|
-
const uploadImage =
|
|
1144
|
+
const uploadImage = useCallback6(
|
|
996
1145
|
async ({
|
|
997
1146
|
formData,
|
|
998
1147
|
service,
|
|
@@ -1011,7 +1160,7 @@ function useFormService() {
|
|
|
1011
1160
|
},
|
|
1012
1161
|
[env]
|
|
1013
1162
|
);
|
|
1014
|
-
const uploadFile =
|
|
1163
|
+
const uploadFile = useCallback6(
|
|
1015
1164
|
async ({
|
|
1016
1165
|
formData,
|
|
1017
1166
|
service,
|
|
@@ -1031,7 +1180,7 @@ function useFormService() {
|
|
|
1031
1180
|
},
|
|
1032
1181
|
[env]
|
|
1033
1182
|
);
|
|
1034
|
-
const getFormView =
|
|
1183
|
+
const getFormView = useCallback6(
|
|
1035
1184
|
async ({ data }) => {
|
|
1036
1185
|
const jsonData = {
|
|
1037
1186
|
model: data.model,
|
|
@@ -1047,7 +1196,7 @@ function useFormService() {
|
|
|
1047
1196
|
},
|
|
1048
1197
|
[env]
|
|
1049
1198
|
);
|
|
1050
|
-
const changeStatus =
|
|
1199
|
+
const changeStatus = useCallback6(
|
|
1051
1200
|
async ({ data }) => {
|
|
1052
1201
|
const vals = {
|
|
1053
1202
|
[data.name]: data.stage_id
|
|
@@ -1076,7 +1225,7 @@ function useFormService() {
|
|
|
1076
1225
|
},
|
|
1077
1226
|
[env]
|
|
1078
1227
|
);
|
|
1079
|
-
const getExternalTab =
|
|
1228
|
+
const getExternalTab = useCallback6(
|
|
1080
1229
|
async ({ method, context, service, xNode }) => {
|
|
1081
1230
|
return env?.requests?.post(
|
|
1082
1231
|
"/call" /* CALL_PATH */,
|
|
@@ -1109,9 +1258,12 @@ function useFormService() {
|
|
|
1109
1258
|
getExternalTab
|
|
1110
1259
|
};
|
|
1111
1260
|
}
|
|
1261
|
+
|
|
1262
|
+
// src/services/kanban-service/index.ts
|
|
1263
|
+
import { useCallback as useCallback7 } from "react";
|
|
1112
1264
|
function useKanbanService() {
|
|
1113
1265
|
const { env } = useEnv();
|
|
1114
|
-
const getGroups =
|
|
1266
|
+
const getGroups = useCallback7(
|
|
1115
1267
|
async ({ model, width_context }) => {
|
|
1116
1268
|
const jsonData = {
|
|
1117
1269
|
model,
|
|
@@ -1131,7 +1283,7 @@ function useKanbanService() {
|
|
|
1131
1283
|
},
|
|
1132
1284
|
[env]
|
|
1133
1285
|
);
|
|
1134
|
-
const getProgressBar =
|
|
1286
|
+
const getProgressBar = useCallback7(
|
|
1135
1287
|
async ({ field, color, model, width_context }) => {
|
|
1136
1288
|
const jsonData = {
|
|
1137
1289
|
model,
|
|
@@ -1159,9 +1311,12 @@ function useKanbanService() {
|
|
|
1159
1311
|
getProgressBar
|
|
1160
1312
|
};
|
|
1161
1313
|
}
|
|
1314
|
+
|
|
1315
|
+
// src/services/model-service/index.ts
|
|
1316
|
+
import { useCallback as useCallback8 } from "react";
|
|
1162
1317
|
function useModelService() {
|
|
1163
1318
|
const { env } = useEnv();
|
|
1164
|
-
const getListMyBankAccount =
|
|
1319
|
+
const getListMyBankAccount = useCallback8(
|
|
1165
1320
|
async ({
|
|
1166
1321
|
domain,
|
|
1167
1322
|
spectification,
|
|
@@ -1185,7 +1340,7 @@ function useModelService() {
|
|
|
1185
1340
|
},
|
|
1186
1341
|
[env]
|
|
1187
1342
|
);
|
|
1188
|
-
const getCurrency =
|
|
1343
|
+
const getCurrency = useCallback8(async () => {
|
|
1189
1344
|
const jsonData = {
|
|
1190
1345
|
model: "res.currency",
|
|
1191
1346
|
method: "web_search_read",
|
|
@@ -1205,7 +1360,7 @@ function useModelService() {
|
|
|
1205
1360
|
}
|
|
1206
1361
|
});
|
|
1207
1362
|
}, [env]);
|
|
1208
|
-
const getConversionRate =
|
|
1363
|
+
const getConversionRate = useCallback8(async () => {
|
|
1209
1364
|
const jsonData = {
|
|
1210
1365
|
model: "res.currency",
|
|
1211
1366
|
method: "web_search_read",
|
|
@@ -1231,7 +1386,7 @@ function useModelService() {
|
|
|
1231
1386
|
}
|
|
1232
1387
|
});
|
|
1233
1388
|
}, [env]);
|
|
1234
|
-
const getAll =
|
|
1389
|
+
const getAll = useCallback8(
|
|
1235
1390
|
async ({
|
|
1236
1391
|
data,
|
|
1237
1392
|
service,
|
|
@@ -1273,7 +1428,7 @@ function useModelService() {
|
|
|
1273
1428
|
},
|
|
1274
1429
|
[env]
|
|
1275
1430
|
);
|
|
1276
|
-
const getListCalendar =
|
|
1431
|
+
const getListCalendar = useCallback8(
|
|
1277
1432
|
async ({ data }) => {
|
|
1278
1433
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
1279
1434
|
fields: data.fields,
|
|
@@ -1304,7 +1459,7 @@ function useModelService() {
|
|
|
1304
1459
|
},
|
|
1305
1460
|
[env]
|
|
1306
1461
|
);
|
|
1307
|
-
const getList =
|
|
1462
|
+
const getList = useCallback8(
|
|
1308
1463
|
async ({
|
|
1309
1464
|
model,
|
|
1310
1465
|
ids = [],
|
|
@@ -1336,7 +1491,7 @@ function useModelService() {
|
|
|
1336
1491
|
},
|
|
1337
1492
|
[env]
|
|
1338
1493
|
);
|
|
1339
|
-
const getDetail =
|
|
1494
|
+
const getDetail = useCallback8(
|
|
1340
1495
|
async ({
|
|
1341
1496
|
ids = [],
|
|
1342
1497
|
model,
|
|
@@ -1368,7 +1523,7 @@ function useModelService() {
|
|
|
1368
1523
|
},
|
|
1369
1524
|
[env]
|
|
1370
1525
|
);
|
|
1371
|
-
const save =
|
|
1526
|
+
const save = useCallback8(
|
|
1372
1527
|
async ({
|
|
1373
1528
|
model,
|
|
1374
1529
|
ids = [],
|
|
@@ -1403,7 +1558,7 @@ function useModelService() {
|
|
|
1403
1558
|
},
|
|
1404
1559
|
[env]
|
|
1405
1560
|
);
|
|
1406
|
-
const deleteApi =
|
|
1561
|
+
const deleteApi = useCallback8(
|
|
1407
1562
|
async ({ ids = [], model, service }) => {
|
|
1408
1563
|
const jsonData = {
|
|
1409
1564
|
model,
|
|
@@ -1423,7 +1578,7 @@ function useModelService() {
|
|
|
1423
1578
|
},
|
|
1424
1579
|
[env]
|
|
1425
1580
|
);
|
|
1426
|
-
const onChange =
|
|
1581
|
+
const onChange = useCallback8(
|
|
1427
1582
|
async ({
|
|
1428
1583
|
ids = [],
|
|
1429
1584
|
model,
|
|
@@ -1459,7 +1614,7 @@ function useModelService() {
|
|
|
1459
1614
|
},
|
|
1460
1615
|
[env]
|
|
1461
1616
|
);
|
|
1462
|
-
const getListFieldsOnchange =
|
|
1617
|
+
const getListFieldsOnchange = useCallback8(
|
|
1463
1618
|
async ({
|
|
1464
1619
|
model,
|
|
1465
1620
|
service,
|
|
@@ -1483,7 +1638,7 @@ function useModelService() {
|
|
|
1483
1638
|
},
|
|
1484
1639
|
[env]
|
|
1485
1640
|
);
|
|
1486
|
-
const parseORMOdoo =
|
|
1641
|
+
const parseORMOdoo = useCallback8((data) => {
|
|
1487
1642
|
for (const key in data) {
|
|
1488
1643
|
if (key === "display_name") {
|
|
1489
1644
|
delete data[key];
|
|
@@ -1494,7 +1649,7 @@ function useModelService() {
|
|
|
1494
1649
|
}
|
|
1495
1650
|
return { ...data };
|
|
1496
1651
|
}, []);
|
|
1497
|
-
const toDataJS =
|
|
1652
|
+
const toDataJS = useCallback8(
|
|
1498
1653
|
(data, viewData, model) => {
|
|
1499
1654
|
for (const key in data) {
|
|
1500
1655
|
if (data[key] === false) {
|
|
@@ -1550,9 +1705,12 @@ function useModelService() {
|
|
|
1550
1705
|
toDataJS
|
|
1551
1706
|
};
|
|
1552
1707
|
}
|
|
1708
|
+
|
|
1709
|
+
// src/services/user-service/index.ts
|
|
1710
|
+
import { useCallback as useCallback9 } from "react";
|
|
1553
1711
|
function useUserService() {
|
|
1554
1712
|
const { env } = useEnv();
|
|
1555
|
-
const getProfile =
|
|
1713
|
+
const getProfile = useCallback9(
|
|
1556
1714
|
async (service, path, extraHeaders) => {
|
|
1557
1715
|
return env?.requests?.get(
|
|
1558
1716
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -1569,7 +1727,7 @@ function useUserService() {
|
|
|
1569
1727
|
},
|
|
1570
1728
|
[env]
|
|
1571
1729
|
);
|
|
1572
|
-
const getUser =
|
|
1730
|
+
const getUser = useCallback9(
|
|
1573
1731
|
async ({ context, id }) => {
|
|
1574
1732
|
const jsonData = {
|
|
1575
1733
|
model: "res.users",
|
|
@@ -1607,7 +1765,7 @@ function useUserService() {
|
|
|
1607
1765
|
},
|
|
1608
1766
|
[env]
|
|
1609
1767
|
);
|
|
1610
|
-
const switchUserLocale =
|
|
1768
|
+
const switchUserLocale = useCallback9(
|
|
1611
1769
|
async ({ id, values, service }) => {
|
|
1612
1770
|
const jsonData = {
|
|
1613
1771
|
model: "res.users",
|
|
@@ -1633,9 +1791,12 @@ function useUserService() {
|
|
|
1633
1791
|
switchUserLocale
|
|
1634
1792
|
};
|
|
1635
1793
|
}
|
|
1794
|
+
|
|
1795
|
+
// src/services/view-service/index.ts
|
|
1796
|
+
import { useCallback as useCallback10 } from "react";
|
|
1636
1797
|
function useViewService() {
|
|
1637
1798
|
const { env } = useEnv();
|
|
1638
|
-
const getView =
|
|
1799
|
+
const getView = useCallback10(
|
|
1639
1800
|
async ({
|
|
1640
1801
|
model,
|
|
1641
1802
|
views,
|
|
@@ -1675,7 +1836,7 @@ function useViewService() {
|
|
|
1675
1836
|
},
|
|
1676
1837
|
[env]
|
|
1677
1838
|
);
|
|
1678
|
-
const getMenu =
|
|
1839
|
+
const getMenu = useCallback10(
|
|
1679
1840
|
async (context, specification, domain, service) => {
|
|
1680
1841
|
const jsonData = {
|
|
1681
1842
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -1698,8 +1859,6 @@ function useViewService() {
|
|
|
1698
1859
|
jsonData,
|
|
1699
1860
|
{
|
|
1700
1861
|
headers: {
|
|
1701
|
-
service: "emenu",
|
|
1702
|
-
"x-node": "2032919254WSCunipay_89234578",
|
|
1703
1862
|
"Content-Type": "application/json"
|
|
1704
1863
|
}
|
|
1705
1864
|
},
|
|
@@ -1708,7 +1867,7 @@ function useViewService() {
|
|
|
1708
1867
|
},
|
|
1709
1868
|
[env]
|
|
1710
1869
|
);
|
|
1711
|
-
const getActionDetail =
|
|
1870
|
+
const getActionDetail = useCallback10(
|
|
1712
1871
|
async (aid, context) => {
|
|
1713
1872
|
const jsonData = {
|
|
1714
1873
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -1738,7 +1897,7 @@ function useViewService() {
|
|
|
1738
1897
|
},
|
|
1739
1898
|
[env]
|
|
1740
1899
|
);
|
|
1741
|
-
const getResequence =
|
|
1900
|
+
const getResequence = useCallback10(
|
|
1742
1901
|
async ({
|
|
1743
1902
|
model,
|
|
1744
1903
|
ids,
|
|
@@ -1768,7 +1927,7 @@ function useViewService() {
|
|
|
1768
1927
|
},
|
|
1769
1928
|
[env]
|
|
1770
1929
|
);
|
|
1771
|
-
const getSelectionItem =
|
|
1930
|
+
const getSelectionItem = useCallback10(
|
|
1772
1931
|
async ({
|
|
1773
1932
|
data,
|
|
1774
1933
|
service,
|
|
@@ -1805,7 +1964,7 @@ function useViewService() {
|
|
|
1805
1964
|
},
|
|
1806
1965
|
[env]
|
|
1807
1966
|
);
|
|
1808
|
-
const loadMessages =
|
|
1967
|
+
const loadMessages = useCallback10(async () => {
|
|
1809
1968
|
return env.requests.post(
|
|
1810
1969
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
1811
1970
|
{},
|
|
@@ -1816,14 +1975,14 @@ function useViewService() {
|
|
|
1816
1975
|
}
|
|
1817
1976
|
);
|
|
1818
1977
|
}, [env]);
|
|
1819
|
-
const getVersion =
|
|
1978
|
+
const getVersion = useCallback10(async () => {
|
|
1820
1979
|
return env?.requests?.get("", {
|
|
1821
1980
|
headers: {
|
|
1822
1981
|
"Content-Type": "application/json"
|
|
1823
1982
|
}
|
|
1824
1983
|
});
|
|
1825
1984
|
}, [env]);
|
|
1826
|
-
const grantAccess =
|
|
1985
|
+
const grantAccess = useCallback10(
|
|
1827
1986
|
async ({
|
|
1828
1987
|
redirect_uri,
|
|
1829
1988
|
state,
|
|
@@ -1850,7 +2009,7 @@ function useViewService() {
|
|
|
1850
2009
|
},
|
|
1851
2010
|
[env]
|
|
1852
2011
|
);
|
|
1853
|
-
const removeTotpSetUp =
|
|
2012
|
+
const removeTotpSetUp = useCallback10(
|
|
1854
2013
|
async ({ method, token }) => {
|
|
1855
2014
|
const jsonData = {
|
|
1856
2015
|
method,
|
|
@@ -1871,7 +2030,7 @@ function useViewService() {
|
|
|
1871
2030
|
},
|
|
1872
2031
|
[env]
|
|
1873
2032
|
);
|
|
1874
|
-
const requestSetupTotp =
|
|
2033
|
+
const requestSetupTotp = useCallback10(
|
|
1875
2034
|
async ({ method, token }) => {
|
|
1876
2035
|
const jsonData = {
|
|
1877
2036
|
method,
|
|
@@ -1890,7 +2049,7 @@ function useViewService() {
|
|
|
1890
2049
|
},
|
|
1891
2050
|
[env]
|
|
1892
2051
|
);
|
|
1893
|
-
const settingsWebRead2fa =
|
|
2052
|
+
const settingsWebRead2fa = useCallback10(
|
|
1894
2053
|
async ({
|
|
1895
2054
|
method,
|
|
1896
2055
|
model,
|
|
@@ -1918,7 +2077,7 @@ function useViewService() {
|
|
|
1918
2077
|
},
|
|
1919
2078
|
[env]
|
|
1920
2079
|
);
|
|
1921
|
-
const signInSSO =
|
|
2080
|
+
const signInSSO = useCallback10(
|
|
1922
2081
|
async ({
|
|
1923
2082
|
redirect_uri,
|
|
1924
2083
|
state,
|
|
@@ -1950,7 +2109,7 @@ function useViewService() {
|
|
|
1950
2109
|
},
|
|
1951
2110
|
[env]
|
|
1952
2111
|
);
|
|
1953
|
-
const verify2FA =
|
|
2112
|
+
const verify2FA = useCallback10(
|
|
1954
2113
|
({
|
|
1955
2114
|
method,
|
|
1956
2115
|
with_context,
|
|
@@ -1983,7 +2142,7 @@ function useViewService() {
|
|
|
1983
2142
|
},
|
|
1984
2143
|
[env]
|
|
1985
2144
|
);
|
|
1986
|
-
const get2FAMethods =
|
|
2145
|
+
const get2FAMethods = useCallback10(
|
|
1987
2146
|
({ method, with_context }) => {
|
|
1988
2147
|
const jsonData = {
|
|
1989
2148
|
method,
|
|
@@ -2002,7 +2161,7 @@ function useViewService() {
|
|
|
2002
2161
|
},
|
|
2003
2162
|
[env]
|
|
2004
2163
|
);
|
|
2005
|
-
const verifyTotp =
|
|
2164
|
+
const verifyTotp = useCallback10(
|
|
2006
2165
|
({
|
|
2007
2166
|
method,
|
|
2008
2167
|
action_token,
|
|
@@ -2027,7 +2186,7 @@ function useViewService() {
|
|
|
2027
2186
|
},
|
|
2028
2187
|
[env]
|
|
2029
2188
|
);
|
|
2030
|
-
const getNotifications =
|
|
2189
|
+
const getNotifications = useCallback10(
|
|
2031
2190
|
async ({
|
|
2032
2191
|
service,
|
|
2033
2192
|
xNode,
|
|
@@ -2047,7 +2206,7 @@ function useViewService() {
|
|
|
2047
2206
|
},
|
|
2048
2207
|
[env]
|
|
2049
2208
|
);
|
|
2050
|
-
const getCountry =
|
|
2209
|
+
const getCountry = useCallback10(
|
|
2051
2210
|
async ({
|
|
2052
2211
|
service,
|
|
2053
2212
|
xNode,
|
|
@@ -2074,7 +2233,7 @@ function useViewService() {
|
|
|
2074
2233
|
},
|
|
2075
2234
|
[env]
|
|
2076
2235
|
);
|
|
2077
|
-
const getCity =
|
|
2236
|
+
const getCity = useCallback10(
|
|
2078
2237
|
async ({
|
|
2079
2238
|
service,
|
|
2080
2239
|
xNode,
|
|
@@ -2101,7 +2260,7 @@ function useViewService() {
|
|
|
2101
2260
|
},
|
|
2102
2261
|
[env]
|
|
2103
2262
|
);
|
|
2104
|
-
const getWard =
|
|
2263
|
+
const getWard = useCallback10(
|
|
2105
2264
|
async ({
|
|
2106
2265
|
service,
|
|
2107
2266
|
xNode,
|
|
@@ -2126,7 +2285,7 @@ function useViewService() {
|
|
|
2126
2285
|
},
|
|
2127
2286
|
[env]
|
|
2128
2287
|
);
|
|
2129
|
-
const getPartnerTitle =
|
|
2288
|
+
const getPartnerTitle = useCallback10(
|
|
2130
2289
|
async ({
|
|
2131
2290
|
service,
|
|
2132
2291
|
xNode,
|
|
@@ -2153,76 +2312,6 @@ function useViewService() {
|
|
|
2153
2312
|
},
|
|
2154
2313
|
[env]
|
|
2155
2314
|
);
|
|
2156
|
-
const getPoints = useCallback(
|
|
2157
|
-
async (path) => {
|
|
2158
|
-
return env?.requests?.get(path, {
|
|
2159
|
-
headers: {
|
|
2160
|
-
"Content-Type": "application/x-www-form-urlencoded",
|
|
2161
|
-
"x-node": "2032919254WSCunipay_89234578",
|
|
2162
|
-
service: "emenu"
|
|
2163
|
-
}
|
|
2164
|
-
});
|
|
2165
|
-
},
|
|
2166
|
-
[env]
|
|
2167
|
-
);
|
|
2168
|
-
const getOrders = useCallback(
|
|
2169
|
-
async ({ kwargs, withContext }) => {
|
|
2170
|
-
const body = {
|
|
2171
|
-
model: "pos.order",
|
|
2172
|
-
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
2173
|
-
kwargs,
|
|
2174
|
-
with_context: withContext
|
|
2175
|
-
};
|
|
2176
|
-
return env?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
2177
|
-
headers: {
|
|
2178
|
-
"Content-Type": "application/json",
|
|
2179
|
-
service: "emenu",
|
|
2180
|
-
"x-node": "2032919254WSCunipay_89234578"
|
|
2181
|
-
}
|
|
2182
|
-
});
|
|
2183
|
-
},
|
|
2184
|
-
[env]
|
|
2185
|
-
);
|
|
2186
|
-
const getVouchers = useCallback(async () => {
|
|
2187
|
-
const body = {
|
|
2188
|
-
model: "loyalty.program",
|
|
2189
|
-
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
2190
|
-
kwargs: {
|
|
2191
|
-
domain: [["is_voucher", "=", true]],
|
|
2192
|
-
limit: 10,
|
|
2193
|
-
offset: 0,
|
|
2194
|
-
count_limit: 10001,
|
|
2195
|
-
order: "",
|
|
2196
|
-
specification: {
|
|
2197
|
-
voucher_code: {},
|
|
2198
|
-
name: {},
|
|
2199
|
-
voucher_type: {},
|
|
2200
|
-
voucher_value: {},
|
|
2201
|
-
voucher_state: {},
|
|
2202
|
-
date_from: {},
|
|
2203
|
-
date_to: {}
|
|
2204
|
-
}
|
|
2205
|
-
},
|
|
2206
|
-
with_context: {
|
|
2207
|
-
uid: 104,
|
|
2208
|
-
lang: "vi_VN",
|
|
2209
|
-
tz: "Asia/Saigon",
|
|
2210
|
-
default_is_voucher: true,
|
|
2211
|
-
default_program_type: "promo_code",
|
|
2212
|
-
default_trigger: "with_code",
|
|
2213
|
-
default_applies_on: "current",
|
|
2214
|
-
default_pos_ok: true,
|
|
2215
|
-
force_vnd_currency: true
|
|
2216
|
-
}
|
|
2217
|
-
};
|
|
2218
|
-
return env?.requests?.post("/call" /* CALL_PATH */, body, {
|
|
2219
|
-
headers: {
|
|
2220
|
-
"Content-Type": "application/json",
|
|
2221
|
-
service: "emenu",
|
|
2222
|
-
"x-node": "2032919254WSCunipay_89234578"
|
|
2223
|
-
}
|
|
2224
|
-
});
|
|
2225
|
-
}, [env]);
|
|
2226
2315
|
return {
|
|
2227
2316
|
getView,
|
|
2228
2317
|
getMenu,
|
|
@@ -2243,15 +2332,15 @@ function useViewService() {
|
|
|
2243
2332
|
getCountry,
|
|
2244
2333
|
getCity,
|
|
2245
2334
|
getWard,
|
|
2246
|
-
getPartnerTitle
|
|
2247
|
-
getPoints,
|
|
2248
|
-
getOrders,
|
|
2249
|
-
getVouchers
|
|
2335
|
+
getPartnerTitle
|
|
2250
2336
|
};
|
|
2251
2337
|
}
|
|
2338
|
+
|
|
2339
|
+
// src/services/dashboard-service/index.ts
|
|
2340
|
+
import { useCallback as useCallback11 } from "react";
|
|
2252
2341
|
function useDashboardService() {
|
|
2253
2342
|
const { env } = useEnv();
|
|
2254
|
-
const readGroup =
|
|
2343
|
+
const readGroup = useCallback11(
|
|
2255
2344
|
async ({
|
|
2256
2345
|
service,
|
|
2257
2346
|
xNode,
|
|
@@ -2268,7 +2357,7 @@ function useDashboardService() {
|
|
|
2268
2357
|
},
|
|
2269
2358
|
[env]
|
|
2270
2359
|
);
|
|
2271
|
-
const getDataChart =
|
|
2360
|
+
const getDataChart = useCallback11(
|
|
2272
2361
|
async ({
|
|
2273
2362
|
service,
|
|
2274
2363
|
xNode,
|
|
@@ -2302,8 +2391,11 @@ function useDashboardService() {
|
|
|
2302
2391
|
);
|
|
2303
2392
|
return { readGroup, getDataChart };
|
|
2304
2393
|
}
|
|
2394
|
+
|
|
2395
|
+
// src/services/pos-service/get-a-session.ts
|
|
2396
|
+
import { useCallback as useCallback12 } from "react";
|
|
2305
2397
|
var getASessionService = (env) => {
|
|
2306
|
-
const getASession =
|
|
2398
|
+
const getASession = useCallback12(
|
|
2307
2399
|
async ({
|
|
2308
2400
|
model,
|
|
2309
2401
|
args,
|
|
@@ -2350,8 +2442,11 @@ var getASessionService = (env) => {
|
|
|
2350
2442
|
getASession
|
|
2351
2443
|
};
|
|
2352
2444
|
};
|
|
2445
|
+
|
|
2446
|
+
// src/services/pos-service/add-entity.ts
|
|
2447
|
+
import { useCallback as useCallback13 } from "react";
|
|
2353
2448
|
var addEntityService = (env) => {
|
|
2354
|
-
const addEntity =
|
|
2449
|
+
const addEntity = useCallback13(
|
|
2355
2450
|
({
|
|
2356
2451
|
model,
|
|
2357
2452
|
values,
|
|
@@ -2385,8 +2480,11 @@ var addEntityService = (env) => {
|
|
|
2385
2480
|
addEntity
|
|
2386
2481
|
};
|
|
2387
2482
|
};
|
|
2483
|
+
|
|
2484
|
+
// src/services/pos-service/change-order-preparation-state.ts
|
|
2485
|
+
import { useCallback as useCallback14 } from "react";
|
|
2388
2486
|
var changOrderPreparationStateService = (env) => {
|
|
2389
|
-
const changeOrderPreparationState =
|
|
2487
|
+
const changeOrderPreparationState = useCallback14(
|
|
2390
2488
|
({
|
|
2391
2489
|
orderId,
|
|
2392
2490
|
stageId,
|
|
@@ -2421,8 +2519,11 @@ var changOrderPreparationStateService = (env) => {
|
|
|
2421
2519
|
changeOrderPreparationState
|
|
2422
2520
|
};
|
|
2423
2521
|
};
|
|
2522
|
+
|
|
2523
|
+
// src/services/pos-service/check-payment.ts
|
|
2524
|
+
import { useCallback as useCallback15 } from "react";
|
|
2424
2525
|
var checkPaymentService = (env) => {
|
|
2425
|
-
const checkPayment =
|
|
2526
|
+
const checkPayment = useCallback15(
|
|
2426
2527
|
({
|
|
2427
2528
|
model,
|
|
2428
2529
|
ids,
|
|
@@ -2454,8 +2555,11 @@ var checkPaymentService = (env) => {
|
|
|
2454
2555
|
checkPayment
|
|
2455
2556
|
};
|
|
2456
2557
|
};
|
|
2558
|
+
|
|
2559
|
+
// src/services/pos-service/create-e-invoice.ts
|
|
2560
|
+
import { useCallback as useCallback16 } from "react";
|
|
2457
2561
|
var createEInvoiceService = (env) => {
|
|
2458
|
-
const createEInvoice =
|
|
2562
|
+
const createEInvoice = useCallback16(
|
|
2459
2563
|
async ({
|
|
2460
2564
|
service,
|
|
2461
2565
|
xNode,
|
|
@@ -2488,8 +2592,11 @@ var createEInvoiceService = (env) => {
|
|
|
2488
2592
|
createEInvoice
|
|
2489
2593
|
};
|
|
2490
2594
|
};
|
|
2595
|
+
|
|
2596
|
+
// src/services/pos-service/create-entity.ts
|
|
2597
|
+
import { useCallback as useCallback17 } from "react";
|
|
2491
2598
|
var createEntityService = (env) => {
|
|
2492
|
-
const createEntity =
|
|
2599
|
+
const createEntity = useCallback17(
|
|
2493
2600
|
({ model, args, xNode, service, supaCallback }) => {
|
|
2494
2601
|
if (env?.isSupaMode && supaCallback) {
|
|
2495
2602
|
return supaCallback(args);
|
|
@@ -2517,8 +2624,11 @@ var createEntityService = (env) => {
|
|
|
2517
2624
|
createEntity
|
|
2518
2625
|
};
|
|
2519
2626
|
};
|
|
2627
|
+
|
|
2628
|
+
// src/services/pos-service/create-pos-config.ts
|
|
2629
|
+
import { useCallback as useCallback18 } from "react";
|
|
2520
2630
|
var createPosConfigService = (env) => {
|
|
2521
|
-
const createPosConfig =
|
|
2631
|
+
const createPosConfig = useCallback18(
|
|
2522
2632
|
({
|
|
2523
2633
|
model,
|
|
2524
2634
|
name,
|
|
@@ -2551,8 +2661,11 @@ var createPosConfigService = (env) => {
|
|
|
2551
2661
|
createPosConfig
|
|
2552
2662
|
};
|
|
2553
2663
|
};
|
|
2664
|
+
|
|
2665
|
+
// src/services/pos-service/create-session.ts
|
|
2666
|
+
import { useCallback as useCallback19 } from "react";
|
|
2554
2667
|
var createSessionService = (env) => {
|
|
2555
|
-
const createSession =
|
|
2668
|
+
const createSession = useCallback19(
|
|
2556
2669
|
({
|
|
2557
2670
|
model,
|
|
2558
2671
|
configId,
|
|
@@ -2586,8 +2699,11 @@ var createSessionService = (env) => {
|
|
|
2586
2699
|
createSession
|
|
2587
2700
|
};
|
|
2588
2701
|
};
|
|
2702
|
+
|
|
2703
|
+
// src/services/pos-service/delete-entity.ts
|
|
2704
|
+
import { useCallback as useCallback20 } from "react";
|
|
2589
2705
|
var deleteEntityService = (env) => {
|
|
2590
|
-
const deleteEntity =
|
|
2706
|
+
const deleteEntity = useCallback20(
|
|
2591
2707
|
({
|
|
2592
2708
|
model,
|
|
2593
2709
|
ids,
|
|
@@ -2622,8 +2738,11 @@ var deleteEntityService = (env) => {
|
|
|
2622
2738
|
deleteEntity
|
|
2623
2739
|
};
|
|
2624
2740
|
};
|
|
2741
|
+
|
|
2742
|
+
// src/services/pos-service/generate-payment-qr-info.ts
|
|
2743
|
+
import { useCallback as useCallback21 } from "react";
|
|
2625
2744
|
var generatePaymentQrInfoService = (env) => {
|
|
2626
|
-
const generatePaymentQRInfo =
|
|
2745
|
+
const generatePaymentQRInfo = useCallback21(
|
|
2627
2746
|
({
|
|
2628
2747
|
orderId,
|
|
2629
2748
|
amount,
|
|
@@ -2654,8 +2773,11 @@ var generatePaymentQrInfoService = (env) => {
|
|
|
2654
2773
|
generatePaymentQRInfo
|
|
2655
2774
|
};
|
|
2656
2775
|
};
|
|
2776
|
+
|
|
2777
|
+
// src/services/pos-service/get-current-user.ts
|
|
2778
|
+
import { useCallback as useCallback22 } from "react";
|
|
2657
2779
|
var getCurrentUserService = (env) => {
|
|
2658
|
-
const getCurrentUser =
|
|
2780
|
+
const getCurrentUser = useCallback22(
|
|
2659
2781
|
async ({
|
|
2660
2782
|
service,
|
|
2661
2783
|
xNode,
|
|
@@ -2683,8 +2805,11 @@ var getCurrentUserService = (env) => {
|
|
|
2683
2805
|
getCurrentUser
|
|
2684
2806
|
};
|
|
2685
2807
|
};
|
|
2808
|
+
|
|
2809
|
+
// src/services/pos-service/get-list.ts
|
|
2810
|
+
import { useCallback as useCallback23 } from "react";
|
|
2686
2811
|
var getListService = (env) => {
|
|
2687
|
-
const getList =
|
|
2812
|
+
const getList = useCallback23(
|
|
2688
2813
|
async ({
|
|
2689
2814
|
model,
|
|
2690
2815
|
domain,
|
|
@@ -2722,8 +2847,11 @@ var getListService = (env) => {
|
|
|
2722
2847
|
getList
|
|
2723
2848
|
};
|
|
2724
2849
|
};
|
|
2850
|
+
|
|
2851
|
+
// src/services/pos-service/get-order-line.ts
|
|
2852
|
+
import { useCallback as useCallback24 } from "react";
|
|
2725
2853
|
var getOrderLineService = (env) => {
|
|
2726
|
-
const getOrderLine =
|
|
2854
|
+
const getOrderLine = useCallback24(
|
|
2727
2855
|
({
|
|
2728
2856
|
model,
|
|
2729
2857
|
ids,
|
|
@@ -2757,8 +2885,11 @@ var getOrderLineService = (env) => {
|
|
|
2757
2885
|
getOrderLine
|
|
2758
2886
|
};
|
|
2759
2887
|
};
|
|
2888
|
+
|
|
2889
|
+
// src/services/pos-service/get-pin-code.ts
|
|
2890
|
+
import { useCallback as useCallback25 } from "react";
|
|
2760
2891
|
var getPinCodeService = (env) => {
|
|
2761
|
-
const getPinCode =
|
|
2892
|
+
const getPinCode = useCallback25(
|
|
2762
2893
|
({
|
|
2763
2894
|
serialNumber,
|
|
2764
2895
|
xNode,
|
|
@@ -2785,8 +2916,11 @@ var getPinCodeService = (env) => {
|
|
|
2785
2916
|
getPinCode
|
|
2786
2917
|
};
|
|
2787
2918
|
};
|
|
2919
|
+
|
|
2920
|
+
// src/services/pos-service/get-pos.ts
|
|
2921
|
+
import { useCallback as useCallback26 } from "react";
|
|
2788
2922
|
var getPosService = (env) => {
|
|
2789
|
-
const getPOS =
|
|
2923
|
+
const getPOS = useCallback26(
|
|
2790
2924
|
({
|
|
2791
2925
|
model,
|
|
2792
2926
|
args,
|
|
@@ -2848,8 +2982,11 @@ var getPosService = (env) => {
|
|
|
2848
2982
|
getPOS
|
|
2849
2983
|
};
|
|
2850
2984
|
};
|
|
2985
|
+
|
|
2986
|
+
// src/services/pos-service/get-preparation-display-data.ts
|
|
2987
|
+
import { useCallback as useCallback27 } from "react";
|
|
2851
2988
|
var getPreparationDisplayDataService = (env) => {
|
|
2852
|
-
const getPreparationDisplayData =
|
|
2989
|
+
const getPreparationDisplayData = useCallback27(
|
|
2853
2990
|
({
|
|
2854
2991
|
ids,
|
|
2855
2992
|
xNode,
|
|
@@ -2880,8 +3017,11 @@ var getPreparationDisplayDataService = (env) => {
|
|
|
2880
3017
|
getPreparationDisplayData
|
|
2881
3018
|
};
|
|
2882
3019
|
};
|
|
3020
|
+
|
|
3021
|
+
// src/services/pos-service/get-product-image.ts
|
|
3022
|
+
import { useCallback as useCallback28 } from "react";
|
|
2883
3023
|
var getProductImageService = (env) => {
|
|
2884
|
-
const getProductImage =
|
|
3024
|
+
const getProductImage = useCallback28(
|
|
2885
3025
|
({
|
|
2886
3026
|
model,
|
|
2887
3027
|
fields,
|
|
@@ -2918,8 +3058,11 @@ var getProductImageService = (env) => {
|
|
|
2918
3058
|
getProductImage
|
|
2919
3059
|
};
|
|
2920
3060
|
};
|
|
3061
|
+
|
|
3062
|
+
// src/services/pos-service/handle-close-session.ts
|
|
3063
|
+
import { useCallback as useCallback29 } from "react";
|
|
2921
3064
|
var handleCloseSessionService = (env) => {
|
|
2922
|
-
const handleCloseSession =
|
|
3065
|
+
const handleCloseSession = useCallback29(
|
|
2923
3066
|
({
|
|
2924
3067
|
model,
|
|
2925
3068
|
ids,
|
|
@@ -2950,8 +3093,11 @@ var handleCloseSessionService = (env) => {
|
|
|
2950
3093
|
handleCloseSession
|
|
2951
3094
|
};
|
|
2952
3095
|
};
|
|
3096
|
+
|
|
3097
|
+
// src/services/pos-service/handle-closing-detail-session.ts
|
|
3098
|
+
import { useCallback as useCallback30 } from "react";
|
|
2953
3099
|
var handleClosingDetailSessionService = (env) => {
|
|
2954
|
-
const handleClosingDetailSession =
|
|
3100
|
+
const handleClosingDetailSession = useCallback30(
|
|
2955
3101
|
({
|
|
2956
3102
|
model,
|
|
2957
3103
|
ids,
|
|
@@ -2984,8 +3130,11 @@ var handleClosingDetailSessionService = (env) => {
|
|
|
2984
3130
|
handleClosingDetailSession
|
|
2985
3131
|
};
|
|
2986
3132
|
};
|
|
3133
|
+
|
|
3134
|
+
// src/services/pos-service/handle-closing-session.ts
|
|
3135
|
+
import { useCallback as useCallback31 } from "react";
|
|
2987
3136
|
var handleClosingSessionService = (env) => {
|
|
2988
|
-
const handleClosingSession =
|
|
3137
|
+
const handleClosingSession = useCallback31(
|
|
2989
3138
|
({
|
|
2990
3139
|
model,
|
|
2991
3140
|
method,
|
|
@@ -3018,6 +3167,9 @@ var handleClosingSessionService = (env) => {
|
|
|
3018
3167
|
handleClosingSession
|
|
3019
3168
|
};
|
|
3020
3169
|
};
|
|
3170
|
+
|
|
3171
|
+
// src/services/pos-service/load-data-pos-session.ts
|
|
3172
|
+
import { useCallback as useCallback32 } from "react";
|
|
3021
3173
|
var createModelResult = (modelName, data = []) => ({
|
|
3022
3174
|
modelName,
|
|
3023
3175
|
data,
|
|
@@ -3026,7 +3178,7 @@ var createModelResult = (modelName, data = []) => ({
|
|
|
3026
3178
|
});
|
|
3027
3179
|
var loadDataPosSessionService = (env) => {
|
|
3028
3180
|
const supabase = useSupabaseOptional();
|
|
3029
|
-
const loadDataPosSession =
|
|
3181
|
+
const loadDataPosSession = useCallback32(
|
|
3030
3182
|
async ({
|
|
3031
3183
|
model,
|
|
3032
3184
|
ids,
|
|
@@ -3064,7 +3216,7 @@ var loadDataPosSessionService = (env) => {
|
|
|
3064
3216
|
},
|
|
3065
3217
|
[env]
|
|
3066
3218
|
);
|
|
3067
|
-
const loadDataPosSessionSupabase =
|
|
3219
|
+
const loadDataPosSessionSupabase = useCallback32(async () => {
|
|
3068
3220
|
if (!supabase) return {};
|
|
3069
3221
|
try {
|
|
3070
3222
|
const allModels = Object.values(LoadDataModel);
|
|
@@ -3125,8 +3277,11 @@ var loadDataPosSessionService = (env) => {
|
|
|
3125
3277
|
loadDataPosSessionSupabase
|
|
3126
3278
|
};
|
|
3127
3279
|
};
|
|
3280
|
+
|
|
3281
|
+
// src/services/pos-service/manage-onchange.ts
|
|
3282
|
+
import { useCallback as useCallback33 } from "react";
|
|
3128
3283
|
var manageOnchangeService = (env) => {
|
|
3129
|
-
const manageOnChange =
|
|
3284
|
+
const manageOnChange = useCallback33(
|
|
3130
3285
|
({
|
|
3131
3286
|
model,
|
|
3132
3287
|
ids,
|
|
@@ -3158,8 +3313,11 @@ var manageOnchangeService = (env) => {
|
|
|
3158
3313
|
manageOnChange
|
|
3159
3314
|
};
|
|
3160
3315
|
};
|
|
3316
|
+
|
|
3317
|
+
// src/services/pos-service/manage-session.ts
|
|
3318
|
+
import { useCallback as useCallback34 } from "react";
|
|
3161
3319
|
var manageSessionService = (env) => {
|
|
3162
|
-
const manageSession =
|
|
3320
|
+
const manageSession = useCallback34(
|
|
3163
3321
|
({
|
|
3164
3322
|
model,
|
|
3165
3323
|
method,
|
|
@@ -3194,8 +3352,11 @@ var manageSessionService = (env) => {
|
|
|
3194
3352
|
manageSession
|
|
3195
3353
|
};
|
|
3196
3354
|
};
|
|
3355
|
+
|
|
3356
|
+
// src/services/pos-service/process-order.ts
|
|
3357
|
+
import { useCallback as useCallback35 } from "react";
|
|
3197
3358
|
var processOrderService = (env) => {
|
|
3198
|
-
const processOrder =
|
|
3359
|
+
const processOrder = useCallback35(
|
|
3199
3360
|
({
|
|
3200
3361
|
orderId,
|
|
3201
3362
|
xNode,
|
|
@@ -3226,8 +3387,11 @@ var processOrderService = (env) => {
|
|
|
3226
3387
|
processOrder
|
|
3227
3388
|
};
|
|
3228
3389
|
};
|
|
3390
|
+
|
|
3391
|
+
// src/services/pos-service/save-pin-code.ts
|
|
3392
|
+
import { useCallback as useCallback36 } from "react";
|
|
3229
3393
|
var savePinCodeService = (env) => {
|
|
3230
|
-
const savePinCode =
|
|
3394
|
+
const savePinCode = useCallback36(
|
|
3231
3395
|
({
|
|
3232
3396
|
serialNumber,
|
|
3233
3397
|
pinCode,
|
|
@@ -3256,8 +3420,11 @@ var savePinCodeService = (env) => {
|
|
|
3256
3420
|
savePinCode
|
|
3257
3421
|
};
|
|
3258
3422
|
};
|
|
3423
|
+
|
|
3424
|
+
// src/services/pos-service/search-journal.ts
|
|
3425
|
+
import { useCallback as useCallback37 } from "react";
|
|
3259
3426
|
var searchJournalService = (env) => {
|
|
3260
|
-
const searchJournal =
|
|
3427
|
+
const searchJournal = useCallback37(
|
|
3261
3428
|
({
|
|
3262
3429
|
model,
|
|
3263
3430
|
method,
|
|
@@ -3290,8 +3457,11 @@ var searchJournalService = (env) => {
|
|
|
3290
3457
|
searchJournal
|
|
3291
3458
|
};
|
|
3292
3459
|
};
|
|
3460
|
+
|
|
3461
|
+
// src/services/pos-service/update-closed-session.ts
|
|
3462
|
+
import { useCallback as useCallback38 } from "react";
|
|
3293
3463
|
var updateClosedSessionService = (env) => {
|
|
3294
|
-
const updateClosedSession =
|
|
3464
|
+
const updateClosedSession = useCallback38(
|
|
3295
3465
|
({
|
|
3296
3466
|
model,
|
|
3297
3467
|
domain,
|
|
@@ -3322,8 +3492,11 @@ var updateClosedSessionService = (env) => {
|
|
|
3322
3492
|
updateClosedSession
|
|
3323
3493
|
};
|
|
3324
3494
|
};
|
|
3495
|
+
|
|
3496
|
+
// src/services/pos-service/update-entity.ts
|
|
3497
|
+
import { useCallback as useCallback39 } from "react";
|
|
3325
3498
|
var updateEntityService = (env) => {
|
|
3326
|
-
const updateEntity =
|
|
3499
|
+
const updateEntity = useCallback39(
|
|
3327
3500
|
({
|
|
3328
3501
|
model,
|
|
3329
3502
|
domain,
|
|
@@ -3359,8 +3532,11 @@ var updateEntityService = (env) => {
|
|
|
3359
3532
|
updateEntity
|
|
3360
3533
|
};
|
|
3361
3534
|
};
|
|
3535
|
+
|
|
3536
|
+
// src/services/pos-service/update-order-status.ts
|
|
3537
|
+
import { useCallback as useCallback40 } from "react";
|
|
3362
3538
|
var updateOrderStatusService = (env) => {
|
|
3363
|
-
const updateOrderStatus =
|
|
3539
|
+
const updateOrderStatus = useCallback40(
|
|
3364
3540
|
({
|
|
3365
3541
|
orderId,
|
|
3366
3542
|
state,
|
|
@@ -3389,8 +3565,11 @@ var updateOrderStatusService = (env) => {
|
|
|
3389
3565
|
updateOrderStatus
|
|
3390
3566
|
};
|
|
3391
3567
|
};
|
|
3568
|
+
|
|
3569
|
+
// src/services/pos-service/complete-current-stage.ts
|
|
3570
|
+
import { useCallback as useCallback41 } from "react";
|
|
3392
3571
|
var completeCurrentStageService = (env) => {
|
|
3393
|
-
const completeCurrentStage =
|
|
3572
|
+
const completeCurrentStage = useCallback41(
|
|
3394
3573
|
({
|
|
3395
3574
|
ids,
|
|
3396
3575
|
withContext,
|
|
@@ -3429,8 +3608,11 @@ var completeCurrentStageService = (env) => {
|
|
|
3429
3608
|
completeCurrentStage
|
|
3430
3609
|
};
|
|
3431
3610
|
};
|
|
3611
|
+
|
|
3612
|
+
// src/services/pos-service/get-e-invoice-info.ts
|
|
3613
|
+
import { useCallback as useCallback42 } from "react";
|
|
3432
3614
|
var getEInvoiceInfoService = (env) => {
|
|
3433
|
-
const getEInvoiceInfo =
|
|
3615
|
+
const getEInvoiceInfo = useCallback42(
|
|
3434
3616
|
async ({ xNode, service, uid }) => {
|
|
3435
3617
|
const body = {
|
|
3436
3618
|
model: "res.company" /* RES_COMPANY */,
|
|
@@ -3475,8 +3657,11 @@ var getEInvoiceInfoService = (env) => {
|
|
|
3475
3657
|
getEInvoiceInfo
|
|
3476
3658
|
};
|
|
3477
3659
|
};
|
|
3660
|
+
|
|
3661
|
+
// src/services/pos-service/get-functional-modules.ts
|
|
3662
|
+
import { useCallback as useCallback43 } from "react";
|
|
3478
3663
|
var getFunctionalModulesService = (env) => {
|
|
3479
|
-
const getFunctionalModules =
|
|
3664
|
+
const getFunctionalModules = useCallback43(
|
|
3480
3665
|
async ({ xNode, service }) => {
|
|
3481
3666
|
return env?.requests.get(
|
|
3482
3667
|
"/functional-modules" /* FUNCTIONAL_MODULES */,
|
|
@@ -3495,8 +3680,11 @@ var getFunctionalModulesService = (env) => {
|
|
|
3495
3680
|
getFunctionalModules
|
|
3496
3681
|
};
|
|
3497
3682
|
};
|
|
3683
|
+
|
|
3684
|
+
// src/services/pos-service/app-authenticate.ts
|
|
3685
|
+
import { useCallback as useCallback44 } from "react";
|
|
3498
3686
|
var appAuthenticateService = (env) => {
|
|
3499
|
-
const appAuthenticate =
|
|
3687
|
+
const appAuthenticate = useCallback44(
|
|
3500
3688
|
({
|
|
3501
3689
|
xNode,
|
|
3502
3690
|
service,
|
|
@@ -3529,8 +3717,11 @@ var appAuthenticateService = (env) => {
|
|
|
3529
3717
|
appAuthenticate
|
|
3530
3718
|
};
|
|
3531
3719
|
};
|
|
3720
|
+
|
|
3721
|
+
// src/services/pos-service/apply-voucher.ts
|
|
3722
|
+
import { useCallback as useCallback45 } from "react";
|
|
3532
3723
|
var applyVoucherService = (env) => {
|
|
3533
|
-
const applyVoucher =
|
|
3724
|
+
const applyVoucher = useCallback45(
|
|
3534
3725
|
({ xNode, service, ids, voucherCode }) => {
|
|
3535
3726
|
const jsonData = {
|
|
3536
3727
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -3558,8 +3749,11 @@ var applyVoucherService = (env) => {
|
|
|
3558
3749
|
applyVoucher
|
|
3559
3750
|
};
|
|
3560
3751
|
};
|
|
3752
|
+
|
|
3753
|
+
// src/services/pos-service/remove-voucher.ts
|
|
3754
|
+
import { useCallback as useCallback46 } from "react";
|
|
3561
3755
|
var removeVoucherService = (env) => {
|
|
3562
|
-
const removeVoucher =
|
|
3756
|
+
const removeVoucher = useCallback46(
|
|
3563
3757
|
({ xNode, service, ids, programId }) => {
|
|
3564
3758
|
const jsonData = {
|
|
3565
3759
|
model: "pos.order" /* POS_ORDER */,
|
|
@@ -3587,8 +3781,11 @@ var removeVoucherService = (env) => {
|
|
|
3587
3781
|
removeVoucher
|
|
3588
3782
|
};
|
|
3589
3783
|
};
|
|
3784
|
+
|
|
3785
|
+
// src/services/pos-service/sync-from-ui.ts
|
|
3786
|
+
import { useCallback as useCallback47 } from "react";
|
|
3590
3787
|
var syncFromUiService = (env) => {
|
|
3591
|
-
const syncFromUi =
|
|
3788
|
+
const syncFromUi = useCallback47(
|
|
3592
3789
|
({ xNode, service, orders }) => {
|
|
3593
3790
|
const jsonData = {
|
|
3594
3791
|
method: "sync_from_ui" /* SYNC_FROM_UI */,
|
|
@@ -3615,9 +3812,39 @@ var syncFromUiService = (env) => {
|
|
|
3615
3812
|
syncFromUi
|
|
3616
3813
|
};
|
|
3617
3814
|
};
|
|
3815
|
+
|
|
3816
|
+
// src/services/pos-service/get-customer-loyalty-point.ts
|
|
3817
|
+
import { useCallback as useCallback48 } from "react";
|
|
3818
|
+
var getCustomerLoyaltyPointService = (env) => {
|
|
3819
|
+
const getCustomerLoyaltyPoint = useCallback48(
|
|
3820
|
+
async ({
|
|
3821
|
+
xNode,
|
|
3822
|
+
service,
|
|
3823
|
+
partnerId
|
|
3824
|
+
}) => {
|
|
3825
|
+
return env?.requests.get(
|
|
3826
|
+
`${"/loyalty/point" /* LOYALTY_POINT */}/${partnerId}`,
|
|
3827
|
+
{
|
|
3828
|
+
headers: {
|
|
3829
|
+
"Content-Type": "application/json",
|
|
3830
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
3831
|
+
}
|
|
3832
|
+
},
|
|
3833
|
+
service
|
|
3834
|
+
);
|
|
3835
|
+
},
|
|
3836
|
+
[env]
|
|
3837
|
+
);
|
|
3838
|
+
return {
|
|
3839
|
+
getCustomerLoyaltyPoint
|
|
3840
|
+
};
|
|
3841
|
+
};
|
|
3842
|
+
|
|
3843
|
+
// src/services/pos-service/supabase/add-floor.ts
|
|
3844
|
+
import { useCallback as useCallback49 } from "react";
|
|
3618
3845
|
var addFloorSupabaseService = () => {
|
|
3619
3846
|
const supabase = useSupabaseOptional();
|
|
3620
|
-
const addFloorSupabase =
|
|
3847
|
+
const addFloorSupabase = useCallback49(
|
|
3621
3848
|
async (values) => {
|
|
3622
3849
|
if (!supabase) {
|
|
3623
3850
|
console.error("Supabase client not initialized");
|
|
@@ -3646,9 +3873,12 @@ var addFloorSupabaseService = () => {
|
|
|
3646
3873
|
addFloorSupabase
|
|
3647
3874
|
};
|
|
3648
3875
|
};
|
|
3876
|
+
|
|
3877
|
+
// src/services/pos-service/supabase/add-table.ts
|
|
3878
|
+
import { useCallback as useCallback50 } from "react";
|
|
3649
3879
|
var addTableSupabaseService = () => {
|
|
3650
3880
|
const supabase = useSupabaseOptional();
|
|
3651
|
-
const addTableSupabase =
|
|
3881
|
+
const addTableSupabase = useCallback50(
|
|
3652
3882
|
async (values) => {
|
|
3653
3883
|
if (!supabase) {
|
|
3654
3884
|
console.error("Supabase client not initialized");
|
|
@@ -3676,9 +3906,12 @@ var addTableSupabaseService = () => {
|
|
|
3676
3906
|
addTableSupabase
|
|
3677
3907
|
};
|
|
3678
3908
|
};
|
|
3909
|
+
|
|
3910
|
+
// src/services/pos-service/supabase/update-floor.ts
|
|
3911
|
+
import { useCallback as useCallback51 } from "react";
|
|
3679
3912
|
var updateFloorSupabaseService = () => {
|
|
3680
3913
|
const supabase = useSupabaseOptional();
|
|
3681
|
-
const updateFloorSupabase =
|
|
3914
|
+
const updateFloorSupabase = useCallback51(
|
|
3682
3915
|
async (values) => {
|
|
3683
3916
|
if (!supabase) {
|
|
3684
3917
|
console.error("Supabase client not initialized");
|
|
@@ -3703,9 +3936,12 @@ var updateFloorSupabaseService = () => {
|
|
|
3703
3936
|
updateFloorSupabase
|
|
3704
3937
|
};
|
|
3705
3938
|
};
|
|
3939
|
+
|
|
3940
|
+
// src/services/pos-service/supabase/update-table.ts
|
|
3941
|
+
import { useCallback as useCallback52 } from "react";
|
|
3706
3942
|
var updateTableSupabaseService = () => {
|
|
3707
3943
|
const supabase = useSupabaseOptional();
|
|
3708
|
-
const updateTableSupabase =
|
|
3944
|
+
const updateTableSupabase = useCallback52(
|
|
3709
3945
|
async (values) => {
|
|
3710
3946
|
if (!supabase) {
|
|
3711
3947
|
console.error("Supabase client not initialized");
|
|
@@ -3730,9 +3966,12 @@ var updateTableSupabaseService = () => {
|
|
|
3730
3966
|
updateTableSupabase
|
|
3731
3967
|
};
|
|
3732
3968
|
};
|
|
3969
|
+
|
|
3970
|
+
// src/services/pos-service/supabase/delete-floor.ts
|
|
3971
|
+
import { useCallback as useCallback53 } from "react";
|
|
3733
3972
|
var deleteFloorSupabaseService = () => {
|
|
3734
3973
|
const supabase = useSupabaseOptional();
|
|
3735
|
-
const deleteFloorSupabase =
|
|
3974
|
+
const deleteFloorSupabase = useCallback53(
|
|
3736
3975
|
async (values) => {
|
|
3737
3976
|
if (!supabase) {
|
|
3738
3977
|
console.error("Supabase client not initialized");
|
|
@@ -3756,9 +3995,12 @@ var deleteFloorSupabaseService = () => {
|
|
|
3756
3995
|
deleteFloorSupabase
|
|
3757
3996
|
};
|
|
3758
3997
|
};
|
|
3998
|
+
|
|
3999
|
+
// src/services/pos-service/supabase/delete-table.ts
|
|
4000
|
+
import { useCallback as useCallback54 } from "react";
|
|
3759
4001
|
var deleteTableSupabaseService = () => {
|
|
3760
4002
|
const supabase = useSupabaseOptional();
|
|
3761
|
-
const deleteTableSupabase =
|
|
4003
|
+
const deleteTableSupabase = useCallback54(
|
|
3762
4004
|
async (values) => {
|
|
3763
4005
|
if (!supabase) {
|
|
3764
4006
|
console.error("Supabase client not initialized");
|
|
@@ -3782,9 +4024,12 @@ var deleteTableSupabaseService = () => {
|
|
|
3782
4024
|
deleteTableSupabase
|
|
3783
4025
|
};
|
|
3784
4026
|
};
|
|
4027
|
+
|
|
4028
|
+
// src/services/pos-service/supabase/create-order.ts
|
|
4029
|
+
import { useCallback as useCallback55 } from "react";
|
|
3785
4030
|
var createOrderSupabaseService = () => {
|
|
3786
4031
|
const supabase = useSupabaseOptional();
|
|
3787
|
-
const createOrderSupabase =
|
|
4032
|
+
const createOrderSupabase = useCallback55(
|
|
3788
4033
|
async (values) => {
|
|
3789
4034
|
if (!supabase) {
|
|
3790
4035
|
console.error("Supabase client not initialized");
|
|
@@ -3817,9 +4062,12 @@ var createOrderSupabaseService = () => {
|
|
|
3817
4062
|
createOrderSupabase
|
|
3818
4063
|
};
|
|
3819
4064
|
};
|
|
4065
|
+
|
|
4066
|
+
// src/services/pos-service/supabase/add-product-to-order.ts
|
|
4067
|
+
import { useCallback as useCallback56 } from "react";
|
|
3820
4068
|
var addProductToOrderSupabaseService = () => {
|
|
3821
4069
|
const supabase = useSupabaseOptional();
|
|
3822
|
-
const addProductToOrderSupabase =
|
|
4070
|
+
const addProductToOrderSupabase = useCallback56(
|
|
3823
4071
|
async (values) => {
|
|
3824
4072
|
if (!supabase) {
|
|
3825
4073
|
console.error("Supabase client not initialized");
|
|
@@ -3854,9 +4102,12 @@ var addProductToOrderSupabaseService = () => {
|
|
|
3854
4102
|
addProductToOrderSupabase
|
|
3855
4103
|
};
|
|
3856
4104
|
};
|
|
4105
|
+
|
|
4106
|
+
// src/services/pos-service/supabase/update-order-total-amount.ts
|
|
4107
|
+
import { useCallback as useCallback57 } from "react";
|
|
3857
4108
|
var updateOrderTotalAmountSupabaseService = () => {
|
|
3858
4109
|
const supabase = useSupabaseOptional();
|
|
3859
|
-
const updateOrderTotalAmountSupabase =
|
|
4110
|
+
const updateOrderTotalAmountSupabase = useCallback57(
|
|
3860
4111
|
async (values) => {
|
|
3861
4112
|
if (!supabase) {
|
|
3862
4113
|
console.error("Supabase client not initialized");
|
|
@@ -3884,9 +4135,12 @@ var updateOrderTotalAmountSupabaseService = () => {
|
|
|
3884
4135
|
updateOrderTotalAmountSupabase
|
|
3885
4136
|
};
|
|
3886
4137
|
};
|
|
4138
|
+
|
|
4139
|
+
// src/services/pos-service/supabase/update-order-line.ts
|
|
4140
|
+
import { useCallback as useCallback58 } from "react";
|
|
3887
4141
|
var updateOrderLineSupabaseService = () => {
|
|
3888
4142
|
const supabase = useSupabaseOptional();
|
|
3889
|
-
const updateOrderLineSupabase =
|
|
4143
|
+
const updateOrderLineSupabase = useCallback58(
|
|
3890
4144
|
async (values) => {
|
|
3891
4145
|
if (!supabase) {
|
|
3892
4146
|
console.error("Supabase client not initialized");
|
|
@@ -3916,9 +4170,12 @@ var updateOrderLineSupabaseService = () => {
|
|
|
3916
4170
|
updateOrderLineSupabase
|
|
3917
4171
|
};
|
|
3918
4172
|
};
|
|
4173
|
+
|
|
4174
|
+
// src/services/pos-service/supabase/update-order.ts
|
|
4175
|
+
import { useCallback as useCallback59 } from "react";
|
|
3919
4176
|
var updateOrderSupabaseService = () => {
|
|
3920
4177
|
const supabase = useSupabaseOptional();
|
|
3921
|
-
const updateOrderSupabase =
|
|
4178
|
+
const updateOrderSupabase = useCallback59(
|
|
3922
4179
|
async (values) => {
|
|
3923
4180
|
if (!supabase) {
|
|
3924
4181
|
console.error("Supabase client not initialized");
|
|
@@ -3950,9 +4207,12 @@ var updateOrderSupabaseService = () => {
|
|
|
3950
4207
|
updateOrderSupabase
|
|
3951
4208
|
};
|
|
3952
4209
|
};
|
|
4210
|
+
|
|
4211
|
+
// src/services/pos-service/supabase/delete-order.ts
|
|
4212
|
+
import { useCallback as useCallback60 } from "react";
|
|
3953
4213
|
var deleteOrderSupabaseService = () => {
|
|
3954
4214
|
const supabase = useSupabaseOptional();
|
|
3955
|
-
const deleteOrderSupabase =
|
|
4215
|
+
const deleteOrderSupabase = useCallback60(
|
|
3956
4216
|
async (values) => {
|
|
3957
4217
|
if (!supabase) {
|
|
3958
4218
|
console.error("Supabase client not initialized");
|
|
@@ -3976,9 +4236,12 @@ var deleteOrderSupabaseService = () => {
|
|
|
3976
4236
|
deleteOrderSupabase
|
|
3977
4237
|
};
|
|
3978
4238
|
};
|
|
4239
|
+
|
|
4240
|
+
// src/services/pos-service/supabase/delete-order-line.ts
|
|
4241
|
+
import { useCallback as useCallback61 } from "react";
|
|
3979
4242
|
var deleteOrderLineSupabaseService = () => {
|
|
3980
4243
|
const supabase = useSupabaseOptional();
|
|
3981
|
-
const deleteOrderLineSupabase =
|
|
4244
|
+
const deleteOrderLineSupabase = useCallback61(
|
|
3982
4245
|
async (values) => {
|
|
3983
4246
|
if (!supabase) {
|
|
3984
4247
|
console.error("Supabase client not initialized");
|
|
@@ -4002,9 +4265,12 @@ var deleteOrderLineSupabaseService = () => {
|
|
|
4002
4265
|
deleteOrderLineSupabase
|
|
4003
4266
|
};
|
|
4004
4267
|
};
|
|
4268
|
+
|
|
4269
|
+
// src/services/pos-service/supabase/add-category.ts
|
|
4270
|
+
import { useCallback as useCallback62 } from "react";
|
|
4005
4271
|
var addCategorySupabaseService = () => {
|
|
4006
4272
|
const supabase = useSupabaseOptional();
|
|
4007
|
-
const addCategorySupabase =
|
|
4273
|
+
const addCategorySupabase = useCallback62(
|
|
4008
4274
|
async (values) => {
|
|
4009
4275
|
if (!supabase) {
|
|
4010
4276
|
console.error("Supabase client not initialized");
|
|
@@ -4030,9 +4296,12 @@ var addCategorySupabaseService = () => {
|
|
|
4030
4296
|
addCategorySupabase
|
|
4031
4297
|
};
|
|
4032
4298
|
};
|
|
4299
|
+
|
|
4300
|
+
// src/services/pos-service/supabase/add-product.ts
|
|
4301
|
+
import { useCallback as useCallback63 } from "react";
|
|
4033
4302
|
var addProductSupabaseService = () => {
|
|
4034
4303
|
const supabase = useSupabaseOptional();
|
|
4035
|
-
const addProductSupabase =
|
|
4304
|
+
const addProductSupabase = useCallback63(
|
|
4036
4305
|
async (values) => {
|
|
4037
4306
|
if (!supabase) {
|
|
4038
4307
|
console.error("Supabase client not initialized");
|
|
@@ -4072,9 +4341,12 @@ var addProductSupabaseService = () => {
|
|
|
4072
4341
|
addProductSupabase
|
|
4073
4342
|
};
|
|
4074
4343
|
};
|
|
4344
|
+
|
|
4345
|
+
// src/services/pos-service/supabase/add-payment-method.ts
|
|
4346
|
+
import { useCallback as useCallback64 } from "react";
|
|
4075
4347
|
var addPaymentMethodSupabaseService = () => {
|
|
4076
4348
|
const supabase = useSupabaseOptional();
|
|
4077
|
-
const addPaymentMethodSupabase =
|
|
4349
|
+
const addPaymentMethodSupabase = useCallback64(
|
|
4078
4350
|
async (values) => {
|
|
4079
4351
|
if (!supabase) {
|
|
4080
4352
|
console.error("Supabase client not initialized");
|
|
@@ -4103,9 +4375,12 @@ var addPaymentMethodSupabaseService = () => {
|
|
|
4103
4375
|
addPaymentMethodSupabase
|
|
4104
4376
|
};
|
|
4105
4377
|
};
|
|
4378
|
+
|
|
4379
|
+
// src/services/pos-service/supabase/update-session-payment-methods.ts
|
|
4380
|
+
import { useCallback as useCallback65 } from "react";
|
|
4106
4381
|
var updateSessionPaymentMethodsSupabaseService = () => {
|
|
4107
4382
|
const supabase = useSupabaseOptional();
|
|
4108
|
-
const updateSessionPaymentMethodsSupabase =
|
|
4383
|
+
const updateSessionPaymentMethodsSupabase = useCallback65(
|
|
4109
4384
|
async (values) => {
|
|
4110
4385
|
if (!supabase) {
|
|
4111
4386
|
console.error("Supabase client not initialized");
|
|
@@ -4132,9 +4407,12 @@ var updateSessionPaymentMethodsSupabaseService = () => {
|
|
|
4132
4407
|
updateSessionPaymentMethodsSupabase
|
|
4133
4408
|
};
|
|
4134
4409
|
};
|
|
4410
|
+
|
|
4411
|
+
// src/services/pos-service/supabase/create-payment.ts
|
|
4412
|
+
import { useCallback as useCallback66 } from "react";
|
|
4135
4413
|
var createPaymentSupabaseService = () => {
|
|
4136
4414
|
const supabase = useSupabaseOptional();
|
|
4137
|
-
const createPaymentSupabase =
|
|
4415
|
+
const createPaymentSupabase = useCallback66(
|
|
4138
4416
|
async (values) => {
|
|
4139
4417
|
if (!supabase) {
|
|
4140
4418
|
console.error("Supabase client not initialized");
|
|
@@ -4173,9 +4451,12 @@ var createPaymentSupabaseService = () => {
|
|
|
4173
4451
|
createPaymentSupabase
|
|
4174
4452
|
};
|
|
4175
4453
|
};
|
|
4454
|
+
|
|
4455
|
+
// src/services/pos-service/supabase/create-customer.ts
|
|
4456
|
+
import { useCallback as useCallback67 } from "react";
|
|
4176
4457
|
var createCustomerSupabaseService = () => {
|
|
4177
4458
|
const supabase = useSupabaseOptional();
|
|
4178
|
-
const createCustomerSupabase =
|
|
4459
|
+
const createCustomerSupabase = useCallback67(
|
|
4179
4460
|
async (values) => {
|
|
4180
4461
|
if (!supabase) {
|
|
4181
4462
|
console.error("Supabase client not initialized");
|
|
@@ -4211,9 +4492,12 @@ var createCustomerSupabaseService = () => {
|
|
|
4211
4492
|
createCustomerSupabase
|
|
4212
4493
|
};
|
|
4213
4494
|
};
|
|
4495
|
+
|
|
4496
|
+
// src/services/pos-service/supabase/update-customer.ts
|
|
4497
|
+
import { useCallback as useCallback68 } from "react";
|
|
4214
4498
|
var updateCustomerSupabaseService = () => {
|
|
4215
4499
|
const supabase = useSupabaseOptional();
|
|
4216
|
-
const updateCustomerSupabase =
|
|
4500
|
+
const updateCustomerSupabase = useCallback68(
|
|
4217
4501
|
async (values) => {
|
|
4218
4502
|
if (!supabase) {
|
|
4219
4503
|
console.error("Supabase client not initialized");
|
|
@@ -4242,9 +4526,12 @@ var updateCustomerSupabaseService = () => {
|
|
|
4242
4526
|
updateCustomerSupabase
|
|
4243
4527
|
};
|
|
4244
4528
|
};
|
|
4529
|
+
|
|
4530
|
+
// src/services/pos-service/supabase/delete-customer.ts
|
|
4531
|
+
import { useCallback as useCallback69 } from "react";
|
|
4245
4532
|
var deleteCustomerSupabaseService = () => {
|
|
4246
4533
|
const supabase = useSupabaseOptional();
|
|
4247
|
-
const deleteCustomerSupabase =
|
|
4534
|
+
const deleteCustomerSupabase = useCallback69(
|
|
4248
4535
|
async (values) => {
|
|
4249
4536
|
if (!supabase) {
|
|
4250
4537
|
console.error("Supabase client not initialized");
|
|
@@ -4268,9 +4555,12 @@ var deleteCustomerSupabaseService = () => {
|
|
|
4268
4555
|
deleteCustomerSupabase
|
|
4269
4556
|
};
|
|
4270
4557
|
};
|
|
4558
|
+
|
|
4559
|
+
// src/services/pos-service/supabase/upload-image.ts
|
|
4560
|
+
import { useCallback as useCallback70 } from "react";
|
|
4271
4561
|
var uploadImageSupabaseService = () => {
|
|
4272
4562
|
const supabase = useSupabaseOptional();
|
|
4273
|
-
const uploadImageSupabase =
|
|
4563
|
+
const uploadImageSupabase = useCallback70(
|
|
4274
4564
|
async (file, tenantId) => {
|
|
4275
4565
|
if (!supabase) {
|
|
4276
4566
|
console.error("Supabase client not initialized");
|
|
@@ -4303,8 +4593,11 @@ var uploadImageSupabaseService = () => {
|
|
|
4303
4593
|
uploadImageSupabase
|
|
4304
4594
|
};
|
|
4305
4595
|
};
|
|
4596
|
+
|
|
4597
|
+
// src/services/pos-service/supabase/get-list-users.ts
|
|
4598
|
+
import { useCallback as useCallback71 } from "react";
|
|
4306
4599
|
var getListUsersService = (env) => {
|
|
4307
|
-
const getListUsers =
|
|
4600
|
+
const getListUsers = useCallback71(
|
|
4308
4601
|
({ tenantId }) => {
|
|
4309
4602
|
const jsonData = {
|
|
4310
4603
|
model: "tenant.users",
|
|
@@ -4323,8 +4616,11 @@ var getListUsersService = (env) => {
|
|
|
4323
4616
|
getListUsers
|
|
4324
4617
|
};
|
|
4325
4618
|
};
|
|
4619
|
+
|
|
4620
|
+
// src/services/pos-service/supabase/get-list-roles.ts
|
|
4621
|
+
import { useCallback as useCallback72 } from "react";
|
|
4326
4622
|
var getListRolesService = (env) => {
|
|
4327
|
-
const getListRoles =
|
|
4623
|
+
const getListRoles = useCallback72(
|
|
4328
4624
|
({ tenantId }) => {
|
|
4329
4625
|
const jsonData = {
|
|
4330
4626
|
model: "tenant.roles",
|
|
@@ -4343,8 +4639,11 @@ var getListRolesService = (env) => {
|
|
|
4343
4639
|
getListRoles
|
|
4344
4640
|
};
|
|
4345
4641
|
};
|
|
4642
|
+
|
|
4643
|
+
// src/services/pos-service/supabase/assign-role.ts
|
|
4644
|
+
import { useCallback as useCallback73 } from "react";
|
|
4346
4645
|
var assignRoleService = (env) => {
|
|
4347
|
-
const assignRole =
|
|
4646
|
+
const assignRole = useCallback73(
|
|
4348
4647
|
({
|
|
4349
4648
|
tenantId,
|
|
4350
4649
|
userId,
|
|
@@ -4371,9 +4670,12 @@ var assignRoleService = (env) => {
|
|
|
4371
4670
|
assignRole
|
|
4372
4671
|
};
|
|
4373
4672
|
};
|
|
4673
|
+
|
|
4674
|
+
// src/services/pos-service/supabase/get-states.ts
|
|
4675
|
+
import { useCallback as useCallback74 } from "react";
|
|
4374
4676
|
var getStatesSupabaseService = () => {
|
|
4375
4677
|
const supabase = useSupabaseOptional();
|
|
4376
|
-
const getStatesSupabase =
|
|
4678
|
+
const getStatesSupabase = useCallback74(async () => {
|
|
4377
4679
|
if (!supabase) return { length: 0, records: [] };
|
|
4378
4680
|
const { data, error } = await supabase.from("states" /* STATES */).select("*");
|
|
4379
4681
|
if (error) {
|
|
@@ -4387,9 +4689,12 @@ var getStatesSupabaseService = () => {
|
|
|
4387
4689
|
getStatesSupabase
|
|
4388
4690
|
};
|
|
4389
4691
|
};
|
|
4692
|
+
|
|
4693
|
+
// src/services/pos-service/supabase/get-wards.ts
|
|
4694
|
+
import { useCallback as useCallback75 } from "react";
|
|
4390
4695
|
var getWardsSupabaseService = () => {
|
|
4391
4696
|
const supabase = useSupabaseOptional();
|
|
4392
|
-
const getWardsSupabase =
|
|
4697
|
+
const getWardsSupabase = useCallback75(async () => {
|
|
4393
4698
|
if (!supabase) return { length: 0, records: [] };
|
|
4394
4699
|
const { data, error } = await supabase.from("wards" /* WARDS */).select("*");
|
|
4395
4700
|
if (error) {
|
|
@@ -4403,9 +4708,12 @@ var getWardsSupabaseService = () => {
|
|
|
4403
4708
|
getWardsSupabase
|
|
4404
4709
|
};
|
|
4405
4710
|
};
|
|
4711
|
+
|
|
4712
|
+
// src/services/pos-service/supabase/get-partner-titles.ts
|
|
4713
|
+
import { useCallback as useCallback76 } from "react";
|
|
4406
4714
|
var getPartnerTitlesSupabaseService = () => {
|
|
4407
4715
|
const supabase = useSupabaseOptional();
|
|
4408
|
-
const getPartnerTitlesSupabase =
|
|
4716
|
+
const getPartnerTitlesSupabase = useCallback76(async () => {
|
|
4409
4717
|
if (!supabase) return { length: 0, records: [] };
|
|
4410
4718
|
const { data, error } = await supabase.from("partner_titles" /* PARTNER_TITLES */).select("*");
|
|
4411
4719
|
if (error) {
|
|
@@ -4419,8 +4727,11 @@ var getPartnerTitlesSupabaseService = () => {
|
|
|
4419
4727
|
getPartnerTitlesSupabase
|
|
4420
4728
|
};
|
|
4421
4729
|
};
|
|
4730
|
+
|
|
4731
|
+
// src/services/pos-service/supabase/get-supa-current-user.ts
|
|
4732
|
+
import { useCallback as useCallback77 } from "react";
|
|
4422
4733
|
var getSupaCurrentUser = (env) => {
|
|
4423
|
-
const getSupaCurrentUser2 =
|
|
4734
|
+
const getSupaCurrentUser2 = useCallback77(
|
|
4424
4735
|
({ tenantId }) => {
|
|
4425
4736
|
return env?.requests.get("/api/v2/auth/me" /* SUPABASE_CURRENT_USER */, {
|
|
4426
4737
|
headers: {
|
|
@@ -4435,9 +4746,12 @@ var getSupaCurrentUser = (env) => {
|
|
|
4435
4746
|
getSupaCurrentUser: getSupaCurrentUser2
|
|
4436
4747
|
};
|
|
4437
4748
|
};
|
|
4749
|
+
|
|
4750
|
+
// src/services/pos-service/supabase/update-category.ts
|
|
4751
|
+
import { useCallback as useCallback78 } from "react";
|
|
4438
4752
|
var updateCategorySupabaseService = () => {
|
|
4439
4753
|
const supabase = useSupabaseOptional();
|
|
4440
|
-
const updateCategorySupabase =
|
|
4754
|
+
const updateCategorySupabase = useCallback78(
|
|
4441
4755
|
async (values) => {
|
|
4442
4756
|
if (!supabase) {
|
|
4443
4757
|
console.error("Supabase client not initialized");
|
|
@@ -4462,9 +4776,12 @@ var updateCategorySupabaseService = () => {
|
|
|
4462
4776
|
updateCategorySupabase
|
|
4463
4777
|
};
|
|
4464
4778
|
};
|
|
4779
|
+
|
|
4780
|
+
// src/services/pos-service/supabase/delete-category.ts
|
|
4781
|
+
import { useCallback as useCallback79 } from "react";
|
|
4465
4782
|
var deleteCategorySupabaseService = () => {
|
|
4466
4783
|
const supabase = useSupabaseOptional();
|
|
4467
|
-
const deleteCategorySupabase =
|
|
4784
|
+
const deleteCategorySupabase = useCallback79(
|
|
4468
4785
|
async (values) => {
|
|
4469
4786
|
if (!supabase) {
|
|
4470
4787
|
console.error("Supabase client not initialized");
|
|
@@ -4488,9 +4805,12 @@ var deleteCategorySupabaseService = () => {
|
|
|
4488
4805
|
deleteCategorySupabase
|
|
4489
4806
|
};
|
|
4490
4807
|
};
|
|
4808
|
+
|
|
4809
|
+
// src/services/pos-service/supabase/update-product.ts
|
|
4810
|
+
import { useCallback as useCallback80 } from "react";
|
|
4491
4811
|
var updateProductSupabaseService = () => {
|
|
4492
4812
|
const supabase = useSupabaseOptional();
|
|
4493
|
-
const updateProductSupabase =
|
|
4813
|
+
const updateProductSupabase = useCallback80(
|
|
4494
4814
|
async (values) => {
|
|
4495
4815
|
if (!supabase) {
|
|
4496
4816
|
console.error("Supabase client not initialized");
|
|
@@ -4516,9 +4836,12 @@ var updateProductSupabaseService = () => {
|
|
|
4516
4836
|
updateProductSupabase
|
|
4517
4837
|
};
|
|
4518
4838
|
};
|
|
4839
|
+
|
|
4840
|
+
// src/services/pos-service/supabase/delete-product.ts
|
|
4841
|
+
import { useCallback as useCallback81 } from "react";
|
|
4519
4842
|
var deleteProductSupabaseService = () => {
|
|
4520
4843
|
const supabase = useSupabaseOptional();
|
|
4521
|
-
const deleteProductSupabase =
|
|
4844
|
+
const deleteProductSupabase = useCallback81(
|
|
4522
4845
|
async (values) => {
|
|
4523
4846
|
if (!supabase) {
|
|
4524
4847
|
console.error("Supabase client not initialized");
|
|
@@ -4542,9 +4865,12 @@ var deleteProductSupabaseService = () => {
|
|
|
4542
4865
|
deleteProductSupabase
|
|
4543
4866
|
};
|
|
4544
4867
|
};
|
|
4868
|
+
|
|
4869
|
+
// src/services/pos-service/supabase/toggle-pos-restaurant.ts
|
|
4870
|
+
import { useCallback as useCallback82 } from "react";
|
|
4545
4871
|
var togglePosRestaurantSupabaseService = () => {
|
|
4546
4872
|
const supabase = useSupabaseOptional();
|
|
4547
|
-
const togglePosRestaurantSupabase =
|
|
4873
|
+
const togglePosRestaurantSupabase = useCallback82(
|
|
4548
4874
|
async (values) => {
|
|
4549
4875
|
if (!supabase) {
|
|
4550
4876
|
console.error("Supabase client not initialized");
|
|
@@ -4606,6 +4932,7 @@ var serviceFactories = [
|
|
|
4606
4932
|
applyVoucherService,
|
|
4607
4933
|
removeVoucherService,
|
|
4608
4934
|
syncFromUiService,
|
|
4935
|
+
getCustomerLoyaltyPointService,
|
|
4609
4936
|
addFloorSupabaseService,
|
|
4610
4937
|
addTableSupabaseService,
|
|
4611
4938
|
updateFloorSupabaseService,
|
|
@@ -4651,164 +4978,8 @@ var usePosService = () => {
|
|
|
4651
4978
|
}
|
|
4652
4979
|
return service;
|
|
4653
4980
|
};
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
const [ready, setReady] = useState(false);
|
|
4657
|
-
const { getVersion } = useViewService();
|
|
4658
|
-
useEffect(() => {
|
|
4659
|
-
const clearVersion = () => {
|
|
4660
|
-
queryClient.clear();
|
|
4661
|
-
localStorage.removeItem("__api_version__");
|
|
4662
|
-
};
|
|
4663
|
-
const validateVersion = async () => {
|
|
4664
|
-
const serverVersion = await getVersion();
|
|
4665
|
-
const cached = localStorage.getItem("__api_version__");
|
|
4666
|
-
if (cached !== serverVersion?.api_version) {
|
|
4667
|
-
clearVersion();
|
|
4668
|
-
localStorage.setItem("__api_version__", serverVersion?.api_version);
|
|
4669
|
-
} else {
|
|
4670
|
-
console.log("Api version:", serverVersion?.api_version);
|
|
4671
|
-
}
|
|
4672
|
-
setReady(true);
|
|
4673
|
-
};
|
|
4674
|
-
validateVersion();
|
|
4675
|
-
if (typeof window !== "undefined") {
|
|
4676
|
-
const onKey = (e) => {
|
|
4677
|
-
const key = e.key.toLowerCase();
|
|
4678
|
-
const isHardRefresh = (key === "f5" || key === "r") && e.ctrlKey && (key !== "r" || e.shiftKey) || key === "r" && e.metaKey && e.shiftKey || key === "r" && e.metaKey && e.altKey;
|
|
4679
|
-
if (isHardRefresh) clearVersion();
|
|
4680
|
-
};
|
|
4681
|
-
window.addEventListener("keydown", onKey);
|
|
4682
|
-
return () => window.removeEventListener("keydown", onKey);
|
|
4683
|
-
}
|
|
4684
|
-
}, [queryClient]);
|
|
4685
|
-
return ready ? /* @__PURE__ */ jsx(Fragment, { children }) : null;
|
|
4686
|
-
};
|
|
4687
|
-
var initialEnvState = {
|
|
4688
|
-
env: null,
|
|
4689
|
-
baseUrl: "",
|
|
4690
|
-
requests: null,
|
|
4691
|
-
companies: [],
|
|
4692
|
-
user: {},
|
|
4693
|
-
config: null,
|
|
4694
|
-
envFile: null,
|
|
4695
|
-
defaultCompany: {
|
|
4696
|
-
id: null,
|
|
4697
|
-
logo: "",
|
|
4698
|
-
secondary_color: "",
|
|
4699
|
-
primary_color: "",
|
|
4700
|
-
secondary_logo: ""
|
|
4701
|
-
},
|
|
4702
|
-
context: {
|
|
4703
|
-
uid: null,
|
|
4704
|
-
lang: "vi_VN",
|
|
4705
|
-
tz: "Asia/Saigon"
|
|
4706
|
-
},
|
|
4707
|
-
excludeLanguages: [],
|
|
4708
|
-
isSupaMode: false
|
|
4709
|
-
};
|
|
4710
|
-
var EnvContext = createContext(null);
|
|
4711
|
-
function EnvProvider({
|
|
4712
|
-
children,
|
|
4713
|
-
localStorageUtils: localStorageUtil = localStorageUtils(),
|
|
4714
|
-
sessionStorageUtils: sessionStorageUtil = sessionStorageUtils
|
|
4715
|
-
}) {
|
|
4716
|
-
const [env, setEnvState] = useState({
|
|
4717
|
-
...initialEnvState,
|
|
4718
|
-
localStorageUtils: localStorageUtil,
|
|
4719
|
-
sessionStorageUtils: sessionStorageUtil
|
|
4720
|
-
});
|
|
4721
|
-
const setupEnv = useCallback(
|
|
4722
|
-
(envConfig) => {
|
|
4723
|
-
const updatedEnv = {
|
|
4724
|
-
...env,
|
|
4725
|
-
...envConfig,
|
|
4726
|
-
localStorageUtils: localStorageUtil,
|
|
4727
|
-
sessionStorageUtils: sessionStorageUtil
|
|
4728
|
-
};
|
|
4729
|
-
const requests = axiosClient.init(updatedEnv);
|
|
4730
|
-
setEnvState({ ...updatedEnv, requests });
|
|
4731
|
-
return updatedEnv;
|
|
4732
|
-
},
|
|
4733
|
-
[env, localStorageUtil, sessionStorageUtil]
|
|
4734
|
-
);
|
|
4735
|
-
const setUid = useCallback((uid) => {
|
|
4736
|
-
setEnvState((prev) => ({
|
|
4737
|
-
...prev,
|
|
4738
|
-
context: { ...prev.context, uid }
|
|
4739
|
-
}));
|
|
4740
|
-
}, []);
|
|
4741
|
-
const setLang = useCallback((lang) => {
|
|
4742
|
-
setEnvState((prev) => ({
|
|
4743
|
-
...prev,
|
|
4744
|
-
context: { ...prev.context, lang }
|
|
4745
|
-
}));
|
|
4746
|
-
}, []);
|
|
4747
|
-
const setAllowCompanies = useCallback((allowed_company_ids) => {
|
|
4748
|
-
setEnvState((prev) => ({
|
|
4749
|
-
...prev,
|
|
4750
|
-
context: { ...prev.context, allowed_company_ids }
|
|
4751
|
-
}));
|
|
4752
|
-
}, []);
|
|
4753
|
-
const setCompanies = useCallback((companies) => {
|
|
4754
|
-
setEnvState((prev) => ({
|
|
4755
|
-
...prev,
|
|
4756
|
-
companies
|
|
4757
|
-
}));
|
|
4758
|
-
}, []);
|
|
4759
|
-
const setDefaultCompany = useCallback(
|
|
4760
|
-
(defaultCompany) => {
|
|
4761
|
-
setEnvState((prev) => ({
|
|
4762
|
-
...prev,
|
|
4763
|
-
defaultCompany
|
|
4764
|
-
}));
|
|
4765
|
-
},
|
|
4766
|
-
[]
|
|
4767
|
-
);
|
|
4768
|
-
const setUserInfo = useCallback((user) => {
|
|
4769
|
-
setEnvState((prev) => ({
|
|
4770
|
-
...prev,
|
|
4771
|
-
user
|
|
4772
|
-
}));
|
|
4773
|
-
}, []);
|
|
4774
|
-
const setConfig = useCallback((config) => {
|
|
4775
|
-
setEnvState((prev) => ({
|
|
4776
|
-
...prev,
|
|
4777
|
-
config
|
|
4778
|
-
}));
|
|
4779
|
-
}, []);
|
|
4780
|
-
const setEnvFile = useCallback((envFile) => {
|
|
4781
|
-
setEnvState((prev) => ({
|
|
4782
|
-
...prev,
|
|
4783
|
-
envFile
|
|
4784
|
-
}));
|
|
4785
|
-
}, []);
|
|
4786
|
-
return /* @__PURE__ */ jsx(
|
|
4787
|
-
EnvContext.Provider,
|
|
4788
|
-
{
|
|
4789
|
-
value: {
|
|
4790
|
-
env,
|
|
4791
|
-
setupEnv,
|
|
4792
|
-
setUid,
|
|
4793
|
-
setLang,
|
|
4794
|
-
setAllowCompanies,
|
|
4795
|
-
setCompanies,
|
|
4796
|
-
setDefaultCompany,
|
|
4797
|
-
setUserInfo,
|
|
4798
|
-
setConfig,
|
|
4799
|
-
setEnvFile
|
|
4800
|
-
},
|
|
4801
|
-
children
|
|
4802
|
-
}
|
|
4803
|
-
);
|
|
4804
|
-
}
|
|
4805
|
-
function useEnv() {
|
|
4806
|
-
const context = useContext(EnvContext);
|
|
4807
|
-
if (!context) {
|
|
4808
|
-
throw new Error("useEnv must be used within an EnvProvider");
|
|
4809
|
-
}
|
|
4810
|
-
return context;
|
|
4811
|
-
}
|
|
4981
|
+
|
|
4982
|
+
// src/hooks/auth/use-forgot-password.ts
|
|
4812
4983
|
var useForgotPassword = () => {
|
|
4813
4984
|
const { forgotPassword } = useAuthService();
|
|
4814
4985
|
return useMutation({
|
|
@@ -4818,9 +4989,12 @@ var useForgotPassword = () => {
|
|
|
4818
4989
|
});
|
|
4819
4990
|
};
|
|
4820
4991
|
var use_forgot_password_default = useForgotPassword;
|
|
4992
|
+
|
|
4993
|
+
// src/hooks/auth/use-forgotpassword-sso.ts
|
|
4994
|
+
import { useMutation as useMutation2 } from "@tanstack/react-query";
|
|
4821
4995
|
var useForgotPasswordSSO = () => {
|
|
4822
4996
|
const { forgotPasswordSSO } = useAuthService();
|
|
4823
|
-
return
|
|
4997
|
+
return useMutation2({
|
|
4824
4998
|
mutationFn: ({
|
|
4825
4999
|
email,
|
|
4826
5000
|
with_context,
|
|
@@ -4831,45 +5005,60 @@ var useForgotPasswordSSO = () => {
|
|
|
4831
5005
|
});
|
|
4832
5006
|
};
|
|
4833
5007
|
var use_forgotpassword_sso_default = useForgotPasswordSSO;
|
|
5008
|
+
|
|
5009
|
+
// src/hooks/auth/use-get-provider.ts
|
|
5010
|
+
import { useMutation as useMutation3 } from "@tanstack/react-query";
|
|
4834
5011
|
var useGetProvider = () => {
|
|
4835
5012
|
const { getProviders } = useAuthService();
|
|
4836
|
-
return
|
|
5013
|
+
return useMutation3({
|
|
4837
5014
|
mutationFn: (data) => {
|
|
4838
5015
|
return getProviders(data?.db);
|
|
4839
5016
|
}
|
|
4840
5017
|
});
|
|
4841
5018
|
};
|
|
4842
5019
|
var use_get_provider_default = useGetProvider;
|
|
5020
|
+
|
|
5021
|
+
// src/hooks/auth/use-isvalid-token.ts
|
|
5022
|
+
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
|
4843
5023
|
var useIsValidToken = () => {
|
|
4844
5024
|
const { isValidToken } = useAuthService();
|
|
4845
|
-
return
|
|
5025
|
+
return useMutation4({
|
|
4846
5026
|
mutationFn: (token) => {
|
|
4847
5027
|
return isValidToken(token);
|
|
4848
5028
|
}
|
|
4849
5029
|
});
|
|
4850
5030
|
};
|
|
4851
5031
|
var use_isvalid_token_default = useIsValidToken;
|
|
5032
|
+
|
|
5033
|
+
// src/hooks/auth/use-login-credential.tsx
|
|
5034
|
+
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
4852
5035
|
var useLoginCredential = () => {
|
|
4853
5036
|
const { login } = useAuthService();
|
|
4854
|
-
return
|
|
5037
|
+
return useMutation5({
|
|
4855
5038
|
mutationFn: (data) => {
|
|
4856
5039
|
return login(data);
|
|
4857
5040
|
}
|
|
4858
5041
|
});
|
|
4859
5042
|
};
|
|
4860
5043
|
var use_login_credential_default = useLoginCredential;
|
|
5044
|
+
|
|
5045
|
+
// src/hooks/auth/use-login-socical.ts
|
|
5046
|
+
import { useMutation as useMutation6 } from "@tanstack/react-query";
|
|
4861
5047
|
var useLoginSocial = () => {
|
|
4862
5048
|
const { loginSocial } = useAuthService();
|
|
4863
|
-
return
|
|
5049
|
+
return useMutation6({
|
|
4864
5050
|
mutationFn: (data) => {
|
|
4865
5051
|
return loginSocial(data);
|
|
4866
5052
|
}
|
|
4867
5053
|
});
|
|
4868
5054
|
};
|
|
4869
5055
|
var use_login_socical_default = useLoginSocial;
|
|
5056
|
+
|
|
5057
|
+
// src/hooks/auth/use-login-tenant-user.ts
|
|
5058
|
+
import { useMutation as useMutation7 } from "@tanstack/react-query";
|
|
4870
5059
|
var useLoginTenantUser = () => {
|
|
4871
5060
|
const { loginTenantUser } = useAuthService();
|
|
4872
|
-
return
|
|
5061
|
+
return useMutation7({
|
|
4873
5062
|
mutationFn: (data) => {
|
|
4874
5063
|
return loginTenantUser({
|
|
4875
5064
|
email: data.email,
|
|
@@ -4880,18 +5069,24 @@ var useLoginTenantUser = () => {
|
|
|
4880
5069
|
});
|
|
4881
5070
|
};
|
|
4882
5071
|
var use_login_tenant_user_default = useLoginTenantUser;
|
|
5072
|
+
|
|
5073
|
+
// src/hooks/auth/use-reset-password.ts
|
|
5074
|
+
import { useMutation as useMutation8 } from "@tanstack/react-query";
|
|
4883
5075
|
var useResetPassword = () => {
|
|
4884
5076
|
const { resetPassword } = useAuthService();
|
|
4885
|
-
return
|
|
5077
|
+
return useMutation8({
|
|
4886
5078
|
mutationFn: (request) => {
|
|
4887
5079
|
return resetPassword(request.data, request.token);
|
|
4888
5080
|
}
|
|
4889
5081
|
});
|
|
4890
5082
|
};
|
|
4891
5083
|
var use_reset_password_default = useResetPassword;
|
|
5084
|
+
|
|
5085
|
+
// src/hooks/auth/use-reset-password-sso.ts
|
|
5086
|
+
import { useMutation as useMutation9 } from "@tanstack/react-query";
|
|
4892
5087
|
var useResetPasswordSSO = () => {
|
|
4893
5088
|
const { resetPasswordSSO } = useAuthService();
|
|
4894
|
-
return
|
|
5089
|
+
return useMutation9({
|
|
4895
5090
|
mutationFn: ({
|
|
4896
5091
|
method,
|
|
4897
5092
|
password,
|
|
@@ -4906,45 +5101,60 @@ var useResetPasswordSSO = () => {
|
|
|
4906
5101
|
});
|
|
4907
5102
|
};
|
|
4908
5103
|
var use_reset_password_sso_default = useResetPasswordSSO;
|
|
5104
|
+
|
|
5105
|
+
// src/hooks/auth/use-update-password.ts
|
|
5106
|
+
import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
4909
5107
|
var useUpdatePassword = () => {
|
|
4910
5108
|
const { updatePassword } = useAuthService();
|
|
4911
|
-
return
|
|
5109
|
+
return useMutation10({
|
|
4912
5110
|
mutationFn: (request) => {
|
|
4913
5111
|
return updatePassword(request.data, request.token);
|
|
4914
5112
|
}
|
|
4915
5113
|
});
|
|
4916
5114
|
};
|
|
4917
5115
|
var use_update_password_default = useUpdatePassword;
|
|
5116
|
+
|
|
5117
|
+
// src/hooks/auth/use-logout.ts
|
|
5118
|
+
import { useMutation as useMutation11 } from "@tanstack/react-query";
|
|
4918
5119
|
var useLogout = () => {
|
|
4919
5120
|
const { logout } = useAuthService();
|
|
4920
|
-
return
|
|
5121
|
+
return useMutation11({
|
|
4921
5122
|
mutationFn: (service) => {
|
|
4922
5123
|
return logout(service);
|
|
4923
5124
|
}
|
|
4924
5125
|
});
|
|
4925
5126
|
};
|
|
4926
5127
|
var use_logout_default = useLogout;
|
|
5128
|
+
|
|
5129
|
+
// src/hooks/auth/use-get-access-by-code.ts
|
|
5130
|
+
import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
4927
5131
|
var useGetAccessByCode = () => {
|
|
4928
5132
|
const { getAccessByCode } = useAuthService();
|
|
4929
|
-
return
|
|
5133
|
+
return useMutation12({
|
|
4930
5134
|
mutationFn: ({ code }) => {
|
|
4931
5135
|
return getAccessByCode(code);
|
|
4932
5136
|
}
|
|
4933
5137
|
});
|
|
4934
5138
|
};
|
|
4935
5139
|
var use_get_access_by_code_default = useGetAccessByCode;
|
|
5140
|
+
|
|
5141
|
+
// src/hooks/auth/use-validate-action-token.ts
|
|
5142
|
+
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
4936
5143
|
var useValidateActionToken = () => {
|
|
4937
5144
|
const { isValidActionToken } = useAuthService();
|
|
4938
|
-
return
|
|
5145
|
+
return useMutation13({
|
|
4939
5146
|
mutationFn: ({ actionToken }) => {
|
|
4940
5147
|
return isValidActionToken(actionToken);
|
|
4941
5148
|
}
|
|
4942
5149
|
});
|
|
4943
5150
|
};
|
|
4944
5151
|
var use_validate_action_token_default = useValidateActionToken;
|
|
5152
|
+
|
|
5153
|
+
// src/hooks/auth/use-get-tenant-mapping.ts
|
|
5154
|
+
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
4945
5155
|
var useGetTenantMapping = () => {
|
|
4946
5156
|
const { getTenantMapping } = useAuthService();
|
|
4947
|
-
return
|
|
5157
|
+
return useMutation14({
|
|
4948
5158
|
mutationFn: ({
|
|
4949
5159
|
shortName,
|
|
4950
5160
|
service
|
|
@@ -4954,9 +5164,12 @@ var useGetTenantMapping = () => {
|
|
|
4954
5164
|
});
|
|
4955
5165
|
};
|
|
4956
5166
|
var use_get_tenant_mapping_default = useGetTenantMapping;
|
|
5167
|
+
|
|
5168
|
+
// src/hooks/auth/use-get-token.ts
|
|
5169
|
+
import { useMutation as useMutation15 } from "@tanstack/react-query";
|
|
4957
5170
|
var useGetToken = () => {
|
|
4958
5171
|
const { getToken } = useAuthService();
|
|
4959
|
-
return
|
|
5172
|
+
return useMutation15({
|
|
4960
5173
|
mutationFn: ({
|
|
4961
5174
|
phone,
|
|
4962
5175
|
name,
|
|
@@ -4968,16 +5181,22 @@ var useGetToken = () => {
|
|
|
4968
5181
|
});
|
|
4969
5182
|
};
|
|
4970
5183
|
var use_get_token_default = useGetToken;
|
|
5184
|
+
|
|
5185
|
+
// src/hooks/company/use-get-company-info.ts
|
|
5186
|
+
import { useMutation as useMutation16 } from "@tanstack/react-query";
|
|
4971
5187
|
var useGetCompanyInfo = () => {
|
|
4972
5188
|
const { getInfoCompany } = useCompanyService();
|
|
4973
|
-
return
|
|
5189
|
+
return useMutation16({
|
|
4974
5190
|
mutationFn: ({ service, id }) => getInfoCompany(id, service)
|
|
4975
5191
|
});
|
|
4976
5192
|
};
|
|
4977
5193
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5194
|
+
|
|
5195
|
+
// src/hooks/company/use-get-current-company.ts
|
|
5196
|
+
import { useMutation as useMutation17 } from "@tanstack/react-query";
|
|
4978
5197
|
var useGetCurrentCompany = () => {
|
|
4979
5198
|
const { getCurrentCompany } = useCompanyService();
|
|
4980
|
-
return
|
|
5199
|
+
return useMutation17({
|
|
4981
5200
|
mutationFn: ({
|
|
4982
5201
|
service,
|
|
4983
5202
|
extraHeaders
|
|
@@ -4985,6 +5204,9 @@ var useGetCurrentCompany = () => {
|
|
|
4985
5204
|
});
|
|
4986
5205
|
};
|
|
4987
5206
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
5207
|
+
|
|
5208
|
+
// src/hooks/company/use-get-list-company.ts
|
|
5209
|
+
import { useQuery } from "@tanstack/react-query";
|
|
4988
5210
|
var useGetListCompany = (companyIDs = []) => {
|
|
4989
5211
|
const { getList } = useModelService();
|
|
4990
5212
|
const companySpec = {
|
|
@@ -5003,9 +5225,12 @@ var useGetListCompany = (companyIDs = []) => {
|
|
|
5003
5225
|
});
|
|
5004
5226
|
};
|
|
5005
5227
|
var use_get_list_company_default = useGetListCompany;
|
|
5228
|
+
|
|
5229
|
+
// src/hooks/excel/use-export-excel.ts
|
|
5230
|
+
import { useMutation as useMutation18 } from "@tanstack/react-query";
|
|
5006
5231
|
var useExportExcel = () => {
|
|
5007
5232
|
const { exportExcel } = useExcelService();
|
|
5008
|
-
return
|
|
5233
|
+
return useMutation18({
|
|
5009
5234
|
mutationFn: ({
|
|
5010
5235
|
model,
|
|
5011
5236
|
domain,
|
|
@@ -5032,9 +5257,12 @@ var useExportExcel = () => {
|
|
|
5032
5257
|
});
|
|
5033
5258
|
};
|
|
5034
5259
|
var use_export_excel_default = useExportExcel;
|
|
5260
|
+
|
|
5261
|
+
// src/hooks/excel/use-get-field-export.ts
|
|
5262
|
+
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
5035
5263
|
var useGetFieldExport = () => {
|
|
5036
5264
|
const { getFieldExport } = useExcelService();
|
|
5037
|
-
return
|
|
5265
|
+
return useMutation19({
|
|
5038
5266
|
mutationFn: ({
|
|
5039
5267
|
ids,
|
|
5040
5268
|
model,
|
|
@@ -5065,6 +5293,9 @@ var useGetFieldExport = () => {
|
|
|
5065
5293
|
});
|
|
5066
5294
|
};
|
|
5067
5295
|
var use_get_field_export_default = useGetFieldExport;
|
|
5296
|
+
|
|
5297
|
+
// src/hooks/excel/use-get-file-excel.ts
|
|
5298
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
5068
5299
|
var useGetFileExcel = ({
|
|
5069
5300
|
model,
|
|
5070
5301
|
service,
|
|
@@ -5072,7 +5303,7 @@ var useGetFileExcel = ({
|
|
|
5072
5303
|
context
|
|
5073
5304
|
}) => {
|
|
5074
5305
|
const { getFileExcel } = useExcelService();
|
|
5075
|
-
return
|
|
5306
|
+
return useQuery2({
|
|
5076
5307
|
queryKey: ["excel", model],
|
|
5077
5308
|
queryFn: () => getFileExcel({
|
|
5078
5309
|
model,
|
|
@@ -5089,9 +5320,12 @@ var useGetFileExcel = ({
|
|
|
5089
5320
|
});
|
|
5090
5321
|
};
|
|
5091
5322
|
var use_get_file_excel_default = useGetFileExcel;
|
|
5323
|
+
|
|
5324
|
+
// src/hooks/excel/use-parse-preview.ts
|
|
5325
|
+
import { useMutation as useMutation20 } from "@tanstack/react-query";
|
|
5092
5326
|
var useParsePreview = () => {
|
|
5093
5327
|
const { parsePreview } = useExcelService();
|
|
5094
|
-
return
|
|
5328
|
+
return useMutation20({
|
|
5095
5329
|
mutationFn: ({
|
|
5096
5330
|
id,
|
|
5097
5331
|
selectedSheet,
|
|
@@ -5110,9 +5344,12 @@ var useParsePreview = () => {
|
|
|
5110
5344
|
});
|
|
5111
5345
|
};
|
|
5112
5346
|
var use_parse_preview_default = useParsePreview;
|
|
5347
|
+
|
|
5348
|
+
// src/hooks/excel/use-upload-file-excel.ts
|
|
5349
|
+
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
5113
5350
|
var useUploadFileExcel = () => {
|
|
5114
5351
|
const { uploadFileExcel } = useExcelService();
|
|
5115
|
-
return
|
|
5352
|
+
return useMutation21({
|
|
5116
5353
|
mutationFn: ({
|
|
5117
5354
|
formData,
|
|
5118
5355
|
service,
|
|
@@ -5125,9 +5362,12 @@ var useUploadFileExcel = () => {
|
|
|
5125
5362
|
});
|
|
5126
5363
|
};
|
|
5127
5364
|
var use_upload_file_excel_default = useUploadFileExcel;
|
|
5365
|
+
|
|
5366
|
+
// src/hooks/excel/use-upload-id-file.ts
|
|
5367
|
+
import { useMutation as useMutation22 } from "@tanstack/react-query";
|
|
5128
5368
|
var useUploadIdFile = () => {
|
|
5129
5369
|
const { uploadIdFile } = useExcelService();
|
|
5130
|
-
return
|
|
5370
|
+
return useMutation22({
|
|
5131
5371
|
mutationFn: ({
|
|
5132
5372
|
formData,
|
|
5133
5373
|
service,
|
|
@@ -5140,9 +5380,12 @@ var useUploadIdFile = () => {
|
|
|
5140
5380
|
});
|
|
5141
5381
|
};
|
|
5142
5382
|
var use_upload_id_file_default = useUploadIdFile;
|
|
5383
|
+
|
|
5384
|
+
// src/hooks/excel/uss-execute-import.ts
|
|
5385
|
+
import { useMutation as useMutation23 } from "@tanstack/react-query";
|
|
5143
5386
|
var useExecuteImport = () => {
|
|
5144
5387
|
const { executeImport } = useExcelService();
|
|
5145
|
-
return
|
|
5388
|
+
return useMutation23({
|
|
5146
5389
|
mutationFn: ({
|
|
5147
5390
|
fields,
|
|
5148
5391
|
columns,
|
|
@@ -5165,9 +5408,12 @@ var useExecuteImport = () => {
|
|
|
5165
5408
|
});
|
|
5166
5409
|
};
|
|
5167
5410
|
var uss_execute_import_default = useExecuteImport;
|
|
5411
|
+
|
|
5412
|
+
// src/hooks/form/use-change-status.ts
|
|
5413
|
+
import { useMutation as useMutation24 } from "@tanstack/react-query";
|
|
5168
5414
|
var useChangeStatus = () => {
|
|
5169
5415
|
const { changeStatus } = useFormService();
|
|
5170
|
-
return
|
|
5416
|
+
return useMutation24({
|
|
5171
5417
|
mutationFn: ({ data }) => {
|
|
5172
5418
|
return changeStatus({
|
|
5173
5419
|
data
|
|
@@ -5176,18 +5422,24 @@ var useChangeStatus = () => {
|
|
|
5176
5422
|
});
|
|
5177
5423
|
};
|
|
5178
5424
|
var use_change_status_default = useChangeStatus;
|
|
5425
|
+
|
|
5426
|
+
// src/hooks/form/use-delete-comment.ts
|
|
5427
|
+
import { useMutation as useMutation25 } from "@tanstack/react-query";
|
|
5179
5428
|
var useDeleteComment = () => {
|
|
5180
5429
|
const { deleteComment } = useFormService();
|
|
5181
|
-
return
|
|
5430
|
+
return useMutation25({
|
|
5182
5431
|
mutationFn: ({ data }) => deleteComment({
|
|
5183
5432
|
data
|
|
5184
5433
|
})
|
|
5185
5434
|
});
|
|
5186
5435
|
};
|
|
5187
5436
|
var use_delete_comment_default = useDeleteComment;
|
|
5437
|
+
|
|
5438
|
+
// src/hooks/form/use-get-comment.ts
|
|
5439
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
5188
5440
|
var useGetComment = ({ data, queryKey }) => {
|
|
5189
5441
|
const { getComment } = useFormService();
|
|
5190
|
-
return
|
|
5442
|
+
return useQuery3({
|
|
5191
5443
|
queryKey,
|
|
5192
5444
|
queryFn: () => getComment({ data }).then((res) => {
|
|
5193
5445
|
if (res) {
|
|
@@ -5199,13 +5451,16 @@ var useGetComment = ({ data, queryKey }) => {
|
|
|
5199
5451
|
});
|
|
5200
5452
|
};
|
|
5201
5453
|
var use_get_comment_default = useGetComment;
|
|
5454
|
+
|
|
5455
|
+
// src/hooks/form/use-get-form-view.ts
|
|
5456
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
5202
5457
|
var useGetFormView = ({
|
|
5203
5458
|
data,
|
|
5204
5459
|
queryKey,
|
|
5205
5460
|
enabled
|
|
5206
5461
|
}) => {
|
|
5207
5462
|
const { getFormView } = useFormService();
|
|
5208
|
-
return
|
|
5463
|
+
return useQuery4({
|
|
5209
5464
|
queryKey,
|
|
5210
5465
|
queryFn: () => getFormView({ data }).then((res) => {
|
|
5211
5466
|
if (res) {
|
|
@@ -5217,36 +5472,24 @@ var useGetFormView = ({
|
|
|
5217
5472
|
});
|
|
5218
5473
|
};
|
|
5219
5474
|
var use_get_form_view_default = useGetFormView;
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
src
|
|
5224
|
-
}) => {
|
|
5225
|
-
const { getImage } = useFormService();
|
|
5226
|
-
return useQuery({
|
|
5227
|
-
queryKey,
|
|
5228
|
-
queryFn: () => getImage({ data }).then((res) => {
|
|
5229
|
-
if (res) {
|
|
5230
|
-
return res;
|
|
5231
|
-
}
|
|
5232
|
-
}),
|
|
5233
|
-
enabled: !src && !isBase64File(src),
|
|
5234
|
-
refetchOnWindowFocus: false
|
|
5235
|
-
});
|
|
5236
|
-
};
|
|
5237
|
-
var use_get_image_default = useGetImage;
|
|
5475
|
+
|
|
5476
|
+
// src/hooks/form/use-send-comment.ts
|
|
5477
|
+
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
5238
5478
|
var useSendComment = () => {
|
|
5239
5479
|
const { sentComment } = useFormService();
|
|
5240
|
-
return
|
|
5480
|
+
return useMutation26({
|
|
5241
5481
|
mutationFn: ({ data }) => sentComment({
|
|
5242
5482
|
data
|
|
5243
5483
|
})
|
|
5244
5484
|
});
|
|
5245
5485
|
};
|
|
5246
5486
|
var use_send_comment_default = useSendComment;
|
|
5487
|
+
|
|
5488
|
+
// src/hooks/form/use-upload-image.ts
|
|
5489
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
5247
5490
|
var useUploadImage = () => {
|
|
5248
5491
|
const { uploadImage } = useFormService();
|
|
5249
|
-
return
|
|
5492
|
+
return useMutation27({
|
|
5250
5493
|
mutationFn: ({
|
|
5251
5494
|
formData,
|
|
5252
5495
|
service,
|
|
@@ -5259,9 +5502,12 @@ var useUploadImage = () => {
|
|
|
5259
5502
|
});
|
|
5260
5503
|
};
|
|
5261
5504
|
var use_upload_image_default = useUploadImage;
|
|
5505
|
+
|
|
5506
|
+
// src/hooks/form/use-upload-file.ts
|
|
5507
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
5262
5508
|
var useUploadFile = () => {
|
|
5263
5509
|
const { uploadFile } = useFormService();
|
|
5264
|
-
return
|
|
5510
|
+
return useMutation28({
|
|
5265
5511
|
mutationFn: ({
|
|
5266
5512
|
formData,
|
|
5267
5513
|
service,
|
|
@@ -5276,6 +5522,9 @@ var useUploadFile = () => {
|
|
|
5276
5522
|
});
|
|
5277
5523
|
};
|
|
5278
5524
|
var use_upload_file_default = useUploadFile;
|
|
5525
|
+
|
|
5526
|
+
// src/hooks/form/use-get-thread-data.ts
|
|
5527
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
5279
5528
|
var useGetThreadData = ({
|
|
5280
5529
|
data,
|
|
5281
5530
|
queryKey,
|
|
@@ -5284,7 +5533,7 @@ var useGetThreadData = ({
|
|
|
5284
5533
|
xNode
|
|
5285
5534
|
}) => {
|
|
5286
5535
|
const { getThreadData } = useFormService();
|
|
5287
|
-
return
|
|
5536
|
+
return useQuery5({
|
|
5288
5537
|
queryKey,
|
|
5289
5538
|
queryFn: () => getThreadData({ data, service, xNode }).then((res) => {
|
|
5290
5539
|
if (res) {
|
|
@@ -5296,6 +5545,9 @@ var useGetThreadData = ({
|
|
|
5296
5545
|
});
|
|
5297
5546
|
};
|
|
5298
5547
|
var use_get_thread_data_default = useGetThreadData;
|
|
5548
|
+
|
|
5549
|
+
// src/hooks/form/use-get-thread-messages.ts
|
|
5550
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
5299
5551
|
var useGetThreadMessages = ({
|
|
5300
5552
|
data,
|
|
5301
5553
|
queryKey,
|
|
@@ -5304,7 +5556,7 @@ var useGetThreadMessages = ({
|
|
|
5304
5556
|
xNode
|
|
5305
5557
|
}) => {
|
|
5306
5558
|
const { getThreadMessages } = useFormService();
|
|
5307
|
-
return
|
|
5559
|
+
return useQuery6({
|
|
5308
5560
|
queryKey,
|
|
5309
5561
|
queryFn: () => getThreadMessages({ data, service, xNode }).then((res) => {
|
|
5310
5562
|
if (res) {
|
|
@@ -5316,6 +5568,9 @@ var useGetThreadMessages = ({
|
|
|
5316
5568
|
});
|
|
5317
5569
|
};
|
|
5318
5570
|
var use_get_thread_messages_default = useGetThreadMessages;
|
|
5571
|
+
|
|
5572
|
+
// src/hooks/form/use-get-external-tabs.ts
|
|
5573
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
5319
5574
|
var useGetExternalTabs = ({
|
|
5320
5575
|
data,
|
|
5321
5576
|
queryKey,
|
|
@@ -5324,7 +5579,7 @@ var useGetExternalTabs = ({
|
|
|
5324
5579
|
xNode
|
|
5325
5580
|
}) => {
|
|
5326
5581
|
const { getExternalTab } = useFormService();
|
|
5327
|
-
return
|
|
5582
|
+
return useQuery7({
|
|
5328
5583
|
queryKey,
|
|
5329
5584
|
queryFn: () => getExternalTab({
|
|
5330
5585
|
method: data?.method,
|
|
@@ -5341,16 +5596,22 @@ var useGetExternalTabs = ({
|
|
|
5341
5596
|
});
|
|
5342
5597
|
};
|
|
5343
5598
|
var use_get_external_tabs_default = useGetExternalTabs;
|
|
5599
|
+
|
|
5600
|
+
// src/hooks/model/use-delete.ts
|
|
5601
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
5344
5602
|
var useDelete = () => {
|
|
5345
5603
|
const { deleteApi } = useModelService();
|
|
5346
|
-
return
|
|
5604
|
+
return useMutation29({
|
|
5347
5605
|
mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
|
|
5348
5606
|
});
|
|
5349
5607
|
};
|
|
5350
5608
|
var use_delete_default = useDelete;
|
|
5609
|
+
|
|
5610
|
+
// src/hooks/model/use-get-all.ts
|
|
5611
|
+
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
5351
5612
|
var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
5352
5613
|
const { getAll } = useModelService();
|
|
5353
|
-
return
|
|
5614
|
+
return useQuery8({
|
|
5354
5615
|
queryKey,
|
|
5355
5616
|
queryFn: () => getAll({ data }).then((res) => {
|
|
5356
5617
|
if (res) {
|
|
@@ -5362,9 +5623,12 @@ var useGetAll = ({ data, queryKey, viewResponse }) => {
|
|
|
5362
5623
|
});
|
|
5363
5624
|
};
|
|
5364
5625
|
var use_get_all_default = useGetAll;
|
|
5626
|
+
|
|
5627
|
+
// src/hooks/model/use-get-conversion-rate.ts
|
|
5628
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
5365
5629
|
var useGetConversionRate = () => {
|
|
5366
5630
|
const { getConversionRate } = useModelService();
|
|
5367
|
-
return
|
|
5631
|
+
return useQuery9({
|
|
5368
5632
|
queryKey: ["currency-rate"],
|
|
5369
5633
|
queryFn: () => getConversionRate().then((res) => {
|
|
5370
5634
|
if (res) {
|
|
@@ -5375,9 +5639,12 @@ var useGetConversionRate = () => {
|
|
|
5375
5639
|
});
|
|
5376
5640
|
};
|
|
5377
5641
|
var use_get_conversion_rate_default = useGetConversionRate;
|
|
5642
|
+
|
|
5643
|
+
// src/hooks/model/use-get-currency.ts
|
|
5644
|
+
import { useQuery as useQuery10 } from "@tanstack/react-query";
|
|
5378
5645
|
var useGetCurrency = () => {
|
|
5379
5646
|
const { getCurrency } = useModelService();
|
|
5380
|
-
return
|
|
5647
|
+
return useQuery10({
|
|
5381
5648
|
queryKey: ["currency"],
|
|
5382
5649
|
queryFn: () => getCurrency().then((res) => {
|
|
5383
5650
|
if (res) {
|
|
@@ -5388,9 +5655,12 @@ var useGetCurrency = () => {
|
|
|
5388
5655
|
});
|
|
5389
5656
|
};
|
|
5390
5657
|
var use_get_currency_default = useGetCurrency;
|
|
5658
|
+
|
|
5659
|
+
// src/hooks/model/use-get-detail.ts
|
|
5660
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
5391
5661
|
var useGetDetail = () => {
|
|
5392
5662
|
const { getDetail } = useModelService();
|
|
5393
|
-
return
|
|
5663
|
+
return useMutation30({
|
|
5394
5664
|
mutationFn: ({
|
|
5395
5665
|
model,
|
|
5396
5666
|
ids,
|
|
@@ -5409,6 +5679,9 @@ var useGetDetail = () => {
|
|
|
5409
5679
|
});
|
|
5410
5680
|
};
|
|
5411
5681
|
var use_get_detail_default = useGetDetail;
|
|
5682
|
+
|
|
5683
|
+
// src/hooks/model/use-get-field-onchange.ts
|
|
5684
|
+
import { useQuery as useQuery11 } from "@tanstack/react-query";
|
|
5412
5685
|
var useGetFieldOnChange = ({
|
|
5413
5686
|
model,
|
|
5414
5687
|
service,
|
|
@@ -5416,7 +5689,7 @@ var useGetFieldOnChange = ({
|
|
|
5416
5689
|
enabled
|
|
5417
5690
|
}) => {
|
|
5418
5691
|
const { getListFieldsOnchange } = useModelService();
|
|
5419
|
-
return
|
|
5692
|
+
return useQuery11({
|
|
5420
5693
|
queryKey: [`field-onchange-${model}`, model],
|
|
5421
5694
|
queryFn: () => getListFieldsOnchange({
|
|
5422
5695
|
model,
|
|
@@ -5433,13 +5706,16 @@ var useGetFieldOnChange = ({
|
|
|
5433
5706
|
});
|
|
5434
5707
|
};
|
|
5435
5708
|
var use_get_field_onchange_default = useGetFieldOnChange;
|
|
5709
|
+
|
|
5710
|
+
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
5711
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
5436
5712
|
var useGetListMyBankAccount = ({
|
|
5437
5713
|
domain,
|
|
5438
5714
|
spectification,
|
|
5439
5715
|
model
|
|
5440
5716
|
}) => {
|
|
5441
5717
|
const { getListMyBankAccount } = useModelService();
|
|
5442
|
-
return
|
|
5718
|
+
return useQuery12({
|
|
5443
5719
|
queryKey: ["bank-account", model, domain],
|
|
5444
5720
|
queryFn: () => getListMyBankAccount({
|
|
5445
5721
|
domain,
|
|
@@ -5454,8 +5730,11 @@ var useGetListMyBankAccount = ({
|
|
|
5454
5730
|
});
|
|
5455
5731
|
};
|
|
5456
5732
|
var use_get_list_my_bank_account_default = useGetListMyBankAccount;
|
|
5733
|
+
|
|
5734
|
+
// src/hooks/model/use-model.ts
|
|
5735
|
+
import { useCallback as useCallback83 } from "react";
|
|
5457
5736
|
var useModel = () => {
|
|
5458
|
-
const initModel =
|
|
5737
|
+
const initModel = useCallback83((modelData) => {
|
|
5459
5738
|
switch (modelData?.name) {
|
|
5460
5739
|
default:
|
|
5461
5740
|
return new BaseModel(modelData);
|
|
@@ -5476,9 +5755,12 @@ var useOdooDataTransform = () => {
|
|
|
5476
5755
|
};
|
|
5477
5756
|
};
|
|
5478
5757
|
var use_odoo_data_transform_default = useOdooDataTransform;
|
|
5758
|
+
|
|
5759
|
+
// src/hooks/model/use-onchange-form.ts
|
|
5760
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
5479
5761
|
var useOnChangeForm = () => {
|
|
5480
5762
|
const { onChange } = useModelService();
|
|
5481
|
-
return
|
|
5763
|
+
return useMutation31({
|
|
5482
5764
|
mutationFn: ({
|
|
5483
5765
|
ids,
|
|
5484
5766
|
model,
|
|
@@ -5501,9 +5783,12 @@ var useOnChangeForm = () => {
|
|
|
5501
5783
|
});
|
|
5502
5784
|
};
|
|
5503
5785
|
var use_onchange_form_default = useOnChangeForm;
|
|
5786
|
+
|
|
5787
|
+
// src/hooks/model/use-save.ts
|
|
5788
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
5504
5789
|
var useSave = () => {
|
|
5505
5790
|
const { save } = useModelService();
|
|
5506
|
-
return
|
|
5791
|
+
return useMutation32({
|
|
5507
5792
|
mutationFn: ({
|
|
5508
5793
|
ids,
|
|
5509
5794
|
model,
|
|
@@ -5517,16 +5802,22 @@ var useSave = () => {
|
|
|
5517
5802
|
});
|
|
5518
5803
|
};
|
|
5519
5804
|
var use_save_default = useSave;
|
|
5805
|
+
|
|
5806
|
+
// src/hooks/user/use-get-profile.ts
|
|
5807
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
5520
5808
|
var useGetProfile = (service, path, extraHeaders) => {
|
|
5521
5809
|
const { getProfile } = useUserService();
|
|
5522
|
-
return
|
|
5810
|
+
return useMutation33({
|
|
5523
5811
|
mutationFn: () => getProfile(service, path, extraHeaders)
|
|
5524
5812
|
});
|
|
5525
5813
|
};
|
|
5526
5814
|
var use_get_profile_default = useGetProfile;
|
|
5815
|
+
|
|
5816
|
+
// src/hooks/user/use-get-user.ts
|
|
5817
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
5527
5818
|
var useGetUser = () => {
|
|
5528
5819
|
const { getUser } = useUserService();
|
|
5529
|
-
return
|
|
5820
|
+
return useMutation34({
|
|
5530
5821
|
mutationFn: ({ id, context }) => getUser({
|
|
5531
5822
|
id,
|
|
5532
5823
|
context
|
|
@@ -5534,9 +5825,12 @@ var useGetUser = () => {
|
|
|
5534
5825
|
});
|
|
5535
5826
|
};
|
|
5536
5827
|
var use_get_user_default = useGetUser;
|
|
5828
|
+
|
|
5829
|
+
// src/hooks/user/use-switch-locale.ts
|
|
5830
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
5537
5831
|
var useSwitchLocale = () => {
|
|
5538
5832
|
const { switchUserLocale } = useUserService();
|
|
5539
|
-
return
|
|
5833
|
+
return useMutation35({
|
|
5540
5834
|
mutationFn: ({
|
|
5541
5835
|
data,
|
|
5542
5836
|
service
|
|
@@ -5550,9 +5844,12 @@ var useSwitchLocale = () => {
|
|
|
5550
5844
|
});
|
|
5551
5845
|
};
|
|
5552
5846
|
var use_switch_locale_default = useSwitchLocale;
|
|
5847
|
+
|
|
5848
|
+
// src/hooks/view/use-button.ts
|
|
5849
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
5553
5850
|
var useButton = () => {
|
|
5554
5851
|
const { callButton } = useActionService();
|
|
5555
|
-
return
|
|
5852
|
+
return useMutation36({
|
|
5556
5853
|
mutationFn: ({
|
|
5557
5854
|
model,
|
|
5558
5855
|
ids,
|
|
@@ -5574,9 +5871,12 @@ var useButton = () => {
|
|
|
5574
5871
|
});
|
|
5575
5872
|
};
|
|
5576
5873
|
var use_button_default = useButton;
|
|
5874
|
+
|
|
5875
|
+
// src/hooks/view/use-duplicate-record.ts
|
|
5876
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
5577
5877
|
var useDuplicateRecord = () => {
|
|
5578
5878
|
const { duplicateRecord } = useActionService();
|
|
5579
|
-
return
|
|
5879
|
+
return useMutation37({
|
|
5580
5880
|
mutationFn: ({
|
|
5581
5881
|
id,
|
|
5582
5882
|
model,
|
|
@@ -5593,6 +5893,9 @@ var useDuplicateRecord = () => {
|
|
|
5593
5893
|
});
|
|
5594
5894
|
};
|
|
5595
5895
|
var use_duplicate_record_default = useDuplicateRecord;
|
|
5896
|
+
|
|
5897
|
+
// src/hooks/view/use-get-action-detail.ts
|
|
5898
|
+
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
5596
5899
|
var useGetActionDetail = ({
|
|
5597
5900
|
aid,
|
|
5598
5901
|
context,
|
|
@@ -5602,7 +5905,12 @@ var useGetActionDetail = ({
|
|
|
5602
5905
|
queryKey
|
|
5603
5906
|
}) => {
|
|
5604
5907
|
const { getActionDetail } = useViewService();
|
|
5605
|
-
|
|
5908
|
+
const data = {
|
|
5909
|
+
id,
|
|
5910
|
+
model: model ?? "",
|
|
5911
|
+
context
|
|
5912
|
+
};
|
|
5913
|
+
return useQuery13({
|
|
5606
5914
|
queryKey,
|
|
5607
5915
|
queryFn: async () => {
|
|
5608
5916
|
if (aid) {
|
|
@@ -5618,9 +5926,12 @@ var useGetActionDetail = ({
|
|
|
5618
5926
|
});
|
|
5619
5927
|
};
|
|
5620
5928
|
var use_get_action_detail_default = useGetActionDetail;
|
|
5929
|
+
|
|
5930
|
+
// src/hooks/view/use-get-calendar.ts
|
|
5931
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
5621
5932
|
var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
5622
5933
|
const { getListCalendar } = useModelService();
|
|
5623
|
-
return
|
|
5934
|
+
return useQuery14({
|
|
5624
5935
|
queryKey,
|
|
5625
5936
|
queryFn: () => getListCalendar({ data: listDataProps }).then((res) => {
|
|
5626
5937
|
if (res) {
|
|
@@ -5634,12 +5945,15 @@ var useGetCalendar = (listDataProps, queryKey, enabled) => {
|
|
|
5634
5945
|
});
|
|
5635
5946
|
};
|
|
5636
5947
|
var use_get_calendar_default = useGetCalendar;
|
|
5948
|
+
|
|
5949
|
+
// src/hooks/view/use-get-groups.ts
|
|
5950
|
+
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
5637
5951
|
var useGetGroups = ({
|
|
5638
5952
|
model,
|
|
5639
5953
|
width_context
|
|
5640
5954
|
}) => {
|
|
5641
5955
|
const { getGroups } = useKanbanService();
|
|
5642
|
-
return
|
|
5956
|
+
return useQuery15({
|
|
5643
5957
|
queryKey: [model, width_context],
|
|
5644
5958
|
queryFn: () => getGroups({
|
|
5645
5959
|
model,
|
|
@@ -5654,9 +5968,12 @@ var useGetGroups = ({
|
|
|
5654
5968
|
});
|
|
5655
5969
|
};
|
|
5656
5970
|
var use_get_groups_default = useGetGroups;
|
|
5971
|
+
|
|
5972
|
+
// src/hooks/view/use-get-list-data.ts
|
|
5973
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
5657
5974
|
var useGetListData = (listDataProps, queryKey, enabled, service, xNode, searchParams) => {
|
|
5658
5975
|
const { getAll } = useModelService();
|
|
5659
|
-
return
|
|
5976
|
+
return useQuery16({
|
|
5660
5977
|
queryKey,
|
|
5661
5978
|
queryFn: () => getAll({
|
|
5662
5979
|
data: listDataProps,
|
|
@@ -5675,9 +5992,12 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode, searchPa
|
|
|
5675
5992
|
});
|
|
5676
5993
|
};
|
|
5677
5994
|
var use_get_list_data_default = useGetListData;
|
|
5995
|
+
|
|
5996
|
+
// src/hooks/view/use-get-menu.ts
|
|
5997
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
5678
5998
|
var useGetMenu = (context, specification, enabled, domain, service) => {
|
|
5679
5999
|
const { getMenu } = useViewService();
|
|
5680
|
-
return
|
|
6000
|
+
return useQuery17({
|
|
5681
6001
|
queryKey: ["menus" /* MENU */, context],
|
|
5682
6002
|
queryFn: () => getMenu(context, specification, domain, service).then((res) => {
|
|
5683
6003
|
if (res && res?.records && res?.records?.length > 0) {
|
|
@@ -5691,15 +6011,21 @@ var useGetMenu = (context, specification, enabled, domain, service) => {
|
|
|
5691
6011
|
});
|
|
5692
6012
|
};
|
|
5693
6013
|
var use_get_menu_default = useGetMenu;
|
|
6014
|
+
|
|
6015
|
+
// src/hooks/view/use-get-print-report.ts
|
|
6016
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
5694
6017
|
var useGetPrintReport = () => {
|
|
5695
6018
|
const { getPrintReportName } = useActionService();
|
|
5696
|
-
return
|
|
6019
|
+
return useMutation38({
|
|
5697
6020
|
mutationFn: ({ id }) => getPrintReportName({
|
|
5698
6021
|
id
|
|
5699
6022
|
})
|
|
5700
6023
|
});
|
|
5701
6024
|
};
|
|
5702
6025
|
var use_get_print_report_default = useGetPrintReport;
|
|
6026
|
+
|
|
6027
|
+
// src/hooks/view/use-get-progress-bar.ts
|
|
6028
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
5703
6029
|
var useGetProGressBar = ({
|
|
5704
6030
|
field,
|
|
5705
6031
|
color,
|
|
@@ -5707,7 +6033,7 @@ var useGetProGressBar = ({
|
|
|
5707
6033
|
width_context
|
|
5708
6034
|
}) => {
|
|
5709
6035
|
const { getProgressBar } = useKanbanService();
|
|
5710
|
-
return
|
|
6036
|
+
return useQuery18({
|
|
5711
6037
|
queryKey: [],
|
|
5712
6038
|
queryFn: () => getProgressBar({
|
|
5713
6039
|
field,
|
|
@@ -5724,6 +6050,9 @@ var useGetProGressBar = ({
|
|
|
5724
6050
|
});
|
|
5725
6051
|
};
|
|
5726
6052
|
var use_get_progress_bar_default = useGetProGressBar;
|
|
6053
|
+
|
|
6054
|
+
// src/hooks/view/use-get-selection.ts
|
|
6055
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
5727
6056
|
var useGetSelection = ({
|
|
5728
6057
|
data,
|
|
5729
6058
|
queryKey,
|
|
@@ -5732,7 +6061,7 @@ var useGetSelection = ({
|
|
|
5732
6061
|
xNode
|
|
5733
6062
|
}) => {
|
|
5734
6063
|
const { getSelectionItem } = useViewService();
|
|
5735
|
-
return
|
|
6064
|
+
return useQuery19({
|
|
5736
6065
|
queryKey,
|
|
5737
6066
|
queryFn: () => getSelectionItem({ data, service, xNode }),
|
|
5738
6067
|
enabled,
|
|
@@ -5740,9 +6069,12 @@ var useGetSelection = ({
|
|
|
5740
6069
|
});
|
|
5741
6070
|
};
|
|
5742
6071
|
var use_get_selection_default = useGetSelection;
|
|
6072
|
+
|
|
6073
|
+
// src/hooks/view/use-get-view.ts
|
|
6074
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
5743
6075
|
var useGetView = ({ viewParams, enabled }) => {
|
|
5744
6076
|
const { getView } = useViewService();
|
|
5745
|
-
return
|
|
6077
|
+
return useQuery20({
|
|
5746
6078
|
queryKey: [
|
|
5747
6079
|
"get_view_by_action" /* GET_VIEW_BY_ACTION */,
|
|
5748
6080
|
viewParams?.model,
|
|
@@ -5757,9 +6089,12 @@ var useGetView = ({ viewParams, enabled }) => {
|
|
|
5757
6089
|
});
|
|
5758
6090
|
};
|
|
5759
6091
|
var use_get_view_default = useGetView;
|
|
6092
|
+
|
|
6093
|
+
// src/hooks/view/use-load-action.ts
|
|
6094
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
5760
6095
|
var useLoadAction = () => {
|
|
5761
6096
|
const { loadAction } = useActionService();
|
|
5762
|
-
return
|
|
6097
|
+
return useMutation39({
|
|
5763
6098
|
mutationFn: ({
|
|
5764
6099
|
idAction,
|
|
5765
6100
|
context,
|
|
@@ -5778,18 +6113,24 @@ var useLoadAction = () => {
|
|
|
5778
6113
|
});
|
|
5779
6114
|
};
|
|
5780
6115
|
var use_load_action_default = useLoadAction;
|
|
6116
|
+
|
|
6117
|
+
// src/hooks/view/use-load-message.ts
|
|
6118
|
+
import { useQuery as useQuery21 } from "@tanstack/react-query";
|
|
5781
6119
|
var useLoadMessage = () => {
|
|
5782
6120
|
const { loadMessages } = useViewService();
|
|
5783
|
-
return
|
|
6121
|
+
return useQuery21({
|
|
5784
6122
|
queryKey: [`load-message-failure`],
|
|
5785
6123
|
queryFn: () => loadMessages(),
|
|
5786
6124
|
refetchOnWindowFocus: false
|
|
5787
6125
|
});
|
|
5788
6126
|
};
|
|
5789
6127
|
var use_load_message_default = useLoadMessage;
|
|
6128
|
+
|
|
6129
|
+
// src/hooks/view/use-print.ts
|
|
6130
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
5790
6131
|
var usePrint = () => {
|
|
5791
6132
|
const { print } = useActionService();
|
|
5792
|
-
return
|
|
6133
|
+
return useMutation40({
|
|
5793
6134
|
mutationFn: ({ id, report, db }) => print({
|
|
5794
6135
|
id,
|
|
5795
6136
|
report,
|
|
@@ -5798,9 +6139,12 @@ var usePrint = () => {
|
|
|
5798
6139
|
});
|
|
5799
6140
|
};
|
|
5800
6141
|
var use_print_default = usePrint;
|
|
6142
|
+
|
|
6143
|
+
// src/hooks/view/use-remove-row.ts
|
|
6144
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
5801
6145
|
var useRemoveRow = () => {
|
|
5802
6146
|
const { removeRows } = useActionService();
|
|
5803
|
-
return
|
|
6147
|
+
return useMutation41({
|
|
5804
6148
|
mutationFn: ({
|
|
5805
6149
|
model,
|
|
5806
6150
|
ids,
|
|
@@ -5817,9 +6161,12 @@ var useRemoveRow = () => {
|
|
|
5817
6161
|
});
|
|
5818
6162
|
};
|
|
5819
6163
|
var use_remove_row_default = useRemoveRow;
|
|
6164
|
+
|
|
6165
|
+
// src/hooks/view/use-resequence.ts
|
|
6166
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
5820
6167
|
var useGetResequence = () => {
|
|
5821
6168
|
const { getResequence } = useViewService();
|
|
5822
|
-
return
|
|
6169
|
+
return useMutation42({
|
|
5823
6170
|
mutationFn: ({
|
|
5824
6171
|
model,
|
|
5825
6172
|
resIds,
|
|
@@ -5838,9 +6185,12 @@ var useGetResequence = () => {
|
|
|
5838
6185
|
});
|
|
5839
6186
|
};
|
|
5840
6187
|
var use_resequence_default = useGetResequence;
|
|
6188
|
+
|
|
6189
|
+
// src/hooks/view/use-run-action.ts
|
|
6190
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
5841
6191
|
var useRunAction = () => {
|
|
5842
6192
|
const { runAction } = useActionService();
|
|
5843
|
-
return
|
|
6193
|
+
return useMutation43({
|
|
5844
6194
|
mutationFn: ({
|
|
5845
6195
|
idAction,
|
|
5846
6196
|
context,
|
|
@@ -5857,9 +6207,12 @@ var useRunAction = () => {
|
|
|
5857
6207
|
});
|
|
5858
6208
|
};
|
|
5859
6209
|
var use_run_action_default = useRunAction;
|
|
6210
|
+
|
|
6211
|
+
// src/hooks/view/use-signin-sso.ts
|
|
6212
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
5860
6213
|
var useSignInSSO = () => {
|
|
5861
6214
|
const { signInSSO } = useViewService();
|
|
5862
|
-
return
|
|
6215
|
+
return useMutation44({
|
|
5863
6216
|
mutationFn: ({
|
|
5864
6217
|
redirect_uri,
|
|
5865
6218
|
state,
|
|
@@ -5880,9 +6233,12 @@ var useSignInSSO = () => {
|
|
|
5880
6233
|
});
|
|
5881
6234
|
};
|
|
5882
6235
|
var use_signin_sso_default = useSignInSSO;
|
|
6236
|
+
|
|
6237
|
+
// src/hooks/view/use-verify-2FA.ts
|
|
6238
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
5883
6239
|
var useVerify2FA = () => {
|
|
5884
6240
|
const { verify2FA } = useViewService();
|
|
5885
|
-
return
|
|
6241
|
+
return useMutation45({
|
|
5886
6242
|
mutationFn: ({
|
|
5887
6243
|
method,
|
|
5888
6244
|
with_context,
|
|
@@ -5901,9 +6257,12 @@ var useVerify2FA = () => {
|
|
|
5901
6257
|
});
|
|
5902
6258
|
};
|
|
5903
6259
|
var use_verify_2FA_default = useVerify2FA;
|
|
6260
|
+
|
|
6261
|
+
// src/hooks/view/uset-get-2FA-method.ts
|
|
6262
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
5904
6263
|
var useGet2FAMethods = () => {
|
|
5905
6264
|
const { get2FAMethods } = useViewService();
|
|
5906
|
-
return
|
|
6265
|
+
return useMutation46({
|
|
5907
6266
|
mutationFn: ({
|
|
5908
6267
|
method,
|
|
5909
6268
|
with_context
|
|
@@ -5916,9 +6275,12 @@ var useGet2FAMethods = () => {
|
|
|
5916
6275
|
});
|
|
5917
6276
|
};
|
|
5918
6277
|
var uset_get_2FA_method_default = useGet2FAMethods;
|
|
6278
|
+
|
|
6279
|
+
// src/hooks/view/use-grant-access.ts
|
|
6280
|
+
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
5919
6281
|
var useGrantAccess = () => {
|
|
5920
6282
|
const { grantAccess } = useViewService();
|
|
5921
|
-
return
|
|
6283
|
+
return useMutation47({
|
|
5922
6284
|
mutationFn: ({
|
|
5923
6285
|
redirect_uri,
|
|
5924
6286
|
state,
|
|
@@ -5935,9 +6297,12 @@ var useGrantAccess = () => {
|
|
|
5935
6297
|
});
|
|
5936
6298
|
};
|
|
5937
6299
|
var use_grant_access_default = useGrantAccess;
|
|
6300
|
+
|
|
6301
|
+
// src/hooks/view/use-remove-totp-setup.ts
|
|
6302
|
+
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
5938
6303
|
var useRemoveTotpSetup = () => {
|
|
5939
6304
|
const { removeTotpSetUp } = useViewService();
|
|
5940
|
-
return
|
|
6305
|
+
return useMutation48({
|
|
5941
6306
|
mutationFn: ({ method, token }) => {
|
|
5942
6307
|
return removeTotpSetUp({
|
|
5943
6308
|
method,
|
|
@@ -5947,9 +6312,12 @@ var useRemoveTotpSetup = () => {
|
|
|
5947
6312
|
});
|
|
5948
6313
|
};
|
|
5949
6314
|
var use_remove_totp_setup_default = useRemoveTotpSetup;
|
|
6315
|
+
|
|
6316
|
+
// src/hooks/view/use-request-setup-totp.ts
|
|
6317
|
+
import { useMutation as useMutation49 } from "@tanstack/react-query";
|
|
5950
6318
|
var useRequestSetupTotp = () => {
|
|
5951
6319
|
const { requestSetupTotp } = useViewService();
|
|
5952
|
-
return
|
|
6320
|
+
return useMutation49({
|
|
5953
6321
|
mutationFn: ({ method, token }) => {
|
|
5954
6322
|
return requestSetupTotp({
|
|
5955
6323
|
method,
|
|
@@ -5959,9 +6327,12 @@ var useRequestSetupTotp = () => {
|
|
|
5959
6327
|
});
|
|
5960
6328
|
};
|
|
5961
6329
|
var use_request_setup_totp_default = useRequestSetupTotp;
|
|
6330
|
+
|
|
6331
|
+
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
6332
|
+
import { useMutation as useMutation50 } from "@tanstack/react-query";
|
|
5962
6333
|
var useSettingsWebRead2fa = () => {
|
|
5963
6334
|
const { settingsWebRead2fa } = useViewService();
|
|
5964
|
-
return
|
|
6335
|
+
return useMutation50({
|
|
5965
6336
|
mutationFn: ({
|
|
5966
6337
|
method,
|
|
5967
6338
|
token,
|
|
@@ -5978,9 +6349,12 @@ var useSettingsWebRead2fa = () => {
|
|
|
5978
6349
|
});
|
|
5979
6350
|
};
|
|
5980
6351
|
var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
|
|
6352
|
+
|
|
6353
|
+
// src/hooks/view/use-verify-totp.ts
|
|
6354
|
+
import { useMutation as useMutation51 } from "@tanstack/react-query";
|
|
5981
6355
|
var useVerifyTotp = () => {
|
|
5982
6356
|
const { verifyTotp } = useViewService();
|
|
5983
|
-
return
|
|
6357
|
+
return useMutation51({
|
|
5984
6358
|
mutationFn: ({
|
|
5985
6359
|
method,
|
|
5986
6360
|
action_token,
|
|
@@ -5995,9 +6369,12 @@ var useVerifyTotp = () => {
|
|
|
5995
6369
|
});
|
|
5996
6370
|
};
|
|
5997
6371
|
var use_verify_totp_default = useVerifyTotp;
|
|
6372
|
+
|
|
6373
|
+
// src/hooks/view/use-gen-serial-number.ts
|
|
6374
|
+
import { useMutation as useMutation52 } from "@tanstack/react-query";
|
|
5998
6375
|
var useGenSerialNumber = () => {
|
|
5999
6376
|
const { generateSerialNumber } = useActionService();
|
|
6000
|
-
return
|
|
6377
|
+
return useMutation52({
|
|
6001
6378
|
mutationFn: ({
|
|
6002
6379
|
kwargs,
|
|
6003
6380
|
context,
|
|
@@ -6014,6 +6391,9 @@ var useGenSerialNumber = () => {
|
|
|
6014
6391
|
});
|
|
6015
6392
|
};
|
|
6016
6393
|
var use_gen_serial_number_default = useGenSerialNumber;
|
|
6394
|
+
|
|
6395
|
+
// src/hooks/view/use-get-notifications.ts
|
|
6396
|
+
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
6017
6397
|
var useGetNotifications = ({
|
|
6018
6398
|
service,
|
|
6019
6399
|
xNode,
|
|
@@ -6022,7 +6402,7 @@ var useGetNotifications = ({
|
|
|
6022
6402
|
enabled
|
|
6023
6403
|
}) => {
|
|
6024
6404
|
const { getNotifications } = useViewService();
|
|
6025
|
-
return
|
|
6405
|
+
return useQuery22({
|
|
6026
6406
|
queryKey,
|
|
6027
6407
|
queryFn: () => getNotifications({ body, service, xNode }).then((res) => {
|
|
6028
6408
|
return res;
|
|
@@ -6032,20 +6412,26 @@ var useGetNotifications = ({
|
|
|
6032
6412
|
});
|
|
6033
6413
|
};
|
|
6034
6414
|
var use_get_notifications_default = useGetNotifications;
|
|
6415
|
+
|
|
6416
|
+
// src/hooks/view/use-get-version.ts
|
|
6417
|
+
import { useMutation as useMutation53 } from "@tanstack/react-query";
|
|
6035
6418
|
var useGetVersion = () => {
|
|
6036
6419
|
const { getVersion } = useViewService();
|
|
6037
|
-
return
|
|
6420
|
+
return useMutation53({
|
|
6038
6421
|
mutationFn: () => {
|
|
6039
6422
|
return getVersion();
|
|
6040
6423
|
}
|
|
6041
6424
|
});
|
|
6042
6425
|
};
|
|
6043
6426
|
var use_get_version_default = useGetVersion;
|
|
6427
|
+
|
|
6428
|
+
// src/hooks/view/use-get-ward.ts
|
|
6429
|
+
import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
6044
6430
|
var useGetWard = () => {
|
|
6045
6431
|
const { getWard } = useViewService();
|
|
6046
6432
|
const pos = usePosService();
|
|
6047
6433
|
const { env } = useEnv();
|
|
6048
|
-
return
|
|
6434
|
+
return useMutation54({
|
|
6049
6435
|
mutationFn: env.isSupaMode ? pos.getWardsSupabase : ({
|
|
6050
6436
|
service,
|
|
6051
6437
|
xNode,
|
|
@@ -6060,11 +6446,14 @@ var useGetWard = () => {
|
|
|
6060
6446
|
});
|
|
6061
6447
|
};
|
|
6062
6448
|
var use_get_ward_default = useGetWard;
|
|
6449
|
+
|
|
6450
|
+
// src/hooks/view/use-get-city.ts
|
|
6451
|
+
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
6063
6452
|
var useGetCity = () => {
|
|
6064
6453
|
const { getCity } = useViewService();
|
|
6065
6454
|
const pos = usePosService();
|
|
6066
6455
|
const { env } = useEnv();
|
|
6067
|
-
return
|
|
6456
|
+
return useMutation55({
|
|
6068
6457
|
mutationFn: env.isSupaMode ? pos.getStatesSupabase : ({
|
|
6069
6458
|
service,
|
|
6070
6459
|
xNode,
|
|
@@ -6081,9 +6470,12 @@ var useGetCity = () => {
|
|
|
6081
6470
|
});
|
|
6082
6471
|
};
|
|
6083
6472
|
var use_get_city_default = useGetCity;
|
|
6473
|
+
|
|
6474
|
+
// src/hooks/view/use-get-country.ts
|
|
6475
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
6084
6476
|
var useGetCountry = () => {
|
|
6085
6477
|
const { getCountry } = useViewService();
|
|
6086
|
-
return
|
|
6478
|
+
return useMutation56({
|
|
6087
6479
|
mutationFn: ({
|
|
6088
6480
|
service,
|
|
6089
6481
|
xNode,
|
|
@@ -6100,11 +6492,14 @@ var useGetCountry = () => {
|
|
|
6100
6492
|
});
|
|
6101
6493
|
};
|
|
6102
6494
|
var use_get_country_default = useGetCountry;
|
|
6495
|
+
|
|
6496
|
+
// src/hooks/view/use-get-partner-title.ts
|
|
6497
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
6103
6498
|
var useGetPartnerTitle = () => {
|
|
6104
6499
|
const { getPartnerTitle } = useViewService();
|
|
6105
6500
|
const pos = usePosService();
|
|
6106
6501
|
const { env } = useEnv();
|
|
6107
|
-
return
|
|
6502
|
+
return useMutation57({
|
|
6108
6503
|
mutationFn: env.isSupaMode ? pos.getPartnerTitlesSupabase : ({
|
|
6109
6504
|
service,
|
|
6110
6505
|
xNode,
|
|
@@ -6121,53 +6516,22 @@ var useGetPartnerTitle = () => {
|
|
|
6121
6516
|
});
|
|
6122
6517
|
};
|
|
6123
6518
|
var use_get_partner_title_default = useGetPartnerTitle;
|
|
6519
|
+
|
|
6520
|
+
// src/hooks/view/use-action-server-home.ts
|
|
6521
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
6124
6522
|
var useActionServerHome = () => {
|
|
6125
6523
|
const { actionServerHome } = useActionService();
|
|
6126
|
-
return
|
|
6524
|
+
return useMutation58({
|
|
6127
6525
|
mutationFn: () => actionServerHome()
|
|
6128
6526
|
});
|
|
6129
6527
|
};
|
|
6130
6528
|
var use_action_server_home_default = useActionServerHome;
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
mutationFn: ({ model, method }) => actionOpenHome({
|
|
6135
|
-
model,
|
|
6136
|
-
method
|
|
6137
|
-
})
|
|
6138
|
-
});
|
|
6139
|
-
};
|
|
6140
|
-
var use_action_open_home_default = useActionOpenHome;
|
|
6141
|
-
var useGetPoints = ({ path }) => {
|
|
6142
|
-
const { getPoints } = useViewService();
|
|
6143
|
-
return useMutation({
|
|
6144
|
-
mutationFn: () => getPoints(path)
|
|
6145
|
-
});
|
|
6146
|
-
};
|
|
6147
|
-
var use_get_point_default = useGetPoints;
|
|
6148
|
-
var useGetOrders = ({
|
|
6149
|
-
kwargs,
|
|
6150
|
-
withContext
|
|
6151
|
-
}) => {
|
|
6152
|
-
const { getOrders } = useViewService();
|
|
6153
|
-
return useMutation({
|
|
6154
|
-
mutationFn: () => getOrders({
|
|
6155
|
-
kwargs,
|
|
6156
|
-
withContext
|
|
6157
|
-
})
|
|
6158
|
-
});
|
|
6159
|
-
};
|
|
6160
|
-
var use_get_order_default = useGetOrders;
|
|
6161
|
-
var useGetVouchers = () => {
|
|
6162
|
-
const { getVouchers } = useViewService();
|
|
6163
|
-
return useMutation({
|
|
6164
|
-
mutationFn: () => getVouchers()
|
|
6165
|
-
});
|
|
6166
|
-
};
|
|
6167
|
-
var use_get_voucher_default = useGetVouchers;
|
|
6529
|
+
|
|
6530
|
+
// src/hooks/chart/use-read-group.ts
|
|
6531
|
+
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
6168
6532
|
var useReadGroup = (services, xNode, body, enabled) => {
|
|
6169
6533
|
const { readGroup } = useDashboardService();
|
|
6170
|
-
return
|
|
6534
|
+
return useQuery23({
|
|
6171
6535
|
queryKey: [body],
|
|
6172
6536
|
queryFn: () => readGroup({
|
|
6173
6537
|
service: services,
|
|
@@ -6179,9 +6543,12 @@ var useReadGroup = (services, xNode, body, enabled) => {
|
|
|
6179
6543
|
});
|
|
6180
6544
|
};
|
|
6181
6545
|
var use_read_group_default = useReadGroup;
|
|
6546
|
+
|
|
6547
|
+
// src/hooks/chart/use-get-data-chart.ts
|
|
6548
|
+
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
6182
6549
|
var useGetDataChart = (services, xNode, body, enabled, path, method, queryKey) => {
|
|
6183
6550
|
const { getDataChart } = useDashboardService();
|
|
6184
|
-
return
|
|
6551
|
+
return useQuery24({
|
|
6185
6552
|
queryKey: [queryKey],
|
|
6186
6553
|
queryFn: () => getDataChart({
|
|
6187
6554
|
service: services,
|
|
@@ -6195,477 +6562,691 @@ var useGetDataChart = (services, xNode, body, enabled, path, method, queryKey) =
|
|
|
6195
6562
|
});
|
|
6196
6563
|
};
|
|
6197
6564
|
var use_get_data_chart_default = useGetDataChart;
|
|
6565
|
+
|
|
6566
|
+
// src/hooks/pos/use-add-entity.ts
|
|
6567
|
+
import { useMutation as useMutation59 } from "@tanstack/react-query";
|
|
6198
6568
|
var useAddEntity = () => {
|
|
6199
6569
|
const { addEntity } = usePosService();
|
|
6200
|
-
return
|
|
6570
|
+
return useMutation59({
|
|
6201
6571
|
mutationFn: addEntity
|
|
6202
6572
|
});
|
|
6203
6573
|
};
|
|
6204
6574
|
var use_add_entity_default = useAddEntity;
|
|
6575
|
+
|
|
6576
|
+
// src/hooks/pos/use-get-a-session.ts
|
|
6577
|
+
import { useMutation as useMutation60 } from "@tanstack/react-query";
|
|
6205
6578
|
var useGetASession = () => {
|
|
6206
6579
|
const pos = usePosService();
|
|
6207
|
-
return
|
|
6580
|
+
return useMutation60({
|
|
6208
6581
|
mutationFn: pos.getASession
|
|
6209
6582
|
});
|
|
6210
6583
|
};
|
|
6211
6584
|
var use_get_a_session_default = useGetASession;
|
|
6585
|
+
|
|
6586
|
+
// src/hooks/pos/use-change-order-preparation-state.ts
|
|
6587
|
+
import { useMutation as useMutation61 } from "@tanstack/react-query";
|
|
6212
6588
|
var useChangeOrderPreparationState = () => {
|
|
6213
6589
|
const pos = usePosService();
|
|
6214
|
-
return
|
|
6590
|
+
return useMutation61({
|
|
6215
6591
|
mutationFn: pos.changeOrderPreparationState
|
|
6216
6592
|
});
|
|
6217
6593
|
};
|
|
6218
6594
|
var use_change_order_preparation_state_default = useChangeOrderPreparationState;
|
|
6595
|
+
|
|
6596
|
+
// src/hooks/pos/use-check-payment.ts
|
|
6597
|
+
import { useMutation as useMutation62 } from "@tanstack/react-query";
|
|
6219
6598
|
var useCheckPayment = () => {
|
|
6220
6599
|
const pos = usePosService();
|
|
6221
|
-
return
|
|
6600
|
+
return useMutation62({
|
|
6222
6601
|
mutationFn: pos.checkPayment
|
|
6223
6602
|
});
|
|
6224
6603
|
};
|
|
6225
6604
|
var use_check_payment_default = useCheckPayment;
|
|
6605
|
+
|
|
6606
|
+
// src/hooks/pos/use-create-e-invoice.ts
|
|
6607
|
+
import { useMutation as useMutation63 } from "@tanstack/react-query";
|
|
6226
6608
|
var useCreateEInvoice = () => {
|
|
6227
6609
|
const pos = usePosService();
|
|
6228
|
-
return
|
|
6610
|
+
return useMutation63({
|
|
6229
6611
|
mutationFn: pos.createEInvoice
|
|
6230
6612
|
});
|
|
6231
6613
|
};
|
|
6232
6614
|
var use_create_e_invoice_default = useCreateEInvoice;
|
|
6615
|
+
|
|
6616
|
+
// src/hooks/pos/use-create-entity.ts
|
|
6617
|
+
import { useMutation as useMutation64 } from "@tanstack/react-query";
|
|
6233
6618
|
var useCreateEntity = () => {
|
|
6234
6619
|
const pos = usePosService();
|
|
6235
|
-
return
|
|
6620
|
+
return useMutation64({
|
|
6236
6621
|
mutationFn: pos.createEntity
|
|
6237
6622
|
});
|
|
6238
6623
|
};
|
|
6239
6624
|
var use_create_entity_default = useCreateEntity;
|
|
6625
|
+
|
|
6626
|
+
// src/hooks/pos/use-create-pos-config.ts
|
|
6627
|
+
import { useMutation as useMutation65 } from "@tanstack/react-query";
|
|
6240
6628
|
var useCreatePosConfig = () => {
|
|
6241
6629
|
const pos = usePosService();
|
|
6242
|
-
return
|
|
6630
|
+
return useMutation65({
|
|
6243
6631
|
mutationFn: pos.createPosConfig
|
|
6244
6632
|
});
|
|
6245
6633
|
};
|
|
6246
6634
|
var use_create_pos_config_default = useCreatePosConfig;
|
|
6635
|
+
|
|
6636
|
+
// src/hooks/pos/use-create-session.ts
|
|
6637
|
+
import { useMutation as useMutation66 } from "@tanstack/react-query";
|
|
6247
6638
|
var useCreateSession = () => {
|
|
6248
6639
|
const pos = usePosService();
|
|
6249
|
-
return
|
|
6640
|
+
return useMutation66({
|
|
6250
6641
|
mutationFn: pos.createSession
|
|
6251
6642
|
});
|
|
6252
6643
|
};
|
|
6253
6644
|
var use_create_session_default = useCreateSession;
|
|
6645
|
+
|
|
6646
|
+
// src/hooks/pos/use-delete-entity.ts
|
|
6647
|
+
import { useMutation as useMutation67 } from "@tanstack/react-query";
|
|
6254
6648
|
var useDeleteEntity = () => {
|
|
6255
6649
|
const pos = usePosService();
|
|
6256
|
-
return
|
|
6650
|
+
return useMutation67({
|
|
6257
6651
|
mutationFn: pos.deleteEntity
|
|
6258
6652
|
});
|
|
6259
6653
|
};
|
|
6260
6654
|
var use_delete_entity_default = useDeleteEntity;
|
|
6655
|
+
|
|
6656
|
+
// src/hooks/pos/use-generate-payment-qr-info.ts
|
|
6657
|
+
import { useMutation as useMutation68 } from "@tanstack/react-query";
|
|
6261
6658
|
var useGeneratePaymentQrInfo = () => {
|
|
6262
6659
|
const pos = usePosService();
|
|
6263
|
-
return
|
|
6660
|
+
return useMutation68({
|
|
6264
6661
|
mutationFn: pos.generatePaymentQRInfo
|
|
6265
6662
|
});
|
|
6266
6663
|
};
|
|
6267
6664
|
var use_generate_payment_qr_info_default = useGeneratePaymentQrInfo;
|
|
6665
|
+
|
|
6666
|
+
// src/hooks/pos/use-get-current-user.ts
|
|
6667
|
+
import { useMutation as useMutation69 } from "@tanstack/react-query";
|
|
6268
6668
|
var useGetCurrentUser = () => {
|
|
6269
6669
|
const pos = usePosService();
|
|
6270
|
-
return
|
|
6670
|
+
return useMutation69({
|
|
6271
6671
|
mutationFn: pos.getCurrentUser
|
|
6272
6672
|
});
|
|
6273
6673
|
};
|
|
6274
6674
|
var use_get_current_user_default = useGetCurrentUser;
|
|
6675
|
+
|
|
6676
|
+
// src/hooks/pos/use-get-list.ts
|
|
6677
|
+
import { useMutation as useMutation70 } from "@tanstack/react-query";
|
|
6275
6678
|
var useGetList = () => {
|
|
6276
6679
|
const pos = usePosService();
|
|
6277
|
-
return
|
|
6680
|
+
return useMutation70({
|
|
6278
6681
|
mutationFn: pos.getList
|
|
6279
6682
|
});
|
|
6280
6683
|
};
|
|
6281
6684
|
var use_get_list_default = useGetList;
|
|
6685
|
+
|
|
6686
|
+
// src/hooks/pos/use-get-order-line.ts
|
|
6687
|
+
import { useMutation as useMutation71 } from "@tanstack/react-query";
|
|
6282
6688
|
var useGetOrderLine = () => {
|
|
6283
6689
|
const pos = usePosService();
|
|
6284
|
-
return
|
|
6690
|
+
return useMutation71({
|
|
6285
6691
|
mutationFn: pos.getOrderLine
|
|
6286
6692
|
});
|
|
6287
6693
|
};
|
|
6288
6694
|
var use_get_order_line_default = useGetOrderLine;
|
|
6695
|
+
|
|
6696
|
+
// src/hooks/pos/use-get-pin-code.ts
|
|
6697
|
+
import { useMutation as useMutation72 } from "@tanstack/react-query";
|
|
6289
6698
|
var useGetPinCode = () => {
|
|
6290
6699
|
const pos = usePosService();
|
|
6291
|
-
return
|
|
6700
|
+
return useMutation72({
|
|
6292
6701
|
mutationFn: pos.getPinCode
|
|
6293
6702
|
});
|
|
6294
6703
|
};
|
|
6295
6704
|
var use_get_pin_code_default = useGetPinCode;
|
|
6705
|
+
|
|
6706
|
+
// src/hooks/pos/use-get-pos.ts
|
|
6707
|
+
import { useMutation as useMutation73 } from "@tanstack/react-query";
|
|
6296
6708
|
var useGetPos = () => {
|
|
6297
6709
|
const pos = usePosService();
|
|
6298
|
-
return
|
|
6710
|
+
return useMutation73({
|
|
6299
6711
|
mutationFn: pos.getPOS
|
|
6300
6712
|
});
|
|
6301
6713
|
};
|
|
6302
6714
|
var use_get_pos_default = useGetPos;
|
|
6715
|
+
|
|
6716
|
+
// src/hooks/pos/use-get-preparation-display-data.ts
|
|
6717
|
+
import { useMutation as useMutation74 } from "@tanstack/react-query";
|
|
6303
6718
|
var useGetPreparationDisplayData = () => {
|
|
6304
6719
|
const pos = usePosService();
|
|
6305
|
-
return
|
|
6720
|
+
return useMutation74({
|
|
6306
6721
|
mutationFn: pos.getPreparationDisplayData
|
|
6307
6722
|
});
|
|
6308
6723
|
};
|
|
6309
6724
|
var use_get_preparation_display_data_default = useGetPreparationDisplayData;
|
|
6725
|
+
|
|
6726
|
+
// src/hooks/pos/use-get-product-image.ts
|
|
6727
|
+
import { useMutation as useMutation75 } from "@tanstack/react-query";
|
|
6310
6728
|
var useGetProductImage = () => {
|
|
6311
6729
|
const pos = usePosService();
|
|
6312
|
-
return
|
|
6730
|
+
return useMutation75({
|
|
6313
6731
|
mutationFn: pos.getProductImage
|
|
6314
6732
|
});
|
|
6315
6733
|
};
|
|
6316
6734
|
var use_get_product_image_default = useGetProductImage;
|
|
6735
|
+
|
|
6736
|
+
// src/hooks/pos/use-handle-close-session.ts
|
|
6737
|
+
import { useMutation as useMutation76 } from "@tanstack/react-query";
|
|
6317
6738
|
var useHandleCloseSession = () => {
|
|
6318
6739
|
const pos = usePosService();
|
|
6319
|
-
return
|
|
6740
|
+
return useMutation76({
|
|
6320
6741
|
mutationFn: pos.handleCloseSession
|
|
6321
6742
|
});
|
|
6322
6743
|
};
|
|
6323
6744
|
var use_handle_close_session_default = useHandleCloseSession;
|
|
6745
|
+
|
|
6746
|
+
// src/hooks/pos/use-handle-closing-detail-session.ts
|
|
6747
|
+
import { useMutation as useMutation77 } from "@tanstack/react-query";
|
|
6324
6748
|
var useHandleClosingDetailSession = () => {
|
|
6325
6749
|
const pos = usePosService();
|
|
6326
|
-
return
|
|
6750
|
+
return useMutation77({
|
|
6327
6751
|
mutationFn: pos.handleClosingDetailSession
|
|
6328
6752
|
});
|
|
6329
6753
|
};
|
|
6330
6754
|
var use_handle_closing_detail_session_default = useHandleClosingDetailSession;
|
|
6755
|
+
|
|
6756
|
+
// src/hooks/pos/use-handle-closing-session.ts
|
|
6757
|
+
import { useMutation as useMutation78 } from "@tanstack/react-query";
|
|
6331
6758
|
var useHandleClosingSession = () => {
|
|
6332
6759
|
const pos = usePosService();
|
|
6333
|
-
return
|
|
6760
|
+
return useMutation78({
|
|
6334
6761
|
mutationFn: pos.handleClosingSession
|
|
6335
6762
|
});
|
|
6336
6763
|
};
|
|
6337
6764
|
var use_handle_closing_session_default = useHandleClosingSession;
|
|
6765
|
+
|
|
6766
|
+
// src/hooks/pos/use-load-data-pos-session.ts
|
|
6767
|
+
import { useMutation as useMutation79 } from "@tanstack/react-query";
|
|
6338
6768
|
var useLoadDataPosSession = () => {
|
|
6339
6769
|
const pos = usePosService();
|
|
6340
6770
|
const { env } = useEnv();
|
|
6341
|
-
return
|
|
6771
|
+
return useMutation79({
|
|
6342
6772
|
mutationFn: env.isSupaMode ? pos.loadDataPosSessionSupabase : pos.loadDataPosSession
|
|
6343
6773
|
});
|
|
6344
6774
|
};
|
|
6345
6775
|
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
6776
|
+
|
|
6777
|
+
// src/hooks/pos/use-manage-onchange.ts
|
|
6778
|
+
import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
6346
6779
|
var useManageOnChange = () => {
|
|
6347
6780
|
const pos = usePosService();
|
|
6348
|
-
return
|
|
6781
|
+
return useMutation80({
|
|
6349
6782
|
mutationFn: pos.manageOnChange
|
|
6350
6783
|
});
|
|
6351
6784
|
};
|
|
6352
6785
|
var use_manage_onchange_default = useManageOnChange;
|
|
6786
|
+
|
|
6787
|
+
// src/hooks/pos/use-manage-session.ts
|
|
6788
|
+
import { useMutation as useMutation81 } from "@tanstack/react-query";
|
|
6353
6789
|
var useManageSession = () => {
|
|
6354
6790
|
const pos = usePosService();
|
|
6355
|
-
return
|
|
6791
|
+
return useMutation81({
|
|
6356
6792
|
mutationFn: pos.manageSession
|
|
6357
6793
|
});
|
|
6358
6794
|
};
|
|
6359
6795
|
var use_manage_session_default = useManageSession;
|
|
6796
|
+
|
|
6797
|
+
// src/hooks/pos/use-process-order.ts
|
|
6798
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
6360
6799
|
var useProcessOrder = () => {
|
|
6361
6800
|
const pos = usePosService();
|
|
6362
|
-
return
|
|
6801
|
+
return useMutation82({
|
|
6363
6802
|
mutationFn: pos.processOrder
|
|
6364
6803
|
});
|
|
6365
6804
|
};
|
|
6366
6805
|
var use_process_order_default = useProcessOrder;
|
|
6806
|
+
|
|
6807
|
+
// src/hooks/pos/use-save-pin-code.ts
|
|
6808
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
6367
6809
|
var useSavePinCode = () => {
|
|
6368
6810
|
const pos = usePosService();
|
|
6369
|
-
return
|
|
6811
|
+
return useMutation83({
|
|
6370
6812
|
mutationFn: pos.savePinCode
|
|
6371
6813
|
});
|
|
6372
6814
|
};
|
|
6373
6815
|
var use_save_pin_code_default = useSavePinCode;
|
|
6816
|
+
|
|
6817
|
+
// src/hooks/pos/use-search-journal.ts
|
|
6818
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
6374
6819
|
var useSearchJournal = () => {
|
|
6375
6820
|
const pos = usePosService();
|
|
6376
|
-
return
|
|
6821
|
+
return useMutation84({
|
|
6377
6822
|
mutationFn: pos.searchJournal
|
|
6378
6823
|
});
|
|
6379
6824
|
};
|
|
6380
6825
|
var use_search_journal_default = useSearchJournal;
|
|
6826
|
+
|
|
6827
|
+
// src/hooks/pos/use-update-closed-session.ts
|
|
6828
|
+
import { useMutation as useMutation85 } from "@tanstack/react-query";
|
|
6381
6829
|
var useUpdateClosedSession = () => {
|
|
6382
6830
|
const pos = usePosService();
|
|
6383
|
-
return
|
|
6831
|
+
return useMutation85({
|
|
6384
6832
|
mutationFn: pos.updateClosedSession
|
|
6385
6833
|
});
|
|
6386
6834
|
};
|
|
6387
6835
|
var use_update_closed_session_default = useUpdateClosedSession;
|
|
6836
|
+
|
|
6837
|
+
// src/hooks/pos/use-update-entity.ts
|
|
6838
|
+
import { useMutation as useMutation86 } from "@tanstack/react-query";
|
|
6388
6839
|
var useUpdateEntity = () => {
|
|
6389
6840
|
const pos = usePosService();
|
|
6390
|
-
return
|
|
6841
|
+
return useMutation86({
|
|
6391
6842
|
mutationFn: pos.updateEntity
|
|
6392
6843
|
});
|
|
6393
6844
|
};
|
|
6394
6845
|
var use_update_entity_default = useUpdateEntity;
|
|
6846
|
+
|
|
6847
|
+
// src/hooks/pos/use-update-order-status.ts
|
|
6848
|
+
import { useMutation as useMutation87 } from "@tanstack/react-query";
|
|
6395
6849
|
var useUpdateOrderStatus = () => {
|
|
6396
6850
|
const pos = usePosService();
|
|
6397
|
-
return
|
|
6851
|
+
return useMutation87({
|
|
6398
6852
|
mutationFn: pos.updateOrderStatus
|
|
6399
6853
|
});
|
|
6400
6854
|
};
|
|
6401
6855
|
var use_update_order_status_default = useUpdateOrderStatus;
|
|
6856
|
+
|
|
6857
|
+
// src/hooks/pos/use-complete-current-stage.ts
|
|
6858
|
+
import { useMutation as useMutation88 } from "@tanstack/react-query";
|
|
6402
6859
|
var useCompleteCurrentStage = () => {
|
|
6403
6860
|
const pos = usePosService();
|
|
6404
|
-
return
|
|
6861
|
+
return useMutation88({
|
|
6405
6862
|
mutationFn: pos.completeCurrentStage
|
|
6406
6863
|
});
|
|
6407
6864
|
};
|
|
6408
6865
|
var use_complete_current_stage_default = useCompleteCurrentStage;
|
|
6866
|
+
|
|
6867
|
+
// src/hooks/pos/use-get-e-invoice-info.ts
|
|
6868
|
+
import { useMutation as useMutation89 } from "@tanstack/react-query";
|
|
6409
6869
|
var useGetEInvoiceInfo = () => {
|
|
6410
6870
|
const pos = usePosService();
|
|
6411
|
-
return
|
|
6871
|
+
return useMutation89({
|
|
6412
6872
|
mutationFn: pos.getEInvoiceInfo
|
|
6413
6873
|
});
|
|
6414
6874
|
};
|
|
6415
6875
|
var use_get_e_invoice_info_default = useGetEInvoiceInfo;
|
|
6876
|
+
|
|
6877
|
+
// src/hooks/pos/use-app-authenticate.ts
|
|
6878
|
+
import { useMutation as useMutation90 } from "@tanstack/react-query";
|
|
6416
6879
|
var useAppAuthenticate = () => {
|
|
6417
6880
|
const pos = usePosService();
|
|
6418
|
-
return
|
|
6881
|
+
return useMutation90({
|
|
6419
6882
|
mutationFn: pos.appAuthenticate
|
|
6420
6883
|
});
|
|
6421
6884
|
};
|
|
6422
6885
|
var use_app_authenticate_default = useAppAuthenticate;
|
|
6886
|
+
|
|
6887
|
+
// src/hooks/pos/use-apply-voucher.ts
|
|
6888
|
+
import { useMutation as useMutation91 } from "@tanstack/react-query";
|
|
6423
6889
|
var useApplyVoucher = () => {
|
|
6424
6890
|
const pos = usePosService();
|
|
6425
|
-
return
|
|
6891
|
+
return useMutation91({
|
|
6426
6892
|
mutationFn: pos.applyVoucher
|
|
6427
6893
|
});
|
|
6428
6894
|
};
|
|
6429
6895
|
var use_apply_voucher_default = useApplyVoucher;
|
|
6896
|
+
|
|
6897
|
+
// src/hooks/pos/use-remove-voucher.ts
|
|
6898
|
+
import { useMutation as useMutation92 } from "@tanstack/react-query";
|
|
6430
6899
|
var useRemoveVoucher = () => {
|
|
6431
6900
|
const pos = usePosService();
|
|
6432
|
-
return
|
|
6901
|
+
return useMutation92({
|
|
6433
6902
|
mutationFn: pos.removeVoucher
|
|
6434
6903
|
});
|
|
6435
6904
|
};
|
|
6436
6905
|
var use_remove_voucher_default = useRemoveVoucher;
|
|
6906
|
+
|
|
6907
|
+
// src/hooks/pos/use-sync-from-ui.ts
|
|
6908
|
+
import { useMutation as useMutation93 } from "@tanstack/react-query";
|
|
6437
6909
|
var useSyncFromUi = () => {
|
|
6438
6910
|
const pos = usePosService();
|
|
6439
|
-
return
|
|
6911
|
+
return useMutation93({
|
|
6440
6912
|
mutationFn: pos.syncFromUi
|
|
6441
6913
|
});
|
|
6442
6914
|
};
|
|
6443
6915
|
var use_sync_from_ui_default = useSyncFromUi;
|
|
6916
|
+
|
|
6917
|
+
// src/hooks/pos/use-get-customer-loyalty-point.ts
|
|
6918
|
+
import { useMutation as useMutation94 } from "@tanstack/react-query";
|
|
6919
|
+
var useGetCustomerLoyaltyPoint = () => {
|
|
6920
|
+
const pos = usePosService();
|
|
6921
|
+
return useMutation94({
|
|
6922
|
+
mutationFn: pos.getCustomerLoyaltyPoint
|
|
6923
|
+
});
|
|
6924
|
+
};
|
|
6925
|
+
var use_get_customer_loyalty_point_default = useGetCustomerLoyaltyPoint;
|
|
6926
|
+
|
|
6927
|
+
// src/hooks/pos/supabase/use-add-floor.ts
|
|
6928
|
+
import { useMutation as useMutation95 } from "@tanstack/react-query";
|
|
6444
6929
|
var useAddFloor = () => {
|
|
6445
6930
|
const { addFloorSupabase } = addFloorSupabaseService();
|
|
6446
|
-
return
|
|
6931
|
+
return useMutation95({
|
|
6447
6932
|
mutationFn: addFloorSupabase
|
|
6448
6933
|
});
|
|
6449
6934
|
};
|
|
6450
6935
|
var use_add_floor_default = useAddFloor;
|
|
6936
|
+
|
|
6937
|
+
// src/hooks/pos/supabase/use-add-table.ts
|
|
6938
|
+
import { useMutation as useMutation96 } from "@tanstack/react-query";
|
|
6451
6939
|
var useAddTable = () => {
|
|
6452
6940
|
const { addTableSupabase } = addTableSupabaseService();
|
|
6453
|
-
return
|
|
6941
|
+
return useMutation96({
|
|
6454
6942
|
mutationFn: addTableSupabase
|
|
6455
6943
|
});
|
|
6456
6944
|
};
|
|
6457
6945
|
var use_add_table_default = useAddTable;
|
|
6946
|
+
|
|
6947
|
+
// src/hooks/pos/supabase/use-update-floor.ts
|
|
6948
|
+
import { useMutation as useMutation97 } from "@tanstack/react-query";
|
|
6458
6949
|
var useUpdateFloor = () => {
|
|
6459
6950
|
const { updateFloorSupabase } = updateFloorSupabaseService();
|
|
6460
|
-
return
|
|
6951
|
+
return useMutation97({
|
|
6461
6952
|
mutationFn: updateFloorSupabase
|
|
6462
6953
|
});
|
|
6463
6954
|
};
|
|
6464
6955
|
var use_update_floor_default = useUpdateFloor;
|
|
6956
|
+
|
|
6957
|
+
// src/hooks/pos/supabase/use-update-table.ts
|
|
6958
|
+
import { useMutation as useMutation98 } from "@tanstack/react-query";
|
|
6465
6959
|
var useUpdateTable = () => {
|
|
6466
6960
|
const { updateTableSupabase } = updateTableSupabaseService();
|
|
6467
|
-
return
|
|
6961
|
+
return useMutation98({
|
|
6468
6962
|
mutationFn: updateTableSupabase
|
|
6469
6963
|
});
|
|
6470
6964
|
};
|
|
6471
6965
|
var use_update_table_default = useUpdateTable;
|
|
6966
|
+
|
|
6967
|
+
// src/hooks/pos/supabase/use-delete-floor.ts
|
|
6968
|
+
import { useMutation as useMutation99 } from "@tanstack/react-query";
|
|
6472
6969
|
var useDeleteFloor = () => {
|
|
6473
6970
|
const { deleteFloorSupabase } = deleteFloorSupabaseService();
|
|
6474
|
-
return
|
|
6971
|
+
return useMutation99({
|
|
6475
6972
|
mutationFn: deleteFloorSupabase
|
|
6476
6973
|
});
|
|
6477
6974
|
};
|
|
6478
6975
|
var use_delete_floor_default = useDeleteFloor;
|
|
6976
|
+
|
|
6977
|
+
// src/hooks/pos/supabase/use-delete-table.ts
|
|
6978
|
+
import { useMutation as useMutation100 } from "@tanstack/react-query";
|
|
6479
6979
|
var useDeleteTable = () => {
|
|
6480
6980
|
const { deleteTableSupabase } = deleteTableSupabaseService();
|
|
6481
|
-
return
|
|
6981
|
+
return useMutation100({
|
|
6482
6982
|
mutationFn: deleteTableSupabase
|
|
6483
6983
|
});
|
|
6484
6984
|
};
|
|
6485
6985
|
var use_delete_table_default = useDeleteTable;
|
|
6986
|
+
|
|
6987
|
+
// src/hooks/pos/supabase/use-create-order.ts
|
|
6988
|
+
import { useMutation as useMutation101 } from "@tanstack/react-query";
|
|
6486
6989
|
var useCreateOrder = () => {
|
|
6487
6990
|
const { createOrderSupabase } = createOrderSupabaseService();
|
|
6488
|
-
return
|
|
6991
|
+
return useMutation101({
|
|
6489
6992
|
mutationFn: createOrderSupabase
|
|
6490
6993
|
});
|
|
6491
6994
|
};
|
|
6492
6995
|
var use_create_order_default = useCreateOrder;
|
|
6996
|
+
|
|
6997
|
+
// src/hooks/pos/supabase/use-add-category.ts
|
|
6998
|
+
import { useMutation as useMutation102 } from "@tanstack/react-query";
|
|
6493
6999
|
var useAddCategory = () => {
|
|
6494
7000
|
const { addCategorySupabase } = addCategorySupabaseService();
|
|
6495
|
-
return
|
|
7001
|
+
return useMutation102({
|
|
6496
7002
|
mutationFn: addCategorySupabase
|
|
6497
7003
|
});
|
|
6498
7004
|
};
|
|
6499
7005
|
var use_add_category_default = useAddCategory;
|
|
7006
|
+
|
|
7007
|
+
// src/hooks/pos/supabase/use-add-product-to-order.ts
|
|
7008
|
+
import { useMutation as useMutation103 } from "@tanstack/react-query";
|
|
6500
7009
|
var useAddProductToOrder = () => {
|
|
6501
7010
|
const { addProductToOrderSupabase } = addProductToOrderSupabaseService();
|
|
6502
|
-
return
|
|
7011
|
+
return useMutation103({
|
|
6503
7012
|
mutationFn: addProductToOrderSupabase
|
|
6504
7013
|
});
|
|
6505
7014
|
};
|
|
6506
7015
|
var use_add_product_to_order_default = useAddProductToOrder;
|
|
7016
|
+
|
|
7017
|
+
// src/hooks/pos/supabase/use-update-order-total-amount.ts
|
|
7018
|
+
import { useMutation as useMutation104 } from "@tanstack/react-query";
|
|
6507
7019
|
var useUpdateOrderTotalAmount = () => {
|
|
6508
7020
|
const { updateOrderTotalAmountSupabase } = updateOrderTotalAmountSupabaseService();
|
|
6509
|
-
return
|
|
7021
|
+
return useMutation104({
|
|
6510
7022
|
mutationFn: updateOrderTotalAmountSupabase
|
|
6511
7023
|
});
|
|
6512
7024
|
};
|
|
6513
7025
|
var use_update_order_total_amount_default = useUpdateOrderTotalAmount;
|
|
7026
|
+
|
|
7027
|
+
// src/hooks/pos/supabase/use-update-order-line.ts
|
|
7028
|
+
import { useMutation as useMutation105 } from "@tanstack/react-query";
|
|
6514
7029
|
var useUpdateOrderLine = () => {
|
|
6515
7030
|
const { updateOrderLineSupabase } = updateOrderLineSupabaseService();
|
|
6516
|
-
return
|
|
7031
|
+
return useMutation105({
|
|
6517
7032
|
mutationFn: updateOrderLineSupabase
|
|
6518
7033
|
});
|
|
6519
7034
|
};
|
|
6520
7035
|
var use_update_order_line_default = useUpdateOrderLine;
|
|
7036
|
+
|
|
7037
|
+
// src/hooks/pos/supabase/use-update-order.ts
|
|
7038
|
+
import { useMutation as useMutation106 } from "@tanstack/react-query";
|
|
6521
7039
|
var useUpdateOrder = () => {
|
|
6522
7040
|
const { updateOrderSupabase } = updateOrderSupabaseService();
|
|
6523
|
-
return
|
|
7041
|
+
return useMutation106({
|
|
6524
7042
|
mutationFn: updateOrderSupabase
|
|
6525
7043
|
});
|
|
6526
7044
|
};
|
|
6527
7045
|
var use_update_order_default = useUpdateOrder;
|
|
7046
|
+
|
|
7047
|
+
// src/hooks/pos/supabase/use-delete-order.ts
|
|
7048
|
+
import { useMutation as useMutation107 } from "@tanstack/react-query";
|
|
6528
7049
|
var useDeleteOrder = () => {
|
|
6529
7050
|
const { deleteOrderSupabase } = deleteOrderSupabaseService();
|
|
6530
|
-
return
|
|
7051
|
+
return useMutation107({
|
|
6531
7052
|
mutationFn: deleteOrderSupabase
|
|
6532
7053
|
});
|
|
6533
7054
|
};
|
|
6534
7055
|
var use_delete_order_default = useDeleteOrder;
|
|
7056
|
+
|
|
7057
|
+
// src/hooks/pos/supabase/use-delete-order-line.ts
|
|
7058
|
+
import { useMutation as useMutation108 } from "@tanstack/react-query";
|
|
6535
7059
|
var useDeleteOrderLine = () => {
|
|
6536
7060
|
const { deleteOrderLineSupabase } = deleteOrderLineSupabaseService();
|
|
6537
|
-
return
|
|
7061
|
+
return useMutation108({
|
|
6538
7062
|
mutationFn: deleteOrderLineSupabase
|
|
6539
7063
|
});
|
|
6540
7064
|
};
|
|
6541
7065
|
var use_delete_order_line_default = useDeleteOrderLine;
|
|
7066
|
+
|
|
7067
|
+
// src/hooks/pos/supabase/use-add-product.ts
|
|
7068
|
+
import { useMutation as useMutation109 } from "@tanstack/react-query";
|
|
6542
7069
|
var useAddProduct = () => {
|
|
6543
7070
|
const { addProductSupabase } = addProductSupabaseService();
|
|
6544
|
-
return
|
|
7071
|
+
return useMutation109({
|
|
6545
7072
|
mutationFn: addProductSupabase
|
|
6546
7073
|
});
|
|
6547
7074
|
};
|
|
6548
7075
|
var use_add_product_default = useAddProduct;
|
|
7076
|
+
|
|
7077
|
+
// src/hooks/pos/use-get-functional-modules.ts
|
|
7078
|
+
import { useMutation as useMutation110 } from "@tanstack/react-query";
|
|
6549
7079
|
var useGetFunctionalModules = () => {
|
|
6550
7080
|
const pos = usePosService();
|
|
6551
|
-
return
|
|
7081
|
+
return useMutation110({
|
|
6552
7082
|
mutationFn: pos.getFunctionalModules
|
|
6553
7083
|
});
|
|
6554
7084
|
};
|
|
6555
7085
|
var use_get_functional_modules_default = useGetFunctionalModules;
|
|
7086
|
+
|
|
7087
|
+
// src/hooks/pos/supabase/use-add-payment-method.ts
|
|
7088
|
+
import { useMutation as useMutation111 } from "@tanstack/react-query";
|
|
6556
7089
|
var useAddPaymentMethod = () => {
|
|
6557
7090
|
const { addPaymentMethodSupabase } = addPaymentMethodSupabaseService();
|
|
6558
|
-
return
|
|
7091
|
+
return useMutation111({
|
|
6559
7092
|
mutationFn: addPaymentMethodSupabase
|
|
6560
7093
|
});
|
|
6561
7094
|
};
|
|
6562
7095
|
var use_add_payment_method_default = useAddPaymentMethod;
|
|
7096
|
+
|
|
7097
|
+
// src/hooks/pos/supabase/use-update-session-payment-methods.ts
|
|
7098
|
+
import { useMutation as useMutation112 } from "@tanstack/react-query";
|
|
6563
7099
|
var useUpdateSessionPaymentMethods = () => {
|
|
6564
7100
|
const { updateSessionPaymentMethodsSupabase } = updateSessionPaymentMethodsSupabaseService();
|
|
6565
|
-
return
|
|
7101
|
+
return useMutation112({
|
|
6566
7102
|
mutationFn: updateSessionPaymentMethodsSupabase
|
|
6567
7103
|
});
|
|
6568
7104
|
};
|
|
6569
7105
|
var use_update_session_payment_methods_default = useUpdateSessionPaymentMethods;
|
|
7106
|
+
|
|
7107
|
+
// src/hooks/pos/supabase/use-create-payment.ts
|
|
7108
|
+
import { useMutation as useMutation113 } from "@tanstack/react-query";
|
|
6570
7109
|
var useCreatePayment = () => {
|
|
6571
7110
|
const { createPaymentSupabase } = createPaymentSupabaseService();
|
|
6572
|
-
return
|
|
7111
|
+
return useMutation113({
|
|
6573
7112
|
mutationFn: createPaymentSupabase
|
|
6574
7113
|
});
|
|
6575
7114
|
};
|
|
6576
7115
|
var use_create_payment_default = useCreatePayment;
|
|
7116
|
+
|
|
7117
|
+
// src/hooks/pos/supabase/use-create-customer.ts
|
|
7118
|
+
import { useMutation as useMutation114 } from "@tanstack/react-query";
|
|
6577
7119
|
var useCreateCustomer = () => {
|
|
6578
7120
|
const { createCustomerSupabase } = createCustomerSupabaseService();
|
|
6579
|
-
return
|
|
7121
|
+
return useMutation114({
|
|
6580
7122
|
mutationFn: createCustomerSupabase
|
|
6581
7123
|
});
|
|
6582
7124
|
};
|
|
6583
7125
|
var use_create_customer_default = useCreateCustomer;
|
|
7126
|
+
|
|
7127
|
+
// src/hooks/pos/supabase/use-update-customer.ts
|
|
7128
|
+
import { useMutation as useMutation115 } from "@tanstack/react-query";
|
|
6584
7129
|
var useUpdateCustomer = () => {
|
|
6585
7130
|
const { updateCustomerSupabase } = updateCustomerSupabaseService();
|
|
6586
|
-
return
|
|
7131
|
+
return useMutation115({
|
|
6587
7132
|
mutationFn: updateCustomerSupabase
|
|
6588
7133
|
});
|
|
6589
7134
|
};
|
|
6590
7135
|
var use_update_customer_default = useUpdateCustomer;
|
|
7136
|
+
|
|
7137
|
+
// src/hooks/pos/supabase/use-delete-customer.ts
|
|
7138
|
+
import { useMutation as useMutation116 } from "@tanstack/react-query";
|
|
6591
7139
|
var useDeleteCustomer = () => {
|
|
6592
7140
|
const { deleteCustomerSupabase } = deleteCustomerSupabaseService();
|
|
6593
|
-
return
|
|
7141
|
+
return useMutation116({
|
|
6594
7142
|
mutationFn: deleteCustomerSupabase
|
|
6595
7143
|
});
|
|
6596
7144
|
};
|
|
6597
7145
|
var use_delete_customer_default = useDeleteCustomer;
|
|
7146
|
+
|
|
7147
|
+
// src/hooks/pos/supabase/use-supa-upload-image.ts
|
|
7148
|
+
import { useMutation as useMutation117 } from "@tanstack/react-query";
|
|
6598
7149
|
var useSupaUploadImage = () => {
|
|
6599
7150
|
const { uploadImageSupabase } = uploadImageSupabaseService();
|
|
6600
|
-
return
|
|
7151
|
+
return useMutation117({
|
|
6601
7152
|
mutationFn: ({ file, tenantId }) => uploadImageSupabase(file, tenantId)
|
|
6602
7153
|
});
|
|
6603
7154
|
};
|
|
6604
7155
|
var use_supa_upload_image_default = useSupaUploadImage;
|
|
7156
|
+
|
|
7157
|
+
// src/hooks/pos/supabase/use-get-list-users.ts
|
|
7158
|
+
import { useMutation as useMutation118 } from "@tanstack/react-query";
|
|
6605
7159
|
var useGetListUsers = () => {
|
|
6606
7160
|
const pos = usePosService();
|
|
6607
|
-
return
|
|
7161
|
+
return useMutation118({
|
|
6608
7162
|
mutationFn: pos.getListUsers
|
|
6609
7163
|
});
|
|
6610
7164
|
};
|
|
6611
7165
|
var use_get_list_users_default = useGetListUsers;
|
|
7166
|
+
|
|
7167
|
+
// src/hooks/pos/supabase/use-get-list-roles.ts
|
|
7168
|
+
import { useMutation as useMutation119 } from "@tanstack/react-query";
|
|
6612
7169
|
var useGetListRoles = () => {
|
|
6613
7170
|
const pos = usePosService();
|
|
6614
|
-
return
|
|
7171
|
+
return useMutation119({
|
|
6615
7172
|
mutationFn: pos.getListRoles
|
|
6616
7173
|
});
|
|
6617
7174
|
};
|
|
6618
7175
|
var use_get_list_roles_default = useGetListRoles;
|
|
7176
|
+
|
|
7177
|
+
// src/hooks/pos/supabase/use-assign-role.ts
|
|
7178
|
+
import { useMutation as useMutation120 } from "@tanstack/react-query";
|
|
6619
7179
|
var useAssignRole = () => {
|
|
6620
7180
|
const pos = usePosService();
|
|
6621
|
-
return
|
|
7181
|
+
return useMutation120({
|
|
6622
7182
|
mutationFn: pos.assignRole
|
|
6623
7183
|
});
|
|
6624
7184
|
};
|
|
6625
7185
|
var use_assign_role_default = useAssignRole;
|
|
7186
|
+
|
|
7187
|
+
// src/hooks/pos/supabase/use-get-supa-current-user.ts
|
|
7188
|
+
import { useMutation as useMutation121 } from "@tanstack/react-query";
|
|
6626
7189
|
var useGetSupaCurrentUser = () => {
|
|
6627
7190
|
const pos = usePosService();
|
|
6628
|
-
return
|
|
7191
|
+
return useMutation121({
|
|
6629
7192
|
mutationFn: pos.getSupaCurrentUser
|
|
6630
7193
|
});
|
|
6631
7194
|
};
|
|
6632
7195
|
var use_get_supa_current_user_default = useGetSupaCurrentUser;
|
|
7196
|
+
|
|
7197
|
+
// src/hooks/pos/supabase/use-update-category.ts
|
|
7198
|
+
import { useMutation as useMutation122 } from "@tanstack/react-query";
|
|
6633
7199
|
var useUpdateCategory = () => {
|
|
6634
7200
|
const pos = usePosService();
|
|
6635
|
-
return
|
|
7201
|
+
return useMutation122({
|
|
6636
7202
|
mutationFn: pos.updateCategorySupabase
|
|
6637
7203
|
});
|
|
6638
7204
|
};
|
|
6639
7205
|
var use_update_category_default = useUpdateCategory;
|
|
7206
|
+
|
|
7207
|
+
// src/hooks/pos/supabase/use-delete-category.ts
|
|
7208
|
+
import { useMutation as useMutation123 } from "@tanstack/react-query";
|
|
6640
7209
|
var useDeleteCategory = () => {
|
|
6641
7210
|
const pos = usePosService();
|
|
6642
|
-
return
|
|
7211
|
+
return useMutation123({
|
|
6643
7212
|
mutationFn: pos.deleteCategorySupabase
|
|
6644
7213
|
});
|
|
6645
7214
|
};
|
|
6646
7215
|
var use_delete_category_default = useDeleteCategory;
|
|
7216
|
+
|
|
7217
|
+
// src/hooks/pos/supabase/use-update-product.ts
|
|
7218
|
+
import { useMutation as useMutation124 } from "@tanstack/react-query";
|
|
6647
7219
|
var useUpdateProduct = () => {
|
|
6648
7220
|
const pos = usePosService();
|
|
6649
|
-
return
|
|
7221
|
+
return useMutation124({
|
|
6650
7222
|
mutationFn: pos.updateProductSupabase
|
|
6651
7223
|
});
|
|
6652
7224
|
};
|
|
6653
7225
|
var use_update_product_default = useUpdateProduct;
|
|
7226
|
+
|
|
7227
|
+
// src/hooks/pos/supabase/use-delete-product.ts
|
|
7228
|
+
import { useMutation as useMutation125 } from "@tanstack/react-query";
|
|
6654
7229
|
var useDeleteProduct = () => {
|
|
6655
7230
|
const pos = usePosService();
|
|
6656
|
-
return
|
|
7231
|
+
return useMutation125({
|
|
6657
7232
|
mutationFn: pos.deleteProductSupabase
|
|
6658
7233
|
});
|
|
6659
7234
|
};
|
|
6660
7235
|
var use_delete_product_default = useDeleteProduct;
|
|
7236
|
+
|
|
7237
|
+
// src/hooks/pos/supabase/use-toggle-pos-restaurant.ts
|
|
7238
|
+
import { useMutation as useMutation126 } from "@tanstack/react-query";
|
|
6661
7239
|
var useTogglePosRestaurant = () => {
|
|
6662
7240
|
const pos = usePosService();
|
|
6663
|
-
return
|
|
7241
|
+
return useMutation126({
|
|
6664
7242
|
mutationFn: pos.togglePosRestaurantSupabase
|
|
6665
7243
|
});
|
|
6666
7244
|
};
|
|
6667
7245
|
var use_toggle_pos_restaurant_default = useTogglePosRestaurant;
|
|
6668
|
-
|
|
7246
|
+
|
|
7247
|
+
// src/provider/service-provider.tsx
|
|
7248
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
7249
|
+
var ServiceContext = createContext3(null);
|
|
6669
7250
|
var ServiceProvider = ({
|
|
6670
7251
|
children
|
|
6671
7252
|
}) => {
|
|
@@ -6696,7 +7277,6 @@ var ServiceProvider = ({
|
|
|
6696
7277
|
useDeleteComment: use_delete_comment_default,
|
|
6697
7278
|
useGetComment: use_get_comment_default,
|
|
6698
7279
|
useGetFormView: use_get_form_view_default,
|
|
6699
|
-
useGetImage: use_get_image_default,
|
|
6700
7280
|
useSendComment: use_send_comment_default,
|
|
6701
7281
|
useSupaUploadImage: use_supa_upload_image_default,
|
|
6702
7282
|
useDelete: use_delete_default,
|
|
@@ -6822,20 +7402,21 @@ var ServiceProvider = ({
|
|
|
6822
7402
|
useDeleteProduct: use_delete_product_default,
|
|
6823
7403
|
useTogglePosRestaurant: use_toggle_pos_restaurant_default,
|
|
6824
7404
|
useActionServerHome: use_action_server_home_default,
|
|
6825
|
-
|
|
6826
|
-
useGetPoints: use_get_point_default,
|
|
6827
|
-
useGetOrders: use_get_order_default,
|
|
6828
|
-
useGetVouchers: use_get_voucher_default
|
|
7405
|
+
useGetCustomerLoyaltyPoint: use_get_customer_loyalty_point_default
|
|
6829
7406
|
};
|
|
6830
|
-
return /* @__PURE__ */
|
|
7407
|
+
return /* @__PURE__ */ jsx5(ServiceContext.Provider, { value: services, children });
|
|
6831
7408
|
};
|
|
6832
7409
|
var useService = () => {
|
|
6833
|
-
const context =
|
|
7410
|
+
const context = useContext3(ServiceContext);
|
|
6834
7411
|
if (!context) {
|
|
6835
7412
|
throw new Error("useService must be used within a ServiceProvider");
|
|
6836
7413
|
}
|
|
6837
7414
|
return context;
|
|
6838
7415
|
};
|
|
7416
|
+
|
|
7417
|
+
// src/provider/meta-provider.tsx
|
|
7418
|
+
import { useEffect } from "react";
|
|
7419
|
+
import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
|
|
6839
7420
|
var MetaProvider = ({ children }) => {
|
|
6840
7421
|
const { env } = useEnv();
|
|
6841
7422
|
function updateMetadata() {
|
|
@@ -6886,7 +7467,180 @@ var MetaProvider = ({ children }) => {
|
|
|
6886
7467
|
useEffect(() => {
|
|
6887
7468
|
updateMetadata();
|
|
6888
7469
|
}, [env?.defaultCompany]);
|
|
6889
|
-
return /* @__PURE__ */
|
|
7470
|
+
return /* @__PURE__ */ jsx6(Fragment, { children });
|
|
6890
7471
|
};
|
|
6891
7472
|
|
|
6892
|
-
export {
|
|
7473
|
+
export {
|
|
7474
|
+
ReactQueryProvider,
|
|
7475
|
+
MainProvider,
|
|
7476
|
+
EnvProvider,
|
|
7477
|
+
useEnv,
|
|
7478
|
+
ServiceProvider,
|
|
7479
|
+
useService,
|
|
7480
|
+
MetaProvider,
|
|
7481
|
+
SupabaseProvider,
|
|
7482
|
+
useSupabase,
|
|
7483
|
+
useActionService,
|
|
7484
|
+
useAuthService,
|
|
7485
|
+
useCompanyService,
|
|
7486
|
+
useExcelService,
|
|
7487
|
+
useFormService,
|
|
7488
|
+
useKanbanService,
|
|
7489
|
+
useModelService,
|
|
7490
|
+
useUserService,
|
|
7491
|
+
useViewService,
|
|
7492
|
+
useDashboardService,
|
|
7493
|
+
usePosService,
|
|
7494
|
+
use_forgot_password_default,
|
|
7495
|
+
use_forgotpassword_sso_default,
|
|
7496
|
+
use_get_provider_default,
|
|
7497
|
+
use_isvalid_token_default,
|
|
7498
|
+
use_login_credential_default,
|
|
7499
|
+
use_login_socical_default,
|
|
7500
|
+
use_login_tenant_user_default,
|
|
7501
|
+
use_reset_password_default,
|
|
7502
|
+
use_reset_password_sso_default,
|
|
7503
|
+
use_update_password_default,
|
|
7504
|
+
use_logout_default,
|
|
7505
|
+
use_get_access_by_code_default,
|
|
7506
|
+
use_validate_action_token_default,
|
|
7507
|
+
use_get_tenant_mapping_default,
|
|
7508
|
+
use_get_token_default,
|
|
7509
|
+
use_get_company_info_default,
|
|
7510
|
+
use_get_current_company_default,
|
|
7511
|
+
use_get_list_company_default,
|
|
7512
|
+
use_export_excel_default,
|
|
7513
|
+
use_get_field_export_default,
|
|
7514
|
+
use_get_file_excel_default,
|
|
7515
|
+
use_parse_preview_default,
|
|
7516
|
+
use_upload_file_excel_default,
|
|
7517
|
+
use_upload_id_file_default,
|
|
7518
|
+
uss_execute_import_default,
|
|
7519
|
+
use_change_status_default,
|
|
7520
|
+
use_delete_comment_default,
|
|
7521
|
+
use_get_comment_default,
|
|
7522
|
+
use_get_form_view_default,
|
|
7523
|
+
use_send_comment_default,
|
|
7524
|
+
use_upload_image_default,
|
|
7525
|
+
use_upload_file_default,
|
|
7526
|
+
use_get_thread_data_default,
|
|
7527
|
+
use_get_thread_messages_default,
|
|
7528
|
+
use_get_external_tabs_default,
|
|
7529
|
+
use_delete_default,
|
|
7530
|
+
use_get_all_default,
|
|
7531
|
+
use_get_conversion_rate_default,
|
|
7532
|
+
use_get_currency_default,
|
|
7533
|
+
use_get_detail_default,
|
|
7534
|
+
use_get_field_onchange_default,
|
|
7535
|
+
use_get_list_my_bank_account_default,
|
|
7536
|
+
use_model_default,
|
|
7537
|
+
use_odoo_data_transform_default,
|
|
7538
|
+
use_onchange_form_default,
|
|
7539
|
+
use_save_default,
|
|
7540
|
+
use_get_profile_default,
|
|
7541
|
+
use_get_user_default,
|
|
7542
|
+
use_switch_locale_default,
|
|
7543
|
+
use_button_default,
|
|
7544
|
+
use_duplicate_record_default,
|
|
7545
|
+
use_get_action_detail_default,
|
|
7546
|
+
use_get_calendar_default,
|
|
7547
|
+
use_get_groups_default,
|
|
7548
|
+
use_get_list_data_default,
|
|
7549
|
+
use_get_menu_default,
|
|
7550
|
+
use_get_print_report_default,
|
|
7551
|
+
use_get_progress_bar_default,
|
|
7552
|
+
use_get_selection_default,
|
|
7553
|
+
use_get_view_default,
|
|
7554
|
+
use_load_action_default,
|
|
7555
|
+
use_load_message_default,
|
|
7556
|
+
use_print_default,
|
|
7557
|
+
use_remove_row_default,
|
|
7558
|
+
use_resequence_default,
|
|
7559
|
+
use_run_action_default,
|
|
7560
|
+
use_signin_sso_default,
|
|
7561
|
+
use_verify_2FA_default,
|
|
7562
|
+
uset_get_2FA_method_default,
|
|
7563
|
+
use_grant_access_default,
|
|
7564
|
+
use_remove_totp_setup_default,
|
|
7565
|
+
use_request_setup_totp_default,
|
|
7566
|
+
use_settings_web_read_2fa_default,
|
|
7567
|
+
use_verify_totp_default,
|
|
7568
|
+
use_gen_serial_number_default,
|
|
7569
|
+
use_get_notifications_default,
|
|
7570
|
+
use_get_version_default,
|
|
7571
|
+
use_get_ward_default,
|
|
7572
|
+
use_get_city_default,
|
|
7573
|
+
use_get_country_default,
|
|
7574
|
+
use_get_partner_title_default,
|
|
7575
|
+
use_action_server_home_default,
|
|
7576
|
+
use_read_group_default,
|
|
7577
|
+
use_get_data_chart_default,
|
|
7578
|
+
use_add_entity_default,
|
|
7579
|
+
use_get_a_session_default,
|
|
7580
|
+
use_change_order_preparation_state_default,
|
|
7581
|
+
use_check_payment_default,
|
|
7582
|
+
use_create_e_invoice_default,
|
|
7583
|
+
use_create_entity_default,
|
|
7584
|
+
use_create_pos_config_default,
|
|
7585
|
+
use_create_session_default,
|
|
7586
|
+
use_delete_entity_default,
|
|
7587
|
+
use_generate_payment_qr_info_default,
|
|
7588
|
+
use_get_current_user_default,
|
|
7589
|
+
use_get_list_default,
|
|
7590
|
+
use_get_order_line_default,
|
|
7591
|
+
use_get_pin_code_default,
|
|
7592
|
+
use_get_pos_default,
|
|
7593
|
+
use_get_preparation_display_data_default,
|
|
7594
|
+
use_get_product_image_default,
|
|
7595
|
+
use_handle_close_session_default,
|
|
7596
|
+
use_handle_closing_detail_session_default,
|
|
7597
|
+
use_handle_closing_session_default,
|
|
7598
|
+
use_load_data_pos_session_default,
|
|
7599
|
+
use_manage_onchange_default,
|
|
7600
|
+
use_manage_session_default,
|
|
7601
|
+
use_process_order_default,
|
|
7602
|
+
use_save_pin_code_default,
|
|
7603
|
+
use_search_journal_default,
|
|
7604
|
+
use_update_closed_session_default,
|
|
7605
|
+
use_update_entity_default,
|
|
7606
|
+
use_update_order_status_default,
|
|
7607
|
+
use_complete_current_stage_default,
|
|
7608
|
+
use_get_e_invoice_info_default,
|
|
7609
|
+
use_app_authenticate_default,
|
|
7610
|
+
use_apply_voucher_default,
|
|
7611
|
+
use_remove_voucher_default,
|
|
7612
|
+
use_sync_from_ui_default,
|
|
7613
|
+
use_get_customer_loyalty_point_default,
|
|
7614
|
+
use_add_floor_default,
|
|
7615
|
+
use_add_table_default,
|
|
7616
|
+
use_update_floor_default,
|
|
7617
|
+
use_update_table_default,
|
|
7618
|
+
use_delete_floor_default,
|
|
7619
|
+
use_delete_table_default,
|
|
7620
|
+
use_create_order_default,
|
|
7621
|
+
use_add_category_default,
|
|
7622
|
+
use_add_product_to_order_default,
|
|
7623
|
+
use_update_order_total_amount_default,
|
|
7624
|
+
use_update_order_line_default,
|
|
7625
|
+
use_update_order_default,
|
|
7626
|
+
use_delete_order_default,
|
|
7627
|
+
use_delete_order_line_default,
|
|
7628
|
+
use_add_product_default,
|
|
7629
|
+
use_get_functional_modules_default,
|
|
7630
|
+
use_add_payment_method_default,
|
|
7631
|
+
use_update_session_payment_methods_default,
|
|
7632
|
+
use_create_payment_default,
|
|
7633
|
+
use_create_customer_default,
|
|
7634
|
+
use_update_customer_default,
|
|
7635
|
+
use_delete_customer_default,
|
|
7636
|
+
use_supa_upload_image_default,
|
|
7637
|
+
use_get_list_users_default,
|
|
7638
|
+
use_get_list_roles_default,
|
|
7639
|
+
use_assign_role_default,
|
|
7640
|
+
use_get_supa_current_user_default,
|
|
7641
|
+
use_update_category_default,
|
|
7642
|
+
use_delete_category_default,
|
|
7643
|
+
use_update_product_default,
|
|
7644
|
+
use_delete_product_default,
|
|
7645
|
+
use_toggle_pos_restaurant_default
|
|
7646
|
+
};
|