@fctc/interface-logic 4.2.1 → 4.2.3
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 +6 -2
- package/dist/constants.d.ts +6 -2
- package/dist/constants.js +4 -0
- package/dist/constants.mjs +4 -0
- package/dist/hooks.d.mts +21 -1
- package/dist/hooks.d.ts +21 -1
- package/dist/hooks.js +157 -5
- package/dist/hooks.mjs +150 -1
- package/dist/provider.d.mts +4 -1
- package/dist/provider.d.ts +4 -1
- package/dist/provider.js +155 -6
- package/dist/provider.mjs +151 -2
- package/dist/services.d.mts +17 -0
- package/dist/services.d.ts +17 -0
- package/dist/services.js +94 -3
- package/dist/services.mjs +92 -1
- package/package.json +90 -90
package/dist/provider.js
CHANGED
|
@@ -5836,6 +5836,85 @@ function useViewService() {
|
|
|
5836
5836
|
},
|
|
5837
5837
|
[env]
|
|
5838
5838
|
);
|
|
5839
|
+
const getCountry = (0, import_react11.useCallback)(
|
|
5840
|
+
async ({
|
|
5841
|
+
service,
|
|
5842
|
+
xNode,
|
|
5843
|
+
ids,
|
|
5844
|
+
kwargs
|
|
5845
|
+
}) => {
|
|
5846
|
+
const body = {
|
|
5847
|
+
model: "res.country" /* COUNTRY */,
|
|
5848
|
+
ids,
|
|
5849
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5850
|
+
kwargs
|
|
5851
|
+
};
|
|
5852
|
+
return env?.requests?.post(
|
|
5853
|
+
"/call" /* CALL_PATH */,
|
|
5854
|
+
body,
|
|
5855
|
+
{
|
|
5856
|
+
headers: {
|
|
5857
|
+
"Content-Type": "application/json",
|
|
5858
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5859
|
+
}
|
|
5860
|
+
},
|
|
5861
|
+
service
|
|
5862
|
+
);
|
|
5863
|
+
},
|
|
5864
|
+
[env]
|
|
5865
|
+
);
|
|
5866
|
+
const getCity = (0, import_react11.useCallback)(
|
|
5867
|
+
async ({
|
|
5868
|
+
service,
|
|
5869
|
+
xNode,
|
|
5870
|
+
ids,
|
|
5871
|
+
kwargs
|
|
5872
|
+
}) => {
|
|
5873
|
+
const body = {
|
|
5874
|
+
model: "res.country.state" /* COUNTRY_STATE */,
|
|
5875
|
+
ids,
|
|
5876
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5877
|
+
kwargs
|
|
5878
|
+
};
|
|
5879
|
+
return env?.requests?.post(
|
|
5880
|
+
"/call" /* CALL_PATH */,
|
|
5881
|
+
body,
|
|
5882
|
+
{
|
|
5883
|
+
headers: {
|
|
5884
|
+
"Content-Type": "application/json",
|
|
5885
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5886
|
+
}
|
|
5887
|
+
},
|
|
5888
|
+
service
|
|
5889
|
+
);
|
|
5890
|
+
},
|
|
5891
|
+
[env]
|
|
5892
|
+
);
|
|
5893
|
+
const getWard = (0, import_react11.useCallback)(
|
|
5894
|
+
async ({
|
|
5895
|
+
service,
|
|
5896
|
+
xNode,
|
|
5897
|
+
kwargs
|
|
5898
|
+
}) => {
|
|
5899
|
+
const body = {
|
|
5900
|
+
model: "res.country.ward" /* COUNTRY_WARD */,
|
|
5901
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5902
|
+
kwargs
|
|
5903
|
+
};
|
|
5904
|
+
return env?.requests?.post(
|
|
5905
|
+
"/call" /* CALL_PATH */,
|
|
5906
|
+
body,
|
|
5907
|
+
{
|
|
5908
|
+
headers: {
|
|
5909
|
+
"Content-Type": "application/json",
|
|
5910
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5911
|
+
}
|
|
5912
|
+
},
|
|
5913
|
+
service
|
|
5914
|
+
);
|
|
5915
|
+
},
|
|
5916
|
+
[env]
|
|
5917
|
+
);
|
|
5839
5918
|
return {
|
|
5840
5919
|
getView,
|
|
5841
5920
|
getMenu,
|
|
@@ -5881,7 +5960,10 @@ function useViewService() {
|
|
|
5881
5960
|
getPinCode,
|
|
5882
5961
|
getNotifications,
|
|
5883
5962
|
createEInvoice,
|
|
5884
|
-
getCurrentUser
|
|
5963
|
+
getCurrentUser,
|
|
5964
|
+
getCountry,
|
|
5965
|
+
getCity,
|
|
5966
|
+
getWard
|
|
5885
5967
|
};
|
|
5886
5968
|
}
|
|
5887
5969
|
|
|
@@ -8692,11 +8774,75 @@ var useGetCurrentUser = () => {
|
|
|
8692
8774
|
};
|
|
8693
8775
|
var use_get_current_user_default = useGetCurrentUser;
|
|
8694
8776
|
|
|
8695
|
-
// src/hooks/
|
|
8777
|
+
// src/hooks/view/use-get-ward.ts
|
|
8696
8778
|
var import_react_query107 = require("@tanstack/react-query");
|
|
8779
|
+
var useGetWard = () => {
|
|
8780
|
+
const { getWard } = useViewService();
|
|
8781
|
+
return (0, import_react_query107.useMutation)({
|
|
8782
|
+
mutationFn: ({
|
|
8783
|
+
service,
|
|
8784
|
+
xNode,
|
|
8785
|
+
kwargs
|
|
8786
|
+
}) => {
|
|
8787
|
+
return getWard({
|
|
8788
|
+
service,
|
|
8789
|
+
xNode,
|
|
8790
|
+
kwargs
|
|
8791
|
+
});
|
|
8792
|
+
}
|
|
8793
|
+
});
|
|
8794
|
+
};
|
|
8795
|
+
var use_get_ward_default = useGetWard;
|
|
8796
|
+
|
|
8797
|
+
// src/hooks/view/use-get-city.ts
|
|
8798
|
+
var import_react_query108 = require("@tanstack/react-query");
|
|
8799
|
+
var useGetCity = () => {
|
|
8800
|
+
const { getCity } = useViewService();
|
|
8801
|
+
return (0, import_react_query108.useMutation)({
|
|
8802
|
+
mutationFn: ({
|
|
8803
|
+
service,
|
|
8804
|
+
xNode,
|
|
8805
|
+
ids,
|
|
8806
|
+
kwargs
|
|
8807
|
+
}) => {
|
|
8808
|
+
return getCity({
|
|
8809
|
+
service,
|
|
8810
|
+
xNode,
|
|
8811
|
+
ids,
|
|
8812
|
+
kwargs
|
|
8813
|
+
});
|
|
8814
|
+
}
|
|
8815
|
+
});
|
|
8816
|
+
};
|
|
8817
|
+
var use_get_city_default = useGetCity;
|
|
8818
|
+
|
|
8819
|
+
// src/hooks/view/use-get-country.ts
|
|
8820
|
+
var import_react_query109 = require("@tanstack/react-query");
|
|
8821
|
+
var useGetCountry = () => {
|
|
8822
|
+
const { getCountry } = useViewService();
|
|
8823
|
+
return (0, import_react_query109.useMutation)({
|
|
8824
|
+
mutationFn: ({
|
|
8825
|
+
service,
|
|
8826
|
+
xNode,
|
|
8827
|
+
ids,
|
|
8828
|
+
kwargs
|
|
8829
|
+
}) => {
|
|
8830
|
+
return getCountry({
|
|
8831
|
+
service,
|
|
8832
|
+
xNode,
|
|
8833
|
+
ids,
|
|
8834
|
+
kwargs
|
|
8835
|
+
});
|
|
8836
|
+
}
|
|
8837
|
+
});
|
|
8838
|
+
};
|
|
8839
|
+
var use_get_country_default = useGetCountry;
|
|
8840
|
+
|
|
8841
|
+
// src/hooks/chart/use-read-group.ts
|
|
8842
|
+
var import_react_query110 = require("@tanstack/react-query");
|
|
8697
8843
|
var useReadGroup = (services, xNode, body, enabled) => {
|
|
8698
8844
|
const { readGroup } = useDashboardService();
|
|
8699
|
-
return (0,
|
|
8845
|
+
return (0, import_react_query110.useQuery)({
|
|
8700
8846
|
queryKey: [body],
|
|
8701
8847
|
queryFn: () => readGroup({
|
|
8702
8848
|
service: services,
|
|
@@ -8710,10 +8856,10 @@ var useReadGroup = (services, xNode, body, enabled) => {
|
|
|
8710
8856
|
var use_read_group_default = useReadGroup;
|
|
8711
8857
|
|
|
8712
8858
|
// src/hooks/chart/use-get-data-chart.ts
|
|
8713
|
-
var
|
|
8859
|
+
var import_react_query111 = require("@tanstack/react-query");
|
|
8714
8860
|
var useGetDataChart = (services, xNode, body, enabled, path, method, queryKey) => {
|
|
8715
8861
|
const { getDataChart } = useDashboardService();
|
|
8716
|
-
return (0,
|
|
8862
|
+
return (0, import_react_query111.useQuery)({
|
|
8717
8863
|
queryKey: [queryKey],
|
|
8718
8864
|
queryFn: () => getDataChart({
|
|
8719
8865
|
service: services,
|
|
@@ -8842,7 +8988,10 @@ var ServiceProvider = ({
|
|
|
8842
8988
|
useGetDataChart: use_get_data_chart_default,
|
|
8843
8989
|
useGetVersion: use_get_version_default,
|
|
8844
8990
|
useCreateEInvoice: use_create_e_invoice_default,
|
|
8845
|
-
useGetCurrentUser: use_get_current_user_default
|
|
8991
|
+
useGetCurrentUser: use_get_current_user_default,
|
|
8992
|
+
useGetCity: use_get_city_default,
|
|
8993
|
+
useGetWard: use_get_ward_default,
|
|
8994
|
+
useGetCountry: use_get_country_default
|
|
8846
8995
|
};
|
|
8847
8996
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ServiceContext.Provider, { value: services, children });
|
|
8848
8997
|
};
|
package/dist/provider.mjs
CHANGED
|
@@ -5793,6 +5793,85 @@ function useViewService() {
|
|
|
5793
5793
|
},
|
|
5794
5794
|
[env]
|
|
5795
5795
|
);
|
|
5796
|
+
const getCountry = useCallback9(
|
|
5797
|
+
async ({
|
|
5798
|
+
service,
|
|
5799
|
+
xNode,
|
|
5800
|
+
ids,
|
|
5801
|
+
kwargs
|
|
5802
|
+
}) => {
|
|
5803
|
+
const body = {
|
|
5804
|
+
model: "res.country" /* COUNTRY */,
|
|
5805
|
+
ids,
|
|
5806
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5807
|
+
kwargs
|
|
5808
|
+
};
|
|
5809
|
+
return env?.requests?.post(
|
|
5810
|
+
"/call" /* CALL_PATH */,
|
|
5811
|
+
body,
|
|
5812
|
+
{
|
|
5813
|
+
headers: {
|
|
5814
|
+
"Content-Type": "application/json",
|
|
5815
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5816
|
+
}
|
|
5817
|
+
},
|
|
5818
|
+
service
|
|
5819
|
+
);
|
|
5820
|
+
},
|
|
5821
|
+
[env]
|
|
5822
|
+
);
|
|
5823
|
+
const getCity = useCallback9(
|
|
5824
|
+
async ({
|
|
5825
|
+
service,
|
|
5826
|
+
xNode,
|
|
5827
|
+
ids,
|
|
5828
|
+
kwargs
|
|
5829
|
+
}) => {
|
|
5830
|
+
const body = {
|
|
5831
|
+
model: "res.country.state" /* COUNTRY_STATE */,
|
|
5832
|
+
ids,
|
|
5833
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5834
|
+
kwargs
|
|
5835
|
+
};
|
|
5836
|
+
return env?.requests?.post(
|
|
5837
|
+
"/call" /* CALL_PATH */,
|
|
5838
|
+
body,
|
|
5839
|
+
{
|
|
5840
|
+
headers: {
|
|
5841
|
+
"Content-Type": "application/json",
|
|
5842
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5843
|
+
}
|
|
5844
|
+
},
|
|
5845
|
+
service
|
|
5846
|
+
);
|
|
5847
|
+
},
|
|
5848
|
+
[env]
|
|
5849
|
+
);
|
|
5850
|
+
const getWard = useCallback9(
|
|
5851
|
+
async ({
|
|
5852
|
+
service,
|
|
5853
|
+
xNode,
|
|
5854
|
+
kwargs
|
|
5855
|
+
}) => {
|
|
5856
|
+
const body = {
|
|
5857
|
+
model: "res.country.ward" /* COUNTRY_WARD */,
|
|
5858
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
5859
|
+
kwargs
|
|
5860
|
+
};
|
|
5861
|
+
return env?.requests?.post(
|
|
5862
|
+
"/call" /* CALL_PATH */,
|
|
5863
|
+
body,
|
|
5864
|
+
{
|
|
5865
|
+
headers: {
|
|
5866
|
+
"Content-Type": "application/json",
|
|
5867
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5868
|
+
}
|
|
5869
|
+
},
|
|
5870
|
+
service
|
|
5871
|
+
);
|
|
5872
|
+
},
|
|
5873
|
+
[env]
|
|
5874
|
+
);
|
|
5796
5875
|
return {
|
|
5797
5876
|
getView,
|
|
5798
5877
|
getMenu,
|
|
@@ -5838,7 +5917,10 @@ function useViewService() {
|
|
|
5838
5917
|
getPinCode,
|
|
5839
5918
|
getNotifications,
|
|
5840
5919
|
createEInvoice,
|
|
5841
|
-
getCurrentUser
|
|
5920
|
+
getCurrentUser,
|
|
5921
|
+
getCountry,
|
|
5922
|
+
getCity,
|
|
5923
|
+
getWard
|
|
5842
5924
|
};
|
|
5843
5925
|
}
|
|
5844
5926
|
|
|
@@ -8649,6 +8731,70 @@ var useGetCurrentUser = () => {
|
|
|
8649
8731
|
};
|
|
8650
8732
|
var use_get_current_user_default = useGetCurrentUser;
|
|
8651
8733
|
|
|
8734
|
+
// src/hooks/view/use-get-ward.ts
|
|
8735
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
8736
|
+
var useGetWard = () => {
|
|
8737
|
+
const { getWard } = useViewService();
|
|
8738
|
+
return useMutation82({
|
|
8739
|
+
mutationFn: ({
|
|
8740
|
+
service,
|
|
8741
|
+
xNode,
|
|
8742
|
+
kwargs
|
|
8743
|
+
}) => {
|
|
8744
|
+
return getWard({
|
|
8745
|
+
service,
|
|
8746
|
+
xNode,
|
|
8747
|
+
kwargs
|
|
8748
|
+
});
|
|
8749
|
+
}
|
|
8750
|
+
});
|
|
8751
|
+
};
|
|
8752
|
+
var use_get_ward_default = useGetWard;
|
|
8753
|
+
|
|
8754
|
+
// src/hooks/view/use-get-city.ts
|
|
8755
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
8756
|
+
var useGetCity = () => {
|
|
8757
|
+
const { getCity } = useViewService();
|
|
8758
|
+
return useMutation83({
|
|
8759
|
+
mutationFn: ({
|
|
8760
|
+
service,
|
|
8761
|
+
xNode,
|
|
8762
|
+
ids,
|
|
8763
|
+
kwargs
|
|
8764
|
+
}) => {
|
|
8765
|
+
return getCity({
|
|
8766
|
+
service,
|
|
8767
|
+
xNode,
|
|
8768
|
+
ids,
|
|
8769
|
+
kwargs
|
|
8770
|
+
});
|
|
8771
|
+
}
|
|
8772
|
+
});
|
|
8773
|
+
};
|
|
8774
|
+
var use_get_city_default = useGetCity;
|
|
8775
|
+
|
|
8776
|
+
// src/hooks/view/use-get-country.ts
|
|
8777
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
8778
|
+
var useGetCountry = () => {
|
|
8779
|
+
const { getCountry } = useViewService();
|
|
8780
|
+
return useMutation84({
|
|
8781
|
+
mutationFn: ({
|
|
8782
|
+
service,
|
|
8783
|
+
xNode,
|
|
8784
|
+
ids,
|
|
8785
|
+
kwargs
|
|
8786
|
+
}) => {
|
|
8787
|
+
return getCountry({
|
|
8788
|
+
service,
|
|
8789
|
+
xNode,
|
|
8790
|
+
ids,
|
|
8791
|
+
kwargs
|
|
8792
|
+
});
|
|
8793
|
+
}
|
|
8794
|
+
});
|
|
8795
|
+
};
|
|
8796
|
+
var use_get_country_default = useGetCountry;
|
|
8797
|
+
|
|
8652
8798
|
// src/hooks/chart/use-read-group.ts
|
|
8653
8799
|
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
8654
8800
|
var useReadGroup = (services, xNode, body, enabled) => {
|
|
@@ -8799,7 +8945,10 @@ var ServiceProvider = ({
|
|
|
8799
8945
|
useGetDataChart: use_get_data_chart_default,
|
|
8800
8946
|
useGetVersion: use_get_version_default,
|
|
8801
8947
|
useCreateEInvoice: use_create_e_invoice_default,
|
|
8802
|
-
useGetCurrentUser: use_get_current_user_default
|
|
8948
|
+
useGetCurrentUser: use_get_current_user_default,
|
|
8949
|
+
useGetCity: use_get_city_default,
|
|
8950
|
+
useGetWard: use_get_ward_default,
|
|
8951
|
+
useGetCountry: use_get_country_default
|
|
8803
8952
|
};
|
|
8804
8953
|
return /* @__PURE__ */ jsx6(ServiceContext.Provider, { value: services, children });
|
|
8805
8954
|
};
|
package/dist/services.d.mts
CHANGED
|
@@ -535,6 +535,23 @@ declare function useViewService(): {
|
|
|
535
535
|
oauthUid?: string;
|
|
536
536
|
extraHeaders?: any;
|
|
537
537
|
}) => Promise<any>;
|
|
538
|
+
getCountry: ({ service, xNode, ids, kwargs, }: {
|
|
539
|
+
service?: string;
|
|
540
|
+
xNode?: string;
|
|
541
|
+
ids: any;
|
|
542
|
+
kwargs: any;
|
|
543
|
+
}) => Promise<any>;
|
|
544
|
+
getCity: ({ service, xNode, ids, kwargs, }: {
|
|
545
|
+
service?: string;
|
|
546
|
+
xNode?: string;
|
|
547
|
+
ids: any;
|
|
548
|
+
kwargs: any;
|
|
549
|
+
}) => Promise<any>;
|
|
550
|
+
getWard: ({ service, xNode, kwargs, }: {
|
|
551
|
+
service?: string;
|
|
552
|
+
xNode?: string;
|
|
553
|
+
kwargs: any;
|
|
554
|
+
}) => Promise<any>;
|
|
538
555
|
};
|
|
539
556
|
|
|
540
557
|
declare function useDashboardService(): {
|
package/dist/services.d.ts
CHANGED
|
@@ -535,6 +535,23 @@ declare function useViewService(): {
|
|
|
535
535
|
oauthUid?: string;
|
|
536
536
|
extraHeaders?: any;
|
|
537
537
|
}) => Promise<any>;
|
|
538
|
+
getCountry: ({ service, xNode, ids, kwargs, }: {
|
|
539
|
+
service?: string;
|
|
540
|
+
xNode?: string;
|
|
541
|
+
ids: any;
|
|
542
|
+
kwargs: any;
|
|
543
|
+
}) => Promise<any>;
|
|
544
|
+
getCity: ({ service, xNode, ids, kwargs, }: {
|
|
545
|
+
service?: string;
|
|
546
|
+
xNode?: string;
|
|
547
|
+
ids: any;
|
|
548
|
+
kwargs: any;
|
|
549
|
+
}) => Promise<any>;
|
|
550
|
+
getWard: ({ service, xNode, kwargs, }: {
|
|
551
|
+
service?: string;
|
|
552
|
+
xNode?: string;
|
|
553
|
+
kwargs: any;
|
|
554
|
+
}) => Promise<any>;
|
|
538
555
|
};
|
|
539
556
|
|
|
540
557
|
declare function useDashboardService(): {
|
package/dist/services.js
CHANGED
|
@@ -3198,12 +3198,21 @@ var import_react_query105 = require("@tanstack/react-query");
|
|
|
3198
3198
|
// src/hooks/view/use-get-current-user.ts
|
|
3199
3199
|
var import_react_query106 = require("@tanstack/react-query");
|
|
3200
3200
|
|
|
3201
|
-
// src/hooks/
|
|
3201
|
+
// src/hooks/view/use-get-ward.ts
|
|
3202
3202
|
var import_react_query107 = require("@tanstack/react-query");
|
|
3203
3203
|
|
|
3204
|
-
// src/hooks/
|
|
3204
|
+
// src/hooks/view/use-get-city.ts
|
|
3205
3205
|
var import_react_query108 = require("@tanstack/react-query");
|
|
3206
3206
|
|
|
3207
|
+
// src/hooks/view/use-get-country.ts
|
|
3208
|
+
var import_react_query109 = require("@tanstack/react-query");
|
|
3209
|
+
|
|
3210
|
+
// src/hooks/chart/use-read-group.ts
|
|
3211
|
+
var import_react_query110 = require("@tanstack/react-query");
|
|
3212
|
+
|
|
3213
|
+
// src/hooks/chart/use-get-data-chart.ts
|
|
3214
|
+
var import_react_query111 = require("@tanstack/react-query");
|
|
3215
|
+
|
|
3207
3216
|
// src/provider/service-provider.tsx
|
|
3208
3217
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3209
3218
|
var ServiceContext = (0, import_react6.createContext)(null);
|
|
@@ -6049,6 +6058,85 @@ function useViewService() {
|
|
|
6049
6058
|
},
|
|
6050
6059
|
[env]
|
|
6051
6060
|
);
|
|
6061
|
+
const getCountry = (0, import_react16.useCallback)(
|
|
6062
|
+
async ({
|
|
6063
|
+
service,
|
|
6064
|
+
xNode,
|
|
6065
|
+
ids,
|
|
6066
|
+
kwargs
|
|
6067
|
+
}) => {
|
|
6068
|
+
const body = {
|
|
6069
|
+
model: "res.country" /* COUNTRY */,
|
|
6070
|
+
ids,
|
|
6071
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6072
|
+
kwargs
|
|
6073
|
+
};
|
|
6074
|
+
return env?.requests?.post(
|
|
6075
|
+
"/call" /* CALL_PATH */,
|
|
6076
|
+
body,
|
|
6077
|
+
{
|
|
6078
|
+
headers: {
|
|
6079
|
+
"Content-Type": "application/json",
|
|
6080
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6081
|
+
}
|
|
6082
|
+
},
|
|
6083
|
+
service
|
|
6084
|
+
);
|
|
6085
|
+
},
|
|
6086
|
+
[env]
|
|
6087
|
+
);
|
|
6088
|
+
const getCity = (0, import_react16.useCallback)(
|
|
6089
|
+
async ({
|
|
6090
|
+
service,
|
|
6091
|
+
xNode,
|
|
6092
|
+
ids,
|
|
6093
|
+
kwargs
|
|
6094
|
+
}) => {
|
|
6095
|
+
const body = {
|
|
6096
|
+
model: "res.country.state" /* COUNTRY_STATE */,
|
|
6097
|
+
ids,
|
|
6098
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6099
|
+
kwargs
|
|
6100
|
+
};
|
|
6101
|
+
return env?.requests?.post(
|
|
6102
|
+
"/call" /* CALL_PATH */,
|
|
6103
|
+
body,
|
|
6104
|
+
{
|
|
6105
|
+
headers: {
|
|
6106
|
+
"Content-Type": "application/json",
|
|
6107
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6108
|
+
}
|
|
6109
|
+
},
|
|
6110
|
+
service
|
|
6111
|
+
);
|
|
6112
|
+
},
|
|
6113
|
+
[env]
|
|
6114
|
+
);
|
|
6115
|
+
const getWard = (0, import_react16.useCallback)(
|
|
6116
|
+
async ({
|
|
6117
|
+
service,
|
|
6118
|
+
xNode,
|
|
6119
|
+
kwargs
|
|
6120
|
+
}) => {
|
|
6121
|
+
const body = {
|
|
6122
|
+
model: "res.country.ward" /* COUNTRY_WARD */,
|
|
6123
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6124
|
+
kwargs
|
|
6125
|
+
};
|
|
6126
|
+
return env?.requests?.post(
|
|
6127
|
+
"/call" /* CALL_PATH */,
|
|
6128
|
+
body,
|
|
6129
|
+
{
|
|
6130
|
+
headers: {
|
|
6131
|
+
"Content-Type": "application/json",
|
|
6132
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6133
|
+
}
|
|
6134
|
+
},
|
|
6135
|
+
service
|
|
6136
|
+
);
|
|
6137
|
+
},
|
|
6138
|
+
[env]
|
|
6139
|
+
);
|
|
6052
6140
|
return {
|
|
6053
6141
|
getView,
|
|
6054
6142
|
getMenu,
|
|
@@ -6094,7 +6182,10 @@ function useViewService() {
|
|
|
6094
6182
|
getPinCode,
|
|
6095
6183
|
getNotifications,
|
|
6096
6184
|
createEInvoice,
|
|
6097
|
-
getCurrentUser
|
|
6185
|
+
getCurrentUser,
|
|
6186
|
+
getCountry,
|
|
6187
|
+
getCity,
|
|
6188
|
+
getWard
|
|
6098
6189
|
};
|
|
6099
6190
|
}
|
|
6100
6191
|
|
package/dist/services.mjs
CHANGED
|
@@ -3153,6 +3153,15 @@ import { useMutation as useMutation80 } from "@tanstack/react-query";
|
|
|
3153
3153
|
// src/hooks/view/use-get-current-user.ts
|
|
3154
3154
|
import { useMutation as useMutation81 } from "@tanstack/react-query";
|
|
3155
3155
|
|
|
3156
|
+
// src/hooks/view/use-get-ward.ts
|
|
3157
|
+
import { useMutation as useMutation82 } from "@tanstack/react-query";
|
|
3158
|
+
|
|
3159
|
+
// src/hooks/view/use-get-city.ts
|
|
3160
|
+
import { useMutation as useMutation83 } from "@tanstack/react-query";
|
|
3161
|
+
|
|
3162
|
+
// src/hooks/view/use-get-country.ts
|
|
3163
|
+
import { useMutation as useMutation84 } from "@tanstack/react-query";
|
|
3164
|
+
|
|
3156
3165
|
// src/hooks/chart/use-read-group.ts
|
|
3157
3166
|
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
3158
3167
|
|
|
@@ -6004,6 +6013,85 @@ function useViewService() {
|
|
|
6004
6013
|
},
|
|
6005
6014
|
[env]
|
|
6006
6015
|
);
|
|
6016
|
+
const getCountry = useCallback11(
|
|
6017
|
+
async ({
|
|
6018
|
+
service,
|
|
6019
|
+
xNode,
|
|
6020
|
+
ids,
|
|
6021
|
+
kwargs
|
|
6022
|
+
}) => {
|
|
6023
|
+
const body = {
|
|
6024
|
+
model: "res.country" /* COUNTRY */,
|
|
6025
|
+
ids,
|
|
6026
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6027
|
+
kwargs
|
|
6028
|
+
};
|
|
6029
|
+
return env?.requests?.post(
|
|
6030
|
+
"/call" /* CALL_PATH */,
|
|
6031
|
+
body,
|
|
6032
|
+
{
|
|
6033
|
+
headers: {
|
|
6034
|
+
"Content-Type": "application/json",
|
|
6035
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6036
|
+
}
|
|
6037
|
+
},
|
|
6038
|
+
service
|
|
6039
|
+
);
|
|
6040
|
+
},
|
|
6041
|
+
[env]
|
|
6042
|
+
);
|
|
6043
|
+
const getCity = useCallback11(
|
|
6044
|
+
async ({
|
|
6045
|
+
service,
|
|
6046
|
+
xNode,
|
|
6047
|
+
ids,
|
|
6048
|
+
kwargs
|
|
6049
|
+
}) => {
|
|
6050
|
+
const body = {
|
|
6051
|
+
model: "res.country.state" /* COUNTRY_STATE */,
|
|
6052
|
+
ids,
|
|
6053
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6054
|
+
kwargs
|
|
6055
|
+
};
|
|
6056
|
+
return env?.requests?.post(
|
|
6057
|
+
"/call" /* CALL_PATH */,
|
|
6058
|
+
body,
|
|
6059
|
+
{
|
|
6060
|
+
headers: {
|
|
6061
|
+
"Content-Type": "application/json",
|
|
6062
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6063
|
+
}
|
|
6064
|
+
},
|
|
6065
|
+
service
|
|
6066
|
+
);
|
|
6067
|
+
},
|
|
6068
|
+
[env]
|
|
6069
|
+
);
|
|
6070
|
+
const getWard = useCallback11(
|
|
6071
|
+
async ({
|
|
6072
|
+
service,
|
|
6073
|
+
xNode,
|
|
6074
|
+
kwargs
|
|
6075
|
+
}) => {
|
|
6076
|
+
const body = {
|
|
6077
|
+
model: "res.country.ward" /* COUNTRY_WARD */,
|
|
6078
|
+
method: "get_data_select" /* GET_DATA_SELECT */,
|
|
6079
|
+
kwargs
|
|
6080
|
+
};
|
|
6081
|
+
return env?.requests?.post(
|
|
6082
|
+
"/call" /* CALL_PATH */,
|
|
6083
|
+
body,
|
|
6084
|
+
{
|
|
6085
|
+
headers: {
|
|
6086
|
+
"Content-Type": "application/json",
|
|
6087
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
6088
|
+
}
|
|
6089
|
+
},
|
|
6090
|
+
service
|
|
6091
|
+
);
|
|
6092
|
+
},
|
|
6093
|
+
[env]
|
|
6094
|
+
);
|
|
6007
6095
|
return {
|
|
6008
6096
|
getView,
|
|
6009
6097
|
getMenu,
|
|
@@ -6049,7 +6137,10 @@ function useViewService() {
|
|
|
6049
6137
|
getPinCode,
|
|
6050
6138
|
getNotifications,
|
|
6051
6139
|
createEInvoice,
|
|
6052
|
-
getCurrentUser
|
|
6140
|
+
getCurrentUser,
|
|
6141
|
+
getCountry,
|
|
6142
|
+
getCity,
|
|
6143
|
+
getWard
|
|
6053
6144
|
};
|
|
6054
6145
|
}
|
|
6055
6146
|
|