@omniumretail/shared-resources 0.2.54 → 0.2.56
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/Asgt/mutate/createPackageASGTMutateQuery.hook.d.ts +6 -0
- package/dist/types/hooks/Asgt/mutate/createTransferASGTMutateQuery.hook.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/interfaces/TransferPackage.d.ts +5 -0
- package/package.json +1 -1
- package/src/hooks/Asgt/mutate/createPackageASGTMutateQuery.hook.ts +21 -0
- package/src/hooks/Asgt/mutate/createTransferASGTMutateQuery.hook.ts +15 -0
- package/src/hooks/index.ts +2 -0
- package/src/interfaces/TransferPackage.ts +7 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPackage } from '../../../interfaces/TransferPackage';
|
|
3
|
+
export interface TransferPackageASGTMutateProps extends UseQueryOptions<TransferPackage> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const createPackageASGTMutateQuery: ({ transferDocumentId }: TransferPackageASGTMutateProps) => import("@tanstack/react-query").UseMutationResult<TransferPackage, unknown, TransferPackage, unknown>;
|
|
@@ -130,6 +130,8 @@ export * from "./Asgt/mutate/postTransferDocumentsASGTMutateQuery.hook";
|
|
|
130
130
|
export * from "./Asgt/mutate/putTransferDocumentsStateASGTMutateQuery.hook";
|
|
131
131
|
export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
132
132
|
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
133
|
+
export * from "./Asgt/mutate/createPackageASGTMutateQuery.hook";
|
|
134
|
+
export * from "./Asgt/mutate/createTransferASGTMutateQuery.hook";
|
|
133
135
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
134
136
|
export * from "./ATIM/PicaPonto/mutate/postVerifyUserQuery.hook";
|
|
135
137
|
export * from "./ATIM/PicaPonto/mutate/postAttendance.hook";
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useMutation, useQueryClient, UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPackage } from '../../../interfaces/TransferPackage';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export interface TransferPackageASGTMutateProps extends UseQueryOptions<TransferPackage> {
|
|
6
|
+
transferDocumentId: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const createPackageASGTMutateQuery = ({ transferDocumentId }: TransferPackageASGTMutateProps) => {
|
|
10
|
+
const queryClient = useQueryClient();
|
|
11
|
+
return useMutation<TransferPackage, unknown, TransferPackage>((data: TransferPackage) => {
|
|
12
|
+
return postAuth0(`/ASGT/TransferDocuments/Packages?`, {
|
|
13
|
+
pTransferDocumentId: transferDocumentId
|
|
14
|
+
}, data);
|
|
15
|
+
}, {
|
|
16
|
+
onSuccess: (data: TransferPackage) => {
|
|
17
|
+
queryClient.setQueryData(
|
|
18
|
+
['CREATE_PACKAGE_ASGT_QUERY'], data);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { TransferDocuments } from '../../../interfaces/TransferDocuments';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const createTransferASGTMutateQuery = () => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<TransferDocuments, unknown, TransferDocuments>((data: TransferDocuments) => {
|
|
8
|
+
return postAuth0(`/ASGT/TransferDocuments`, { undefined }, data);
|
|
9
|
+
}, {
|
|
10
|
+
onSuccess: (data: TransferDocuments) => {
|
|
11
|
+
queryClient.setQueryData(
|
|
12
|
+
['CREATE_TRANSFER_ASGT_QUERY'], data);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -155,6 +155,8 @@ export * from "./Asgt/mutate/postTransferDocumentsASGTMutateQuery.hook";
|
|
|
155
155
|
export * from "./Asgt/mutate/putTransferDocumentsStateASGTMutateQuery.hook";
|
|
156
156
|
export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
157
157
|
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
158
|
+
export * from "./Asgt/mutate/createPackageASGTMutateQuery.hook";
|
|
159
|
+
export * from "./Asgt/mutate/createTransferASGTMutateQuery.hook";
|
|
158
160
|
|
|
159
161
|
//ATIM
|
|
160
162
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
@@ -8,5 +8,10 @@ export interface TransferPackage {
|
|
|
8
8
|
Custom3: string;
|
|
9
9
|
ExpectedQuantity: number;
|
|
10
10
|
PickedQuantity: number;
|
|
11
|
-
ItemState: string
|
|
12
|
-
|
|
11
|
+
ItemState: string;
|
|
12
|
+
UserId: string;
|
|
13
|
+
UserName: string;
|
|
14
|
+
PackageName: string;
|
|
15
|
+
PackageType: string;
|
|
16
|
+
CreateDate: Number;
|
|
17
|
+
}
|