@omniumretail/shared-resources 0.1.66 → 0.1.67
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/bundle.js +1 -1
- package/dist/types/hooks/Asta/AnswerType/get/getAnswerTypeQuery.hook.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/interfaces/AnswerType.d.ts +17 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/Asta/AnswerType/get/getAnswerTypeQuery.hook.ts +10 -0
- package/src/hooks/Asta/Template/others/duplicateTemplateQuery.hook.ts +2 -2
- package/src/hooks/index.ts +2 -0
- package/src/interfaces/AnswerType.ts +19 -0
- package/src/interfaces/index.ts +1 -0
- /package/src/hooks/Answer/get/{useAnswersUserSupervisorQuery.hook.tsx → useAnswersUserSupervisorQuery.hook.ts} +0 -0
|
@@ -75,6 +75,7 @@ export * from './Asta/Answer/get/getAstaAnswerQuery.hook';
|
|
|
75
75
|
export * from './Asta/Answer/mutate/useAstaAnswersMutateQuery.hook';
|
|
76
76
|
export * from './Asta/Answer/others/finishAstaAnswersQuery.hook';
|
|
77
77
|
export * from './Asta/Answer/others/putAnswerImageQuery.hook';
|
|
78
|
+
export * from './Asta/AnswerType/get/getAnswerTypeQuery.hook';
|
|
78
79
|
export * from './Others/useJobTitlesQuery.hook';
|
|
79
80
|
export * from './Others/useContractStatesQuery.hook';
|
|
80
81
|
export * from './Others/useApplicationDataQuery.hook';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AnswerType {
|
|
2
|
+
Id: string;
|
|
3
|
+
Name: string;
|
|
4
|
+
IsOpenAnswer: boolean;
|
|
5
|
+
IsCheckBox: boolean;
|
|
6
|
+
IsNumeric: boolean;
|
|
7
|
+
HasGrade: boolean;
|
|
8
|
+
State: string;
|
|
9
|
+
Grade: number;
|
|
10
|
+
Options: AnswerTypeOptions[];
|
|
11
|
+
}
|
|
12
|
+
export interface AnswerTypeOptions {
|
|
13
|
+
Value: string;
|
|
14
|
+
Grade: number;
|
|
15
|
+
Color: string;
|
|
16
|
+
NeedsAction: boolean;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { AnswerType } from "../../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export const getAnswerTypeQueryHook = () => {
|
|
6
|
+
return useQuery(
|
|
7
|
+
['ANSWER_TYPE_QUERY'],
|
|
8
|
+
() => getAuth0<AnswerType[]>(`/ASTA/AnswerType`),
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { Template } from '../../../../interfaces';
|
|
3
|
-
import {
|
|
3
|
+
import { postAuth0 } from '../../../../services/ApiService';
|
|
4
4
|
|
|
5
5
|
export interface DuplicateTemplateProps extends UseQueryOptions<Template> {
|
|
6
6
|
templatesIds: string[];
|
|
@@ -9,7 +9,7 @@ export interface DuplicateTemplateProps extends UseQueryOptions<Template> {
|
|
|
9
9
|
export const duplicateTemplateQueryHook = ({ templatesIds }: DuplicateTemplateProps) => {
|
|
10
10
|
const queryClient = useQueryClient();
|
|
11
11
|
return useMutation<Template, unknown, string[]>(() => {
|
|
12
|
-
return
|
|
12
|
+
return postAuth0(`/ASTA/Template/DuplicateTemplateList`, undefined, templatesIds)
|
|
13
13
|
}, {
|
|
14
14
|
onSuccess: (data: Template) => {
|
|
15
15
|
queryClient.setQueryData(
|
package/src/hooks/index.ts
CHANGED
|
@@ -101,6 +101,8 @@ export * from './Asta/Answer/mutate/useAstaAnswersMutateQuery.hook';
|
|
|
101
101
|
export * from './Asta/Answer/others/finishAstaAnswersQuery.hook';
|
|
102
102
|
export * from './Asta/Answer/others/putAnswerImageQuery.hook';
|
|
103
103
|
|
|
104
|
+
export * from './Asta/AnswerType/get/getAnswerTypeQuery.hook';
|
|
105
|
+
|
|
104
106
|
//Others
|
|
105
107
|
export * from './Others/useJobTitlesQuery.hook';
|
|
106
108
|
export * from './Others/useContractStatesQuery.hook';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
export interface AnswerType {
|
|
3
|
+
Id: string;
|
|
4
|
+
Name: string;
|
|
5
|
+
IsOpenAnswer: boolean;
|
|
6
|
+
IsCheckBox: boolean;
|
|
7
|
+
IsNumeric: boolean;
|
|
8
|
+
HasGrade: boolean;
|
|
9
|
+
State: string;
|
|
10
|
+
Grade: number;
|
|
11
|
+
Options: AnswerTypeOptions[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface AnswerTypeOptions {
|
|
15
|
+
Value: string;
|
|
16
|
+
Grade: number;
|
|
17
|
+
Color: string;
|
|
18
|
+
NeedsAction: boolean
|
|
19
|
+
}
|
package/src/interfaces/index.ts
CHANGED
|
File without changes
|