@fctc/interface-logic 2.6.6 → 2.6.8
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 +11 -4
- package/dist/hooks.d.ts +11 -4
- package/dist/hooks.js +96 -1
- package/dist/hooks.mjs +95 -1
- package/dist/provider.d.mts +2 -1
- package/dist/provider.d.ts +2 -1
- package/dist/provider.js +96 -2
- package/dist/provider.mjs +96 -2
- package/dist/services.d.mts +9 -3
- package/dist/services.d.ts +9 -3
- package/dist/services.js +75 -1
- package/dist/services.mjs +75 -1
- package/package.json +90 -90
package/dist/constants.d.mts
CHANGED
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -63,6 +63,7 @@ var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
|
|
|
63
63
|
MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
|
|
64
64
|
MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
|
|
65
65
|
MethodConstants2["CREATE"] = "create";
|
|
66
|
+
MethodConstants2["LOAD_DATA"] = "load_data";
|
|
66
67
|
return MethodConstants2;
|
|
67
68
|
})(MethodConstants || {});
|
|
68
69
|
|
package/dist/constants.mjs
CHANGED
|
@@ -25,6 +25,7 @@ var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
|
|
|
25
25
|
MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
|
|
26
26
|
MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
|
|
27
27
|
MethodConstants2["CREATE"] = "create";
|
|
28
|
+
MethodConstants2["LOAD_DATA"] = "load_data";
|
|
28
29
|
return MethodConstants2;
|
|
29
30
|
})(MethodConstants || {});
|
|
30
31
|
|
package/dist/hooks.d.mts
CHANGED
|
@@ -400,8 +400,8 @@ declare const useManageSession: () => _tanstack_react_query.UseMutationResult<un
|
|
|
400
400
|
declare const useHandleClosingSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
401
401
|
model: string;
|
|
402
402
|
method: string;
|
|
403
|
-
ids:
|
|
404
|
-
kwargs:
|
|
403
|
+
ids: any;
|
|
404
|
+
kwargs: any;
|
|
405
405
|
service: string;
|
|
406
406
|
xNode: string;
|
|
407
407
|
}, unknown>;
|
|
@@ -415,7 +415,7 @@ declare const useCreateSession: () => _tanstack_react_query.UseMutationResult<un
|
|
|
415
415
|
|
|
416
416
|
declare const useGetPos: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
417
417
|
model: string;
|
|
418
|
-
args:
|
|
418
|
+
args: any;
|
|
419
419
|
domain: any;
|
|
420
420
|
service: string;
|
|
421
421
|
xNode: string;
|
|
@@ -451,4 +451,11 @@ declare const useDeleteEntity: () => _tanstack_react_query.UseMutationResult<unk
|
|
|
451
451
|
xNode: string;
|
|
452
452
|
}, unknown>;
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
declare const useLoadDataPosSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
455
|
+
model: string;
|
|
456
|
+
ids: any;
|
|
457
|
+
service: string;
|
|
458
|
+
xNode: string;
|
|
459
|
+
}, unknown>;
|
|
460
|
+
|
|
461
|
+
export { useButton, useChangeStatus, useCreateEntity, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPos, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
|
package/dist/hooks.d.ts
CHANGED
|
@@ -400,8 +400,8 @@ declare const useManageSession: () => _tanstack_react_query.UseMutationResult<un
|
|
|
400
400
|
declare const useHandleClosingSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
401
401
|
model: string;
|
|
402
402
|
method: string;
|
|
403
|
-
ids:
|
|
404
|
-
kwargs:
|
|
403
|
+
ids: any;
|
|
404
|
+
kwargs: any;
|
|
405
405
|
service: string;
|
|
406
406
|
xNode: string;
|
|
407
407
|
}, unknown>;
|
|
@@ -415,7 +415,7 @@ declare const useCreateSession: () => _tanstack_react_query.UseMutationResult<un
|
|
|
415
415
|
|
|
416
416
|
declare const useGetPos: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
417
417
|
model: string;
|
|
418
|
-
args:
|
|
418
|
+
args: any;
|
|
419
419
|
domain: any;
|
|
420
420
|
service: string;
|
|
421
421
|
xNode: string;
|
|
@@ -451,4 +451,11 @@ declare const useDeleteEntity: () => _tanstack_react_query.UseMutationResult<unk
|
|
|
451
451
|
xNode: string;
|
|
452
452
|
}, unknown>;
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
declare const useLoadDataPosSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
455
|
+
model: string;
|
|
456
|
+
ids: any;
|
|
457
|
+
service: string;
|
|
458
|
+
xNode: string;
|
|
459
|
+
}, unknown>;
|
|
460
|
+
|
|
461
|
+
export { useButton, useChangeStatus, useCreateEntity, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPos, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadDataPosSession, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
|
package/dist/hooks.js
CHANGED
|
@@ -78,6 +78,7 @@ __export(hooks_exports, {
|
|
|
78
78
|
useHandleClosingSession: () => use_handle_closing_session_default,
|
|
79
79
|
useIsValidToken: () => use_isvalid_token_default,
|
|
80
80
|
useLoadAction: () => use_load_action_default,
|
|
81
|
+
useLoadDataPosSession: () => use_load_data_pos_session_default,
|
|
81
82
|
useLoadMessage: () => use_load_message_default,
|
|
82
83
|
useLoginCredential: () => use_login_credential_default,
|
|
83
84
|
useLoginSocial: () => use_login_socical_default,
|
|
@@ -4901,6 +4902,76 @@ function useViewService() {
|
|
|
4901
4902
|
},
|
|
4902
4903
|
[env]
|
|
4903
4904
|
);
|
|
4905
|
+
const loadDataPosSession = (0, import_react14.useCallback)(
|
|
4906
|
+
({
|
|
4907
|
+
model,
|
|
4908
|
+
ids,
|
|
4909
|
+
xNode,
|
|
4910
|
+
service
|
|
4911
|
+
}) => {
|
|
4912
|
+
const jsonData = {
|
|
4913
|
+
model,
|
|
4914
|
+
method: "load_data" /* LOAD_DATA */,
|
|
4915
|
+
ids,
|
|
4916
|
+
kwargs: {
|
|
4917
|
+
models_to_load: [
|
|
4918
|
+
"pos.config",
|
|
4919
|
+
"pos.order",
|
|
4920
|
+
"pos.order.line",
|
|
4921
|
+
"pos.pack.operation.lot",
|
|
4922
|
+
"pos.payment",
|
|
4923
|
+
"pos.payment.method",
|
|
4924
|
+
"pos.printer",
|
|
4925
|
+
"pos.category",
|
|
4926
|
+
"pos.bill",
|
|
4927
|
+
"res.company",
|
|
4928
|
+
"account.tax",
|
|
4929
|
+
"account.tax.group",
|
|
4930
|
+
"product.product",
|
|
4931
|
+
"product.attribute",
|
|
4932
|
+
"product.attribute.custom.value",
|
|
4933
|
+
"product.template.attribute.line",
|
|
4934
|
+
"product.template.attribute.value",
|
|
4935
|
+
"product.combo",
|
|
4936
|
+
"product.combo.item",
|
|
4937
|
+
"product.packaging",
|
|
4938
|
+
"res.users",
|
|
4939
|
+
"res.partner",
|
|
4940
|
+
"decimal.precision",
|
|
4941
|
+
"uom.uom",
|
|
4942
|
+
"uom.category",
|
|
4943
|
+
"res.country",
|
|
4944
|
+
"res.country.state",
|
|
4945
|
+
"res.lang",
|
|
4946
|
+
"product.pricelist",
|
|
4947
|
+
"product.pricelist.item",
|
|
4948
|
+
"product.category",
|
|
4949
|
+
"account.cash.rounding",
|
|
4950
|
+
"account.fiscal.position",
|
|
4951
|
+
"account.fiscal.position.tax",
|
|
4952
|
+
"stock.picking.type",
|
|
4953
|
+
"res.currency",
|
|
4954
|
+
"pos.note",
|
|
4955
|
+
"ir.ui.view",
|
|
4956
|
+
"product.tag",
|
|
4957
|
+
"ir.module.module"
|
|
4958
|
+
]
|
|
4959
|
+
}
|
|
4960
|
+
};
|
|
4961
|
+
return env?.requests.post(
|
|
4962
|
+
"/call" /* CALL_PATH */,
|
|
4963
|
+
jsonData,
|
|
4964
|
+
{
|
|
4965
|
+
headers: {
|
|
4966
|
+
"Content-Type": "application/json",
|
|
4967
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4968
|
+
}
|
|
4969
|
+
},
|
|
4970
|
+
service
|
|
4971
|
+
);
|
|
4972
|
+
},
|
|
4973
|
+
[env]
|
|
4974
|
+
);
|
|
4904
4975
|
return {
|
|
4905
4976
|
getView,
|
|
4906
4977
|
getMenu,
|
|
@@ -4926,7 +4997,8 @@ function useViewService() {
|
|
|
4926
4997
|
createEntity,
|
|
4927
4998
|
getList,
|
|
4928
4999
|
updateEntity,
|
|
4929
|
-
deleteEntity
|
|
5000
|
+
deleteEntity,
|
|
5001
|
+
loadDataPosSession
|
|
4930
5002
|
};
|
|
4931
5003
|
}
|
|
4932
5004
|
|
|
@@ -6488,6 +6560,28 @@ var useDeleteEntity = () => {
|
|
|
6488
6560
|
});
|
|
6489
6561
|
};
|
|
6490
6562
|
var use_delete_entity_default = useDeleteEntity;
|
|
6563
|
+
|
|
6564
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
6565
|
+
var import_react_query80 = require("@tanstack/react-query");
|
|
6566
|
+
var useLoadDataPosSession = () => {
|
|
6567
|
+
const { loadDataPosSession } = useViewService();
|
|
6568
|
+
return (0, import_react_query80.useMutation)({
|
|
6569
|
+
mutationFn: ({
|
|
6570
|
+
model,
|
|
6571
|
+
ids,
|
|
6572
|
+
xNode,
|
|
6573
|
+
service
|
|
6574
|
+
}) => {
|
|
6575
|
+
return loadDataPosSession({
|
|
6576
|
+
model,
|
|
6577
|
+
ids,
|
|
6578
|
+
xNode,
|
|
6579
|
+
service
|
|
6580
|
+
});
|
|
6581
|
+
}
|
|
6582
|
+
});
|
|
6583
|
+
};
|
|
6584
|
+
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
6491
6585
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6492
6586
|
0 && (module.exports = {
|
|
6493
6587
|
useButton,
|
|
@@ -6538,6 +6632,7 @@ var use_delete_entity_default = useDeleteEntity;
|
|
|
6538
6632
|
useHandleClosingSession,
|
|
6539
6633
|
useIsValidToken,
|
|
6540
6634
|
useLoadAction,
|
|
6635
|
+
useLoadDataPosSession,
|
|
6541
6636
|
useLoadMessage,
|
|
6542
6637
|
useLoginCredential,
|
|
6543
6638
|
useLoginSocial,
|
package/dist/hooks.mjs
CHANGED
|
@@ -4787,6 +4787,76 @@ function useViewService() {
|
|
|
4787
4787
|
},
|
|
4788
4788
|
[env]
|
|
4789
4789
|
);
|
|
4790
|
+
const loadDataPosSession = useCallback10(
|
|
4791
|
+
({
|
|
4792
|
+
model,
|
|
4793
|
+
ids,
|
|
4794
|
+
xNode,
|
|
4795
|
+
service
|
|
4796
|
+
}) => {
|
|
4797
|
+
const jsonData = {
|
|
4798
|
+
model,
|
|
4799
|
+
method: "load_data" /* LOAD_DATA */,
|
|
4800
|
+
ids,
|
|
4801
|
+
kwargs: {
|
|
4802
|
+
models_to_load: [
|
|
4803
|
+
"pos.config",
|
|
4804
|
+
"pos.order",
|
|
4805
|
+
"pos.order.line",
|
|
4806
|
+
"pos.pack.operation.lot",
|
|
4807
|
+
"pos.payment",
|
|
4808
|
+
"pos.payment.method",
|
|
4809
|
+
"pos.printer",
|
|
4810
|
+
"pos.category",
|
|
4811
|
+
"pos.bill",
|
|
4812
|
+
"res.company",
|
|
4813
|
+
"account.tax",
|
|
4814
|
+
"account.tax.group",
|
|
4815
|
+
"product.product",
|
|
4816
|
+
"product.attribute",
|
|
4817
|
+
"product.attribute.custom.value",
|
|
4818
|
+
"product.template.attribute.line",
|
|
4819
|
+
"product.template.attribute.value",
|
|
4820
|
+
"product.combo",
|
|
4821
|
+
"product.combo.item",
|
|
4822
|
+
"product.packaging",
|
|
4823
|
+
"res.users",
|
|
4824
|
+
"res.partner",
|
|
4825
|
+
"decimal.precision",
|
|
4826
|
+
"uom.uom",
|
|
4827
|
+
"uom.category",
|
|
4828
|
+
"res.country",
|
|
4829
|
+
"res.country.state",
|
|
4830
|
+
"res.lang",
|
|
4831
|
+
"product.pricelist",
|
|
4832
|
+
"product.pricelist.item",
|
|
4833
|
+
"product.category",
|
|
4834
|
+
"account.cash.rounding",
|
|
4835
|
+
"account.fiscal.position",
|
|
4836
|
+
"account.fiscal.position.tax",
|
|
4837
|
+
"stock.picking.type",
|
|
4838
|
+
"res.currency",
|
|
4839
|
+
"pos.note",
|
|
4840
|
+
"ir.ui.view",
|
|
4841
|
+
"product.tag",
|
|
4842
|
+
"ir.module.module"
|
|
4843
|
+
]
|
|
4844
|
+
}
|
|
4845
|
+
};
|
|
4846
|
+
return env?.requests.post(
|
|
4847
|
+
"/call" /* CALL_PATH */,
|
|
4848
|
+
jsonData,
|
|
4849
|
+
{
|
|
4850
|
+
headers: {
|
|
4851
|
+
"Content-Type": "application/json",
|
|
4852
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4853
|
+
}
|
|
4854
|
+
},
|
|
4855
|
+
service
|
|
4856
|
+
);
|
|
4857
|
+
},
|
|
4858
|
+
[env]
|
|
4859
|
+
);
|
|
4790
4860
|
return {
|
|
4791
4861
|
getView,
|
|
4792
4862
|
getMenu,
|
|
@@ -4812,7 +4882,8 @@ function useViewService() {
|
|
|
4812
4882
|
createEntity,
|
|
4813
4883
|
getList,
|
|
4814
4884
|
updateEntity,
|
|
4815
|
-
deleteEntity
|
|
4885
|
+
deleteEntity,
|
|
4886
|
+
loadDataPosSession
|
|
4816
4887
|
};
|
|
4817
4888
|
}
|
|
4818
4889
|
|
|
@@ -6374,6 +6445,28 @@ var useDeleteEntity = () => {
|
|
|
6374
6445
|
});
|
|
6375
6446
|
};
|
|
6376
6447
|
var use_delete_entity_default = useDeleteEntity;
|
|
6448
|
+
|
|
6449
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
6450
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
6451
|
+
var useLoadDataPosSession = () => {
|
|
6452
|
+
const { loadDataPosSession } = useViewService();
|
|
6453
|
+
return useMutation58({
|
|
6454
|
+
mutationFn: ({
|
|
6455
|
+
model,
|
|
6456
|
+
ids,
|
|
6457
|
+
xNode,
|
|
6458
|
+
service
|
|
6459
|
+
}) => {
|
|
6460
|
+
return loadDataPosSession({
|
|
6461
|
+
model,
|
|
6462
|
+
ids,
|
|
6463
|
+
xNode,
|
|
6464
|
+
service
|
|
6465
|
+
});
|
|
6466
|
+
}
|
|
6467
|
+
});
|
|
6468
|
+
};
|
|
6469
|
+
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
6377
6470
|
export {
|
|
6378
6471
|
use_button_default as useButton,
|
|
6379
6472
|
use_change_status_default as useChangeStatus,
|
|
@@ -6423,6 +6516,7 @@ export {
|
|
|
6423
6516
|
use_handle_closing_session_default as useHandleClosingSession,
|
|
6424
6517
|
use_isvalid_token_default as useIsValidToken,
|
|
6425
6518
|
use_load_action_default as useLoadAction,
|
|
6519
|
+
use_load_data_pos_session_default as useLoadDataPosSession,
|
|
6426
6520
|
use_load_message_default as useLoadMessage,
|
|
6427
6521
|
use_login_credential_default as useLoginCredential,
|
|
6428
6522
|
use_login_socical_default as useLoginSocial,
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
|
|
4
|
-
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity } from './hooks.mjs';
|
|
4
|
+
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession } from './hooks.mjs';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.mjs';
|
|
7
7
|
import './base-model-type-DD8uZnDP.mjs';
|
|
@@ -143,6 +143,7 @@ interface ServiceContextType {
|
|
|
143
143
|
useManageSession: typeof useManageSession;
|
|
144
144
|
useUpdateClosedSession: typeof useUpdateClosedSession;
|
|
145
145
|
useUpdateEntity: typeof useUpdateEntity;
|
|
146
|
+
useLoadDataPosSession: typeof useLoadDataPosSession;
|
|
146
147
|
}
|
|
147
148
|
declare const ServiceProvider: ({ children, }: {
|
|
148
149
|
children: React.ReactNode;
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
|
|
4
|
-
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity } from './hooks.js';
|
|
4
|
+
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession } from './hooks.js';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
6
|
import './view-type-xxw9OeSR.js';
|
|
7
7
|
import './base-model-type-DD8uZnDP.js';
|
|
@@ -143,6 +143,7 @@ interface ServiceContextType {
|
|
|
143
143
|
useManageSession: typeof useManageSession;
|
|
144
144
|
useUpdateClosedSession: typeof useUpdateClosedSession;
|
|
145
145
|
useUpdateEntity: typeof useUpdateEntity;
|
|
146
|
+
useLoadDataPosSession: typeof useLoadDataPosSession;
|
|
146
147
|
}
|
|
147
148
|
declare const ServiceProvider: ({ children, }: {
|
|
148
149
|
children: React.ReactNode;
|
package/dist/provider.js
CHANGED
|
@@ -4839,6 +4839,76 @@ function useViewService() {
|
|
|
4839
4839
|
},
|
|
4840
4840
|
[env]
|
|
4841
4841
|
);
|
|
4842
|
+
const loadDataPosSession = (0, import_react10.useCallback)(
|
|
4843
|
+
({
|
|
4844
|
+
model,
|
|
4845
|
+
ids,
|
|
4846
|
+
xNode,
|
|
4847
|
+
service
|
|
4848
|
+
}) => {
|
|
4849
|
+
const jsonData = {
|
|
4850
|
+
model,
|
|
4851
|
+
method: "load_data" /* LOAD_DATA */,
|
|
4852
|
+
ids,
|
|
4853
|
+
kwargs: {
|
|
4854
|
+
models_to_load: [
|
|
4855
|
+
"pos.config",
|
|
4856
|
+
"pos.order",
|
|
4857
|
+
"pos.order.line",
|
|
4858
|
+
"pos.pack.operation.lot",
|
|
4859
|
+
"pos.payment",
|
|
4860
|
+
"pos.payment.method",
|
|
4861
|
+
"pos.printer",
|
|
4862
|
+
"pos.category",
|
|
4863
|
+
"pos.bill",
|
|
4864
|
+
"res.company",
|
|
4865
|
+
"account.tax",
|
|
4866
|
+
"account.tax.group",
|
|
4867
|
+
"product.product",
|
|
4868
|
+
"product.attribute",
|
|
4869
|
+
"product.attribute.custom.value",
|
|
4870
|
+
"product.template.attribute.line",
|
|
4871
|
+
"product.template.attribute.value",
|
|
4872
|
+
"product.combo",
|
|
4873
|
+
"product.combo.item",
|
|
4874
|
+
"product.packaging",
|
|
4875
|
+
"res.users",
|
|
4876
|
+
"res.partner",
|
|
4877
|
+
"decimal.precision",
|
|
4878
|
+
"uom.uom",
|
|
4879
|
+
"uom.category",
|
|
4880
|
+
"res.country",
|
|
4881
|
+
"res.country.state",
|
|
4882
|
+
"res.lang",
|
|
4883
|
+
"product.pricelist",
|
|
4884
|
+
"product.pricelist.item",
|
|
4885
|
+
"product.category",
|
|
4886
|
+
"account.cash.rounding",
|
|
4887
|
+
"account.fiscal.position",
|
|
4888
|
+
"account.fiscal.position.tax",
|
|
4889
|
+
"stock.picking.type",
|
|
4890
|
+
"res.currency",
|
|
4891
|
+
"pos.note",
|
|
4892
|
+
"ir.ui.view",
|
|
4893
|
+
"product.tag",
|
|
4894
|
+
"ir.module.module"
|
|
4895
|
+
]
|
|
4896
|
+
}
|
|
4897
|
+
};
|
|
4898
|
+
return env?.requests.post(
|
|
4899
|
+
"/call" /* CALL_PATH */,
|
|
4900
|
+
jsonData,
|
|
4901
|
+
{
|
|
4902
|
+
headers: {
|
|
4903
|
+
"Content-Type": "application/json",
|
|
4904
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4905
|
+
}
|
|
4906
|
+
},
|
|
4907
|
+
service
|
|
4908
|
+
);
|
|
4909
|
+
},
|
|
4910
|
+
[env]
|
|
4911
|
+
);
|
|
4842
4912
|
return {
|
|
4843
4913
|
getView,
|
|
4844
4914
|
getMenu,
|
|
@@ -4864,7 +4934,8 @@ function useViewService() {
|
|
|
4864
4934
|
createEntity,
|
|
4865
4935
|
getList,
|
|
4866
4936
|
updateEntity,
|
|
4867
|
-
deleteEntity
|
|
4937
|
+
deleteEntity,
|
|
4938
|
+
loadDataPosSession
|
|
4868
4939
|
};
|
|
4869
4940
|
}
|
|
4870
4941
|
|
|
@@ -6845,6 +6916,28 @@ var useDeleteEntity = () => {
|
|
|
6845
6916
|
};
|
|
6846
6917
|
var use_delete_entity_default = useDeleteEntity;
|
|
6847
6918
|
|
|
6919
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
6920
|
+
var import_react_query80 = require("@tanstack/react-query");
|
|
6921
|
+
var useLoadDataPosSession = () => {
|
|
6922
|
+
const { loadDataPosSession } = useViewService();
|
|
6923
|
+
return (0, import_react_query80.useMutation)({
|
|
6924
|
+
mutationFn: ({
|
|
6925
|
+
model,
|
|
6926
|
+
ids,
|
|
6927
|
+
xNode,
|
|
6928
|
+
service
|
|
6929
|
+
}) => {
|
|
6930
|
+
return loadDataPosSession({
|
|
6931
|
+
model,
|
|
6932
|
+
ids,
|
|
6933
|
+
xNode,
|
|
6934
|
+
service
|
|
6935
|
+
});
|
|
6936
|
+
}
|
|
6937
|
+
});
|
|
6938
|
+
};
|
|
6939
|
+
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
6940
|
+
|
|
6848
6941
|
// src/provider/service-provider.tsx
|
|
6849
6942
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6850
6943
|
var ServiceContext = (0, import_react13.createContext)(null);
|
|
@@ -6930,7 +7023,8 @@ var ServiceProvider = ({
|
|
|
6930
7023
|
useHandleClosingSession: use_handle_closing_session_default,
|
|
6931
7024
|
useManageSession: use_manage_session_default,
|
|
6932
7025
|
useUpdateClosedSession: use_update_closed_session_default,
|
|
6933
|
-
useUpdateEntity: use_update_entity_default
|
|
7026
|
+
useUpdateEntity: use_update_entity_default,
|
|
7027
|
+
useLoadDataPosSession: use_load_data_pos_session_default
|
|
6934
7028
|
};
|
|
6935
7029
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ServiceContext.Provider, { value: services, children });
|
|
6936
7030
|
};
|
package/dist/provider.mjs
CHANGED
|
@@ -4796,6 +4796,76 @@ function useViewService() {
|
|
|
4796
4796
|
},
|
|
4797
4797
|
[env]
|
|
4798
4798
|
);
|
|
4799
|
+
const loadDataPosSession = useCallback9(
|
|
4800
|
+
({
|
|
4801
|
+
model,
|
|
4802
|
+
ids,
|
|
4803
|
+
xNode,
|
|
4804
|
+
service
|
|
4805
|
+
}) => {
|
|
4806
|
+
const jsonData = {
|
|
4807
|
+
model,
|
|
4808
|
+
method: "load_data" /* LOAD_DATA */,
|
|
4809
|
+
ids,
|
|
4810
|
+
kwargs: {
|
|
4811
|
+
models_to_load: [
|
|
4812
|
+
"pos.config",
|
|
4813
|
+
"pos.order",
|
|
4814
|
+
"pos.order.line",
|
|
4815
|
+
"pos.pack.operation.lot",
|
|
4816
|
+
"pos.payment",
|
|
4817
|
+
"pos.payment.method",
|
|
4818
|
+
"pos.printer",
|
|
4819
|
+
"pos.category",
|
|
4820
|
+
"pos.bill",
|
|
4821
|
+
"res.company",
|
|
4822
|
+
"account.tax",
|
|
4823
|
+
"account.tax.group",
|
|
4824
|
+
"product.product",
|
|
4825
|
+
"product.attribute",
|
|
4826
|
+
"product.attribute.custom.value",
|
|
4827
|
+
"product.template.attribute.line",
|
|
4828
|
+
"product.template.attribute.value",
|
|
4829
|
+
"product.combo",
|
|
4830
|
+
"product.combo.item",
|
|
4831
|
+
"product.packaging",
|
|
4832
|
+
"res.users",
|
|
4833
|
+
"res.partner",
|
|
4834
|
+
"decimal.precision",
|
|
4835
|
+
"uom.uom",
|
|
4836
|
+
"uom.category",
|
|
4837
|
+
"res.country",
|
|
4838
|
+
"res.country.state",
|
|
4839
|
+
"res.lang",
|
|
4840
|
+
"product.pricelist",
|
|
4841
|
+
"product.pricelist.item",
|
|
4842
|
+
"product.category",
|
|
4843
|
+
"account.cash.rounding",
|
|
4844
|
+
"account.fiscal.position",
|
|
4845
|
+
"account.fiscal.position.tax",
|
|
4846
|
+
"stock.picking.type",
|
|
4847
|
+
"res.currency",
|
|
4848
|
+
"pos.note",
|
|
4849
|
+
"ir.ui.view",
|
|
4850
|
+
"product.tag",
|
|
4851
|
+
"ir.module.module"
|
|
4852
|
+
]
|
|
4853
|
+
}
|
|
4854
|
+
};
|
|
4855
|
+
return env?.requests.post(
|
|
4856
|
+
"/call" /* CALL_PATH */,
|
|
4857
|
+
jsonData,
|
|
4858
|
+
{
|
|
4859
|
+
headers: {
|
|
4860
|
+
"Content-Type": "application/json",
|
|
4861
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4862
|
+
}
|
|
4863
|
+
},
|
|
4864
|
+
service
|
|
4865
|
+
);
|
|
4866
|
+
},
|
|
4867
|
+
[env]
|
|
4868
|
+
);
|
|
4799
4869
|
return {
|
|
4800
4870
|
getView,
|
|
4801
4871
|
getMenu,
|
|
@@ -4821,7 +4891,8 @@ function useViewService() {
|
|
|
4821
4891
|
createEntity,
|
|
4822
4892
|
getList,
|
|
4823
4893
|
updateEntity,
|
|
4824
|
-
deleteEntity
|
|
4894
|
+
deleteEntity,
|
|
4895
|
+
loadDataPosSession
|
|
4825
4896
|
};
|
|
4826
4897
|
}
|
|
4827
4898
|
|
|
@@ -6802,6 +6873,28 @@ var useDeleteEntity = () => {
|
|
|
6802
6873
|
};
|
|
6803
6874
|
var use_delete_entity_default = useDeleteEntity;
|
|
6804
6875
|
|
|
6876
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
6877
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
6878
|
+
var useLoadDataPosSession = () => {
|
|
6879
|
+
const { loadDataPosSession } = useViewService();
|
|
6880
|
+
return useMutation58({
|
|
6881
|
+
mutationFn: ({
|
|
6882
|
+
model,
|
|
6883
|
+
ids,
|
|
6884
|
+
xNode,
|
|
6885
|
+
service
|
|
6886
|
+
}) => {
|
|
6887
|
+
return loadDataPosSession({
|
|
6888
|
+
model,
|
|
6889
|
+
ids,
|
|
6890
|
+
xNode,
|
|
6891
|
+
service
|
|
6892
|
+
});
|
|
6893
|
+
}
|
|
6894
|
+
});
|
|
6895
|
+
};
|
|
6896
|
+
var use_load_data_pos_session_default = useLoadDataPosSession;
|
|
6897
|
+
|
|
6805
6898
|
// src/provider/service-provider.tsx
|
|
6806
6899
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
6807
6900
|
var ServiceContext = createContext2(null);
|
|
@@ -6887,7 +6980,8 @@ var ServiceProvider = ({
|
|
|
6887
6980
|
useHandleClosingSession: use_handle_closing_session_default,
|
|
6888
6981
|
useManageSession: use_manage_session_default,
|
|
6889
6982
|
useUpdateClosedSession: use_update_closed_session_default,
|
|
6890
|
-
useUpdateEntity: use_update_entity_default
|
|
6983
|
+
useUpdateEntity: use_update_entity_default,
|
|
6984
|
+
useLoadDataPosSession: use_load_data_pos_session_default
|
|
6891
6985
|
};
|
|
6892
6986
|
return /* @__PURE__ */ jsx6(ServiceContext.Provider, { value: services, children });
|
|
6893
6987
|
};
|
package/dist/services.d.mts
CHANGED
|
@@ -298,8 +298,8 @@ declare function useViewService(): {
|
|
|
298
298
|
handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
|
|
299
299
|
model: string;
|
|
300
300
|
method: string;
|
|
301
|
-
ids:
|
|
302
|
-
kwargs:
|
|
301
|
+
ids: any;
|
|
302
|
+
kwargs: any;
|
|
303
303
|
service: string;
|
|
304
304
|
xNode: string;
|
|
305
305
|
}) => any;
|
|
@@ -311,7 +311,7 @@ declare function useViewService(): {
|
|
|
311
311
|
}) => any;
|
|
312
312
|
getPOS: ({ model, args, domain, xNode, service, }: {
|
|
313
313
|
model: string;
|
|
314
|
-
args:
|
|
314
|
+
args: any;
|
|
315
315
|
domain: any;
|
|
316
316
|
service: string;
|
|
317
317
|
xNode: string;
|
|
@@ -342,6 +342,12 @@ declare function useViewService(): {
|
|
|
342
342
|
service: string;
|
|
343
343
|
xNode: string;
|
|
344
344
|
}) => any;
|
|
345
|
+
loadDataPosSession: ({ model, ids, xNode, service, }: {
|
|
346
|
+
model: string;
|
|
347
|
+
ids: any;
|
|
348
|
+
service: string;
|
|
349
|
+
xNode: string;
|
|
350
|
+
}) => any;
|
|
345
351
|
};
|
|
346
352
|
|
|
347
353
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.d.ts
CHANGED
|
@@ -298,8 +298,8 @@ declare function useViewService(): {
|
|
|
298
298
|
handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
|
|
299
299
|
model: string;
|
|
300
300
|
method: string;
|
|
301
|
-
ids:
|
|
302
|
-
kwargs:
|
|
301
|
+
ids: any;
|
|
302
|
+
kwargs: any;
|
|
303
303
|
service: string;
|
|
304
304
|
xNode: string;
|
|
305
305
|
}) => any;
|
|
@@ -311,7 +311,7 @@ declare function useViewService(): {
|
|
|
311
311
|
}) => any;
|
|
312
312
|
getPOS: ({ model, args, domain, xNode, service, }: {
|
|
313
313
|
model: string;
|
|
314
|
-
args:
|
|
314
|
+
args: any;
|
|
315
315
|
domain: any;
|
|
316
316
|
service: string;
|
|
317
317
|
xNode: string;
|
|
@@ -342,6 +342,12 @@ declare function useViewService(): {
|
|
|
342
342
|
service: string;
|
|
343
343
|
xNode: string;
|
|
344
344
|
}) => any;
|
|
345
|
+
loadDataPosSession: ({ model, ids, xNode, service, }: {
|
|
346
|
+
model: string;
|
|
347
|
+
ids: any;
|
|
348
|
+
service: string;
|
|
349
|
+
xNode: string;
|
|
350
|
+
}) => any;
|
|
345
351
|
};
|
|
346
352
|
|
|
347
353
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.js
CHANGED
|
@@ -3080,6 +3080,9 @@ var import_react_query78 = require("@tanstack/react-query");
|
|
|
3080
3080
|
// src/hooks/view/use-delete-entity.ts
|
|
3081
3081
|
var import_react_query79 = require("@tanstack/react-query");
|
|
3082
3082
|
|
|
3083
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
3084
|
+
var import_react_query80 = require("@tanstack/react-query");
|
|
3085
|
+
|
|
3083
3086
|
// src/provider/service-provider.tsx
|
|
3084
3087
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3085
3088
|
var ServiceContext = (0, import_react4.createContext)(null);
|
|
@@ -5039,6 +5042,76 @@ function useViewService() {
|
|
|
5039
5042
|
},
|
|
5040
5043
|
[env]
|
|
5041
5044
|
);
|
|
5045
|
+
const loadDataPosSession = (0, import_react14.useCallback)(
|
|
5046
|
+
({
|
|
5047
|
+
model,
|
|
5048
|
+
ids,
|
|
5049
|
+
xNode,
|
|
5050
|
+
service
|
|
5051
|
+
}) => {
|
|
5052
|
+
const jsonData = {
|
|
5053
|
+
model,
|
|
5054
|
+
method: "load_data" /* LOAD_DATA */,
|
|
5055
|
+
ids,
|
|
5056
|
+
kwargs: {
|
|
5057
|
+
models_to_load: [
|
|
5058
|
+
"pos.config",
|
|
5059
|
+
"pos.order",
|
|
5060
|
+
"pos.order.line",
|
|
5061
|
+
"pos.pack.operation.lot",
|
|
5062
|
+
"pos.payment",
|
|
5063
|
+
"pos.payment.method",
|
|
5064
|
+
"pos.printer",
|
|
5065
|
+
"pos.category",
|
|
5066
|
+
"pos.bill",
|
|
5067
|
+
"res.company",
|
|
5068
|
+
"account.tax",
|
|
5069
|
+
"account.tax.group",
|
|
5070
|
+
"product.product",
|
|
5071
|
+
"product.attribute",
|
|
5072
|
+
"product.attribute.custom.value",
|
|
5073
|
+
"product.template.attribute.line",
|
|
5074
|
+
"product.template.attribute.value",
|
|
5075
|
+
"product.combo",
|
|
5076
|
+
"product.combo.item",
|
|
5077
|
+
"product.packaging",
|
|
5078
|
+
"res.users",
|
|
5079
|
+
"res.partner",
|
|
5080
|
+
"decimal.precision",
|
|
5081
|
+
"uom.uom",
|
|
5082
|
+
"uom.category",
|
|
5083
|
+
"res.country",
|
|
5084
|
+
"res.country.state",
|
|
5085
|
+
"res.lang",
|
|
5086
|
+
"product.pricelist",
|
|
5087
|
+
"product.pricelist.item",
|
|
5088
|
+
"product.category",
|
|
5089
|
+
"account.cash.rounding",
|
|
5090
|
+
"account.fiscal.position",
|
|
5091
|
+
"account.fiscal.position.tax",
|
|
5092
|
+
"stock.picking.type",
|
|
5093
|
+
"res.currency",
|
|
5094
|
+
"pos.note",
|
|
5095
|
+
"ir.ui.view",
|
|
5096
|
+
"product.tag",
|
|
5097
|
+
"ir.module.module"
|
|
5098
|
+
]
|
|
5099
|
+
}
|
|
5100
|
+
};
|
|
5101
|
+
return env?.requests.post(
|
|
5102
|
+
"/call" /* CALL_PATH */,
|
|
5103
|
+
jsonData,
|
|
5104
|
+
{
|
|
5105
|
+
headers: {
|
|
5106
|
+
"Content-Type": "application/json",
|
|
5107
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5108
|
+
}
|
|
5109
|
+
},
|
|
5110
|
+
service
|
|
5111
|
+
);
|
|
5112
|
+
},
|
|
5113
|
+
[env]
|
|
5114
|
+
);
|
|
5042
5115
|
return {
|
|
5043
5116
|
getView,
|
|
5044
5117
|
getMenu,
|
|
@@ -5064,7 +5137,8 @@ function useViewService() {
|
|
|
5064
5137
|
createEntity,
|
|
5065
5138
|
getList,
|
|
5066
5139
|
updateEntity,
|
|
5067
|
-
deleteEntity
|
|
5140
|
+
deleteEntity,
|
|
5141
|
+
loadDataPosSession
|
|
5068
5142
|
};
|
|
5069
5143
|
}
|
|
5070
5144
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/services.mjs
CHANGED
|
@@ -3036,6 +3036,9 @@ import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
|
3036
3036
|
// src/hooks/view/use-delete-entity.ts
|
|
3037
3037
|
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
3038
3038
|
|
|
3039
|
+
// src/hooks/view/use-load-data-pos-session.ts
|
|
3040
|
+
import { useMutation as useMutation58 } from "@tanstack/react-query";
|
|
3041
|
+
|
|
3039
3042
|
// src/provider/service-provider.tsx
|
|
3040
3043
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3041
3044
|
var ServiceContext = createContext2(null);
|
|
@@ -4995,6 +4998,76 @@ function useViewService() {
|
|
|
4995
4998
|
},
|
|
4996
4999
|
[env]
|
|
4997
5000
|
);
|
|
5001
|
+
const loadDataPosSession = useCallback10(
|
|
5002
|
+
({
|
|
5003
|
+
model,
|
|
5004
|
+
ids,
|
|
5005
|
+
xNode,
|
|
5006
|
+
service
|
|
5007
|
+
}) => {
|
|
5008
|
+
const jsonData = {
|
|
5009
|
+
model,
|
|
5010
|
+
method: "load_data" /* LOAD_DATA */,
|
|
5011
|
+
ids,
|
|
5012
|
+
kwargs: {
|
|
5013
|
+
models_to_load: [
|
|
5014
|
+
"pos.config",
|
|
5015
|
+
"pos.order",
|
|
5016
|
+
"pos.order.line",
|
|
5017
|
+
"pos.pack.operation.lot",
|
|
5018
|
+
"pos.payment",
|
|
5019
|
+
"pos.payment.method",
|
|
5020
|
+
"pos.printer",
|
|
5021
|
+
"pos.category",
|
|
5022
|
+
"pos.bill",
|
|
5023
|
+
"res.company",
|
|
5024
|
+
"account.tax",
|
|
5025
|
+
"account.tax.group",
|
|
5026
|
+
"product.product",
|
|
5027
|
+
"product.attribute",
|
|
5028
|
+
"product.attribute.custom.value",
|
|
5029
|
+
"product.template.attribute.line",
|
|
5030
|
+
"product.template.attribute.value",
|
|
5031
|
+
"product.combo",
|
|
5032
|
+
"product.combo.item",
|
|
5033
|
+
"product.packaging",
|
|
5034
|
+
"res.users",
|
|
5035
|
+
"res.partner",
|
|
5036
|
+
"decimal.precision",
|
|
5037
|
+
"uom.uom",
|
|
5038
|
+
"uom.category",
|
|
5039
|
+
"res.country",
|
|
5040
|
+
"res.country.state",
|
|
5041
|
+
"res.lang",
|
|
5042
|
+
"product.pricelist",
|
|
5043
|
+
"product.pricelist.item",
|
|
5044
|
+
"product.category",
|
|
5045
|
+
"account.cash.rounding",
|
|
5046
|
+
"account.fiscal.position",
|
|
5047
|
+
"account.fiscal.position.tax",
|
|
5048
|
+
"stock.picking.type",
|
|
5049
|
+
"res.currency",
|
|
5050
|
+
"pos.note",
|
|
5051
|
+
"ir.ui.view",
|
|
5052
|
+
"product.tag",
|
|
5053
|
+
"ir.module.module"
|
|
5054
|
+
]
|
|
5055
|
+
}
|
|
5056
|
+
};
|
|
5057
|
+
return env?.requests.post(
|
|
5058
|
+
"/call" /* CALL_PATH */,
|
|
5059
|
+
jsonData,
|
|
5060
|
+
{
|
|
5061
|
+
headers: {
|
|
5062
|
+
"Content-Type": "application/json",
|
|
5063
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5064
|
+
}
|
|
5065
|
+
},
|
|
5066
|
+
service
|
|
5067
|
+
);
|
|
5068
|
+
},
|
|
5069
|
+
[env]
|
|
5070
|
+
);
|
|
4998
5071
|
return {
|
|
4999
5072
|
getView,
|
|
5000
5073
|
getMenu,
|
|
@@ -5020,7 +5093,8 @@ function useViewService() {
|
|
|
5020
5093
|
createEntity,
|
|
5021
5094
|
getList,
|
|
5022
5095
|
updateEntity,
|
|
5023
|
-
deleteEntity
|
|
5096
|
+
deleteEntity,
|
|
5097
|
+
loadDataPosSession
|
|
5024
5098
|
};
|
|
5025
5099
|
}
|
|
5026
5100
|
export {
|
package/package.json
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./configs": {
|
|
14
|
-
"types": "./dist/configs.d.ts",
|
|
15
|
-
"import": "./dist/configs.mjs",
|
|
16
|
-
"require": "./dist/configs.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./constants": {
|
|
19
|
-
"types": "./dist/constants.d.ts",
|
|
20
|
-
"import": "./dist/constants.mjs",
|
|
21
|
-
"require": "./dist/constants.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./environment": {
|
|
24
|
-
"types": "./dist/environment.d.ts",
|
|
25
|
-
"import": "./dist/environment.mjs",
|
|
26
|
-
"require": "./dist/environment.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./hooks": {
|
|
29
|
-
"types": "./dist/hooks.d.ts",
|
|
30
|
-
"import": "./dist/hooks.mjs",
|
|
31
|
-
"require": "./dist/hooks.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./provider": {
|
|
34
|
-
"types": "./dist/provider.d.ts",
|
|
35
|
-
"import": "./dist/provider.mjs",
|
|
36
|
-
"require": "./dist/provider.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./services": {
|
|
39
|
-
"types": "./dist/services.d.ts",
|
|
40
|
-
"import": "./dist/services.mjs",
|
|
41
|
-
"require": "./dist/services.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./store": {
|
|
44
|
-
"types": "./dist/store.d.ts",
|
|
45
|
-
"import": "./dist/store.mjs",
|
|
46
|
-
"require": "./dist/store.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./utils": {
|
|
49
|
-
"types": "./dist/utils.d.ts",
|
|
50
|
-
"import": "./dist/utils.mjs",
|
|
51
|
-
"require": "./dist/utils.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./types": {
|
|
54
|
-
"types": "./dist/types.d.ts",
|
|
55
|
-
"import": "./dist/types.mjs",
|
|
56
|
-
"require": "./dist/types.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./models": {
|
|
59
|
-
"types": "./dist/models.d.ts",
|
|
60
|
-
"import": "./dist/models.mjs",
|
|
61
|
-
"require": "./dist/models.cjs"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"files": [
|
|
65
|
-
"dist"
|
|
66
|
-
],
|
|
67
|
-
"scripts": {
|
|
68
|
-
"build": "tsup",
|
|
69
|
-
"test": "jest"
|
|
70
|
-
},
|
|
71
|
-
"peerDependencies": {
|
|
72
|
-
"react": "18.0.0",
|
|
73
|
-
"@tanstack/react-query": "^5.83.0"
|
|
74
|
-
},
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@reduxjs/toolkit": "^2.8.2",
|
|
77
|
-
"@tanstack/react-query": "^5.83.0",
|
|
78
|
-
"axios": "^1.11.0",
|
|
79
|
-
"moment": "^2.30.1",
|
|
80
|
-
"react-redux": "^9.2.0"
|
|
81
|
-
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@types/react": "^18.3.1",
|
|
84
|
-
"react": "18.0.0",
|
|
85
|
-
"jest": "^29.7.0",
|
|
86
|
-
"tsup": "^8.0.0",
|
|
87
|
-
"typescript": "^5.8.2"
|
|
88
|
-
},
|
|
89
|
-
"packageManager": "yarn@1.22.0"
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/interface-logic",
|
|
3
|
+
"version": "2.6.8",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./configs": {
|
|
14
|
+
"types": "./dist/configs.d.ts",
|
|
15
|
+
"import": "./dist/configs.mjs",
|
|
16
|
+
"require": "./dist/configs.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./constants": {
|
|
19
|
+
"types": "./dist/constants.d.ts",
|
|
20
|
+
"import": "./dist/constants.mjs",
|
|
21
|
+
"require": "./dist/constants.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./environment": {
|
|
24
|
+
"types": "./dist/environment.d.ts",
|
|
25
|
+
"import": "./dist/environment.mjs",
|
|
26
|
+
"require": "./dist/environment.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./hooks": {
|
|
29
|
+
"types": "./dist/hooks.d.ts",
|
|
30
|
+
"import": "./dist/hooks.mjs",
|
|
31
|
+
"require": "./dist/hooks.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./provider": {
|
|
34
|
+
"types": "./dist/provider.d.ts",
|
|
35
|
+
"import": "./dist/provider.mjs",
|
|
36
|
+
"require": "./dist/provider.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./services": {
|
|
39
|
+
"types": "./dist/services.d.ts",
|
|
40
|
+
"import": "./dist/services.mjs",
|
|
41
|
+
"require": "./dist/services.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./store": {
|
|
44
|
+
"types": "./dist/store.d.ts",
|
|
45
|
+
"import": "./dist/store.mjs",
|
|
46
|
+
"require": "./dist/store.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./utils": {
|
|
49
|
+
"types": "./dist/utils.d.ts",
|
|
50
|
+
"import": "./dist/utils.mjs",
|
|
51
|
+
"require": "./dist/utils.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./types": {
|
|
54
|
+
"types": "./dist/types.d.ts",
|
|
55
|
+
"import": "./dist/types.mjs",
|
|
56
|
+
"require": "./dist/types.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./models": {
|
|
59
|
+
"types": "./dist/models.d.ts",
|
|
60
|
+
"import": "./dist/models.mjs",
|
|
61
|
+
"require": "./dist/models.cjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"dist"
|
|
66
|
+
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsup",
|
|
69
|
+
"test": "jest"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": "18.0.0",
|
|
73
|
+
"@tanstack/react-query": "^5.83.0"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
77
|
+
"@tanstack/react-query": "^5.83.0",
|
|
78
|
+
"axios": "^1.11.0",
|
|
79
|
+
"moment": "^2.30.1",
|
|
80
|
+
"react-redux": "^9.2.0"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@types/react": "^18.3.1",
|
|
84
|
+
"react": "18.0.0",
|
|
85
|
+
"jest": "^29.7.0",
|
|
86
|
+
"tsup": "^8.0.0",
|
|
87
|
+
"typescript": "^5.8.2"
|
|
88
|
+
},
|
|
89
|
+
"packageManager": "yarn@1.22.0"
|
|
90
|
+
}
|