mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat(webapp): wip printing financial reports
This commit is contained in:
@@ -11,24 +11,23 @@ const JournalSheetContext = createContext();
|
||||
*/
|
||||
function JournalSheetProvider({ query, ...props }) {
|
||||
// Transforms the sheet query to request query.
|
||||
const requestQuery = React.useMemo(
|
||||
const httpQuery = React.useMemo(
|
||||
() => transformFilterFormToQuery(query),
|
||||
[query],
|
||||
);
|
||||
|
||||
const {
|
||||
data: journalSheet,
|
||||
isFetching,
|
||||
isLoading,
|
||||
refetch,
|
||||
} = useJournalSheet(requestQuery, { keepPreviousData: true });
|
||||
} = useJournalSheet(httpQuery, { keepPreviousData: true });
|
||||
|
||||
const provider = {
|
||||
journalSheet,
|
||||
isLoading,
|
||||
isFetching,
|
||||
refetchSheet: refetch,
|
||||
httpQuery: requestQuery
|
||||
httpQuery,
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @ts-nocheck
|
||||
import {
|
||||
DialogContent,
|
||||
PdfDocumentPreview,
|
||||
@@ -5,9 +6,11 @@ import {
|
||||
} from '@/components';
|
||||
import { useJournalSheetPdf } from '@/hooks/query';
|
||||
import { AnchorButton } from '@blueprintjs/core';
|
||||
import { useJournalSheetContext } from '../../JournalProvider';
|
||||
|
||||
export default function JournalSheetPdfDialogContent() {
|
||||
const { isLoading, pdfUrl } = useJournalSheetPdf();
|
||||
const { httpQuery } = useJournalSheetContext();
|
||||
const { isLoading, pdfUrl } = useJournalSheetPdf(httpQuery);
|
||||
|
||||
return (
|
||||
<DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user