@omniumretail/shared-resources 0.1.39 → 0.1.41
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/getTransferDocumentsQuery.hook.d.ts +3 -4
- package/dist/types/hooks/Astt/getTransferStatesQuery.hook.d.ts +1 -2
- package/package.json +1 -1
- package/src/hooks/Astt/getTransferDocumentsQuery.hook.ts +6 -8
- package/src/hooks/Astt/getTransferStatesQuery.hook.ts +2 -2
|
@@ -5,8 +5,7 @@ export interface TransferDocumentsProps extends UseQueryOptions<ResponseList<"Tr
|
|
|
5
5
|
records: number;
|
|
6
6
|
sortBy: string;
|
|
7
7
|
sortDirection: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
transferStateId?: string;
|
|
8
|
+
terms?: string;
|
|
9
|
+
query?: string;
|
|
11
10
|
}
|
|
12
|
-
export declare const getTransferDocumentsQueryHook: ({ page, records, sortBy, sortDirection,
|
|
11
|
+
export declare const getTransferDocumentsQueryHook: ({ page, records, sortBy, sortDirection, terms, query }: TransferDocumentsProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"TransferDocuments", TransferDocuments>, unknown>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
1
|
import { TransferStates } from "../../interfaces";
|
|
3
|
-
export declare const getTransfeStatesQueryHook: (
|
|
2
|
+
export declare const getTransfeStatesQueryHook: () => import("@tanstack/react-query").UseQueryResult<TransferStates[], unknown>;
|
package/package.json
CHANGED
|
@@ -7,22 +7,20 @@ export interface TransferDocumentsProps extends UseQueryOptions<ResponseList<"Tr
|
|
|
7
7
|
records: number;
|
|
8
8
|
sortBy: string;
|
|
9
9
|
sortDirection: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
transferStateId?: string;
|
|
10
|
+
terms?: string;
|
|
11
|
+
query?: string;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
export const getTransferDocumentsQueryHook = ({ page, records, sortBy, sortDirection,
|
|
14
|
+
export const getTransferDocumentsQueryHook = ({ page, records, sortBy, sortDirection, terms, query }: TransferDocumentsProps) => {
|
|
16
15
|
return useQuery(
|
|
17
|
-
['ASTT_TRANSFER_DOCUMENTS', page, records, sortBy, sortDirection,
|
|
16
|
+
['ASTT_TRANSFER_DOCUMENTS', page, records, sortBy, sortDirection, terms, query],
|
|
18
17
|
() => get<ResponseList<"TransferDocuments", TransferDocuments>>('/ASTT/TransferDocuments', {
|
|
19
18
|
pPage: page|| 1,
|
|
20
19
|
pRecords: records || 50,
|
|
21
20
|
pSortBy: sortBy || "DocumentCreationDate",
|
|
22
21
|
pSortDirection: sortDirection || "asc",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
pTransferStateId: transferStateId
|
|
22
|
+
pTerms: terms,
|
|
23
|
+
pQuery: query
|
|
26
24
|
}),
|
|
27
25
|
{
|
|
28
26
|
keepPreviousData: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useQuery
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
2
|
import { TransferStates } from "../../interfaces";
|
|
3
3
|
import { get } from "../../services/ApiService";
|
|
4
4
|
|
|
5
|
-
export const getTransfeStatesQueryHook = (
|
|
5
|
+
export const getTransfeStatesQueryHook = () => {
|
|
6
6
|
return useQuery(
|
|
7
7
|
['ASTT_STATUS'],
|
|
8
8
|
() => get<TransferStates[]>('/ASTT/TransferStates'),
|