@fctc/interface-logic 4.2.3 → 4.2.5
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/constants.d.mts +2 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/constants.mjs +1 -0
- package/dist/hooks.d.mts +16 -9
- package/dist/hooks.d.ts +16 -9
- package/dist/hooks.js +145 -92
- package/dist/hooks.mjs +142 -90
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +166 -114
- package/dist/provider.mjs +153 -101
- package/dist/services.d.mts +6 -7
- package/dist/services.d.ts +6 -7
- package/dist/services.js +177 -170
- package/dist/services.mjs +174 -167
- package/package.json +1 -1
package/dist/services.js
CHANGED
|
@@ -44,7 +44,7 @@ __export(services_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(services_exports);
|
|
45
45
|
|
|
46
46
|
// src/services/action-service/index.ts
|
|
47
|
-
var
|
|
47
|
+
var import_react9 = require("react");
|
|
48
48
|
|
|
49
49
|
// src/constants/api/uri-constant.ts
|
|
50
50
|
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
@@ -2881,7 +2881,7 @@ function useEnv() {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
|
|
2883
2883
|
// src/provider/service-provider.tsx
|
|
2884
|
-
var
|
|
2884
|
+
var import_react7 = require("react");
|
|
2885
2885
|
|
|
2886
2886
|
// src/hooks/auth/use-forgot-password.ts
|
|
2887
2887
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -3147,64 +3147,64 @@ var import_react_query88 = require("@tanstack/react-query");
|
|
|
3147
3147
|
// src/hooks/view/use-get-product-image.ts
|
|
3148
3148
|
var import_react_query89 = require("@tanstack/react-query");
|
|
3149
3149
|
|
|
3150
|
-
// src/hooks/view/use-
|
|
3150
|
+
// src/hooks/view/use-check-payment.ts
|
|
3151
3151
|
var import_react_query90 = require("@tanstack/react-query");
|
|
3152
3152
|
|
|
3153
|
-
// src/hooks/view/use-
|
|
3153
|
+
// src/hooks/view/use-handle-close-session.ts
|
|
3154
3154
|
var import_react_query91 = require("@tanstack/react-query");
|
|
3155
3155
|
|
|
3156
|
-
// src/hooks/view/use-handle-
|
|
3156
|
+
// src/hooks/view/use-handle-closing-detail-session.ts
|
|
3157
3157
|
var import_react_query92 = require("@tanstack/react-query");
|
|
3158
3158
|
|
|
3159
|
-
// src/hooks/view/use-
|
|
3159
|
+
// src/hooks/view/use-create-pos-config.ts
|
|
3160
3160
|
var import_react_query93 = require("@tanstack/react-query");
|
|
3161
3161
|
|
|
3162
|
-
// src/hooks/view/use-
|
|
3162
|
+
// src/hooks/view/use-search-journal.ts
|
|
3163
3163
|
var import_react_query94 = require("@tanstack/react-query");
|
|
3164
3164
|
|
|
3165
|
-
// src/hooks/view/
|
|
3165
|
+
// src/hooks/view/useGetPreparaionDisplayData.ts
|
|
3166
3166
|
var import_react_query95 = require("@tanstack/react-query");
|
|
3167
3167
|
|
|
3168
|
-
// src/hooks/view/
|
|
3168
|
+
// src/hooks/view/useChangeOrderPreparaionState.ts
|
|
3169
3169
|
var import_react_query96 = require("@tanstack/react-query");
|
|
3170
3170
|
|
|
3171
|
-
// src/hooks/view/
|
|
3171
|
+
// src/hooks/view/use-update-order-status.ts
|
|
3172
3172
|
var import_react_query97 = require("@tanstack/react-query");
|
|
3173
3173
|
|
|
3174
|
-
// src/hooks/view/use-
|
|
3174
|
+
// src/hooks/view/use-process-order.ts
|
|
3175
3175
|
var import_react_query98 = require("@tanstack/react-query");
|
|
3176
3176
|
|
|
3177
|
-
// src/hooks/view/use-
|
|
3177
|
+
// src/hooks/view/use-generate-payment-qr-info.ts
|
|
3178
3178
|
var import_react_query99 = require("@tanstack/react-query");
|
|
3179
3179
|
|
|
3180
|
-
// src/hooks/view/use-
|
|
3180
|
+
// src/hooks/view/use-save-pin-code.ts
|
|
3181
3181
|
var import_react_query100 = require("@tanstack/react-query");
|
|
3182
3182
|
|
|
3183
|
-
// src/hooks/view/use-
|
|
3183
|
+
// src/hooks/view/use-get-pin-code.ts
|
|
3184
3184
|
var import_react_query101 = require("@tanstack/react-query");
|
|
3185
3185
|
|
|
3186
|
-
// src/hooks/view/use-get-
|
|
3186
|
+
// src/hooks/view/use-get-notifications.ts
|
|
3187
3187
|
var import_react_query102 = require("@tanstack/react-query");
|
|
3188
3188
|
|
|
3189
|
-
// src/hooks/view/use-get-
|
|
3189
|
+
// src/hooks/view/use-get-version.ts
|
|
3190
3190
|
var import_react_query103 = require("@tanstack/react-query");
|
|
3191
3191
|
|
|
3192
|
-
// src/hooks/view/use-
|
|
3192
|
+
// src/hooks/view/use-create-e-invoice.ts
|
|
3193
3193
|
var import_react_query104 = require("@tanstack/react-query");
|
|
3194
3194
|
|
|
3195
|
-
// src/hooks/view/use-
|
|
3195
|
+
// src/hooks/view/use-get-current-user.ts
|
|
3196
3196
|
var import_react_query105 = require("@tanstack/react-query");
|
|
3197
3197
|
|
|
3198
|
-
// src/hooks/view/use-get-
|
|
3198
|
+
// src/hooks/view/use-get-ward.ts
|
|
3199
3199
|
var import_react_query106 = require("@tanstack/react-query");
|
|
3200
3200
|
|
|
3201
|
-
// src/hooks/view/use-get-
|
|
3201
|
+
// src/hooks/view/use-get-city.ts
|
|
3202
3202
|
var import_react_query107 = require("@tanstack/react-query");
|
|
3203
3203
|
|
|
3204
|
-
// src/hooks/view/use-get-
|
|
3204
|
+
// src/hooks/view/use-get-country.ts
|
|
3205
3205
|
var import_react_query108 = require("@tanstack/react-query");
|
|
3206
3206
|
|
|
3207
|
-
// src/hooks/view/use-get-
|
|
3207
|
+
// src/hooks/view/use-get-partner-title.ts
|
|
3208
3208
|
var import_react_query109 = require("@tanstack/react-query");
|
|
3209
3209
|
|
|
3210
3210
|
// src/hooks/chart/use-read-group.ts
|
|
@@ -3213,18 +3213,24 @@ var import_react_query110 = require("@tanstack/react-query");
|
|
|
3213
3213
|
// src/hooks/chart/use-get-data-chart.ts
|
|
3214
3214
|
var import_react_query111 = require("@tanstack/react-query");
|
|
3215
3215
|
|
|
3216
|
+
// src/hooks/pos/use-add-entity.ts
|
|
3217
|
+
var import_react_query112 = require("@tanstack/react-query");
|
|
3218
|
+
|
|
3219
|
+
// src/services/pos-service/add-entity.ts
|
|
3220
|
+
var import_react6 = require("react");
|
|
3221
|
+
|
|
3216
3222
|
// src/provider/service-provider.tsx
|
|
3217
3223
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3218
|
-
var ServiceContext = (0,
|
|
3224
|
+
var ServiceContext = (0, import_react7.createContext)(null);
|
|
3219
3225
|
|
|
3220
3226
|
// src/provider/meta-provider.tsx
|
|
3221
|
-
var
|
|
3227
|
+
var import_react8 = require("react");
|
|
3222
3228
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3223
3229
|
|
|
3224
3230
|
// src/services/action-service/index.ts
|
|
3225
3231
|
function useActionService() {
|
|
3226
3232
|
const { env } = useEnv();
|
|
3227
|
-
const loadAction = (0,
|
|
3233
|
+
const loadAction = (0, import_react9.useCallback)(
|
|
3228
3234
|
async ({
|
|
3229
3235
|
idAction,
|
|
3230
3236
|
context,
|
|
@@ -3248,7 +3254,7 @@ function useActionService() {
|
|
|
3248
3254
|
},
|
|
3249
3255
|
[env]
|
|
3250
3256
|
);
|
|
3251
|
-
const callButton = (0,
|
|
3257
|
+
const callButton = (0, import_react9.useCallback)(
|
|
3252
3258
|
async ({
|
|
3253
3259
|
model,
|
|
3254
3260
|
ids = [],
|
|
@@ -3282,7 +3288,7 @@ function useActionService() {
|
|
|
3282
3288
|
},
|
|
3283
3289
|
[env]
|
|
3284
3290
|
);
|
|
3285
|
-
const removeRows = (0,
|
|
3291
|
+
const removeRows = (0, import_react9.useCallback)(
|
|
3286
3292
|
async ({
|
|
3287
3293
|
model,
|
|
3288
3294
|
ids,
|
|
@@ -3308,7 +3314,7 @@ function useActionService() {
|
|
|
3308
3314
|
},
|
|
3309
3315
|
[env]
|
|
3310
3316
|
);
|
|
3311
|
-
const duplicateRecord = (0,
|
|
3317
|
+
const duplicateRecord = (0, import_react9.useCallback)(
|
|
3312
3318
|
async ({
|
|
3313
3319
|
model,
|
|
3314
3320
|
id,
|
|
@@ -3334,7 +3340,7 @@ function useActionService() {
|
|
|
3334
3340
|
},
|
|
3335
3341
|
[env]
|
|
3336
3342
|
);
|
|
3337
|
-
const getPrintReportName = (0,
|
|
3343
|
+
const getPrintReportName = (0, import_react9.useCallback)(
|
|
3338
3344
|
async ({ id }) => {
|
|
3339
3345
|
const jsonData = {
|
|
3340
3346
|
model: "ir.actions.report",
|
|
@@ -3352,7 +3358,7 @@ function useActionService() {
|
|
|
3352
3358
|
},
|
|
3353
3359
|
[env]
|
|
3354
3360
|
);
|
|
3355
|
-
const print = (0,
|
|
3361
|
+
const print = (0, import_react9.useCallback)(
|
|
3356
3362
|
async ({ id, report, db }) => {
|
|
3357
3363
|
const jsonData = {
|
|
3358
3364
|
report,
|
|
@@ -3370,7 +3376,7 @@ function useActionService() {
|
|
|
3370
3376
|
},
|
|
3371
3377
|
[env]
|
|
3372
3378
|
);
|
|
3373
|
-
const runAction = (0,
|
|
3379
|
+
const runAction = (0, import_react9.useCallback)(
|
|
3374
3380
|
async ({
|
|
3375
3381
|
idAction,
|
|
3376
3382
|
context,
|
|
@@ -3397,7 +3403,7 @@ function useActionService() {
|
|
|
3397
3403
|
},
|
|
3398
3404
|
[env]
|
|
3399
3405
|
);
|
|
3400
|
-
const generateSerialNumber = (0,
|
|
3406
|
+
const generateSerialNumber = (0, import_react9.useCallback)(
|
|
3401
3407
|
async ({
|
|
3402
3408
|
kwargs,
|
|
3403
3409
|
context,
|
|
@@ -3435,10 +3441,10 @@ function useActionService() {
|
|
|
3435
3441
|
}
|
|
3436
3442
|
|
|
3437
3443
|
// src/services/auth-service/index.ts
|
|
3438
|
-
var
|
|
3444
|
+
var import_react10 = require("react");
|
|
3439
3445
|
function useAuthService() {
|
|
3440
3446
|
const { env } = useEnv();
|
|
3441
|
-
const login = (0,
|
|
3447
|
+
const login = (0, import_react10.useCallback)(
|
|
3442
3448
|
async (body) => {
|
|
3443
3449
|
const payload = Object.fromEntries(
|
|
3444
3450
|
Object.entries({
|
|
@@ -3463,7 +3469,7 @@ function useAuthService() {
|
|
|
3463
3469
|
},
|
|
3464
3470
|
[env]
|
|
3465
3471
|
);
|
|
3466
|
-
const forgotPassword = (0,
|
|
3472
|
+
const forgotPassword = (0, import_react10.useCallback)(
|
|
3467
3473
|
async (email) => {
|
|
3468
3474
|
const bodyData = {
|
|
3469
3475
|
login: email,
|
|
@@ -3477,7 +3483,7 @@ function useAuthService() {
|
|
|
3477
3483
|
},
|
|
3478
3484
|
[env]
|
|
3479
3485
|
);
|
|
3480
|
-
const forgotPasswordSSO = (0,
|
|
3486
|
+
const forgotPasswordSSO = (0, import_react10.useCallback)(
|
|
3481
3487
|
async ({
|
|
3482
3488
|
email,
|
|
3483
3489
|
with_context,
|
|
@@ -3500,7 +3506,7 @@ function useAuthService() {
|
|
|
3500
3506
|
},
|
|
3501
3507
|
[env]
|
|
3502
3508
|
);
|
|
3503
|
-
const resetPassword = (0,
|
|
3509
|
+
const resetPassword = (0, import_react10.useCallback)(
|
|
3504
3510
|
async (data, token) => {
|
|
3505
3511
|
const bodyData = {
|
|
3506
3512
|
token,
|
|
@@ -3515,7 +3521,7 @@ function useAuthService() {
|
|
|
3515
3521
|
},
|
|
3516
3522
|
[env]
|
|
3517
3523
|
);
|
|
3518
|
-
const resetPasswordSSO = (0,
|
|
3524
|
+
const resetPasswordSSO = (0, import_react10.useCallback)(
|
|
3519
3525
|
async ({
|
|
3520
3526
|
method,
|
|
3521
3527
|
password,
|
|
@@ -3538,7 +3544,7 @@ function useAuthService() {
|
|
|
3538
3544
|
},
|
|
3539
3545
|
[env]
|
|
3540
3546
|
);
|
|
3541
|
-
const updatePassword = (0,
|
|
3547
|
+
const updatePassword = (0, import_react10.useCallback)(
|
|
3542
3548
|
async (data, token) => {
|
|
3543
3549
|
const bodyData = {
|
|
3544
3550
|
token,
|
|
@@ -3553,7 +3559,7 @@ function useAuthService() {
|
|
|
3553
3559
|
},
|
|
3554
3560
|
[env]
|
|
3555
3561
|
);
|
|
3556
|
-
const isValidToken = (0,
|
|
3562
|
+
const isValidToken = (0, import_react10.useCallback)(
|
|
3557
3563
|
async (token) => {
|
|
3558
3564
|
const bodyData = {
|
|
3559
3565
|
token
|
|
@@ -3566,7 +3572,7 @@ function useAuthService() {
|
|
|
3566
3572
|
},
|
|
3567
3573
|
[env]
|
|
3568
3574
|
);
|
|
3569
|
-
const isValidActionToken = (0,
|
|
3575
|
+
const isValidActionToken = (0, import_react10.useCallback)(
|
|
3570
3576
|
async (actionToken) => {
|
|
3571
3577
|
const bodyData = {};
|
|
3572
3578
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
@@ -3579,7 +3585,7 @@ function useAuthService() {
|
|
|
3579
3585
|
},
|
|
3580
3586
|
[env]
|
|
3581
3587
|
);
|
|
3582
|
-
const loginSocial = (0,
|
|
3588
|
+
const loginSocial = (0, import_react10.useCallback)(
|
|
3583
3589
|
async ({
|
|
3584
3590
|
db,
|
|
3585
3591
|
state,
|
|
@@ -3597,13 +3603,13 @@ function useAuthService() {
|
|
|
3597
3603
|
},
|
|
3598
3604
|
[env]
|
|
3599
3605
|
);
|
|
3600
|
-
const getProviders = (0,
|
|
3606
|
+
const getProviders = (0, import_react10.useCallback)(
|
|
3601
3607
|
async (db) => {
|
|
3602
3608
|
return env?.requests?.get("/oauth/providers", { params: { db } });
|
|
3603
3609
|
},
|
|
3604
3610
|
[env]
|
|
3605
3611
|
);
|
|
3606
|
-
const getAccessByCode = (0,
|
|
3612
|
+
const getAccessByCode = (0, import_react10.useCallback)(
|
|
3607
3613
|
async (code) => {
|
|
3608
3614
|
const data = new URLSearchParams();
|
|
3609
3615
|
data.append("code", code);
|
|
@@ -3623,7 +3629,7 @@ function useAuthService() {
|
|
|
3623
3629
|
},
|
|
3624
3630
|
[env]
|
|
3625
3631
|
);
|
|
3626
|
-
const logout = (0,
|
|
3632
|
+
const logout = (0, import_react10.useCallback)(
|
|
3627
3633
|
async (service) => {
|
|
3628
3634
|
return env?.requests?.post(
|
|
3629
3635
|
"/logout" /* LOGOUT */,
|
|
@@ -3640,7 +3646,7 @@ function useAuthService() {
|
|
|
3640
3646
|
},
|
|
3641
3647
|
[env]
|
|
3642
3648
|
);
|
|
3643
|
-
const getTenantMapping = (0,
|
|
3649
|
+
const getTenantMapping = (0, import_react10.useCallback)(
|
|
3644
3650
|
async ({ shortName, service }) => {
|
|
3645
3651
|
const bodyData = {
|
|
3646
3652
|
short_name: shortName
|
|
@@ -3658,7 +3664,7 @@ function useAuthService() {
|
|
|
3658
3664
|
},
|
|
3659
3665
|
[env]
|
|
3660
3666
|
);
|
|
3661
|
-
const getToken = (0,
|
|
3667
|
+
const getToken = (0, import_react10.useCallback)(
|
|
3662
3668
|
async ({
|
|
3663
3669
|
phone,
|
|
3664
3670
|
name,
|
|
@@ -3702,10 +3708,10 @@ function useAuthService() {
|
|
|
3702
3708
|
}
|
|
3703
3709
|
|
|
3704
3710
|
// src/services/company-service/index.ts
|
|
3705
|
-
var
|
|
3711
|
+
var import_react11 = require("react");
|
|
3706
3712
|
function useCompanyService() {
|
|
3707
3713
|
const { env } = useEnv();
|
|
3708
|
-
const getCurrentCompany = (0,
|
|
3714
|
+
const getCurrentCompany = (0, import_react11.useCallback)(
|
|
3709
3715
|
async (service, extraHeaders) => {
|
|
3710
3716
|
return await env.requests.get(
|
|
3711
3717
|
"/company" /* COMPANY_PATH */,
|
|
@@ -3722,7 +3728,7 @@ function useCompanyService() {
|
|
|
3722
3728
|
},
|
|
3723
3729
|
[env]
|
|
3724
3730
|
);
|
|
3725
|
-
const getInfoCompany = (0,
|
|
3731
|
+
const getInfoCompany = (0, import_react11.useCallback)(
|
|
3726
3732
|
async (id, service) => {
|
|
3727
3733
|
const jsonData = {
|
|
3728
3734
|
ids: [id],
|
|
@@ -3758,10 +3764,10 @@ function useCompanyService() {
|
|
|
3758
3764
|
}
|
|
3759
3765
|
|
|
3760
3766
|
// src/services/excel-service/index.ts
|
|
3761
|
-
var
|
|
3767
|
+
var import_react12 = require("react");
|
|
3762
3768
|
function useExcelService() {
|
|
3763
3769
|
const { env } = useEnv();
|
|
3764
|
-
const uploadFileExcel = (0,
|
|
3770
|
+
const uploadFileExcel = (0, import_react12.useCallback)(
|
|
3765
3771
|
async ({
|
|
3766
3772
|
formData,
|
|
3767
3773
|
service,
|
|
@@ -3778,7 +3784,7 @@ function useExcelService() {
|
|
|
3778
3784
|
},
|
|
3779
3785
|
[env]
|
|
3780
3786
|
);
|
|
3781
|
-
const uploadIdFile = (0,
|
|
3787
|
+
const uploadIdFile = (0, import_react12.useCallback)(
|
|
3782
3788
|
async ({
|
|
3783
3789
|
formData,
|
|
3784
3790
|
service,
|
|
@@ -3795,7 +3801,7 @@ function useExcelService() {
|
|
|
3795
3801
|
},
|
|
3796
3802
|
[env]
|
|
3797
3803
|
);
|
|
3798
|
-
const parsePreview = (0,
|
|
3804
|
+
const parsePreview = (0, import_react12.useCallback)(
|
|
3799
3805
|
async ({
|
|
3800
3806
|
id,
|
|
3801
3807
|
selectedSheet,
|
|
@@ -3844,7 +3850,7 @@ function useExcelService() {
|
|
|
3844
3850
|
},
|
|
3845
3851
|
[env]
|
|
3846
3852
|
);
|
|
3847
|
-
const executeImport = (0,
|
|
3853
|
+
const executeImport = (0, import_react12.useCallback)(
|
|
3848
3854
|
async ({
|
|
3849
3855
|
columns,
|
|
3850
3856
|
fields,
|
|
@@ -3878,7 +3884,7 @@ function useExcelService() {
|
|
|
3878
3884
|
},
|
|
3879
3885
|
[env]
|
|
3880
3886
|
);
|
|
3881
|
-
const getFileExcel = (0,
|
|
3887
|
+
const getFileExcel = (0, import_react12.useCallback)(
|
|
3882
3888
|
async ({
|
|
3883
3889
|
model,
|
|
3884
3890
|
service,
|
|
@@ -3902,7 +3908,7 @@ function useExcelService() {
|
|
|
3902
3908
|
},
|
|
3903
3909
|
[env]
|
|
3904
3910
|
);
|
|
3905
|
-
const getFieldExport = (0,
|
|
3911
|
+
const getFieldExport = (0, import_react12.useCallback)(
|
|
3906
3912
|
async ({
|
|
3907
3913
|
ids,
|
|
3908
3914
|
model,
|
|
@@ -3942,7 +3948,7 @@ function useExcelService() {
|
|
|
3942
3948
|
},
|
|
3943
3949
|
[env]
|
|
3944
3950
|
);
|
|
3945
|
-
const exportExcel = (0,
|
|
3951
|
+
const exportExcel = (0, import_react12.useCallback)(
|
|
3946
3952
|
async ({
|
|
3947
3953
|
model,
|
|
3948
3954
|
domain,
|
|
@@ -3990,10 +3996,10 @@ function useExcelService() {
|
|
|
3990
3996
|
}
|
|
3991
3997
|
|
|
3992
3998
|
// src/services/form-service/index.ts
|
|
3993
|
-
var
|
|
3999
|
+
var import_react13 = require("react");
|
|
3994
4000
|
function useFormService() {
|
|
3995
4001
|
const { env } = useEnv();
|
|
3996
|
-
const getComment = (0,
|
|
4002
|
+
const getComment = (0, import_react13.useCallback)(
|
|
3997
4003
|
async ({ data }) => {
|
|
3998
4004
|
const jsonData = {
|
|
3999
4005
|
thread_id: data.thread_id,
|
|
@@ -4011,7 +4017,7 @@ function useFormService() {
|
|
|
4011
4017
|
},
|
|
4012
4018
|
[env]
|
|
4013
4019
|
);
|
|
4014
|
-
const getThreadData = (0,
|
|
4020
|
+
const getThreadData = (0, import_react13.useCallback)(
|
|
4015
4021
|
async ({
|
|
4016
4022
|
data,
|
|
4017
4023
|
xNode,
|
|
@@ -4038,7 +4044,7 @@ function useFormService() {
|
|
|
4038
4044
|
},
|
|
4039
4045
|
[env]
|
|
4040
4046
|
);
|
|
4041
|
-
const getThreadMessages = (0,
|
|
4047
|
+
const getThreadMessages = (0, import_react13.useCallback)(
|
|
4042
4048
|
async ({
|
|
4043
4049
|
data,
|
|
4044
4050
|
xNode,
|
|
@@ -4064,7 +4070,7 @@ function useFormService() {
|
|
|
4064
4070
|
},
|
|
4065
4071
|
[env]
|
|
4066
4072
|
);
|
|
4067
|
-
const sentComment = (0,
|
|
4073
|
+
const sentComment = (0, import_react13.useCallback)(
|
|
4068
4074
|
async ({ data }) => {
|
|
4069
4075
|
const jsonData = {
|
|
4070
4076
|
context: {
|
|
@@ -4092,7 +4098,7 @@ function useFormService() {
|
|
|
4092
4098
|
},
|
|
4093
4099
|
[env]
|
|
4094
4100
|
);
|
|
4095
|
-
const deleteComment = (0,
|
|
4101
|
+
const deleteComment = (0, import_react13.useCallback)(
|
|
4096
4102
|
async ({ data }) => {
|
|
4097
4103
|
const jsonData = {
|
|
4098
4104
|
attachment_ids: [],
|
|
@@ -4108,7 +4114,7 @@ function useFormService() {
|
|
|
4108
4114
|
},
|
|
4109
4115
|
[env]
|
|
4110
4116
|
);
|
|
4111
|
-
const getImage = (0,
|
|
4117
|
+
const getImage = (0, import_react13.useCallback)(
|
|
4112
4118
|
async ({ data }) => {
|
|
4113
4119
|
return env.requests.get(
|
|
4114
4120
|
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
@@ -4121,7 +4127,7 @@ function useFormService() {
|
|
|
4121
4127
|
},
|
|
4122
4128
|
[env]
|
|
4123
4129
|
);
|
|
4124
|
-
const uploadImage = (0,
|
|
4130
|
+
const uploadImage = (0, import_react13.useCallback)(
|
|
4125
4131
|
async ({
|
|
4126
4132
|
formData,
|
|
4127
4133
|
service,
|
|
@@ -4140,7 +4146,7 @@ function useFormService() {
|
|
|
4140
4146
|
},
|
|
4141
4147
|
[env]
|
|
4142
4148
|
);
|
|
4143
|
-
const uploadFile = (0,
|
|
4149
|
+
const uploadFile = (0, import_react13.useCallback)(
|
|
4144
4150
|
async ({
|
|
4145
4151
|
formData,
|
|
4146
4152
|
service,
|
|
@@ -4160,7 +4166,7 @@ function useFormService() {
|
|
|
4160
4166
|
},
|
|
4161
4167
|
[env]
|
|
4162
4168
|
);
|
|
4163
|
-
const getFormView = (0,
|
|
4169
|
+
const getFormView = (0, import_react13.useCallback)(
|
|
4164
4170
|
async ({ data }) => {
|
|
4165
4171
|
const jsonData = {
|
|
4166
4172
|
model: data.model,
|
|
@@ -4176,7 +4182,7 @@ function useFormService() {
|
|
|
4176
4182
|
},
|
|
4177
4183
|
[env]
|
|
4178
4184
|
);
|
|
4179
|
-
const changeStatus = (0,
|
|
4185
|
+
const changeStatus = (0, import_react13.useCallback)(
|
|
4180
4186
|
async ({ data }) => {
|
|
4181
4187
|
const vals = {
|
|
4182
4188
|
[data.name]: data.stage_id
|
|
@@ -4205,7 +4211,7 @@ function useFormService() {
|
|
|
4205
4211
|
},
|
|
4206
4212
|
[env]
|
|
4207
4213
|
);
|
|
4208
|
-
const getExternalTab = (0,
|
|
4214
|
+
const getExternalTab = (0, import_react13.useCallback)(
|
|
4209
4215
|
async ({ method, context, service, xNode }) => {
|
|
4210
4216
|
return env?.requests?.post(
|
|
4211
4217
|
"/call" /* CALL_PATH */,
|
|
@@ -4240,10 +4246,10 @@ function useFormService() {
|
|
|
4240
4246
|
}
|
|
4241
4247
|
|
|
4242
4248
|
// src/services/kanban-service/index.ts
|
|
4243
|
-
var
|
|
4249
|
+
var import_react14 = require("react");
|
|
4244
4250
|
function useKanbanService() {
|
|
4245
4251
|
const { env } = useEnv();
|
|
4246
|
-
const getGroups = (0,
|
|
4252
|
+
const getGroups = (0, import_react14.useCallback)(
|
|
4247
4253
|
async ({ model, width_context }) => {
|
|
4248
4254
|
const jsonData = {
|
|
4249
4255
|
model,
|
|
@@ -4263,7 +4269,7 @@ function useKanbanService() {
|
|
|
4263
4269
|
},
|
|
4264
4270
|
[env]
|
|
4265
4271
|
);
|
|
4266
|
-
const getProgressBar = (0,
|
|
4272
|
+
const getProgressBar = (0, import_react14.useCallback)(
|
|
4267
4273
|
async ({ field, color, model, width_context }) => {
|
|
4268
4274
|
const jsonData = {
|
|
4269
4275
|
model,
|
|
@@ -4293,10 +4299,10 @@ function useKanbanService() {
|
|
|
4293
4299
|
}
|
|
4294
4300
|
|
|
4295
4301
|
// src/services/model-service/index.ts
|
|
4296
|
-
var
|
|
4302
|
+
var import_react15 = require("react");
|
|
4297
4303
|
function useModelService() {
|
|
4298
4304
|
const { env } = useEnv();
|
|
4299
|
-
const getListMyBankAccount = (0,
|
|
4305
|
+
const getListMyBankAccount = (0, import_react15.useCallback)(
|
|
4300
4306
|
async ({
|
|
4301
4307
|
domain,
|
|
4302
4308
|
spectification,
|
|
@@ -4320,7 +4326,7 @@ function useModelService() {
|
|
|
4320
4326
|
},
|
|
4321
4327
|
[env]
|
|
4322
4328
|
);
|
|
4323
|
-
const getCurrency = (0,
|
|
4329
|
+
const getCurrency = (0, import_react15.useCallback)(async () => {
|
|
4324
4330
|
const jsonData = {
|
|
4325
4331
|
model: "res.currency",
|
|
4326
4332
|
method: "web_search_read",
|
|
@@ -4340,7 +4346,7 @@ function useModelService() {
|
|
|
4340
4346
|
}
|
|
4341
4347
|
});
|
|
4342
4348
|
}, [env]);
|
|
4343
|
-
const getConversionRate = (0,
|
|
4349
|
+
const getConversionRate = (0, import_react15.useCallback)(async () => {
|
|
4344
4350
|
const jsonData = {
|
|
4345
4351
|
model: "res.currency",
|
|
4346
4352
|
method: "web_search_read",
|
|
@@ -4366,7 +4372,7 @@ function useModelService() {
|
|
|
4366
4372
|
}
|
|
4367
4373
|
});
|
|
4368
4374
|
}, [env]);
|
|
4369
|
-
const getAll = (0,
|
|
4375
|
+
const getAll = (0, import_react15.useCallback)(
|
|
4370
4376
|
async ({
|
|
4371
4377
|
data,
|
|
4372
4378
|
service,
|
|
@@ -4408,7 +4414,7 @@ function useModelService() {
|
|
|
4408
4414
|
},
|
|
4409
4415
|
[env]
|
|
4410
4416
|
);
|
|
4411
|
-
const getListCalendar = (0,
|
|
4417
|
+
const getListCalendar = (0, import_react15.useCallback)(
|
|
4412
4418
|
async ({ data }) => {
|
|
4413
4419
|
const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
4414
4420
|
fields: data.fields,
|
|
@@ -4439,7 +4445,7 @@ function useModelService() {
|
|
|
4439
4445
|
},
|
|
4440
4446
|
[env]
|
|
4441
4447
|
);
|
|
4442
|
-
const getList = (0,
|
|
4448
|
+
const getList = (0, import_react15.useCallback)(
|
|
4443
4449
|
async ({
|
|
4444
4450
|
model,
|
|
4445
4451
|
ids = [],
|
|
@@ -4471,7 +4477,7 @@ function useModelService() {
|
|
|
4471
4477
|
},
|
|
4472
4478
|
[env]
|
|
4473
4479
|
);
|
|
4474
|
-
const getDetail = (0,
|
|
4480
|
+
const getDetail = (0, import_react15.useCallback)(
|
|
4475
4481
|
async ({
|
|
4476
4482
|
ids = [],
|
|
4477
4483
|
model,
|
|
@@ -4503,7 +4509,7 @@ function useModelService() {
|
|
|
4503
4509
|
},
|
|
4504
4510
|
[env]
|
|
4505
4511
|
);
|
|
4506
|
-
const save = (0,
|
|
4512
|
+
const save = (0, import_react15.useCallback)(
|
|
4507
4513
|
async ({
|
|
4508
4514
|
model,
|
|
4509
4515
|
ids = [],
|
|
@@ -4538,7 +4544,7 @@ function useModelService() {
|
|
|
4538
4544
|
},
|
|
4539
4545
|
[env]
|
|
4540
4546
|
);
|
|
4541
|
-
const deleteApi = (0,
|
|
4547
|
+
const deleteApi = (0, import_react15.useCallback)(
|
|
4542
4548
|
async ({ ids = [], model, service }) => {
|
|
4543
4549
|
const jsonData = {
|
|
4544
4550
|
model,
|
|
@@ -4558,7 +4564,7 @@ function useModelService() {
|
|
|
4558
4564
|
},
|
|
4559
4565
|
[env]
|
|
4560
4566
|
);
|
|
4561
|
-
const onChange = (0,
|
|
4567
|
+
const onChange = (0, import_react15.useCallback)(
|
|
4562
4568
|
async ({
|
|
4563
4569
|
ids = [],
|
|
4564
4570
|
model,
|
|
@@ -4594,7 +4600,7 @@ function useModelService() {
|
|
|
4594
4600
|
},
|
|
4595
4601
|
[env]
|
|
4596
4602
|
);
|
|
4597
|
-
const getListFieldsOnchange = (0,
|
|
4603
|
+
const getListFieldsOnchange = (0, import_react15.useCallback)(
|
|
4598
4604
|
async ({
|
|
4599
4605
|
model,
|
|
4600
4606
|
service,
|
|
@@ -4618,7 +4624,7 @@ function useModelService() {
|
|
|
4618
4624
|
},
|
|
4619
4625
|
[env]
|
|
4620
4626
|
);
|
|
4621
|
-
const parseORMOdoo = (0,
|
|
4627
|
+
const parseORMOdoo = (0, import_react15.useCallback)((data) => {
|
|
4622
4628
|
for (const key in data) {
|
|
4623
4629
|
if (key === "display_name") {
|
|
4624
4630
|
delete data[key];
|
|
@@ -4631,7 +4637,7 @@ function useModelService() {
|
|
|
4631
4637
|
}
|
|
4632
4638
|
return { ...data };
|
|
4633
4639
|
}, []);
|
|
4634
|
-
const toDataJS = (0,
|
|
4640
|
+
const toDataJS = (0, import_react15.useCallback)(
|
|
4635
4641
|
(data, viewData, model) => {
|
|
4636
4642
|
for (const key in data) {
|
|
4637
4643
|
if (data[key] === false) {
|
|
@@ -4691,10 +4697,10 @@ function useModelService() {
|
|
|
4691
4697
|
}
|
|
4692
4698
|
|
|
4693
4699
|
// src/services/user-service/index.ts
|
|
4694
|
-
var
|
|
4700
|
+
var import_react16 = require("react");
|
|
4695
4701
|
function useUserService() {
|
|
4696
4702
|
const { env } = useEnv();
|
|
4697
|
-
const getProfile = (0,
|
|
4703
|
+
const getProfile = (0, import_react16.useCallback)(
|
|
4698
4704
|
async (service, path, extraHeaders) => {
|
|
4699
4705
|
return env?.requests?.get(
|
|
4700
4706
|
path || "/userinfo" /* PROFILE_PATH */,
|
|
@@ -4711,7 +4717,7 @@ function useUserService() {
|
|
|
4711
4717
|
},
|
|
4712
4718
|
[env]
|
|
4713
4719
|
);
|
|
4714
|
-
const getUser = (0,
|
|
4720
|
+
const getUser = (0, import_react16.useCallback)(
|
|
4715
4721
|
async ({ context, id }) => {
|
|
4716
4722
|
const jsonData = {
|
|
4717
4723
|
model: "res.users",
|
|
@@ -4749,7 +4755,7 @@ function useUserService() {
|
|
|
4749
4755
|
},
|
|
4750
4756
|
[env]
|
|
4751
4757
|
);
|
|
4752
|
-
const switchUserLocale = (0,
|
|
4758
|
+
const switchUserLocale = (0, import_react16.useCallback)(
|
|
4753
4759
|
async ({ id, values, service }) => {
|
|
4754
4760
|
const jsonData = {
|
|
4755
4761
|
model: "res.users",
|
|
@@ -4777,10 +4783,10 @@ function useUserService() {
|
|
|
4777
4783
|
}
|
|
4778
4784
|
|
|
4779
4785
|
// src/services/view-service/index.ts
|
|
4780
|
-
var
|
|
4786
|
+
var import_react17 = require("react");
|
|
4781
4787
|
function useViewService() {
|
|
4782
4788
|
const { env } = useEnv();
|
|
4783
|
-
const getView = (0,
|
|
4789
|
+
const getView = (0, import_react17.useCallback)(
|
|
4784
4790
|
async ({
|
|
4785
4791
|
model,
|
|
4786
4792
|
views,
|
|
@@ -4820,7 +4826,7 @@ function useViewService() {
|
|
|
4820
4826
|
},
|
|
4821
4827
|
[env]
|
|
4822
4828
|
);
|
|
4823
|
-
const getMenu = (0,
|
|
4829
|
+
const getMenu = (0, import_react17.useCallback)(
|
|
4824
4830
|
async (context, specification, domain, service) => {
|
|
4825
4831
|
const jsonData = {
|
|
4826
4832
|
model: "ir.ui.menu" /* MENU */,
|
|
@@ -4851,7 +4857,7 @@ function useViewService() {
|
|
|
4851
4857
|
},
|
|
4852
4858
|
[env]
|
|
4853
4859
|
);
|
|
4854
|
-
const getActionDetail = (0,
|
|
4860
|
+
const getActionDetail = (0, import_react17.useCallback)(
|
|
4855
4861
|
async (aid, context) => {
|
|
4856
4862
|
const jsonData = {
|
|
4857
4863
|
model: "ir.actions.act_window" /* WINDOW_ACTION */,
|
|
@@ -4881,7 +4887,7 @@ function useViewService() {
|
|
|
4881
4887
|
},
|
|
4882
4888
|
[env]
|
|
4883
4889
|
);
|
|
4884
|
-
const getResequence = (0,
|
|
4890
|
+
const getResequence = (0, import_react17.useCallback)(
|
|
4885
4891
|
async ({
|
|
4886
4892
|
model,
|
|
4887
4893
|
ids,
|
|
@@ -4911,7 +4917,7 @@ function useViewService() {
|
|
|
4911
4917
|
},
|
|
4912
4918
|
[env]
|
|
4913
4919
|
);
|
|
4914
|
-
const getSelectionItem = (0,
|
|
4920
|
+
const getSelectionItem = (0, import_react17.useCallback)(
|
|
4915
4921
|
async ({
|
|
4916
4922
|
data,
|
|
4917
4923
|
service,
|
|
@@ -4948,7 +4954,7 @@ function useViewService() {
|
|
|
4948
4954
|
},
|
|
4949
4955
|
[env]
|
|
4950
4956
|
);
|
|
4951
|
-
const loadMessages = (0,
|
|
4957
|
+
const loadMessages = (0, import_react17.useCallback)(async () => {
|
|
4952
4958
|
return env.requests.post(
|
|
4953
4959
|
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
4954
4960
|
{},
|
|
@@ -4959,14 +4965,14 @@ function useViewService() {
|
|
|
4959
4965
|
}
|
|
4960
4966
|
);
|
|
4961
4967
|
}, [env]);
|
|
4962
|
-
const getVersion = (0,
|
|
4968
|
+
const getVersion = (0, import_react17.useCallback)(async () => {
|
|
4963
4969
|
return env?.requests?.get("", {
|
|
4964
4970
|
headers: {
|
|
4965
4971
|
"Content-Type": "application/json"
|
|
4966
4972
|
}
|
|
4967
4973
|
});
|
|
4968
4974
|
}, [env]);
|
|
4969
|
-
const grantAccess = (0,
|
|
4975
|
+
const grantAccess = (0, import_react17.useCallback)(
|
|
4970
4976
|
async ({
|
|
4971
4977
|
redirect_uri,
|
|
4972
4978
|
state,
|
|
@@ -4993,7 +4999,7 @@ function useViewService() {
|
|
|
4993
4999
|
},
|
|
4994
5000
|
[env]
|
|
4995
5001
|
);
|
|
4996
|
-
const removeTotpSetUp = (0,
|
|
5002
|
+
const removeTotpSetUp = (0, import_react17.useCallback)(
|
|
4997
5003
|
async ({ method, token }) => {
|
|
4998
5004
|
const jsonData = {
|
|
4999
5005
|
method,
|
|
@@ -5014,7 +5020,7 @@ function useViewService() {
|
|
|
5014
5020
|
},
|
|
5015
5021
|
[env]
|
|
5016
5022
|
);
|
|
5017
|
-
const requestSetupTotp = (0,
|
|
5023
|
+
const requestSetupTotp = (0, import_react17.useCallback)(
|
|
5018
5024
|
async ({ method, token }) => {
|
|
5019
5025
|
const jsonData = {
|
|
5020
5026
|
method,
|
|
@@ -5033,7 +5039,7 @@ function useViewService() {
|
|
|
5033
5039
|
},
|
|
5034
5040
|
[env]
|
|
5035
5041
|
);
|
|
5036
|
-
const settingsWebRead2fa = (0,
|
|
5042
|
+
const settingsWebRead2fa = (0, import_react17.useCallback)(
|
|
5037
5043
|
async ({
|
|
5038
5044
|
method,
|
|
5039
5045
|
model,
|
|
@@ -5061,7 +5067,7 @@ function useViewService() {
|
|
|
5061
5067
|
},
|
|
5062
5068
|
[env]
|
|
5063
5069
|
);
|
|
5064
|
-
const signInSSO = (0,
|
|
5070
|
+
const signInSSO = (0, import_react17.useCallback)(
|
|
5065
5071
|
async ({
|
|
5066
5072
|
redirect_uri,
|
|
5067
5073
|
state,
|
|
@@ -5093,7 +5099,7 @@ function useViewService() {
|
|
|
5093
5099
|
},
|
|
5094
5100
|
[env]
|
|
5095
5101
|
);
|
|
5096
|
-
const verify2FA = (0,
|
|
5102
|
+
const verify2FA = (0, import_react17.useCallback)(
|
|
5097
5103
|
({
|
|
5098
5104
|
method,
|
|
5099
5105
|
with_context,
|
|
@@ -5126,7 +5132,7 @@ function useViewService() {
|
|
|
5126
5132
|
},
|
|
5127
5133
|
[env]
|
|
5128
5134
|
);
|
|
5129
|
-
const get2FAMethods = (0,
|
|
5135
|
+
const get2FAMethods = (0, import_react17.useCallback)(
|
|
5130
5136
|
({ method, with_context }) => {
|
|
5131
5137
|
const jsonData = {
|
|
5132
5138
|
method,
|
|
@@ -5145,7 +5151,7 @@ function useViewService() {
|
|
|
5145
5151
|
},
|
|
5146
5152
|
[env]
|
|
5147
5153
|
);
|
|
5148
|
-
const verifyTotp = (0,
|
|
5154
|
+
const verifyTotp = (0, import_react17.useCallback)(
|
|
5149
5155
|
({
|
|
5150
5156
|
method,
|
|
5151
5157
|
action_token,
|
|
@@ -5170,7 +5176,7 @@ function useViewService() {
|
|
|
5170
5176
|
},
|
|
5171
5177
|
[env]
|
|
5172
5178
|
);
|
|
5173
|
-
const getASession = (0,
|
|
5179
|
+
const getASession = (0, import_react17.useCallback)(
|
|
5174
5180
|
async ({
|
|
5175
5181
|
model,
|
|
5176
5182
|
args,
|
|
@@ -5213,7 +5219,7 @@ function useViewService() {
|
|
|
5213
5219
|
},
|
|
5214
5220
|
[env]
|
|
5215
5221
|
);
|
|
5216
|
-
const updateClosedSession = (0,
|
|
5222
|
+
const updateClosedSession = (0, import_react17.useCallback)(
|
|
5217
5223
|
({
|
|
5218
5224
|
model,
|
|
5219
5225
|
domain,
|
|
@@ -5240,7 +5246,7 @@ function useViewService() {
|
|
|
5240
5246
|
},
|
|
5241
5247
|
[env]
|
|
5242
5248
|
);
|
|
5243
|
-
const manageSession = (0,
|
|
5249
|
+
const manageSession = (0, import_react17.useCallback)(
|
|
5244
5250
|
({
|
|
5245
5251
|
model,
|
|
5246
5252
|
method,
|
|
@@ -5271,7 +5277,7 @@ function useViewService() {
|
|
|
5271
5277
|
},
|
|
5272
5278
|
[env]
|
|
5273
5279
|
);
|
|
5274
|
-
const handleClosingSession = (0,
|
|
5280
|
+
const handleClosingSession = (0, import_react17.useCallback)(
|
|
5275
5281
|
({
|
|
5276
5282
|
model,
|
|
5277
5283
|
method,
|
|
@@ -5300,7 +5306,7 @@ function useViewService() {
|
|
|
5300
5306
|
},
|
|
5301
5307
|
[env]
|
|
5302
5308
|
);
|
|
5303
|
-
const createSession = (0,
|
|
5309
|
+
const createSession = (0, import_react17.useCallback)(
|
|
5304
5310
|
({
|
|
5305
5311
|
model,
|
|
5306
5312
|
configId,
|
|
@@ -5330,7 +5336,7 @@ function useViewService() {
|
|
|
5330
5336
|
},
|
|
5331
5337
|
[env]
|
|
5332
5338
|
);
|
|
5333
|
-
const getPOS = (0,
|
|
5339
|
+
const getPOS = (0, import_react17.useCallback)(
|
|
5334
5340
|
({
|
|
5335
5341
|
model,
|
|
5336
5342
|
args,
|
|
@@ -5388,7 +5394,7 @@ function useViewService() {
|
|
|
5388
5394
|
},
|
|
5389
5395
|
[env]
|
|
5390
5396
|
);
|
|
5391
|
-
const createEntity = (0,
|
|
5397
|
+
const createEntity = (0, import_react17.useCallback)(
|
|
5392
5398
|
({
|
|
5393
5399
|
model,
|
|
5394
5400
|
args,
|
|
@@ -5414,33 +5420,7 @@ function useViewService() {
|
|
|
5414
5420
|
},
|
|
5415
5421
|
[env]
|
|
5416
5422
|
);
|
|
5417
|
-
const
|
|
5418
|
-
({
|
|
5419
|
-
model,
|
|
5420
|
-
values,
|
|
5421
|
-
xNode,
|
|
5422
|
-
service,
|
|
5423
|
-
isCreateEndpoint = false
|
|
5424
|
-
}) => {
|
|
5425
|
-
const jsonData = {
|
|
5426
|
-
model,
|
|
5427
|
-
values
|
|
5428
|
-
};
|
|
5429
|
-
return env?.requests.post(
|
|
5430
|
-
isCreateEndpoint ? "/create" /* CREATE_PATH */ : "/call" /* CALL_PATH */,
|
|
5431
|
-
jsonData,
|
|
5432
|
-
{
|
|
5433
|
-
headers: {
|
|
5434
|
-
"Content-Type": "application/json",
|
|
5435
|
-
...xNode ? { "X-Node": xNode } : {}
|
|
5436
|
-
}
|
|
5437
|
-
},
|
|
5438
|
-
service
|
|
5439
|
-
);
|
|
5440
|
-
},
|
|
5441
|
-
[env]
|
|
5442
|
-
);
|
|
5443
|
-
const getList = (0, import_react16.useCallback)(
|
|
5423
|
+
const getList = (0, import_react17.useCallback)(
|
|
5444
5424
|
({
|
|
5445
5425
|
model,
|
|
5446
5426
|
domain,
|
|
@@ -5474,7 +5454,7 @@ function useViewService() {
|
|
|
5474
5454
|
},
|
|
5475
5455
|
[env]
|
|
5476
5456
|
);
|
|
5477
|
-
const updateEntity = (0,
|
|
5457
|
+
const updateEntity = (0, import_react17.useCallback)(
|
|
5478
5458
|
({
|
|
5479
5459
|
model,
|
|
5480
5460
|
domain,
|
|
@@ -5502,7 +5482,7 @@ function useViewService() {
|
|
|
5502
5482
|
},
|
|
5503
5483
|
[env]
|
|
5504
5484
|
);
|
|
5505
|
-
const deleteEntity = (0,
|
|
5485
|
+
const deleteEntity = (0, import_react17.useCallback)(
|
|
5506
5486
|
({
|
|
5507
5487
|
model,
|
|
5508
5488
|
ids,
|
|
@@ -5529,7 +5509,7 @@ function useViewService() {
|
|
|
5529
5509
|
},
|
|
5530
5510
|
[env]
|
|
5531
5511
|
);
|
|
5532
|
-
const loadDataPosSession = (0,
|
|
5512
|
+
const loadDataPosSession = (0, import_react17.useCallback)(
|
|
5533
5513
|
({
|
|
5534
5514
|
model,
|
|
5535
5515
|
ids,
|
|
@@ -5567,7 +5547,7 @@ function useViewService() {
|
|
|
5567
5547
|
},
|
|
5568
5548
|
[env]
|
|
5569
5549
|
);
|
|
5570
|
-
const getPreparationDisplayData = (0,
|
|
5550
|
+
const getPreparationDisplayData = (0, import_react17.useCallback)(
|
|
5571
5551
|
({
|
|
5572
5552
|
ids,
|
|
5573
5553
|
xNode,
|
|
@@ -5594,7 +5574,7 @@ function useViewService() {
|
|
|
5594
5574
|
},
|
|
5595
5575
|
[env]
|
|
5596
5576
|
);
|
|
5597
|
-
const manageOnChange = (0,
|
|
5577
|
+
const manageOnChange = (0, import_react17.useCallback)(
|
|
5598
5578
|
({
|
|
5599
5579
|
model,
|
|
5600
5580
|
ids,
|
|
@@ -5622,7 +5602,7 @@ function useViewService() {
|
|
|
5622
5602
|
},
|
|
5623
5603
|
[env]
|
|
5624
5604
|
);
|
|
5625
|
-
const getOrderLine = (0,
|
|
5605
|
+
const getOrderLine = (0, import_react17.useCallback)(
|
|
5626
5606
|
({
|
|
5627
5607
|
model,
|
|
5628
5608
|
ids,
|
|
@@ -5652,7 +5632,7 @@ function useViewService() {
|
|
|
5652
5632
|
},
|
|
5653
5633
|
[env]
|
|
5654
5634
|
);
|
|
5655
|
-
const getProductImage = (0,
|
|
5635
|
+
const getProductImage = (0, import_react17.useCallback)(
|
|
5656
5636
|
({
|
|
5657
5637
|
model,
|
|
5658
5638
|
fields,
|
|
@@ -5685,7 +5665,7 @@ function useViewService() {
|
|
|
5685
5665
|
},
|
|
5686
5666
|
[env]
|
|
5687
5667
|
);
|
|
5688
|
-
const checkPayment = (0,
|
|
5668
|
+
const checkPayment = (0, import_react17.useCallback)(
|
|
5689
5669
|
({
|
|
5690
5670
|
model,
|
|
5691
5671
|
ids,
|
|
@@ -5713,7 +5693,7 @@ function useViewService() {
|
|
|
5713
5693
|
},
|
|
5714
5694
|
[env]
|
|
5715
5695
|
);
|
|
5716
|
-
const handleCloseSession = (0,
|
|
5696
|
+
const handleCloseSession = (0, import_react17.useCallback)(
|
|
5717
5697
|
({
|
|
5718
5698
|
model,
|
|
5719
5699
|
ids,
|
|
@@ -5740,7 +5720,7 @@ function useViewService() {
|
|
|
5740
5720
|
},
|
|
5741
5721
|
[env]
|
|
5742
5722
|
);
|
|
5743
|
-
const handleClosingDetailSession = (0,
|
|
5723
|
+
const handleClosingDetailSession = (0, import_react17.useCallback)(
|
|
5744
5724
|
({
|
|
5745
5725
|
model,
|
|
5746
5726
|
ids,
|
|
@@ -5769,7 +5749,7 @@ function useViewService() {
|
|
|
5769
5749
|
},
|
|
5770
5750
|
[env]
|
|
5771
5751
|
);
|
|
5772
|
-
const createPosConfig = (0,
|
|
5752
|
+
const createPosConfig = (0, import_react17.useCallback)(
|
|
5773
5753
|
({
|
|
5774
5754
|
model,
|
|
5775
5755
|
name,
|
|
@@ -5798,7 +5778,7 @@ function useViewService() {
|
|
|
5798
5778
|
},
|
|
5799
5779
|
[env]
|
|
5800
5780
|
);
|
|
5801
|
-
const searchJournal = (0,
|
|
5781
|
+
const searchJournal = (0, import_react17.useCallback)(
|
|
5802
5782
|
({
|
|
5803
5783
|
model,
|
|
5804
5784
|
method,
|
|
@@ -5827,7 +5807,7 @@ function useViewService() {
|
|
|
5827
5807
|
},
|
|
5828
5808
|
[env]
|
|
5829
5809
|
);
|
|
5830
|
-
const changeOrderPreparaionState = (0,
|
|
5810
|
+
const changeOrderPreparaionState = (0, import_react17.useCallback)(
|
|
5831
5811
|
({
|
|
5832
5812
|
orderId,
|
|
5833
5813
|
stageId,
|
|
@@ -5858,7 +5838,7 @@ function useViewService() {
|
|
|
5858
5838
|
},
|
|
5859
5839
|
[env]
|
|
5860
5840
|
);
|
|
5861
|
-
const updateOrderStatus = (0,
|
|
5841
|
+
const updateOrderStatus = (0, import_react17.useCallback)(
|
|
5862
5842
|
({
|
|
5863
5843
|
orderId,
|
|
5864
5844
|
state,
|
|
@@ -5883,7 +5863,7 @@ function useViewService() {
|
|
|
5883
5863
|
},
|
|
5884
5864
|
[env]
|
|
5885
5865
|
);
|
|
5886
|
-
const processOrder = (0,
|
|
5866
|
+
const processOrder = (0, import_react17.useCallback)(
|
|
5887
5867
|
({
|
|
5888
5868
|
orderId,
|
|
5889
5869
|
xNode,
|
|
@@ -5910,7 +5890,7 @@ function useViewService() {
|
|
|
5910
5890
|
},
|
|
5911
5891
|
[env]
|
|
5912
5892
|
);
|
|
5913
|
-
const generatePaymentQRInfo = (0,
|
|
5893
|
+
const generatePaymentQRInfo = (0, import_react17.useCallback)(
|
|
5914
5894
|
({
|
|
5915
5895
|
orderId,
|
|
5916
5896
|
amount,
|
|
@@ -5937,7 +5917,7 @@ function useViewService() {
|
|
|
5937
5917
|
},
|
|
5938
5918
|
[env]
|
|
5939
5919
|
);
|
|
5940
|
-
const savePinCode = (0,
|
|
5920
|
+
const savePinCode = (0, import_react17.useCallback)(
|
|
5941
5921
|
({
|
|
5942
5922
|
serialNumber,
|
|
5943
5923
|
pinCode,
|
|
@@ -5962,7 +5942,7 @@ function useViewService() {
|
|
|
5962
5942
|
},
|
|
5963
5943
|
[env]
|
|
5964
5944
|
);
|
|
5965
|
-
const getPinCode = (0,
|
|
5945
|
+
const getPinCode = (0, import_react17.useCallback)(
|
|
5966
5946
|
({
|
|
5967
5947
|
serialNumber,
|
|
5968
5948
|
xNode,
|
|
@@ -5985,7 +5965,7 @@ function useViewService() {
|
|
|
5985
5965
|
},
|
|
5986
5966
|
[env]
|
|
5987
5967
|
);
|
|
5988
|
-
const getNotifications = (0,
|
|
5968
|
+
const getNotifications = (0, import_react17.useCallback)(
|
|
5989
5969
|
async ({
|
|
5990
5970
|
service,
|
|
5991
5971
|
xNode,
|
|
@@ -6005,7 +5985,7 @@ function useViewService() {
|
|
|
6005
5985
|
},
|
|
6006
5986
|
[env]
|
|
6007
5987
|
);
|
|
6008
|
-
const createEInvoice = (0,
|
|
5988
|
+
const createEInvoice = (0, import_react17.useCallback)(
|
|
6009
5989
|
async ({
|
|
6010
5990
|
service,
|
|
6011
5991
|
xNode,
|
|
@@ -6034,7 +6014,7 @@ function useViewService() {
|
|
|
6034
6014
|
},
|
|
6035
6015
|
[env]
|
|
6036
6016
|
);
|
|
6037
|
-
const getCurrentUser = (0,
|
|
6017
|
+
const getCurrentUser = (0, import_react17.useCallback)(
|
|
6038
6018
|
async ({
|
|
6039
6019
|
service,
|
|
6040
6020
|
xNode,
|
|
@@ -6058,7 +6038,7 @@ function useViewService() {
|
|
|
6058
6038
|
},
|
|
6059
6039
|
[env]
|
|
6060
6040
|
);
|
|
6061
|
-
const getCountry = (0,
|
|
6041
|
+
const getCountry = (0, import_react17.useCallback)(
|
|
6062
6042
|
async ({
|
|
6063
6043
|
service,
|
|
6064
6044
|
xNode,
|
|
@@ -6085,7 +6065,7 @@ function useViewService() {
|
|
|
6085
6065
|
},
|
|
6086
6066
|
[env]
|
|
6087
6067
|
);
|
|
6088
|
-
const getCity = (0,
|
|
6068
|
+
const getCity = (0, import_react17.useCallback)(
|
|
6089
6069
|
async ({
|
|
6090
6070
|
service,
|
|
6091
6071
|
xNode,
|
|
@@ -6112,7 +6092,7 @@ function useViewService() {
|
|
|
6112
6092
|
},
|
|
6113
6093
|
[env]
|
|
6114
6094
|
);
|
|
6115
|
-
const getWard = (0,
|
|
6095
|
+
const getWard = (0, import_react17.useCallback)(
|
|
6116
6096
|
async ({
|
|
6117
6097
|
service,
|
|
6118
6098
|
xNode,
|
|
@@ -6137,6 +6117,33 @@ function useViewService() {
|
|
|
6137
6117
|
},
|
|
6138
6118
|
[env]
|
|
6139
6119
|
);
|
|
6120
|
+
const getPartnerTitle = (0, import_react17.useCallback)(
|
|
6121
|
+
async ({
|
|
6122
|
+
service,
|
|
6123
|
+
xNode,
|
|
6124
|
+
kwargs,
|
|
6125
|
+
withContext
|
|
6126
|
+
}) => {
|
|
6127
|
+
const body = {
|
|
6128
|
+
model: "res.partner.title" /* RES_PARTNER_TITLE */,
|
|
6129
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6130
|
+
kwargs,
|
|
6131
|
+
with_context: withContext
|
|
6132
|
+
};
|
|
6133
|
+
return env?.requests?.post(
|
|
6134
|
+
"/call" /* CALL_PATH */,
|
|
6135
|
+
body,
|
|
6136
|
+
{
|
|
6137
|
+
headers: {
|
|
6138
|
+
"Content-Type": "application/json",
|
|
6139
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6140
|
+
}
|
|
6141
|
+
},
|
|
6142
|
+
service
|
|
6143
|
+
);
|
|
6144
|
+
},
|
|
6145
|
+
[env]
|
|
6146
|
+
);
|
|
6140
6147
|
return {
|
|
6141
6148
|
getView,
|
|
6142
6149
|
getMenu,
|
|
@@ -6167,7 +6174,6 @@ function useViewService() {
|
|
|
6167
6174
|
manageOnChange,
|
|
6168
6175
|
getOrderLine,
|
|
6169
6176
|
getProductImage,
|
|
6170
|
-
addEntity,
|
|
6171
6177
|
checkPayment,
|
|
6172
6178
|
handleCloseSession,
|
|
6173
6179
|
handleClosingDetailSession,
|
|
@@ -6185,15 +6191,16 @@ function useViewService() {
|
|
|
6185
6191
|
getCurrentUser,
|
|
6186
6192
|
getCountry,
|
|
6187
6193
|
getCity,
|
|
6188
|
-
getWard
|
|
6194
|
+
getWard,
|
|
6195
|
+
getPartnerTitle
|
|
6189
6196
|
};
|
|
6190
6197
|
}
|
|
6191
6198
|
|
|
6192
6199
|
// src/services/dashboard-service/index.ts
|
|
6193
|
-
var
|
|
6200
|
+
var import_react18 = require("react");
|
|
6194
6201
|
function useDashboardService() {
|
|
6195
6202
|
const { env } = useEnv();
|
|
6196
|
-
const readGroup = (0,
|
|
6203
|
+
const readGroup = (0, import_react18.useCallback)(
|
|
6197
6204
|
async ({
|
|
6198
6205
|
service,
|
|
6199
6206
|
xNode,
|
|
@@ -6210,7 +6217,7 @@ function useDashboardService() {
|
|
|
6210
6217
|
},
|
|
6211
6218
|
[env]
|
|
6212
6219
|
);
|
|
6213
|
-
const getDataChart = (0,
|
|
6220
|
+
const getDataChart = (0, import_react18.useCallback)(
|
|
6214
6221
|
async ({
|
|
6215
6222
|
service,
|
|
6216
6223
|
xNode,
|