Skip to content

Commit

Permalink
Merge branch 'release/v0.15.2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Apr 9, 2024
2 parents 16b721d + 2baa667 commit 21a1777
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 52 deletions.
6 changes: 2 additions & 4 deletions packages/webapp/src/hooks/query/creditNote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQueryClient, useMutation } from 'react-query';
import { useRequestQuery } from '../useQueryRequest';
import { transformPagination } from '@/utils';
import useApiRequest from '../useRequest';
import { useRequestPdf } from '../utils';
import { useRequestPdf } from '../useRequestPdf';
import t from './types';

const commonInvalidateQueries = (queryClient) => {
Expand Down Expand Up @@ -354,7 +354,5 @@ export function useRefundCreditTransaction(id, props, requestProps) {
* Retrieve the credit note pdf document data,
*/
export function usePdfCreditNote(creditNoteId) {
return useRequestPdf({
url: `sales/credit_notes/${creditNoteId}`,
});
return useRequestPdf({ url: `sales/credit_notes/${creditNoteId}` });
}
3 changes: 1 addition & 2 deletions packages/webapp/src/hooks/query/estimates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
import { useQueryClient, useMutation } from 'react-query';
import { useRequestQuery } from '../useQueryRequest';
import useApiRequest from '../useRequest';
import { useRequestPdf } from '../utils';

import { transformPagination } from '@/utils';
import t from './types';
import { useRequestPdf } from '../useRequestPdf';

const commonInvalidateQueries = (queryClient) => {
// Invalidate estimates.
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/hooks/query/invoices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQueryClient, useMutation } from 'react-query';
import { useRequestQuery } from '../useQueryRequest';
import { transformPagination } from '@/utils';
import useApiRequest from '../useRequest';
import { useRequestPdf } from '../utils';
import { useRequestPdf } from '../useRequestPdf';
import t from './types';

// Common invalidate queries.
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/src/hooks/query/paymentReceives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useMutation, useQueryClient } from 'react-query';
import { useRequestQuery } from '../useQueryRequest';
import useApiRequest from '../useRequest';
import { transformPagination, saveInvoke } from '@/utils';
import { useRequestPdf } from '../utils';

import t from './types';
import { useRequestPdf } from '../useRequestPdf';

// Common invalidate queries.
const commonInvalidateQueries = (client) => {
Expand Down
6 changes: 2 additions & 4 deletions packages/webapp/src/hooks/query/receipts.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @ts-nocheck
import { useQueryClient, useMutation } from 'react-query';
import { useRequestQuery } from '../useQueryRequest';
import { useRequestPdf } from '../utils';
import useApiRequest from '../useRequest';
import { transformPagination } from '@/utils';
import { useRequestPdf } from '../useRequestPdf';
import t from './types';

const commonInvalidateQueries = (queryClient) => {
Expand Down Expand Up @@ -165,9 +165,7 @@ export function useReceipt(id, props) {
* @param {number} receiptId -
*/
export function usePdfReceipt(receiptId: number) {
return useRequestPdf({
url: `sales/receipts/${receiptId}`,
});
return useRequestPdf({ url: `sales/receipts/${receiptId}` });
}

export function useRefreshReceipts() {
Expand Down
1 change: 0 additions & 1 deletion packages/webapp/src/hooks/utils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export * from './usePrevious';
export * from './useUpdateEffect';
export * from './useWatch';
export * from './useWhen';
export * from './useRequestPdf';
export * from './useIntersectionObserver';
export * from './useAbilityContext';
export * from './useCustomCompareEffect';
Expand Down
39 changes: 0 additions & 39 deletions packages/webapp/src/hooks/utils/useRequestPdf.tsx

This file was deleted.

0 comments on commit 21a1777

Please sign in to comment.