@omniumretail/shared-resources 0.1.95 → 0.1.96
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/BigWin/get/getMonthsListQuery.hook.d.ts +2 -0
- package/dist/types/hooks/BigWin/others/publishMonthsEmployeeQuery.hook.d.ts +2 -0
- package/dist/types/hooks/BigWin/others/publishMonthsManagerQuery.hook.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/interfaces/GetMonths.d.ts +6 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/hooks/BigWin/get/getMonthsListQuery.hook.ts +10 -0
- package/src/hooks/BigWin/others/publishMonthsEmployeeQuery.hook.ts +17 -0
- package/src/hooks/BigWin/others/publishMonthsManagerQuery.hook.ts +17 -0
- package/src/hooks/index.ts +5 -0
- package/src/interfaces/GetMonths.ts +7 -0
- package/src/interfaces/index.ts +1 -0
|
@@ -103,6 +103,9 @@ export * from './Asta/Actions/others/finishActionQuery.hook';
|
|
|
103
103
|
export * from './Aprc/get/getPriceChangePinQuery.hook';
|
|
104
104
|
export * from './Aprc/others/postPriceChangePinQuery.hook';
|
|
105
105
|
export * from './Aprc/others/sendEmailWithPinQuery.hook';
|
|
106
|
+
export * from './BigWin/get/getMonthsListQuery.hook';
|
|
107
|
+
export * from './BigWin/others/publishMonthsEmployeeQuery.hook';
|
|
108
|
+
export * from './BigWin/others/publishMonthsManagerQuery.hook';
|
|
106
109
|
export * from './Others/useJobTitlesQuery.hook';
|
|
107
110
|
export * from './Others/useContractStatesQuery.hook';
|
|
108
111
|
export * from './Others/useApplicationDataQuery.hook';
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { GetMonths } from "../../../interfaces";
|
|
3
|
+
import { getAuth0 } from "../../../services/ApiService";
|
|
4
|
+
|
|
5
|
+
export const getMonthsListQueryHook = () => {
|
|
6
|
+
return useQuery(
|
|
7
|
+
['MONTHS_LIST_QUERY'],
|
|
8
|
+
() => getAuth0<GetMonths[]>(`/ABWG/BWGEmployees/BackOffice`),
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { GetMonths } from '../../../interfaces';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const publishMonthsEmployeeHook = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<number, unknown, GetMonths>((data: GetMonths) => {
|
|
8
|
+
return postAuth0(`/ABWG/BWGEmployees?`, {
|
|
9
|
+
pMonth: data.MonthCode
|
|
10
|
+
}, data);
|
|
11
|
+
}, {
|
|
12
|
+
onSuccess: (data: number) => {
|
|
13
|
+
queryClient.setQueryData(
|
|
14
|
+
['PUBLISH_MONTH_EMPLOYEE_QUERY'], data);
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { GetMonths } from '../../../interfaces';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const publishMonthsManagerHook = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<number, unknown, GetMonths>((data: GetMonths) => {
|
|
8
|
+
return postAuth0(`/ABWG/BWGManager?`, {
|
|
9
|
+
pMonth: data.MonthCode
|
|
10
|
+
}, data);
|
|
11
|
+
}, {
|
|
12
|
+
onSuccess: (data: number) => {
|
|
13
|
+
queryClient.setQueryData(
|
|
14
|
+
['PUBLISH_MONTH_MANAGER_QUERY'], data);
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -135,6 +135,11 @@ export * from './Aprc/get/getPriceChangePinQuery.hook';
|
|
|
135
135
|
export * from './Aprc/others/postPriceChangePinQuery.hook';
|
|
136
136
|
export * from './Aprc/others/sendEmailWithPinQuery.hook';
|
|
137
137
|
|
|
138
|
+
//BigWin
|
|
139
|
+
export * from './BigWin/get/getMonthsListQuery.hook';
|
|
140
|
+
export * from './BigWin/others/publishMonthsEmployeeQuery.hook';
|
|
141
|
+
export * from './BigWin/others/publishMonthsManagerQuery.hook';
|
|
142
|
+
|
|
138
143
|
//Others
|
|
139
144
|
export * from './Others/useJobTitlesQuery.hook';
|
|
140
145
|
export * from './Others/useContractStatesQuery.hook';
|
package/src/interfaces/index.ts
CHANGED