feat: deal status history table
This commit is contained in:
@ -42,6 +42,7 @@ import {
|
||||
getServices,
|
||||
getServicesKits,
|
||||
getStatuses,
|
||||
getStatusHistory,
|
||||
updateBoard,
|
||||
updateDeal,
|
||||
updateDealProduct,
|
||||
@ -138,6 +139,7 @@ import type {
|
||||
GetServicesData,
|
||||
GetServicesKitsData,
|
||||
GetStatusesData,
|
||||
GetStatusHistoryData,
|
||||
UpdateBoardData,
|
||||
UpdateBoardError,
|
||||
UpdateBoardResponse2,
|
||||
@ -807,6 +809,30 @@ export const updateStatusMutation = (
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getStatusHistoryQueryKey = (
|
||||
options: Options<GetStatusHistoryData>
|
||||
) => createQueryKey("getStatusHistory", options);
|
||||
|
||||
/**
|
||||
* Get Status History
|
||||
*/
|
||||
export const getStatusHistoryOptions = (
|
||||
options: Options<GetStatusHistoryData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getStatusHistory({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getStatusHistoryQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const getDealProductsQueryKey = (
|
||||
options: Options<GetDealProductsData>
|
||||
) => createQueryKey("getDealProducts", options);
|
||||
|
||||
Reference in New Issue
Block a user