@fctc/interface-logic 2.2.9 → 2.2.10
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.js +1 -1
- package/dist/configs.mjs +1 -1
- package/dist/environment.js +1 -1
- package/dist/environment.mjs +1 -1
- package/dist/hooks.d.mts +9 -2
- package/dist/hooks.d.ts +9 -2
- package/dist/hooks.js +126 -79
- package/dist/hooks.mjs +95 -49
- package/dist/provider.d.mts +8 -8
- package/dist/provider.d.ts +8 -8
- package/dist/provider.js +126 -80
- package/dist/provider.mjs +96 -50
- package/dist/services.d.mts +7 -1
- package/dist/services.d.ts +7 -1
- package/dist/services.js +73 -40
- package/dist/services.mjs +58 -25
- package/package.json +85 -85
package/dist/provider.mjs
CHANGED
|
@@ -3533,6 +3533,35 @@ function useFormService() {
|
|
|
3533
3533
|
},
|
|
3534
3534
|
[env]
|
|
3535
3535
|
);
|
|
3536
|
+
const saveFile = useCallback5(
|
|
3537
|
+
async ({
|
|
3538
|
+
model,
|
|
3539
|
+
idForm,
|
|
3540
|
+
idFile,
|
|
3541
|
+
context
|
|
3542
|
+
}) => {
|
|
3543
|
+
const jsonData = {
|
|
3544
|
+
model,
|
|
3545
|
+
method: "web_save" /* WEB_SAVE */,
|
|
3546
|
+
ids: [
|
|
3547
|
+
[idForm],
|
|
3548
|
+
{
|
|
3549
|
+
attachment_ids: [[4, idFile]]
|
|
3550
|
+
}
|
|
3551
|
+
],
|
|
3552
|
+
kwargs: {
|
|
3553
|
+
context,
|
|
3554
|
+
specification: {}
|
|
3555
|
+
}
|
|
3556
|
+
};
|
|
3557
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3558
|
+
headers: {
|
|
3559
|
+
"Content-Type": "application/json"
|
|
3560
|
+
}
|
|
3561
|
+
});
|
|
3562
|
+
},
|
|
3563
|
+
[env]
|
|
3564
|
+
);
|
|
3536
3565
|
const getFormView = useCallback5(
|
|
3537
3566
|
async ({ data }) => {
|
|
3538
3567
|
const jsonData = {
|
|
@@ -3586,7 +3615,8 @@ function useFormService() {
|
|
|
3586
3615
|
uploadImage,
|
|
3587
3616
|
getFormView,
|
|
3588
3617
|
changeStatus,
|
|
3589
|
-
uploadFile
|
|
3618
|
+
uploadFile,
|
|
3619
|
+
saveFile
|
|
3590
3620
|
};
|
|
3591
3621
|
}
|
|
3592
3622
|
|
|
@@ -4139,7 +4169,7 @@ function useViewService() {
|
|
|
4139
4169
|
[env]
|
|
4140
4170
|
);
|
|
4141
4171
|
const getMenu = useCallback9(
|
|
4142
|
-
async (context, specification
|
|
4172
|
+
async (context, specification) => {
|
|
4143
4173
|
const jsonData = {
|
|
4144
4174
|
model: "ir.ui.menu" /* MENU */,
|
|
4145
4175
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4147,7 +4177,7 @@ function useViewService() {
|
|
|
4147
4177
|
with_context: context,
|
|
4148
4178
|
kwargs: {
|
|
4149
4179
|
specification,
|
|
4150
|
-
domain:
|
|
4180
|
+
domain: [
|
|
4151
4181
|
"&",
|
|
4152
4182
|
["is_display", "=", true],
|
|
4153
4183
|
"&",
|
|
@@ -4699,7 +4729,7 @@ var axiosClient = {
|
|
|
4699
4729
|
}
|
|
4700
4730
|
const getBaseUrl = (baseUrl, serviceName) => {
|
|
4701
4731
|
const service = serviceName || config?.default_service;
|
|
4702
|
-
return `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
4732
|
+
return config?.default_service === "" ? `${baseUrl.replace(/\/$/, "")}/api/v2` : `${baseUrl.replace(/\/$/, "")}/${service}/api/v2`;
|
|
4703
4733
|
};
|
|
4704
4734
|
const responseBody = (response) => response;
|
|
4705
4735
|
const requests = {
|
|
@@ -5337,11 +5367,26 @@ var useUploadFile = () => {
|
|
|
5337
5367
|
};
|
|
5338
5368
|
var use_upload_file_default = useUploadFile;
|
|
5339
5369
|
|
|
5340
|
-
// src/hooks/
|
|
5370
|
+
// src/hooks/form/use-save-file.ts
|
|
5341
5371
|
import { useMutation as useMutation26 } from "@tanstack/react-query";
|
|
5372
|
+
var useSaveFile = () => {
|
|
5373
|
+
const { saveFile } = useFormService();
|
|
5374
|
+
return useMutation26({
|
|
5375
|
+
mutationFn: ({
|
|
5376
|
+
model,
|
|
5377
|
+
idForm,
|
|
5378
|
+
idFile,
|
|
5379
|
+
context
|
|
5380
|
+
}) => saveFile({ model, idForm, idFile, context })
|
|
5381
|
+
});
|
|
5382
|
+
};
|
|
5383
|
+
var use_save_file_default = useSaveFile;
|
|
5384
|
+
|
|
5385
|
+
// src/hooks/model/use-delete.ts
|
|
5386
|
+
import { useMutation as useMutation27 } from "@tanstack/react-query";
|
|
5342
5387
|
var useDelete = () => {
|
|
5343
5388
|
const { deleteApi } = useModelService();
|
|
5344
|
-
return
|
|
5389
|
+
return useMutation27({
|
|
5345
5390
|
mutationFn: ({ ids, model, service }) => deleteApi({ ids, model, service })
|
|
5346
5391
|
});
|
|
5347
5392
|
};
|
|
@@ -5397,10 +5442,10 @@ var useGetCurrency = () => {
|
|
|
5397
5442
|
var use_get_currency_default = useGetCurrency;
|
|
5398
5443
|
|
|
5399
5444
|
// src/hooks/model/use-get-detail.ts
|
|
5400
|
-
import { useMutation as
|
|
5445
|
+
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
5401
5446
|
var useGetDetail = () => {
|
|
5402
5447
|
const { getDetail } = useModelService();
|
|
5403
|
-
return
|
|
5448
|
+
return useMutation28({
|
|
5404
5449
|
mutationFn: ({
|
|
5405
5450
|
model,
|
|
5406
5451
|
ids,
|
|
@@ -5602,10 +5647,10 @@ var useOdooDataTransform = () => {
|
|
|
5602
5647
|
var use_odoo_data_transform_default = useOdooDataTransform;
|
|
5603
5648
|
|
|
5604
5649
|
// src/hooks/model/use-onchange-form.ts
|
|
5605
|
-
import { useMutation as
|
|
5650
|
+
import { useMutation as useMutation29 } from "@tanstack/react-query";
|
|
5606
5651
|
var useOnChangeForm = () => {
|
|
5607
5652
|
const { onChange } = useModelService();
|
|
5608
|
-
return
|
|
5653
|
+
return useMutation29({
|
|
5609
5654
|
mutationFn: ({
|
|
5610
5655
|
ids,
|
|
5611
5656
|
model,
|
|
@@ -5628,10 +5673,10 @@ var useOnChangeForm = () => {
|
|
|
5628
5673
|
var use_onchange_form_default = useOnChangeForm;
|
|
5629
5674
|
|
|
5630
5675
|
// src/hooks/model/use-save.ts
|
|
5631
|
-
import { useMutation as
|
|
5676
|
+
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
5632
5677
|
var useSave = () => {
|
|
5633
5678
|
const { save } = useModelService();
|
|
5634
|
-
return
|
|
5679
|
+
return useMutation30({
|
|
5635
5680
|
mutationFn: ({
|
|
5636
5681
|
ids,
|
|
5637
5682
|
model,
|
|
@@ -5646,20 +5691,20 @@ var useSave = () => {
|
|
|
5646
5691
|
var use_save_default = useSave;
|
|
5647
5692
|
|
|
5648
5693
|
// src/hooks/user/use-get-profile.ts
|
|
5649
|
-
import { useMutation as
|
|
5694
|
+
import { useMutation as useMutation31 } from "@tanstack/react-query";
|
|
5650
5695
|
var useGetProfile = (path) => {
|
|
5651
5696
|
const { getProfile } = useUserService();
|
|
5652
|
-
return
|
|
5697
|
+
return useMutation31({
|
|
5653
5698
|
mutationFn: () => getProfile(path)
|
|
5654
5699
|
});
|
|
5655
5700
|
};
|
|
5656
5701
|
var use_get_profile_default = useGetProfile;
|
|
5657
5702
|
|
|
5658
5703
|
// src/hooks/user/use-get-user.ts
|
|
5659
|
-
import { useMutation as
|
|
5704
|
+
import { useMutation as useMutation32 } from "@tanstack/react-query";
|
|
5660
5705
|
var useGetUser = () => {
|
|
5661
5706
|
const { getUser } = useUserService();
|
|
5662
|
-
return
|
|
5707
|
+
return useMutation32({
|
|
5663
5708
|
mutationFn: ({ id, context }) => getUser({
|
|
5664
5709
|
id,
|
|
5665
5710
|
context
|
|
@@ -5669,10 +5714,10 @@ var useGetUser = () => {
|
|
|
5669
5714
|
var use_get_user_default = useGetUser;
|
|
5670
5715
|
|
|
5671
5716
|
// src/hooks/user/use-switch-locale.ts
|
|
5672
|
-
import { useMutation as
|
|
5717
|
+
import { useMutation as useMutation33 } from "@tanstack/react-query";
|
|
5673
5718
|
var useSwitchLocale = () => {
|
|
5674
5719
|
const { switchUserLocale } = useUserService();
|
|
5675
|
-
return
|
|
5720
|
+
return useMutation33({
|
|
5676
5721
|
mutationFn: ({ data }) => {
|
|
5677
5722
|
return switchUserLocale({
|
|
5678
5723
|
id: data.id,
|
|
@@ -5684,10 +5729,10 @@ var useSwitchLocale = () => {
|
|
|
5684
5729
|
var use_switch_locale_default = useSwitchLocale;
|
|
5685
5730
|
|
|
5686
5731
|
// src/hooks/view/use-button.ts
|
|
5687
|
-
import { useMutation as
|
|
5732
|
+
import { useMutation as useMutation34 } from "@tanstack/react-query";
|
|
5688
5733
|
var useButton = () => {
|
|
5689
5734
|
const { callButton } = useActionService();
|
|
5690
|
-
return
|
|
5735
|
+
return useMutation34({
|
|
5691
5736
|
mutationFn: ({
|
|
5692
5737
|
model,
|
|
5693
5738
|
ids,
|
|
@@ -5709,10 +5754,10 @@ var useButton = () => {
|
|
|
5709
5754
|
var use_button_default = useButton;
|
|
5710
5755
|
|
|
5711
5756
|
// src/hooks/view/use-duplicate-record.ts
|
|
5712
|
-
import { useMutation as
|
|
5757
|
+
import { useMutation as useMutation35 } from "@tanstack/react-query";
|
|
5713
5758
|
var useDuplicateRecord = () => {
|
|
5714
5759
|
const { duplicateRecord } = useActionService();
|
|
5715
|
-
return
|
|
5760
|
+
return useMutation35({
|
|
5716
5761
|
mutationFn: ({
|
|
5717
5762
|
id,
|
|
5718
5763
|
model,
|
|
@@ -5824,11 +5869,11 @@ var use_get_list_data_default = useGetListData;
|
|
|
5824
5869
|
|
|
5825
5870
|
// src/hooks/view/use-get-menu.ts
|
|
5826
5871
|
import { useQuery as useQuery15 } from "@tanstack/react-query";
|
|
5827
|
-
var useGetMenu = (context, specification, enabled
|
|
5872
|
+
var useGetMenu = (context, specification, enabled) => {
|
|
5828
5873
|
const { getMenu } = useViewService();
|
|
5829
5874
|
return useQuery15({
|
|
5830
5875
|
queryKey: ["menus" /* MENU */, context],
|
|
5831
|
-
queryFn: () => getMenu(context, specification
|
|
5876
|
+
queryFn: () => getMenu(context, specification).then((res) => {
|
|
5832
5877
|
if (res && res?.records && res?.records?.length > 0) {
|
|
5833
5878
|
return res?.records;
|
|
5834
5879
|
}
|
|
@@ -5842,10 +5887,10 @@ var useGetMenu = (context, specification, enabled, domain) => {
|
|
|
5842
5887
|
var use_get_menu_default = useGetMenu;
|
|
5843
5888
|
|
|
5844
5889
|
// src/hooks/view/use-get-print-report.ts
|
|
5845
|
-
import { useMutation as
|
|
5890
|
+
import { useMutation as useMutation36 } from "@tanstack/react-query";
|
|
5846
5891
|
var useGetPrintReport = () => {
|
|
5847
5892
|
const { getPrintReportName } = useActionService();
|
|
5848
|
-
return
|
|
5893
|
+
return useMutation36({
|
|
5849
5894
|
mutationFn: ({ id }) => getPrintReportName({
|
|
5850
5895
|
id
|
|
5851
5896
|
})
|
|
@@ -5913,10 +5958,10 @@ var useGetView = (viewParams, actData) => {
|
|
|
5913
5958
|
var use_get_view_default = useGetView;
|
|
5914
5959
|
|
|
5915
5960
|
// src/hooks/view/use-load-action.ts
|
|
5916
|
-
import { useMutation as
|
|
5961
|
+
import { useMutation as useMutation37 } from "@tanstack/react-query";
|
|
5917
5962
|
var useLoadAction = () => {
|
|
5918
5963
|
const { loadAction } = useActionService();
|
|
5919
|
-
return
|
|
5964
|
+
return useMutation37({
|
|
5920
5965
|
mutationFn: ({
|
|
5921
5966
|
idAction,
|
|
5922
5967
|
context,
|
|
@@ -5945,10 +5990,10 @@ var useLoadMessage = () => {
|
|
|
5945
5990
|
var use_load_message_default = useLoadMessage;
|
|
5946
5991
|
|
|
5947
5992
|
// src/hooks/view/use-print.ts
|
|
5948
|
-
import { useMutation as
|
|
5993
|
+
import { useMutation as useMutation38 } from "@tanstack/react-query";
|
|
5949
5994
|
var usePrint = () => {
|
|
5950
5995
|
const { print } = useActionService();
|
|
5951
|
-
return
|
|
5996
|
+
return useMutation38({
|
|
5952
5997
|
mutationFn: ({ id, report, db }) => print({
|
|
5953
5998
|
id,
|
|
5954
5999
|
report,
|
|
@@ -5959,10 +6004,10 @@ var usePrint = () => {
|
|
|
5959
6004
|
var use_print_default = usePrint;
|
|
5960
6005
|
|
|
5961
6006
|
// src/hooks/view/use-remove-row.ts
|
|
5962
|
-
import { useMutation as
|
|
6007
|
+
import { useMutation as useMutation39 } from "@tanstack/react-query";
|
|
5963
6008
|
var useRemoveRow = () => {
|
|
5964
6009
|
const { removeRows } = useActionService();
|
|
5965
|
-
return
|
|
6010
|
+
return useMutation39({
|
|
5966
6011
|
mutationFn: ({
|
|
5967
6012
|
model,
|
|
5968
6013
|
ids,
|
|
@@ -5997,10 +6042,10 @@ var useGetResequence = (model, resIds, context, offset) => {
|
|
|
5997
6042
|
var use_resequence_default = useGetResequence;
|
|
5998
6043
|
|
|
5999
6044
|
// src/hooks/view/use-run-action.ts
|
|
6000
|
-
import { useMutation as
|
|
6045
|
+
import { useMutation as useMutation40 } from "@tanstack/react-query";
|
|
6001
6046
|
var useRunAction = () => {
|
|
6002
6047
|
const { runAction } = useActionService();
|
|
6003
|
-
return
|
|
6048
|
+
return useMutation40({
|
|
6004
6049
|
mutationFn: ({
|
|
6005
6050
|
idAction,
|
|
6006
6051
|
context,
|
|
@@ -6015,10 +6060,10 @@ var useRunAction = () => {
|
|
|
6015
6060
|
var use_run_action_default = useRunAction;
|
|
6016
6061
|
|
|
6017
6062
|
// src/hooks/view/use-signin-sso.ts
|
|
6018
|
-
import { useMutation as
|
|
6063
|
+
import { useMutation as useMutation41 } from "@tanstack/react-query";
|
|
6019
6064
|
var useSignInSSO = () => {
|
|
6020
6065
|
const { signInSSO } = useViewService();
|
|
6021
|
-
return
|
|
6066
|
+
return useMutation41({
|
|
6022
6067
|
mutationFn: ({
|
|
6023
6068
|
redirect_uri,
|
|
6024
6069
|
state,
|
|
@@ -6041,10 +6086,10 @@ var useSignInSSO = () => {
|
|
|
6041
6086
|
var use_signin_sso_default = useSignInSSO;
|
|
6042
6087
|
|
|
6043
6088
|
// src/hooks/view/use-verify-2FA.ts
|
|
6044
|
-
import { useMutation as
|
|
6089
|
+
import { useMutation as useMutation42 } from "@tanstack/react-query";
|
|
6045
6090
|
var useVerify2FA = () => {
|
|
6046
6091
|
const { verify2FA } = useViewService();
|
|
6047
|
-
return
|
|
6092
|
+
return useMutation42({
|
|
6048
6093
|
mutationFn: ({
|
|
6049
6094
|
method,
|
|
6050
6095
|
with_context,
|
|
@@ -6065,10 +6110,10 @@ var useVerify2FA = () => {
|
|
|
6065
6110
|
var use_verify_2FA_default = useVerify2FA;
|
|
6066
6111
|
|
|
6067
6112
|
// src/hooks/view/uset-get-2FA-method.ts
|
|
6068
|
-
import { useMutation as
|
|
6113
|
+
import { useMutation as useMutation43 } from "@tanstack/react-query";
|
|
6069
6114
|
var useGet2FAMethods = () => {
|
|
6070
6115
|
const { get2FAMethods } = useViewService();
|
|
6071
|
-
return
|
|
6116
|
+
return useMutation43({
|
|
6072
6117
|
mutationFn: ({
|
|
6073
6118
|
method,
|
|
6074
6119
|
with_context
|
|
@@ -6083,10 +6128,10 @@ var useGet2FAMethods = () => {
|
|
|
6083
6128
|
var uset_get_2FA_method_default = useGet2FAMethods;
|
|
6084
6129
|
|
|
6085
6130
|
// src/hooks/view/use-grant-access.ts
|
|
6086
|
-
import { useMutation as
|
|
6131
|
+
import { useMutation as useMutation44 } from "@tanstack/react-query";
|
|
6087
6132
|
var useGrantAccess = () => {
|
|
6088
6133
|
const { grantAccess } = useViewService();
|
|
6089
|
-
return
|
|
6134
|
+
return useMutation44({
|
|
6090
6135
|
mutationFn: ({
|
|
6091
6136
|
redirect_uri,
|
|
6092
6137
|
state,
|
|
@@ -6105,10 +6150,10 @@ var useGrantAccess = () => {
|
|
|
6105
6150
|
var use_grant_access_default = useGrantAccess;
|
|
6106
6151
|
|
|
6107
6152
|
// src/hooks/view/use-remove-totp-setup.ts
|
|
6108
|
-
import { useMutation as
|
|
6153
|
+
import { useMutation as useMutation45 } from "@tanstack/react-query";
|
|
6109
6154
|
var useRemoveTotpSetup = () => {
|
|
6110
6155
|
const { removeTotpSetUp } = useViewService();
|
|
6111
|
-
return
|
|
6156
|
+
return useMutation45({
|
|
6112
6157
|
mutationFn: ({ method, token }) => {
|
|
6113
6158
|
return removeTotpSetUp({
|
|
6114
6159
|
method,
|
|
@@ -6120,10 +6165,10 @@ var useRemoveTotpSetup = () => {
|
|
|
6120
6165
|
var use_remove_totp_setup_default = useRemoveTotpSetup;
|
|
6121
6166
|
|
|
6122
6167
|
// src/hooks/view/use-request-setup-totp.ts
|
|
6123
|
-
import { useMutation as
|
|
6168
|
+
import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
6124
6169
|
var useRequestSetupTotp = () => {
|
|
6125
6170
|
const { requestSetupTotp } = useViewService();
|
|
6126
|
-
return
|
|
6171
|
+
return useMutation46({
|
|
6127
6172
|
mutationFn: ({ method, token }) => {
|
|
6128
6173
|
return requestSetupTotp({
|
|
6129
6174
|
method,
|
|
@@ -6135,10 +6180,10 @@ var useRequestSetupTotp = () => {
|
|
|
6135
6180
|
var use_request_setup_totp_default = useRequestSetupTotp;
|
|
6136
6181
|
|
|
6137
6182
|
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
6138
|
-
import { useMutation as
|
|
6183
|
+
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
6139
6184
|
var useSettingsWebRead2fa = () => {
|
|
6140
6185
|
const { settingsWebRead2fa } = useViewService();
|
|
6141
|
-
return
|
|
6186
|
+
return useMutation47({
|
|
6142
6187
|
mutationFn: ({
|
|
6143
6188
|
method,
|
|
6144
6189
|
token,
|
|
@@ -6157,10 +6202,10 @@ var useSettingsWebRead2fa = () => {
|
|
|
6157
6202
|
var use_settings_web_read_2fa_default = useSettingsWebRead2fa;
|
|
6158
6203
|
|
|
6159
6204
|
// src/hooks/view/use-verify-totp.ts
|
|
6160
|
-
import { useMutation as
|
|
6205
|
+
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
6161
6206
|
var useVerifyTotp = () => {
|
|
6162
6207
|
const { verifyTotp } = useViewService();
|
|
6163
|
-
return
|
|
6208
|
+
return useMutation48({
|
|
6164
6209
|
mutationFn: ({
|
|
6165
6210
|
method,
|
|
6166
6211
|
action_token,
|
|
@@ -6183,6 +6228,7 @@ var ServiceProvider = ({
|
|
|
6183
6228
|
children
|
|
6184
6229
|
}) => {
|
|
6185
6230
|
const services = {
|
|
6231
|
+
useSaveFile: use_save_file_default,
|
|
6186
6232
|
useForgotPassword: use_forgot_password_default,
|
|
6187
6233
|
useForgotPasswordSSO: use_forgotpassword_sso_default,
|
|
6188
6234
|
useGetProvider: use_get_provider_default,
|
package/dist/services.d.mts
CHANGED
|
@@ -146,6 +146,12 @@ declare function useFormService(): {
|
|
|
146
146
|
uploadFile: ({ formData }: {
|
|
147
147
|
formData: any;
|
|
148
148
|
}) => Promise<any>;
|
|
149
|
+
saveFile: ({ model, idForm, idFile, context, }: {
|
|
150
|
+
model: string;
|
|
151
|
+
idForm: any;
|
|
152
|
+
idFile: any;
|
|
153
|
+
context: any;
|
|
154
|
+
}) => Promise<any>;
|
|
149
155
|
};
|
|
150
156
|
|
|
151
157
|
type TGetGroupsParams = {
|
|
@@ -206,7 +212,7 @@ declare function useUserService(): {
|
|
|
206
212
|
|
|
207
213
|
declare function useViewService(): {
|
|
208
214
|
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
209
|
-
getMenu: (context: any, specification: any
|
|
215
|
+
getMenu: (context: any, specification: any) => Promise<any>;
|
|
210
216
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
211
217
|
getResequence: ({ model, ids, context, offset, }: {
|
|
212
218
|
model: string;
|
package/dist/services.d.ts
CHANGED
|
@@ -146,6 +146,12 @@ declare function useFormService(): {
|
|
|
146
146
|
uploadFile: ({ formData }: {
|
|
147
147
|
formData: any;
|
|
148
148
|
}) => Promise<any>;
|
|
149
|
+
saveFile: ({ model, idForm, idFile, context, }: {
|
|
150
|
+
model: string;
|
|
151
|
+
idForm: any;
|
|
152
|
+
idFile: any;
|
|
153
|
+
context: any;
|
|
154
|
+
}) => Promise<any>;
|
|
149
155
|
};
|
|
150
156
|
|
|
151
157
|
type TGetGroupsParams = {
|
|
@@ -206,7 +212,7 @@ declare function useUserService(): {
|
|
|
206
212
|
|
|
207
213
|
declare function useViewService(): {
|
|
208
214
|
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
209
|
-
getMenu: (context: any, specification: any
|
|
215
|
+
getMenu: (context: any, specification: any) => Promise<any>;
|
|
210
216
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
211
217
|
getResequence: ({ model, ids, context, offset, }: {
|
|
212
218
|
model: string;
|
package/dist/services.js
CHANGED
|
@@ -2938,117 +2938,120 @@ var import_react_query31 = require("@tanstack/react-query");
|
|
|
2938
2938
|
// src/hooks/form/use-upload-file.ts
|
|
2939
2939
|
var import_react_query32 = require("@tanstack/react-query");
|
|
2940
2940
|
|
|
2941
|
-
// src/hooks/
|
|
2941
|
+
// src/hooks/form/use-save-file.ts
|
|
2942
2942
|
var import_react_query33 = require("@tanstack/react-query");
|
|
2943
2943
|
|
|
2944
|
-
// src/hooks/model/use-
|
|
2944
|
+
// src/hooks/model/use-delete.ts
|
|
2945
2945
|
var import_react_query34 = require("@tanstack/react-query");
|
|
2946
2946
|
|
|
2947
|
-
// src/hooks/model/use-get-
|
|
2947
|
+
// src/hooks/model/use-get-all.ts
|
|
2948
2948
|
var import_react_query35 = require("@tanstack/react-query");
|
|
2949
2949
|
|
|
2950
|
-
// src/hooks/model/use-get-
|
|
2950
|
+
// src/hooks/model/use-get-conversion-rate.ts
|
|
2951
2951
|
var import_react_query36 = require("@tanstack/react-query");
|
|
2952
2952
|
|
|
2953
|
-
// src/hooks/model/use-get-
|
|
2953
|
+
// src/hooks/model/use-get-currency.ts
|
|
2954
2954
|
var import_react_query37 = require("@tanstack/react-query");
|
|
2955
2955
|
|
|
2956
|
-
// src/hooks/model/use-get-
|
|
2956
|
+
// src/hooks/model/use-get-detail.ts
|
|
2957
2957
|
var import_react_query38 = require("@tanstack/react-query");
|
|
2958
2958
|
|
|
2959
|
-
// src/hooks/model/use-get-
|
|
2959
|
+
// src/hooks/model/use-get-field-onchange.ts
|
|
2960
2960
|
var import_react_query39 = require("@tanstack/react-query");
|
|
2961
2961
|
|
|
2962
|
-
// src/hooks/model/use-
|
|
2962
|
+
// src/hooks/model/use-get-list-my-bank-account.ts
|
|
2963
2963
|
var import_react_query40 = require("@tanstack/react-query");
|
|
2964
2964
|
|
|
2965
|
-
// src/hooks/model/use-
|
|
2965
|
+
// src/hooks/model/use-onchange-form.ts
|
|
2966
2966
|
var import_react_query41 = require("@tanstack/react-query");
|
|
2967
2967
|
|
|
2968
|
-
// src/hooks/
|
|
2968
|
+
// src/hooks/model/use-save.ts
|
|
2969
2969
|
var import_react_query42 = require("@tanstack/react-query");
|
|
2970
2970
|
|
|
2971
|
-
// src/hooks/user/use-get-
|
|
2971
|
+
// src/hooks/user/use-get-profile.ts
|
|
2972
2972
|
var import_react_query43 = require("@tanstack/react-query");
|
|
2973
2973
|
|
|
2974
|
-
// src/hooks/user/use-
|
|
2974
|
+
// src/hooks/user/use-get-user.ts
|
|
2975
2975
|
var import_react_query44 = require("@tanstack/react-query");
|
|
2976
2976
|
|
|
2977
|
-
// src/hooks/
|
|
2977
|
+
// src/hooks/user/use-switch-locale.ts
|
|
2978
2978
|
var import_react_query45 = require("@tanstack/react-query");
|
|
2979
2979
|
|
|
2980
|
-
// src/hooks/view/use-
|
|
2980
|
+
// src/hooks/view/use-button.ts
|
|
2981
2981
|
var import_react_query46 = require("@tanstack/react-query");
|
|
2982
2982
|
|
|
2983
|
-
// src/hooks/view/use-
|
|
2983
|
+
// src/hooks/view/use-duplicate-record.ts
|
|
2984
2984
|
var import_react_query47 = require("@tanstack/react-query");
|
|
2985
2985
|
|
|
2986
|
-
// src/hooks/view/use-get-
|
|
2986
|
+
// src/hooks/view/use-get-action-detail.ts
|
|
2987
2987
|
var import_react_query48 = require("@tanstack/react-query");
|
|
2988
2988
|
|
|
2989
|
-
// src/hooks/view/use-get-
|
|
2989
|
+
// src/hooks/view/use-get-calendar.ts
|
|
2990
2990
|
var import_react_query49 = require("@tanstack/react-query");
|
|
2991
2991
|
|
|
2992
|
-
// src/hooks/view/use-get-
|
|
2992
|
+
// src/hooks/view/use-get-groups.ts
|
|
2993
2993
|
var import_react_query50 = require("@tanstack/react-query");
|
|
2994
2994
|
|
|
2995
|
-
// src/hooks/view/use-get-
|
|
2995
|
+
// src/hooks/view/use-get-list-data.ts
|
|
2996
2996
|
var import_react_query51 = require("@tanstack/react-query");
|
|
2997
2997
|
|
|
2998
|
-
// src/hooks/view/use-get-
|
|
2998
|
+
// src/hooks/view/use-get-menu.ts
|
|
2999
2999
|
var import_react_query52 = require("@tanstack/react-query");
|
|
3000
3000
|
|
|
3001
|
-
// src/hooks/view/use-get-
|
|
3001
|
+
// src/hooks/view/use-get-print-report.ts
|
|
3002
3002
|
var import_react_query53 = require("@tanstack/react-query");
|
|
3003
3003
|
|
|
3004
|
-
// src/hooks/view/use-get-
|
|
3004
|
+
// src/hooks/view/use-get-progress-bar.ts
|
|
3005
3005
|
var import_react_query54 = require("@tanstack/react-query");
|
|
3006
3006
|
|
|
3007
|
-
// src/hooks/view/use-get-
|
|
3007
|
+
// src/hooks/view/use-get-selection.ts
|
|
3008
3008
|
var import_react_query55 = require("@tanstack/react-query");
|
|
3009
3009
|
|
|
3010
|
-
// src/hooks/view/use-
|
|
3010
|
+
// src/hooks/view/use-get-view.ts
|
|
3011
3011
|
var import_react_query56 = require("@tanstack/react-query");
|
|
3012
3012
|
|
|
3013
|
-
// src/hooks/view/use-load-
|
|
3013
|
+
// src/hooks/view/use-load-action.ts
|
|
3014
3014
|
var import_react_query57 = require("@tanstack/react-query");
|
|
3015
3015
|
|
|
3016
|
-
// src/hooks/view/use-
|
|
3016
|
+
// src/hooks/view/use-load-message.ts
|
|
3017
3017
|
var import_react_query58 = require("@tanstack/react-query");
|
|
3018
3018
|
|
|
3019
|
-
// src/hooks/view/use-
|
|
3019
|
+
// src/hooks/view/use-print.ts
|
|
3020
3020
|
var import_react_query59 = require("@tanstack/react-query");
|
|
3021
3021
|
|
|
3022
|
-
// src/hooks/view/use-
|
|
3022
|
+
// src/hooks/view/use-remove-row.ts
|
|
3023
3023
|
var import_react_query60 = require("@tanstack/react-query");
|
|
3024
3024
|
|
|
3025
|
-
// src/hooks/view/use-
|
|
3025
|
+
// src/hooks/view/use-resequence.ts
|
|
3026
3026
|
var import_react_query61 = require("@tanstack/react-query");
|
|
3027
3027
|
|
|
3028
|
-
// src/hooks/view/use-
|
|
3028
|
+
// src/hooks/view/use-run-action.ts
|
|
3029
3029
|
var import_react_query62 = require("@tanstack/react-query");
|
|
3030
3030
|
|
|
3031
|
-
// src/hooks/view/use-
|
|
3031
|
+
// src/hooks/view/use-signin-sso.ts
|
|
3032
3032
|
var import_react_query63 = require("@tanstack/react-query");
|
|
3033
3033
|
|
|
3034
|
-
// src/hooks/view/
|
|
3034
|
+
// src/hooks/view/use-verify-2FA.ts
|
|
3035
3035
|
var import_react_query64 = require("@tanstack/react-query");
|
|
3036
3036
|
|
|
3037
|
-
// src/hooks/view/
|
|
3037
|
+
// src/hooks/view/uset-get-2FA-method.ts
|
|
3038
3038
|
var import_react_query65 = require("@tanstack/react-query");
|
|
3039
3039
|
|
|
3040
|
-
// src/hooks/view/use-
|
|
3040
|
+
// src/hooks/view/use-grant-access.ts
|
|
3041
3041
|
var import_react_query66 = require("@tanstack/react-query");
|
|
3042
3042
|
|
|
3043
|
-
// src/hooks/view/use-
|
|
3043
|
+
// src/hooks/view/use-remove-totp-setup.ts
|
|
3044
3044
|
var import_react_query67 = require("@tanstack/react-query");
|
|
3045
3045
|
|
|
3046
|
-
// src/hooks/view/use-
|
|
3046
|
+
// src/hooks/view/use-request-setup-totp.ts
|
|
3047
3047
|
var import_react_query68 = require("@tanstack/react-query");
|
|
3048
3048
|
|
|
3049
|
-
// src/hooks/view/use-
|
|
3049
|
+
// src/hooks/view/use-settings-web-read-2fa.ts
|
|
3050
3050
|
var import_react_query69 = require("@tanstack/react-query");
|
|
3051
3051
|
|
|
3052
|
+
// src/hooks/view/use-verify-totp.ts
|
|
3053
|
+
var import_react_query70 = require("@tanstack/react-query");
|
|
3054
|
+
|
|
3052
3055
|
// src/provider/service-provider.tsx
|
|
3053
3056
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3054
3057
|
var ServiceContext = (0, import_react4.createContext)(null);
|
|
@@ -3746,6 +3749,35 @@ function useFormService() {
|
|
|
3746
3749
|
},
|
|
3747
3750
|
[env]
|
|
3748
3751
|
);
|
|
3752
|
+
const saveFile = (0, import_react10.useCallback)(
|
|
3753
|
+
async ({
|
|
3754
|
+
model,
|
|
3755
|
+
idForm,
|
|
3756
|
+
idFile,
|
|
3757
|
+
context
|
|
3758
|
+
}) => {
|
|
3759
|
+
const jsonData = {
|
|
3760
|
+
model,
|
|
3761
|
+
method: "web_save" /* WEB_SAVE */,
|
|
3762
|
+
ids: [
|
|
3763
|
+
[idForm],
|
|
3764
|
+
{
|
|
3765
|
+
attachment_ids: [[4, idFile]]
|
|
3766
|
+
}
|
|
3767
|
+
],
|
|
3768
|
+
kwargs: {
|
|
3769
|
+
context,
|
|
3770
|
+
specification: {}
|
|
3771
|
+
}
|
|
3772
|
+
};
|
|
3773
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
3774
|
+
headers: {
|
|
3775
|
+
"Content-Type": "application/json"
|
|
3776
|
+
}
|
|
3777
|
+
});
|
|
3778
|
+
},
|
|
3779
|
+
[env]
|
|
3780
|
+
);
|
|
3749
3781
|
const getFormView = (0, import_react10.useCallback)(
|
|
3750
3782
|
async ({ data }) => {
|
|
3751
3783
|
const jsonData = {
|
|
@@ -3799,7 +3831,8 @@ function useFormService() {
|
|
|
3799
3831
|
uploadImage,
|
|
3800
3832
|
getFormView,
|
|
3801
3833
|
changeStatus,
|
|
3802
|
-
uploadFile
|
|
3834
|
+
uploadFile,
|
|
3835
|
+
saveFile
|
|
3803
3836
|
};
|
|
3804
3837
|
}
|
|
3805
3838
|
|
|
@@ -4352,7 +4385,7 @@ function useViewService() {
|
|
|
4352
4385
|
[env]
|
|
4353
4386
|
);
|
|
4354
4387
|
const getMenu = (0, import_react14.useCallback)(
|
|
4355
|
-
async (context, specification
|
|
4388
|
+
async (context, specification) => {
|
|
4356
4389
|
const jsonData = {
|
|
4357
4390
|
model: "ir.ui.menu" /* MENU */,
|
|
4358
4391
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
@@ -4360,7 +4393,7 @@ function useViewService() {
|
|
|
4360
4393
|
with_context: context,
|
|
4361
4394
|
kwargs: {
|
|
4362
4395
|
specification,
|
|
4363
|
-
domain:
|
|
4396
|
+
domain: [
|
|
4364
4397
|
"&",
|
|
4365
4398
|
["is_display", "=", true],
|
|
4366
4399
|
"&",
|