@antscorp/antsomi-ui 1.3.5-beta.70 → 1.3.5-beta.71
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.
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
// Libraries
|
|
11
11
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient, } from '@tanstack/react-query';
|
|
12
|
-
import { omit } from 'lodash';
|
|
12
|
+
import { get, omit } from 'lodash';
|
|
13
13
|
// Services
|
|
14
14
|
import { templateListingServices, } from '@antscorp/antsomi-ui/es/services/TemplateListing';
|
|
15
15
|
// Constants
|
|
@@ -36,7 +36,7 @@ export const useGetObjectTemplateList = (params) => {
|
|
|
36
36
|
};
|
|
37
37
|
export const useGetObjectTemplateDetail = (params) => {
|
|
38
38
|
const { args, options } = params;
|
|
39
|
-
return useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_OBJECT_TEMPLATE_DETAIL, args.params.template_id], queryFn: () => objectTemplate.getDetail(args), enabled: !!args.params.template_id }, options));
|
|
39
|
+
return useQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_OBJECT_TEMPLATE_DETAIL, +args.params.template_id], queryFn: () => objectTemplate.getDetail(args), enabled: !!args.params.template_id }, options));
|
|
40
40
|
};
|
|
41
41
|
export const useValidateTemplateName = (params) => {
|
|
42
42
|
const { options } = params;
|
|
@@ -93,7 +93,7 @@ export const usePersistTemplate = (params) => {
|
|
|
93
93
|
}, onSettled(data, error, variables) {
|
|
94
94
|
queryClient.invalidateQueries([
|
|
95
95
|
QUERY_KEYS.GET_OBJECT_TEMPLATE_DETAIL,
|
|
96
|
-
variables
|
|
96
|
+
+get(variables, 'params.data.template_id', -1),
|
|
97
97
|
]);
|
|
98
98
|
queryClient.invalidateQueries([QUERY_KEYS.GET_OBJECT_TEMPLATE_LIST], {
|
|
99
99
|
exact: false,
|