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