@@ -147,7 +147,6 @@ export const useCreateBatch = (options?: AppMutationOptions<typeof createBatch,
147147 return createBatch ( officeId , data )
148148 } ,
149149 ...options ,
150- onError : options ?. onError ?? queryConfig . onError ,
151150 onSuccess : async ( resData , variables , onMutateResult , context ) => {
152151 await runMutationEffects ( resData , variables , options ) ;
153152 options ?. onSuccess ?.( resData , variables , onMutateResult , context ) ;
@@ -179,7 +178,6 @@ export const usePaginateBatches = <TData>({ officeId, limit, order, filter, page
179178 checkAcl ( BookkeepingExportAcl . canUsePaginateBatches ( { officeId } ) ) ;
180179 return paginateBatches ( officeId , limit , order , filter , page , cursor ) } ,
181180 ...options ,
182- onError : options ?. onError ?? queryConfig . onError ,
183181 } ) ;
184182} ;
185183
@@ -212,7 +210,6 @@ export const usePaginateBatchesInfinite = <TData>({ officeId, limit, order, filt
212210 return pageParam * limitParam < totalItems ? pageParam + 1 : null ;
213211 } ,
214212 ...options ,
215- onError : options ?. onError ?? queryConfig . onError ,
216213 } ) ;
217214} ;
218215
@@ -236,7 +233,6 @@ export const useGetBatch = <TData>({ officeId, batchId }: { officeId: string, ba
236233 checkAcl ( BookkeepingExportAcl . canUseGetBatch ( { officeId } ) ) ;
237234 return getBatch ( officeId , batchId ) } ,
238235 ...options ,
239- onError : options ?. onError ?? queryConfig . onError ,
240236 } ) ;
241237} ;
242238
@@ -262,7 +258,6 @@ export const useUpdateBatchFormat = (options?: AppMutationOptions<typeof updateB
262258 return updateBatchFormat ( officeId , batchId , data )
263259 } ,
264260 ...options ,
265- onError : options ?. onError ?? queryConfig . onError ,
266261 onSuccess : async ( resData , variables , onMutateResult , context ) => {
267262 const { officeId, batchId } = variables ;
268263 const updateKeys = [ keys . getBatch ( officeId , batchId ) ] ;
@@ -294,7 +289,6 @@ export const useUpdateBatchItem = (options?: AppMutationOptions<typeof updateBat
294289 return updateBatchItem ( officeId , batchId , data )
295290 } ,
296291 ...options ,
297- onError : options ?. onError ?? queryConfig . onError ,
298292 onSuccess : async ( resData , variables , onMutateResult , context ) => {
299293 await runMutationEffects ( resData , variables , options ) ;
300294 options ?. onSuccess ?.( resData , variables , onMutateResult , context ) ;
@@ -327,7 +321,6 @@ export const usePaginateBatchItems = <TData>({ officeId, batchId, limit, order,
327321 checkAcl ( BookkeepingExportAcl . canUsePaginateBatchItems ( { officeId } ) ) ;
328322 return paginateBatchItems ( officeId , batchId , limit , order , filter , page , cursor ) } ,
329323 ...options ,
330- onError : options ?. onError ?? queryConfig . onError ,
331324 } ) ;
332325} ;
333326
@@ -361,7 +354,6 @@ export const usePaginateBatchItemsInfinite = <TData>({ officeId, batchId, limit,
361354 return pageParam * limitParam < totalItems ? pageParam + 1 : null ;
362355 } ,
363356 ...options ,
364- onError : options ?. onError ?? queryConfig . onError ,
365357 } ) ;
366358} ;
367359
@@ -386,7 +378,6 @@ export const useValidateBookkeepingBatch = (options?: AppMutationOptions<typeof
386378 return validateBookkeepingBatch ( officeId , batchId )
387379 } ,
388380 ...options ,
389- onError : options ?. onError ?? queryConfig . onError ,
390381 onSuccess : async ( resData , variables , onMutateResult , context ) => {
391382 await runMutationEffects ( resData , variables , options ) ;
392383 options ?. onSuccess ?.( resData , variables , onMutateResult , context ) ;
@@ -415,7 +406,6 @@ export const useExportBookkeepingBatch = (options?: AppMutationOptions<typeof ex
415406 return exportBookkeepingBatch ( officeId , batchId )
416407 } ,
417408 ...options ,
418- onError : options ?. onError ?? queryConfig . onError ,
419409 onSuccess : async ( resData , variables , onMutateResult , context ) => {
420410 await runMutationEffects ( resData , variables , options ) ;
421411 options ?. onSuccess ?.( resData , variables , onMutateResult , context ) ;
@@ -444,7 +434,6 @@ export const useRevertBookkeepingBatch = (options?: AppMutationOptions<typeof re
444434 return revertBookkeepingBatch ( officeId , batchId )
445435 } ,
446436 ...options ,
447- onError : options ?. onError ?? queryConfig . onError ,
448437 onSuccess : async ( resData , variables , onMutateResult , context ) => {
449438 await runMutationEffects ( resData , variables , options ) ;
450439 options ?. onSuccess ?.( resData , variables , onMutateResult , context ) ;
@@ -473,7 +462,6 @@ export const useGetVatLineItems = <TData>({ officeId, batchId, order }: { office
473462 checkAcl ( BookkeepingExportAcl . canUseGetVatLineItems ( { officeId } ) ) ;
474463 return getVatLineItems ( officeId , batchId , order ) } ,
475464 ...options ,
476- onError : options ?. onError ?? queryConfig . onError ,
477465 } ) ;
478466} ;
479467
0 commit comments