@omniumretail/shared-resources 0.3.48 → 0.3.50
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/Astt/mutate/postManualTransferQuery.hook.d.ts +2 -0
- package/dist/types/hooks/Astt/mutate/postMatchingPackageQuery.hook.d.ts +6 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/interfaces/TransferDocuments.d.ts +7 -0
- package/dist/types/interfaces/TransferPickProducts.d.ts +4 -0
- package/package.json +1 -1
- package/src/hooks/Astt/mutate/postManualTransferQuery.hook.ts +16 -0
- package/src/hooks/Astt/mutate/postMatchingPackageQuery.hook.ts +22 -0
- package/src/hooks/index.ts +2 -0
- package/src/interfaces/TransferDocuments.ts +11 -4
- package/src/interfaces/TransferPickProducts.ts +5 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TransferDocumentManual, TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
|
|
2
|
+
export declare const postManualTransferQueryHook: (bodyType?: string) => import("@tanstack/react-query").UseMutationResult<TransferDocumentsDetails, unknown, TransferDocumentManual, unknown>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPickProductsList, TransferPickProductsMatched } from '../../../interfaces/TransferPickProducts';
|
|
3
|
+
export interface MatchingPackageMutateProps extends UseQueryOptions<TransferPickProductsMatched> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const postMatchingPackageQueryHook: ({ transferDocumentId }: MatchingPackageMutateProps) => import("@tanstack/react-query").UseMutationResult<TransferPickProductsMatched, unknown, TransferPickProductsList[], unknown>;
|
|
@@ -135,6 +135,8 @@ export * from "./Astt/get/getProductsListingQuery.hook";
|
|
|
135
135
|
export * from "./Astt/get/getBarcodesPrintQuery.hook";
|
|
136
136
|
export * from "./Astt/get/getBarcodesListingQuery.hook";
|
|
137
137
|
export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
|
|
138
|
+
export * from "./Astt/mutate/postMatchingPackageQuery.hook";
|
|
139
|
+
export * from "./Astt/mutate/postManualTransferQuery.hook";
|
|
138
140
|
export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
|
|
139
141
|
export * from "./Astt/Asgt/get/getTransferDocumentsByIdASTTQuery.hook";
|
|
140
142
|
export * from "./Astt/Asgt/get/getTransferDocumentsByPackageASTTQuery.hook";
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { TransferDocumentManual, TransferDocumentsDetails } from '../../../interfaces/TransferDocuments';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export const postManualTransferQueryHook = (bodyType?: string) => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
return useMutation<TransferDocumentsDetails, unknown, TransferDocumentManual>((data: any) => {
|
|
8
|
+
return postAuth0(`/ASTT/TransferDocuments/Manual`, undefined, data, bodyType);
|
|
9
|
+
}, {
|
|
10
|
+
onSuccess: (data: TransferDocumentsDetails) => {
|
|
11
|
+
queryClient.setQueryData(
|
|
12
|
+
['MANUAL_TRANSFER_QUERY'], data);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPickProductsList, TransferPickProductsMatched } from '../../../interfaces/TransferPickProducts';
|
|
3
|
+
import { postAuth0 } from '../../../services/ApiService';
|
|
4
|
+
|
|
5
|
+
export interface MatchingPackageMutateProps extends UseQueryOptions<TransferPickProductsMatched> {
|
|
6
|
+
transferDocumentId: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const postMatchingPackageQueryHook = ({ transferDocumentId }: MatchingPackageMutateProps) => {
|
|
10
|
+
const queryClient = useQueryClient();
|
|
11
|
+
return useMutation<TransferPickProductsMatched, unknown, TransferPickProductsList[]>((data: TransferPickProductsList[]) => {
|
|
12
|
+
return postAuth0(`/ASTT/TransferDocuments/MatchingPackage?`, {
|
|
13
|
+
pTransferDocumentId: transferDocumentId,
|
|
14
|
+
}, data);
|
|
15
|
+
}, {
|
|
16
|
+
onSuccess: (data: TransferPickProductsMatched) => {
|
|
17
|
+
queryClient.setQueryData(
|
|
18
|
+
['MATCHING_PACKAGE_QUERY'], data);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
package/src/hooks/index.ts
CHANGED
|
@@ -158,6 +158,8 @@ export * from "./Astt/get/getProductsListingQuery.hook";
|
|
|
158
158
|
export * from "./Astt/get/getBarcodesPrintQuery.hook";
|
|
159
159
|
export * from "./Astt/get/getBarcodesListingQuery.hook";
|
|
160
160
|
export * from "./Astt/get/getBarcodesListingByPackageQuery.hook";
|
|
161
|
+
export * from "./Astt/mutate/postMatchingPackageQuery.hook";
|
|
162
|
+
export * from "./Astt/mutate/postManualTransferQuery.hook";
|
|
161
163
|
|
|
162
164
|
//Astt Asgt
|
|
163
165
|
export * from "./Astt/Asgt/get/getTransferDocumentsASTTQuery.hook";
|
|
@@ -42,7 +42,7 @@ export interface TransferDocument {
|
|
|
42
42
|
export interface ProductMovement {
|
|
43
43
|
DocNr: string;
|
|
44
44
|
TypeOfDocument: string;
|
|
45
|
-
Date: string;
|
|
45
|
+
Date: string;
|
|
46
46
|
Store: string;
|
|
47
47
|
StoreFrom: string;
|
|
48
48
|
ProductTitle: string;
|
|
@@ -50,6 +50,13 @@ export interface ProductMovement {
|
|
|
50
50
|
Movement: number;
|
|
51
51
|
VendusId: string;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
|
|
54
|
+
export interface TransferDocumentManual {
|
|
55
|
+
TransferDocumentId: string;
|
|
56
|
+
DocumentNumber: string;
|
|
57
|
+
LocationCode: string;
|
|
58
|
+
Image: any;
|
|
59
|
+
UserId: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|