feat(dashboard): claims first implementation (#8468)
* wip: setup UI * wip: rendering modal, adding claim items, create checks * fix: make form work after merge * fix: continuation of claim edit --------- Co-authored-by: fPolic <mainacc.polic@gmail.com>
This commit is contained in:
@@ -56,7 +56,10 @@ export const useClaims = (
|
||||
export const useCreateClaim = (
|
||||
orderId: string,
|
||||
options?: UseMutationOptions<
|
||||
HttpTypes.AdminClaimResponse,
|
||||
{
|
||||
claim: HttpTypes.AdminClaimResponse
|
||||
order: HttpTypes.AdminOrderResponse
|
||||
},
|
||||
Error,
|
||||
HttpTypes.AdminCreateClaim
|
||||
>
|
||||
@@ -75,6 +78,11 @@ export const useCreateClaim = (
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ordersQueryKeys.preview(orderId),
|
||||
})
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: claimsQueryKeys.lists(),
|
||||
})
|
||||
|
||||
options?.onSuccess?.(data, variables, context)
|
||||
},
|
||||
...options,
|
||||
@@ -103,6 +111,7 @@ export const useCancelClaim = (
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: claimsQueryKeys.details(),
|
||||
})
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: claimsQueryKeys.lists(),
|
||||
})
|
||||
@@ -231,7 +240,7 @@ export const useAddClaimInboundItems = (
|
||||
})
|
||||
}
|
||||
|
||||
export const useUpdateClaimInboundItems = (
|
||||
export const useUpdateClaimInboundItem = (
|
||||
id: string,
|
||||
orderId: string,
|
||||
options?: UseMutationOptions<
|
||||
|
||||
Reference in New Issue
Block a user