@omniumretail/shared-resources 0.2.52 → 0.2.54
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/get/getProductsListingASGTQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Asgt/get/getReportsBuilderASGTQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Asgt/get/getTransferAllProductsASGTQuery.hook.d.ts +10 -0
- package/dist/types/hooks/Asgt/get/getTransferDocumentsASGTQuery.hook.d.ts +11 -0
- package/dist/types/hooks/Asgt/get/getTransferDocumentsByIdASGTQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Asgt/get/getTransferDocumentsByPackageASGTQuery.hook.d.ts +3 -0
- package/dist/types/hooks/Asgt/get/getTransferDocumentsPackagesASGTQuery.hook.d.ts +9 -0
- package/dist/types/hooks/Asgt/get/getTransferReportDiffASGT.hook.d.ts +12 -0
- package/dist/types/hooks/Asgt/mutate/postTransferDocumentsASGTMutateQuery.hook.d.ts +7 -0
- package/dist/types/hooks/Asgt/mutate/putTransferDocumentsStateASGTMutateQuery.hook.d.ts +6 -0
- package/dist/types/hooks/Asts/get/getProductInfoQuery.hook.d.ts +8 -1
- package/dist/types/hooks/index.d.ts +10 -12
- package/package.json +1 -1
- package/src/hooks/Asgt/get/{getProductsListingQuery.hook.ts → getProductsListingASGTQuery.hook.ts} +2 -2
- package/src/hooks/Asgt/get/{getReportsBuilderQuery.hook.ts → getReportsBuilderASGTQuery.hook.ts} +2 -2
- package/src/hooks/Asgt/get/{getTransferAllProductsQuery.hook.ts → getTransferAllProductsASGTQuery.hook.ts} +3 -3
- package/src/hooks/Asgt/get/{getTransferDocumentsQuery.hook.ts → getTransferDocumentsASGTQuery.hook.ts} +3 -3
- package/src/hooks/Asgt/get/{getTransferDocumentsByIdQuery.hook.ts → getTransferDocumentsByIdASGTQuery.hook.ts} +2 -2
- package/src/hooks/Asgt/get/{getTransferDocumentsByPackageQuery.hook.ts → getTransferDocumentsByPackageASGTQuery.hook.ts} +2 -2
- package/src/hooks/Asgt/get/{getTransferDocumentsPackagesQuery.hook.ts → getTransferDocumentsPackagesASGTQuery.hook.ts} +3 -3
- package/src/hooks/Asgt/get/{getTransferReportDiff.hook.ts → getTransferReportDiffASGT.hook.ts} +3 -3
- package/src/hooks/Asgt/mutate/{postTransferDocumentsMutateQuery.hook.ts → postTransferDocumentsASGTMutateQuery.hook.ts} +3 -3
- package/src/hooks/Asgt/mutate/{putTransferDocumentsStateMutateQuery.hook.ts → putTransferDocumentsStateASGTMutateQuery.hook.ts} +3 -3
- package/src/hooks/Asts/get/getProductInfoQuery.hook.ts +10 -6
- package/src/hooks/index.ts +12 -12
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ReportBuilder } from '../../..';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getProductsListingASGTQueryHook: (transferId: string, transferPackageId: string, { ...options }: UseQueryOptions<ReportBuilder>) => import("@tanstack/react-query").UseQueryResult<ReportBuilder, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ReportBuilder } from '../../..';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getReportsBuilderASGTQueryHook: (transferId: string, { ...options }: UseQueryOptions<ReportBuilder>) => import("@tanstack/react-query").UseQueryResult<ReportBuilder, unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferAllProducts, ResponseList } from "../../../interfaces";
|
|
3
|
+
export interface TransferAllProductsASGTProps extends UseQueryOptions<ResponseList<"Products", TransferAllProducts>> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
query?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const getTransferAllProductsASGTQueryHook: ({ page, records, sortBy, sortDirection, query, ...options }: TransferAllProductsASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Products", TransferAllProducts>, unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferDocuments, ResponseList } from "../../../interfaces";
|
|
3
|
+
export interface TransferDocumentsASGTProps extends UseQueryOptions<ResponseList<"TransferDocuments", TransferDocuments>> {
|
|
4
|
+
page: number;
|
|
5
|
+
records: number;
|
|
6
|
+
sortBy: string;
|
|
7
|
+
sortDirection: string;
|
|
8
|
+
terms?: string;
|
|
9
|
+
query?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const getTransferDocumentsASGTQueryHook: ({ page, records, sortBy, sortDirection, terms, query, ...options }: TransferDocumentsASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"TransferDocuments", TransferDocuments>, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TransferDocuments } from '../../..';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getTransferDocumentsByIdASGTQueryHook: (transferId: string, { ...options }: UseQueryOptions<TransferDocuments>) => import("@tanstack/react-query").UseQueryResult<TransferDocuments, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TransferPackage } from '../../..';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
export declare const getTransferDocumentsByPackageASGTQueryHook: (transferId: string, transferPackageId: string, { ...options }: UseQueryOptions<TransferPackage>) => import("@tanstack/react-query").UseQueryResult<TransferPackage, unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferDocumentsDetails, ResponseList } from "../../../interfaces";
|
|
3
|
+
export interface TransferDocumentsPackagesASGTProps extends UseQueryOptions<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>> {
|
|
4
|
+
sortBy?: string;
|
|
5
|
+
sortDirection?: string;
|
|
6
|
+
terms?: string;
|
|
7
|
+
transferDocumentId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getTransferDocumentsPackagesASGTQueryHook: ({ sortBy, sortDirection, terms, transferDocumentId, ...options }: TransferDocumentsPackagesASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>, unknown>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
|
+
import { TransferReportDiff } from "../../../interfaces";
|
|
3
|
+
export interface TransferReportDiffASGTProps extends UseQueryOptions<{
|
|
4
|
+
ProductsToBePicked: TransferReportDiff[];
|
|
5
|
+
FalsePositiveProducts?: TransferReportDiff[];
|
|
6
|
+
}> {
|
|
7
|
+
transferDocumentId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const getTransferReportDiffASGTQueryHook: ({ transferDocumentId, ...options }: TransferReportDiffASGTProps) => import("@tanstack/react-query").UseQueryResult<{
|
|
10
|
+
ProductsToBePicked: TransferReportDiff[];
|
|
11
|
+
FalsePositiveProducts?: TransferReportDiff[];
|
|
12
|
+
}, unknown>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferPickProducts } from '../../../interfaces/TransferPickProducts';
|
|
3
|
+
export interface TransferDocumentsASGTMutateProps extends UseQueryOptions<TransferPickProducts> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
packageId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const postTransferDocumentsASGTMutateQueryHook: ({ transferDocumentId, packageId }: TransferDocumentsASGTMutateProps) => import("@tanstack/react-query").UseMutationResult<TransferPickProducts, unknown, TransferPickProducts, unknown>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TransferDocumentState } from '../../../interfaces/TransferDocumentState';
|
|
3
|
+
export interface TransferDocumentsStateASGTMutateProps extends UseQueryOptions<TransferDocumentState> {
|
|
4
|
+
transferDocumentId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const putTransferDocumentsStateASGTMutateQueryHook: ({ transferDocumentId }: TransferDocumentsStateASGTMutateProps) => import("@tanstack/react-query").UseMutationResult<TransferDocumentState, unknown, TransferDocumentState, unknown>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
1
2
|
import { AstsStock } from "../../../interfaces";
|
|
2
|
-
export declare const getProductInfoQueryHook: (barcode: string
|
|
3
|
+
export declare const getProductInfoQueryHook: (barcode: string, { ...options }: UseQueryOptions<{
|
|
4
|
+
Product: AstsStock;
|
|
5
|
+
ProductList: AstsStock[];
|
|
6
|
+
Color: string[];
|
|
7
|
+
Size: string[];
|
|
8
|
+
Size2: string[];
|
|
9
|
+
}>) => import("@tanstack/react-query").UseQueryResult<{
|
|
3
10
|
Product: AstsStock;
|
|
4
11
|
ProductList: AstsStock[];
|
|
5
12
|
Color: string[];
|
|
@@ -120,18 +120,16 @@ export * from "./Astt/mutate/putTransferDocumentsStateMutateQuery.hook";
|
|
|
120
120
|
export * from "./Astt/get/getReportsBuilderQuery.hook";
|
|
121
121
|
export * from "./Astt/get/getRfidQuery.hook";
|
|
122
122
|
export * from "./Astt/get/getProductsListingQuery.hook";
|
|
123
|
-
export * from "./
|
|
124
|
-
export * from "./
|
|
125
|
-
export * from "./
|
|
126
|
-
export * from "./
|
|
127
|
-
export * from "./
|
|
128
|
-
export * from "./
|
|
129
|
-
export * from "./
|
|
130
|
-
export * from "./
|
|
131
|
-
export * from "./
|
|
132
|
-
export * from "./
|
|
133
|
-
export * from "./Astt/get/getRfidQuery.hook";
|
|
134
|
-
export * from "./Astt/get/getProductsListingQuery.hook";
|
|
123
|
+
export * from "./Asgt/get/getTransferDocumentsASGTQuery.hook";
|
|
124
|
+
export * from "./Asgt/get/getTransferDocumentsByIdASGTQuery.hook";
|
|
125
|
+
export * from "./Asgt/get/getTransferDocumentsByPackageASGTQuery.hook";
|
|
126
|
+
export * from "./Asgt/get/getTransferDocumentsPackagesASGTQuery.hook";
|
|
127
|
+
export * from "./Asgt/get/getTransferReportDiffASGT.hook";
|
|
128
|
+
export * from "./Asgt/get/getTransferAllProductsASGTQuery.hook";
|
|
129
|
+
export * from "./Asgt/mutate/postTransferDocumentsASGTMutateQuery.hook";
|
|
130
|
+
export * from "./Asgt/mutate/putTransferDocumentsStateASGTMutateQuery.hook";
|
|
131
|
+
export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
132
|
+
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
135
133
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|
|
136
134
|
export * from "./ATIM/PicaPonto/mutate/postVerifyUserQuery.hook";
|
|
137
135
|
export * from "./ATIM/PicaPonto/mutate/postAttendance.hook";
|
package/package.json
CHANGED
package/src/hooks/Asgt/get/{getProductsListingQuery.hook.ts → getProductsListingASGTQuery.hook.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAuth0, ReportBuilder } from '../../..';
|
|
2
2
|
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const getProductsListingASGTQueryHook = (transferId: string, transferPackageId: string, { ...options }: UseQueryOptions<ReportBuilder>) => {
|
|
5
5
|
return useQuery(
|
|
6
|
-
['
|
|
6
|
+
['ASGT_PRODUCTS_LISTING', transferId, transferPackageId, options],
|
|
7
7
|
() => getAuth0<ReportBuilder>(`/ASGT/ReportsBuilder/ProductsListing`, {
|
|
8
8
|
pTransferDocumentId: transferId,
|
|
9
9
|
pPackageId: transferPackageId
|
package/src/hooks/Asgt/get/{getReportsBuilderQuery.hook.ts → getReportsBuilderASGTQuery.hook.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAuth0, ReportBuilder } from '../../..';
|
|
2
2
|
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const getReportsBuilderASGTQueryHook = (transferId: string, {...options} : UseQueryOptions<ReportBuilder>) => {
|
|
5
5
|
return useQuery(
|
|
6
|
-
['
|
|
6
|
+
['ASGT_REPORTS_BUILDER', transferId, options],
|
|
7
7
|
() => getAuth0<ReportBuilder>(`/ASGT/ReportsBuilder/DifferencesReport`, {
|
|
8
8
|
pTransferDocumentId: transferId
|
|
9
9
|
}),
|
|
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { TransferAllProducts, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferAllProductsASGTProps extends UseQueryOptions<ResponseList<"Products", TransferAllProducts>> {
|
|
6
6
|
page: number;
|
|
7
7
|
records: number;
|
|
8
8
|
sortBy: string;
|
|
@@ -10,9 +10,9 @@ export interface TransferAllProductsProps extends UseQueryOptions<ResponseList<"
|
|
|
10
10
|
query?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const
|
|
13
|
+
export const getTransferAllProductsASGTQueryHook = ({ page, records, sortBy, sortDirection, query, ...options }: TransferAllProductsASGTProps) => {
|
|
14
14
|
return useQuery(
|
|
15
|
-
['
|
|
15
|
+
['ASGT_TRANSFER_ALL_PRODUCTS', page, records, sortBy, sortDirection, query, options],
|
|
16
16
|
() => getAuth0<ResponseList<"Products", TransferAllProducts>>('/Product/Products', {
|
|
17
17
|
pPage: page || 1,
|
|
18
18
|
pRecords: records || 50,
|
|
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { TransferDocuments, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferDocumentsASGTProps extends UseQueryOptions<ResponseList<"TransferDocuments", TransferDocuments>> {
|
|
6
6
|
page: number;
|
|
7
7
|
records: number;
|
|
8
8
|
sortBy: string;
|
|
@@ -11,9 +11,9 @@ export interface TransferDocumentsProps extends UseQueryOptions<ResponseList<"Tr
|
|
|
11
11
|
query?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const getTransferDocumentsASGTQueryHook = ({ page, records, sortBy, sortDirection, terms, query, ...options }: TransferDocumentsASGTProps) => {
|
|
15
15
|
return useQuery(
|
|
16
|
-
['
|
|
16
|
+
['ASGT_TRANSFER_DOCUMENTS', page, records, sortBy, sortDirection, terms, query, options],
|
|
17
17
|
() => getAuth0<ResponseList<"TransferDocuments", TransferDocuments>>('/ASGT/TransferDocuments', {
|
|
18
18
|
pPage: page || 1,
|
|
19
19
|
pRecords: records || 50,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAuth0, TransferDocuments } from '../../..';
|
|
2
2
|
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const getTransferDocumentsByIdASGTQueryHook = (transferId: string, {...options} : UseQueryOptions<TransferDocuments>) => {
|
|
5
5
|
return useQuery(
|
|
6
|
-
['
|
|
6
|
+
['ASGT_TRANSFER_DOCUMENTS_BY_ID', transferId, options],
|
|
7
7
|
() => getAuth0<TransferDocuments>(`/ASGT/TransferDocuments`, {
|
|
8
8
|
pTransferDocumentId: transferId
|
|
9
9
|
}),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAuth0, TransferPackage } from '../../..';
|
|
2
2
|
import { useQuery, UseQueryOptions } from '@tanstack/react-query';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const getTransferDocumentsByPackageASGTQueryHook = (transferId: string, transferPackageId: string, {...options} : UseQueryOptions<TransferPackage>) => {
|
|
5
5
|
return useQuery(
|
|
6
|
-
['
|
|
6
|
+
['ASGT_TRANSFER_DOCUMENTS_BY_PACKAGE', transferId, transferPackageId, options],
|
|
7
7
|
() => getAuth0<TransferPackage>(`/ASGT/TransferDocuments/Products`, {
|
|
8
8
|
pTransferDocumentId: transferId,
|
|
9
9
|
pPackageId: transferPackageId
|
|
@@ -2,16 +2,16 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { TransferDocumentsDetails, ResponseList } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferDocumentsPackagesASGTProps extends UseQueryOptions<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>> {
|
|
6
6
|
sortBy?: string;
|
|
7
7
|
sortDirection?: string;
|
|
8
8
|
terms?: string;
|
|
9
9
|
transferDocumentId?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const getTransferDocumentsPackagesASGTQueryHook = ({ sortBy, sortDirection, terms, transferDocumentId, ...options }: TransferDocumentsPackagesASGTProps) => {
|
|
13
13
|
return useQuery(
|
|
14
|
-
['
|
|
14
|
+
['ASGT_TRANSFER_PACKAGES', sortBy, sortDirection, terms, transferDocumentId, options],
|
|
15
15
|
() => getAuth0<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>>(`/ASGT/TransferDocuments/Packages`, {
|
|
16
16
|
pTransferDocumentId: transferDocumentId,
|
|
17
17
|
pSortBy: sortBy || "PackageId",
|
package/src/hooks/Asgt/get/{getTransferReportDiff.hook.ts → getTransferReportDiffASGT.hook.ts}
RENAMED
|
@@ -2,13 +2,13 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { TransferReportDiff } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferReportDiffASGTProps extends UseQueryOptions<{ ProductsToBePicked: TransferReportDiff[]; FalsePositiveProducts?: TransferReportDiff[] }> {
|
|
6
6
|
transferDocumentId?: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const getTransferReportDiffASGTQueryHook = ({ transferDocumentId, ...options }: TransferReportDiffASGTProps) => {
|
|
10
10
|
return useQuery(
|
|
11
|
-
['
|
|
11
|
+
['ASGT_TRANSFER_REPORT_DIFF', transferDocumentId, options],
|
|
12
12
|
() => getAuth0<{ ProductsToBePicked: TransferReportDiff[]; FalsePositiveProducts?: TransferReportDiff[] }>(`/ASGT/TransferDocuments/DifferencesReport`, {
|
|
13
13
|
pTransferDocumentId: transferDocumentId
|
|
14
14
|
}),
|
|
@@ -2,12 +2,12 @@ import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-qu
|
|
|
2
2
|
import { TransferPickProducts } from '../../../interfaces/TransferPickProducts';
|
|
3
3
|
import { postAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferDocumentsASGTMutateProps extends UseQueryOptions<TransferPickProducts> {
|
|
6
6
|
transferDocumentId: string;
|
|
7
7
|
packageId: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export const
|
|
10
|
+
export const postTransferDocumentsASGTMutateQueryHook = ({ transferDocumentId, packageId }: TransferDocumentsASGTMutateProps) => {
|
|
11
11
|
const queryClient = useQueryClient();
|
|
12
12
|
return useMutation<TransferPickProducts, unknown, TransferPickProducts>((data: TransferPickProducts) => {
|
|
13
13
|
return postAuth0(`/ASGT/TransferDocuments/Products/Picking?`, {
|
|
@@ -17,7 +17,7 @@ export const postTransferDocumentsMutateQueryHook = ({ transferDocumentId, packa
|
|
|
17
17
|
}, {
|
|
18
18
|
onSuccess: (data: TransferPickProducts) => {
|
|
19
19
|
queryClient.setQueryData(
|
|
20
|
-
['
|
|
20
|
+
['ASGT_TRANSFER_PICKED_PRODUCTS_QUERY'], data);
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -2,11 +2,11 @@ import { UseQueryOptions, useMutation, useQueryClient } from '@tanstack/react-qu
|
|
|
2
2
|
import { TransferDocumentState } from '../../../interfaces/TransferDocumentState';
|
|
3
3
|
import { putAuth0 } from '../../../services/ApiService';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TransferDocumentsStateASGTMutateProps extends UseQueryOptions<TransferDocumentState> {
|
|
6
6
|
transferDocumentId: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const putTransferDocumentsStateASGTMutateQueryHook = ({ transferDocumentId }: TransferDocumentsStateASGTMutateProps) => {
|
|
10
10
|
const queryClient = useQueryClient();
|
|
11
11
|
return useMutation<TransferDocumentState, unknown, TransferDocumentState>((data: TransferDocumentState) => {
|
|
12
12
|
return putAuth0(`/ASGT/TransferDocuments?`, {
|
|
@@ -15,7 +15,7 @@ export const putTransferDocumentsStateMutateQueryHook = ({ transferDocumentId }:
|
|
|
15
15
|
}, {
|
|
16
16
|
onSuccess: (data: TransferDocumentState) => {
|
|
17
17
|
queryClient.setQueryData(
|
|
18
|
-
['
|
|
18
|
+
['ASGT_TRANSFER_PACKAGE_STATE_QUERY'], data);
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { useQuery } from "@tanstack/react-query";
|
|
1
|
+
import { useQuery, UseQueryOptions } from "@tanstack/react-query";
|
|
2
2
|
import { AstsStock } from "../../../interfaces";
|
|
3
3
|
import { getAuth0 } from "../../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export const getProductInfoQueryHook = (barcode: string
|
|
5
|
+
export const getProductInfoQueryHook = (barcode: string, { ...options }: UseQueryOptions<{
|
|
6
|
+
Product: AstsStock;
|
|
7
|
+
ProductList: AstsStock[];
|
|
8
|
+
Color: string[];
|
|
9
|
+
Size: string[];
|
|
10
|
+
Size2: string[];
|
|
11
|
+
}>) => {
|
|
6
12
|
return useQuery(
|
|
7
|
-
['ASTS_PRODUCT_INFO_QUERY', barcode],
|
|
13
|
+
['ASTS_PRODUCT_INFO_QUERY', barcode, options],
|
|
8
14
|
() => getAuth0<{ Product: AstsStock, ProductList: AstsStock[], Color: string[], Size: string[], Size2: string[] }>(`/ASTS/Product`, {
|
|
9
15
|
pBarcode: barcode
|
|
10
16
|
}),
|
|
11
|
-
|
|
12
|
-
enabled: !!(barcode),
|
|
13
|
-
},
|
|
17
|
+
options
|
|
14
18
|
);
|
|
15
19
|
}
|
package/src/hooks/index.ts
CHANGED
|
@@ -143,18 +143,18 @@ export * from "./Astt/mutate/putTransferDocumentsStateMutateQuery.hook";
|
|
|
143
143
|
export * from "./Astt/get/getReportsBuilderQuery.hook";
|
|
144
144
|
export * from "./Astt/get/getRfidQuery.hook";
|
|
145
145
|
export * from "./Astt/get/getProductsListingQuery.hook";
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
export * from "./
|
|
149
|
-
export * from "./
|
|
150
|
-
export * from "./
|
|
151
|
-
export * from "./
|
|
152
|
-
export * from "./
|
|
153
|
-
export * from "./
|
|
154
|
-
export * from "./
|
|
155
|
-
export * from "./
|
|
156
|
-
export * from "./
|
|
157
|
-
export * from "./
|
|
146
|
+
|
|
147
|
+
//Asgt
|
|
148
|
+
export * from "./Asgt/get/getTransferDocumentsASGTQuery.hook";
|
|
149
|
+
export * from "./Asgt/get/getTransferDocumentsByIdASGTQuery.hook";
|
|
150
|
+
export * from "./Asgt/get/getTransferDocumentsByPackageASGTQuery.hook";
|
|
151
|
+
export * from "./Asgt/get/getTransferDocumentsPackagesASGTQuery.hook";
|
|
152
|
+
export * from "./Asgt/get/getTransferReportDiffASGT.hook";
|
|
153
|
+
export * from "./Asgt/get/getTransferAllProductsASGTQuery.hook";
|
|
154
|
+
export * from "./Asgt/mutate/postTransferDocumentsASGTMutateQuery.hook";
|
|
155
|
+
export * from "./Asgt/mutate/putTransferDocumentsStateASGTMutateQuery.hook";
|
|
156
|
+
export * from "./Asgt/get/getReportsBuilderASGTQuery.hook";
|
|
157
|
+
export * from "./Asgt/get/getProductsListingASGTQuery.hook";
|
|
158
158
|
|
|
159
159
|
//ATIM
|
|
160
160
|
export * from "./ATIM/PicaPonto/get/getEmployeesWithTimekeeping.hook";
|