@fctc/interface-logic 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs.d.mts +6 -6
- package/dist/configs.d.ts +6 -6
- package/dist/configs.js +48 -18
- package/dist/configs.mjs +48 -18
- package/dist/constants.d.mts +3 -1
- package/dist/constants.d.ts +3 -1
- package/dist/constants.js +3 -1
- package/dist/constants.mjs +3 -1
- package/dist/environment.js +48 -18
- package/dist/environment.mjs +48 -18
- package/dist/hooks.d.mts +22 -8
- package/dist/hooks.d.ts +22 -8
- package/dist/hooks.js +319 -200
- package/dist/hooks.mjs +288 -170
- package/dist/provider.d.mts +5 -3
- package/dist/provider.d.ts +5 -3
- package/dist/provider.js +368 -220
- package/dist/provider.mjs +338 -190
- package/dist/services.d.mts +28 -17
- package/dist/services.d.ts +28 -17
- package/dist/services.js +218 -128
- package/dist/services.mjs +203 -113
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{view-type-BGJfDe73.d.mts → view-type-p4JdAOsz.d.mts} +5 -0
- package/dist/{view-type-BGJfDe73.d.ts → view-type-p4JdAOsz.d.ts} +5 -0
- package/package.json +1 -1
package/dist/services.js
CHANGED
|
@@ -58,7 +58,8 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
58
58
|
UriConstants2["LOAD_ACTION"] = `/load_action`;
|
|
59
59
|
UriConstants2["REPORT_PATH"] = `/report`;
|
|
60
60
|
UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
|
|
61
|
-
UriConstants2["
|
|
61
|
+
UriConstants2["UPLOAD_FILE_EXCEL_PATH"] = `/upload/file`;
|
|
62
|
+
UriConstants2["UPLOAD_FILE_PATH"] = `/web/binary/upload_attachment`;
|
|
62
63
|
UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
|
|
63
64
|
UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
|
|
64
65
|
UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
|
|
@@ -66,6 +67,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
66
67
|
UriConstants2["IMAGE_PATH"] = `/web/image`;
|
|
67
68
|
UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
|
|
68
69
|
UriConstants2["TOKEN"] = `/check_token`;
|
|
70
|
+
UriConstants2["VALIDATE_ACTION_TOKEN"] = `/action-token/validate`;
|
|
69
71
|
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
70
72
|
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
71
73
|
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
@@ -2903,7 +2905,7 @@ var import_react_query20 = require("@tanstack/react-query");
|
|
|
2903
2905
|
// src/hooks/excel/use-parse-preview.ts
|
|
2904
2906
|
var import_react_query21 = require("@tanstack/react-query");
|
|
2905
2907
|
|
|
2906
|
-
// src/hooks/excel/use-upload-file.ts
|
|
2908
|
+
// src/hooks/excel/use-upload-file-excel.ts
|
|
2907
2909
|
var import_react_query22 = require("@tanstack/react-query");
|
|
2908
2910
|
|
|
2909
2911
|
// src/hooks/excel/use-upload-id-file.ts
|
|
@@ -2933,117 +2935,120 @@ var import_react_query30 = require("@tanstack/react-query");
|
|
|
2933
2935
|
// src/hooks/form/use-upload-image.ts
|
|
2934
2936
|
var import_react_query31 = require("@tanstack/react-query");
|
|
2935
2937
|
|
|
2936
|
-
// src/hooks/
|
|
2938
|
+
// src/hooks/form/use-upload-file.ts
|
|
2937
2939
|
var import_react_query32 = require("@tanstack/react-query");
|
|
2938
2940
|
|
|
2939
|
-
// src/hooks/model/use-
|
|
2941
|
+
// src/hooks/model/use-delete.ts
|
|
2940
2942
|
var import_react_query33 = require("@tanstack/react-query");
|
|
2941
2943
|
|
|
2942
|
-
// src/hooks/model/use-get-
|
|
2944
|
+
// src/hooks/model/use-get-all.ts
|
|
2943
2945
|
var import_react_query34 = require("@tanstack/react-query");
|
|
2944
2946
|
|
|
2945
|
-
// src/hooks/model/use-get-
|
|
2947
|
+
// src/hooks/model/use-get-conversion-rate.ts
|
|
2946
2948
|
var import_react_query35 = require("@tanstack/react-query");
|
|
2947
2949
|
|
|
2948
|
-
// src/hooks/model/use-get-
|
|
2950
|
+
// src/hooks/model/use-get-currency.ts
|
|
2949
2951
|
var import_react_query36 = require("@tanstack/react-query");
|
|
2950
2952
|
|
|
2951
|
-
// src/hooks/model/use-get-
|
|
2953
|
+
// src/hooks/model/use-get-detail.ts
|
|
2952
2954
|
var import_react_query37 = require("@tanstack/react-query");
|
|
2953
2955
|
|
|
2954
|
-
// src/hooks/model/use-get-
|
|
2956
|
+
// src/hooks/model/use-get-field-onchange.ts
|
|
2955
2957
|
var import_react_query38 = require("@tanstack/react-query");
|
|
2956
2958
|
|
|
2957
|
-
// src/hooks/model/use-
|
|
2959
|
+
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
2958
2960
|
var import_react_query39 = require("@tanstack/react-query");
|
|
2959
2961
|
|
|
2960
|
-
// src/hooks/model/use-
|
|
2962
|
+
// src/hooks/model/use-onchange-form.ts
|
|
2961
2963
|
var import_react_query40 = require("@tanstack/react-query");
|
|
2962
2964
|
|
|
2963
|
-
// src/hooks/
|
|
2965
|
+
// src/hooks/model/use-save.ts
|
|
2964
2966
|
var import_react_query41 = require("@tanstack/react-query");
|
|
2965
2967
|
|
|
2966
|
-
// src/hooks/user/use-get-
|
|
2968
|
+
// src/hooks/user/use-get-profile.ts
|
|
2967
2969
|
var import_react_query42 = require("@tanstack/react-query");
|
|
2968
2970
|
|
|
2969
|
-
// src/hooks/user/use-
|
|
2971
|
+
// src/hooks/user/use-get-user.ts
|
|
2970
2972
|
var import_react_query43 = require("@tanstack/react-query");
|
|
2971
2973
|
|
|
2972
|
-
// src/hooks/
|
|
2974
|
+
// src/hooks/user/use-switch-locale.ts
|
|
2973
2975
|
var import_react_query44 = require("@tanstack/react-query");
|
|
2974
2976
|
|
|
2975
|
-
// src/hooks/view/use-
|
|
2977
|
+
// src/hooks/view/use-button.ts
|
|
2976
2978
|
var import_react_query45 = require("@tanstack/react-query");
|
|
2977
2979
|
|
|
2978
|
-
// src/hooks/view/use-
|
|
2980
|
+
// src/hooks/view/use-duplicate-record.ts
|
|
2979
2981
|
var import_react_query46 = require("@tanstack/react-query");
|
|
2980
2982
|
|
|
2981
|
-
// src/hooks/view/use-get-
|
|
2983
|
+
// src/hooks/view/use-get-action-detail.ts
|
|
2982
2984
|
var import_react_query47 = require("@tanstack/react-query");
|
|
2983
2985
|
|
|
2984
|
-
// src/hooks/view/use-get-
|
|
2986
|
+
// src/hooks/view/use-get-calendar.ts
|
|
2985
2987
|
var import_react_query48 = require("@tanstack/react-query");
|
|
2986
2988
|
|
|
2987
|
-
// src/hooks/view/use-get-
|
|
2989
|
+
// src/hooks/view/use-get-groups.ts
|
|
2988
2990
|
var import_react_query49 = require("@tanstack/react-query");
|
|
2989
2991
|
|
|
2990
|
-
// src/hooks/view/use-get-
|
|
2992
|
+
// src/hooks/view/use-get-list-data.ts
|
|
2991
2993
|
var import_react_query50 = require("@tanstack/react-query");
|
|
2992
2994
|
|
|
2993
|
-
// src/hooks/view/use-get-
|
|
2995
|
+
// src/hooks/view/use-get-menu.ts
|
|
2994
2996
|
var import_react_query51 = require("@tanstack/react-query");
|
|
2995
2997
|
|
|
2996
|
-
// src/hooks/view/use-get-
|
|
2998
|
+
// src/hooks/view/use-get-print-report.ts
|
|
2997
2999
|
var import_react_query52 = require("@tanstack/react-query");
|
|
2998
3000
|
|
|
2999
|
-
// src/hooks/view/use-get-
|
|
3001
|
+
// src/hooks/view/use-get-progress-bar.ts
|
|
3000
3002
|
var import_react_query53 = require("@tanstack/react-query");
|
|
3001
3003
|
|
|
3002
|
-
// src/hooks/view/use-get-
|
|
3004
|
+
// src/hooks/view/use-get-selection.ts
|
|
3003
3005
|
var import_react_query54 = require("@tanstack/react-query");
|
|
3004
3006
|
|
|
3005
|
-
// src/hooks/view/use-
|
|
3007
|
+
// src/hooks/view/use-get-view.ts
|
|
3006
3008
|
var import_react_query55 = require("@tanstack/react-query");
|
|
3007
3009
|
|
|
3008
|
-
// src/hooks/view/use-load-
|
|
3010
|
+
// src/hooks/view/use-load-action.ts
|
|
3009
3011
|
var import_react_query56 = require("@tanstack/react-query");
|
|
3010
3012
|
|
|
3011
|
-
// src/hooks/view/use-
|
|
3013
|
+
// src/hooks/view/use-load-message.ts
|
|
3012
3014
|
var import_react_query57 = require("@tanstack/react-query");
|
|
3013
3015
|
|
|
3014
|
-
// src/hooks/view/use-
|
|
3016
|
+
// src/hooks/view/use-print.ts
|
|
3015
3017
|
var import_react_query58 = require("@tanstack/react-query");
|
|
3016
3018
|
|
|
3017
|
-
// src/hooks/view/use-
|
|
3019
|
+
// src/hooks/view/use-remove-row.ts
|
|
3018
3020
|
var import_react_query59 = require("@tanstack/react-query");
|
|
3019
3021
|
|
|
3020
|
-
// src/hooks/view/use-
|
|
3022
|
+
// src/hooks/view/use-resequence.ts
|
|
3021
3023
|
var import_react_query60 = require("@tanstack/react-query");
|
|
3022
3024
|
|
|
3023
|
-
// src/hooks/view/use-
|
|
3025
|
+
// src/hooks/view/use-run-action.ts
|
|
3024
3026
|
var import_react_query61 = require("@tanstack/react-query");
|
|
3025
3027
|
|
|
3026
|
-
// src/hooks/view/use-
|
|
3028
|
+
// src/hooks/view/use-signin-sso.ts
|
|
3027
3029
|
var import_react_query62 = require("@tanstack/react-query");
|
|
3028
3030
|
|
|
3029
|
-
// src/hooks/view/
|
|
3031
|
+
// src/hooks/view/use-verify-2FA.ts
|
|
3030
3032
|
var import_react_query63 = require("@tanstack/react-query");
|
|
3031
3033
|
|
|
3032
|
-
// src/hooks/view/
|
|
3034
|
+
// src/hooks/view/uset-get-2FA-method.ts
|
|
3033
3035
|
var import_react_query64 = require("@tanstack/react-query");
|
|
3034
3036
|
|
|
3035
|
-
// src/hooks/view/use-
|
|
3037
|
+
// src/hooks/view/use-grant-access.ts
|
|
3036
3038
|
var import_react_query65 = require("@tanstack/react-query");
|
|
3037
3039
|
|
|
3038
|
-
// src/hooks/view/use-
|
|
3040
|
+
// src/hooks/view/use-remove-totp-setup.ts
|
|
3039
3041
|
var import_react_query66 = require("@tanstack/react-query");
|
|
3040
3042
|
|
|
3041
|
-
// src/hooks/view/use-
|
|
3043
|
+
// src/hooks/view/use-request-setup-totp.ts
|
|
3042
3044
|
var import_react_query67 = require("@tanstack/react-query");
|
|
3043
3045
|
|
|
3044
|
-
// src/hooks/view/use-
|
|
3046
|
+
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3045
3047
|
var import_react_query68 = require("@tanstack/react-query");
|
|
3046
3048
|
|
|
3049
|
+
// src/hooks/view/use-verify-totp.ts
|
|
3050
|
+
var import_react_query69 = require("@tanstack/react-query");
|
|
3051
|
+
|
|
3047
3052
|
// src/provider/service-provider.tsx
|
|
3048
3053
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3049
3054
|
var ServiceContext = (0, import_react4.createContext)(null);
|
|
@@ -3058,15 +3063,21 @@ function useActionService() {
|
|
|
3058
3063
|
const loadAction = (0, import_react6.useCallback)(
|
|
3059
3064
|
async ({
|
|
3060
3065
|
idAction,
|
|
3061
|
-
context
|
|
3066
|
+
context,
|
|
3067
|
+
service
|
|
3062
3068
|
}) => {
|
|
3063
3069
|
const jsonData = {
|
|
3064
3070
|
action_id: idAction,
|
|
3065
3071
|
with_context: { ...context }
|
|
3066
3072
|
};
|
|
3067
|
-
return env.requests.post(
|
|
3068
|
-
|
|
3069
|
-
|
|
3073
|
+
return env.requests.post(
|
|
3074
|
+
"/load_action" /* LOAD_ACTION */,
|
|
3075
|
+
jsonData,
|
|
3076
|
+
{
|
|
3077
|
+
headers: { "Content-Type": "application/json" }
|
|
3078
|
+
},
|
|
3079
|
+
service
|
|
3080
|
+
);
|
|
3070
3081
|
},
|
|
3071
3082
|
[env]
|
|
3072
3083
|
);
|
|
@@ -3075,7 +3086,8 @@ function useActionService() {
|
|
|
3075
3086
|
model,
|
|
3076
3087
|
ids = [],
|
|
3077
3088
|
context,
|
|
3078
|
-
method
|
|
3089
|
+
method,
|
|
3090
|
+
service
|
|
3079
3091
|
}) => {
|
|
3080
3092
|
try {
|
|
3081
3093
|
const jsonData = {
|
|
@@ -3084,9 +3096,14 @@ function useActionService() {
|
|
|
3084
3096
|
ids,
|
|
3085
3097
|
with_context: context
|
|
3086
3098
|
};
|
|
3087
|
-
return env.requests.post(
|
|
3088
|
-
|
|
3089
|
-
|
|
3099
|
+
return env.requests.post(
|
|
3100
|
+
"/call" /* CALL_PATH */,
|
|
3101
|
+
jsonData,
|
|
3102
|
+
{
|
|
3103
|
+
headers: { "Content-Type": "application/json" }
|
|
3104
|
+
},
|
|
3105
|
+
service
|
|
3106
|
+
);
|
|
3090
3107
|
} catch (error) {
|
|
3091
3108
|
console.error("Error when calling button action:", error);
|
|
3092
3109
|
throw error;
|
|
@@ -3098,7 +3115,8 @@ function useActionService() {
|
|
|
3098
3115
|
async ({
|
|
3099
3116
|
model,
|
|
3100
3117
|
ids,
|
|
3101
|
-
context
|
|
3118
|
+
context,
|
|
3119
|
+
service
|
|
3102
3120
|
}) => {
|
|
3103
3121
|
const jsonData = {
|
|
3104
3122
|
model,
|
|
@@ -3106,9 +3124,14 @@ function useActionService() {
|
|
|
3106
3124
|
ids,
|
|
3107
3125
|
with_context: context
|
|
3108
3126
|
};
|
|
3109
|
-
return env.requests.post(
|
|
3110
|
-
|
|
3111
|
-
|
|
3127
|
+
return env.requests.post(
|
|
3128
|
+
"/call" /* CALL_PATH */,
|
|
3129
|
+
jsonData,
|
|
3130
|
+
{
|
|
3131
|
+
headers: { "Content-Type": "application/json" }
|
|
3132
|
+
},
|
|
3133
|
+
service
|
|
3134
|
+
);
|
|
3112
3135
|
},
|
|
3113
3136
|
[env]
|
|
3114
3137
|
);
|
|
@@ -3116,7 +3139,8 @@ function useActionService() {
|
|
|
3116
3139
|
async ({
|
|
3117
3140
|
model,
|
|
3118
3141
|
id,
|
|
3119
|
-
context
|
|
3142
|
+
context,
|
|
3143
|
+
service
|
|
3120
3144
|
}) => {
|
|
3121
3145
|
const jsonData = {
|
|
3122
3146
|
model,
|
|
@@ -3124,9 +3148,14 @@ function useActionService() {
|
|
|
3124
3148
|
ids: id,
|
|
3125
3149
|
with_context: context
|
|
3126
3150
|
};
|
|
3127
|
-
return env.requests.post(
|
|
3128
|
-
|
|
3129
|
-
|
|
3151
|
+
return env.requests.post(
|
|
3152
|
+
"/call" /* CALL_PATH */,
|
|
3153
|
+
jsonData,
|
|
3154
|
+
{
|
|
3155
|
+
headers: { "Content-Type": "application/json" }
|
|
3156
|
+
},
|
|
3157
|
+
service
|
|
3158
|
+
);
|
|
3130
3159
|
},
|
|
3131
3160
|
[env]
|
|
3132
3161
|
);
|
|
@@ -3169,15 +3198,21 @@ function useActionService() {
|
|
|
3169
3198
|
const runAction = (0, import_react6.useCallback)(
|
|
3170
3199
|
async ({
|
|
3171
3200
|
idAction,
|
|
3172
|
-
context
|
|
3201
|
+
context,
|
|
3202
|
+
service
|
|
3173
3203
|
}) => {
|
|
3174
3204
|
const jsonData = {
|
|
3175
3205
|
action_id: idAction,
|
|
3176
3206
|
with_context: { ...context }
|
|
3177
3207
|
};
|
|
3178
|
-
return env.requests.post(
|
|
3179
|
-
|
|
3180
|
-
|
|
3208
|
+
return env.requests.post(
|
|
3209
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3210
|
+
jsonData,
|
|
3211
|
+
{
|
|
3212
|
+
headers: { "Content-Type": "application/json" }
|
|
3213
|
+
},
|
|
3214
|
+
service
|
|
3215
|
+
);
|
|
3181
3216
|
},
|
|
3182
3217
|
[env]
|
|
3183
3218
|
);
|
|
@@ -3320,18 +3355,15 @@ function useAuthService() {
|
|
|
3320
3355
|
[env]
|
|
3321
3356
|
);
|
|
3322
3357
|
const isValidActionToken = (0, import_react7.useCallback)(
|
|
3323
|
-
async (actionToken
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
{
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
actionToken
|
|
3333
|
-
}
|
|
3334
|
-
);
|
|
3358
|
+
async (actionToken) => {
|
|
3359
|
+
const bodyData = {};
|
|
3360
|
+
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3361
|
+
headers: {
|
|
3362
|
+
"Content-Type": "application/json"
|
|
3363
|
+
},
|
|
3364
|
+
useActionToken: true,
|
|
3365
|
+
actionToken
|
|
3366
|
+
});
|
|
3335
3367
|
},
|
|
3336
3368
|
[env]
|
|
3337
3369
|
);
|
|
@@ -3367,13 +3399,14 @@ function useAuthService() {
|
|
|
3367
3399
|
data.append("client_id", env?.config?.clientId || "");
|
|
3368
3400
|
data.append("redirect_uri", env?.config?.redirectUri || "");
|
|
3369
3401
|
return env?.requests?.post(
|
|
3370
|
-
|
|
3402
|
+
"/token" /* TOKEN_BY_CODE */,
|
|
3371
3403
|
data,
|
|
3372
3404
|
{
|
|
3373
3405
|
headers: {
|
|
3374
3406
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
3375
3407
|
}
|
|
3376
|
-
}
|
|
3408
|
+
},
|
|
3409
|
+
"id"
|
|
3377
3410
|
);
|
|
3378
3411
|
},
|
|
3379
3412
|
[env]
|
|
@@ -3456,15 +3489,15 @@ function useCompanyService() {
|
|
|
3456
3489
|
var import_react9 = require("react");
|
|
3457
3490
|
function useExcelService() {
|
|
3458
3491
|
const { env } = useEnv();
|
|
3459
|
-
const
|
|
3492
|
+
const uploadFileExcel = (0, import_react9.useCallback)(
|
|
3460
3493
|
async ({ formData }) => {
|
|
3461
|
-
return env.requests.post("/upload/file" /*
|
|
3494
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData);
|
|
3462
3495
|
},
|
|
3463
3496
|
[env]
|
|
3464
3497
|
);
|
|
3465
3498
|
const uploadIdFile = (0, import_react9.useCallback)(
|
|
3466
3499
|
async ({ formData }) => {
|
|
3467
|
-
return env.requests.post("/upload/file" /*
|
|
3500
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_EXCEL_PATH */, formData, {
|
|
3468
3501
|
headers: {
|
|
3469
3502
|
"Content-Type": "multipart/form-data"
|
|
3470
3503
|
}
|
|
@@ -3612,7 +3645,7 @@ function useExcelService() {
|
|
|
3612
3645
|
[env]
|
|
3613
3646
|
);
|
|
3614
3647
|
return {
|
|
3615
|
-
|
|
3648
|
+
uploadFileExcel,
|
|
3616
3649
|
uploadIdFile,
|
|
3617
3650
|
parsePreview,
|
|
3618
3651
|
executeImport,
|
|
@@ -3707,6 +3740,12 @@ function useFormService() {
|
|
|
3707
3740
|
},
|
|
3708
3741
|
[env]
|
|
3709
3742
|
);
|
|
3743
|
+
const uploadFile = (0, import_react10.useCallback)(
|
|
3744
|
+
async ({ formData }) => {
|
|
3745
|
+
return env.requests.post("/web/binary/upload_attachment" /* UPLOAD_FILE_PATH */, formData);
|
|
3746
|
+
},
|
|
3747
|
+
[env]
|
|
3748
|
+
);
|
|
3710
3749
|
const getFormView = (0, import_react10.useCallback)(
|
|
3711
3750
|
async ({ data }) => {
|
|
3712
3751
|
const jsonData = {
|
|
@@ -3759,7 +3798,8 @@ function useFormService() {
|
|
|
3759
3798
|
getImage,
|
|
3760
3799
|
uploadImage,
|
|
3761
3800
|
getFormView,
|
|
3762
|
-
changeStatus
|
|
3801
|
+
changeStatus,
|
|
3802
|
+
uploadFile
|
|
3763
3803
|
};
|
|
3764
3804
|
}
|
|
3765
3805
|
|
|
@@ -3892,7 +3932,7 @@ function useModelService() {
|
|
|
3892
3932
|
});
|
|
3893
3933
|
}, [env]);
|
|
3894
3934
|
const getAll = (0, import_react12.useCallback)(
|
|
3895
|
-
async ({ data }) => {
|
|
3935
|
+
async ({ data, service }) => {
|
|
3896
3936
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3897
3937
|
fields: data.fields,
|
|
3898
3938
|
groupby: data.groupby
|
|
@@ -3913,11 +3953,16 @@ function useModelService() {
|
|
|
3913
3953
|
...jsonReadGroup
|
|
3914
3954
|
}
|
|
3915
3955
|
};
|
|
3916
|
-
return env.requests.post(
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3956
|
+
return env.requests.post(
|
|
3957
|
+
"/call" /* CALL_PATH */,
|
|
3958
|
+
jsonData,
|
|
3959
|
+
{
|
|
3960
|
+
headers: {
|
|
3961
|
+
"Content-Type": "application/json"
|
|
3962
|
+
}
|
|
3963
|
+
},
|
|
3964
|
+
service
|
|
3965
|
+
);
|
|
3921
3966
|
},
|
|
3922
3967
|
[env]
|
|
3923
3968
|
);
|
|
@@ -3985,7 +4030,13 @@ function useModelService() {
|
|
|
3985
4030
|
[env]
|
|
3986
4031
|
);
|
|
3987
4032
|
const getDetail = (0, import_react12.useCallback)(
|
|
3988
|
-
async ({
|
|
4033
|
+
async ({
|
|
4034
|
+
ids = [],
|
|
4035
|
+
model,
|
|
4036
|
+
specification,
|
|
4037
|
+
context,
|
|
4038
|
+
service
|
|
4039
|
+
}) => {
|
|
3989
4040
|
const jsonData = {
|
|
3990
4041
|
model,
|
|
3991
4042
|
method: "web_read" /* WEB_READ */,
|
|
@@ -3995,11 +4046,16 @@ function useModelService() {
|
|
|
3995
4046
|
specification
|
|
3996
4047
|
}
|
|
3997
4048
|
};
|
|
3998
|
-
return env.requests.post(
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4049
|
+
return env.requests.post(
|
|
4050
|
+
"/call" /* CALL_PATH */,
|
|
4051
|
+
jsonData,
|
|
4052
|
+
{
|
|
4053
|
+
headers: {
|
|
4054
|
+
"Content-Type": "application/json"
|
|
4055
|
+
}
|
|
4056
|
+
},
|
|
4057
|
+
service
|
|
4058
|
+
);
|
|
4003
4059
|
},
|
|
4004
4060
|
[env]
|
|
4005
4061
|
);
|
|
@@ -4010,7 +4066,8 @@ function useModelService() {
|
|
|
4010
4066
|
data = {},
|
|
4011
4067
|
specification = {},
|
|
4012
4068
|
context = {},
|
|
4013
|
-
path
|
|
4069
|
+
path,
|
|
4070
|
+
service
|
|
4014
4071
|
}) => {
|
|
4015
4072
|
const jsonData = {
|
|
4016
4073
|
model,
|
|
@@ -4022,26 +4079,36 @@ function useModelService() {
|
|
|
4022
4079
|
specification
|
|
4023
4080
|
}
|
|
4024
4081
|
};
|
|
4025
|
-
return env.requests.post(
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4082
|
+
return env.requests.post(
|
|
4083
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4084
|
+
jsonData,
|
|
4085
|
+
{
|
|
4086
|
+
headers: {
|
|
4087
|
+
"Content-Type": "application/json"
|
|
4088
|
+
}
|
|
4089
|
+
},
|
|
4090
|
+
service
|
|
4091
|
+
);
|
|
4030
4092
|
},
|
|
4031
4093
|
[env]
|
|
4032
4094
|
);
|
|
4033
4095
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4034
|
-
async ({ ids = [], model }) => {
|
|
4096
|
+
async ({ ids = [], model, service }) => {
|
|
4035
4097
|
const jsonData = {
|
|
4036
4098
|
model,
|
|
4037
4099
|
method: "unlink" /* UNLINK */,
|
|
4038
4100
|
ids
|
|
4039
4101
|
};
|
|
4040
|
-
return env.requests.post(
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4102
|
+
return env.requests.post(
|
|
4103
|
+
"/call" /* CALL_PATH */,
|
|
4104
|
+
jsonData,
|
|
4105
|
+
{
|
|
4106
|
+
headers: {
|
|
4107
|
+
"Content-Type": "application/json"
|
|
4108
|
+
}
|
|
4109
|
+
},
|
|
4110
|
+
service
|
|
4111
|
+
);
|
|
4045
4112
|
},
|
|
4046
4113
|
[env]
|
|
4047
4114
|
);
|
|
@@ -4052,7 +4119,8 @@ function useModelService() {
|
|
|
4052
4119
|
object,
|
|
4053
4120
|
specification,
|
|
4054
4121
|
context,
|
|
4055
|
-
fieldChange
|
|
4122
|
+
fieldChange,
|
|
4123
|
+
service
|
|
4056
4124
|
}) => {
|
|
4057
4125
|
const jsonData = {
|
|
4058
4126
|
model,
|
|
@@ -4065,25 +4133,35 @@ function useModelService() {
|
|
|
4065
4133
|
specification
|
|
4066
4134
|
]
|
|
4067
4135
|
};
|
|
4068
|
-
return env.requests.post(
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4136
|
+
return env.requests.post(
|
|
4137
|
+
"/call" /* CALL_PATH */,
|
|
4138
|
+
jsonData,
|
|
4139
|
+
{
|
|
4140
|
+
headers: {
|
|
4141
|
+
"Content-Type": "application/json"
|
|
4142
|
+
}
|
|
4143
|
+
},
|
|
4144
|
+
service
|
|
4145
|
+
);
|
|
4073
4146
|
},
|
|
4074
4147
|
[env]
|
|
4075
4148
|
);
|
|
4076
4149
|
const getListFieldsOnchange = (0, import_react12.useCallback)(
|
|
4077
|
-
async ({ model }) => {
|
|
4150
|
+
async ({ model, service }) => {
|
|
4078
4151
|
const jsonData = {
|
|
4079
4152
|
model,
|
|
4080
4153
|
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
4081
4154
|
};
|
|
4082
|
-
return env.requests.post(
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4155
|
+
return env.requests.post(
|
|
4156
|
+
"/call" /* CALL_PATH */,
|
|
4157
|
+
jsonData,
|
|
4158
|
+
{
|
|
4159
|
+
headers: {
|
|
4160
|
+
"Content-Type": "application/json"
|
|
4161
|
+
}
|
|
4162
|
+
},
|
|
4163
|
+
service
|
|
4164
|
+
);
|
|
4087
4165
|
},
|
|
4088
4166
|
[env]
|
|
4089
4167
|
);
|
|
@@ -4243,7 +4321,8 @@ function useViewService() {
|
|
|
4243
4321
|
views,
|
|
4244
4322
|
context = {},
|
|
4245
4323
|
options = {},
|
|
4246
|
-
aid
|
|
4324
|
+
aid,
|
|
4325
|
+
service
|
|
4247
4326
|
}) => {
|
|
4248
4327
|
const defaultOptions = {
|
|
4249
4328
|
load_filters: true,
|
|
@@ -4259,16 +4338,22 @@ function useViewService() {
|
|
|
4259
4338
|
},
|
|
4260
4339
|
with_context: context
|
|
4261
4340
|
};
|
|
4262
|
-
return env?.requests?.post(
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4341
|
+
return env?.requests?.post(
|
|
4342
|
+
"/call" /* CALL_PATH */,
|
|
4343
|
+
jsonDataView,
|
|
4344
|
+
{
|
|
4345
|
+
headers: {
|
|
4346
|
+
"Content-Type": "application/json"
|
|
4347
|
+
}
|
|
4348
|
+
},
|
|
4349
|
+
service
|
|
4350
|
+
);
|
|
4267
4351
|
},
|
|
4268
4352
|
[env]
|
|
4269
4353
|
);
|
|
4270
4354
|
const getMenu = (0, import_react14.useCallback)(
|
|
4271
|
-
async (context, specification) => {
|
|
4355
|
+
async (context, specification, domain) => {
|
|
4356
|
+
console.log("domain", domain);
|
|
4272
4357
|
const jsonData = {
|
|
4273
4358
|
model: "ir.ui.menu" /* MENU */,
|
|
4274
4359
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4276,7 +4361,7 @@ function useViewService() {
|
|
|
4276
4361
|
with_context: context,
|
|
4277
4362
|
kwargs: {
|
|
4278
4363
|
specification,
|
|
4279
|
-
domain: [
|
|
4364
|
+
domain: domain ?? [
|
|
4280
4365
|
"&",
|
|
4281
4366
|
["is_display", "=", true],
|
|
4282
4367
|
"&",
|
|
@@ -4346,7 +4431,7 @@ function useViewService() {
|
|
|
4346
4431
|
[env]
|
|
4347
4432
|
);
|
|
4348
4433
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4349
|
-
async ({ data }) => {
|
|
4434
|
+
async ({ data, service }) => {
|
|
4350
4435
|
const jsonData = {
|
|
4351
4436
|
model: data.model,
|
|
4352
4437
|
ids: [],
|
|
@@ -4364,11 +4449,16 @@ function useViewService() {
|
|
|
4364
4449
|
}
|
|
4365
4450
|
}
|
|
4366
4451
|
};
|
|
4367
|
-
return env?.requests.post(
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4452
|
+
return env?.requests.post(
|
|
4453
|
+
"/call" /* CALL_PATH */,
|
|
4454
|
+
jsonData,
|
|
4455
|
+
{
|
|
4456
|
+
headers: {
|
|
4457
|
+
"Content-Type": "application/json"
|
|
4458
|
+
}
|
|
4459
|
+
},
|
|
4460
|
+
service
|
|
4461
|
+
);
|
|
4372
4462
|
},
|
|
4373
4463
|
[env]
|
|
4374
4464
|
);
|