From ca63148f4ff8572b367db7692c56f4b511162c15 Mon Sep 17 00:00:00 2001 From: stephenlago99 Date: Mon, 27 Jan 2025 17:37:07 +0200 Subject: [PATCH] hotfix: Remove filters from credit notes (#2003) * feat(CreditNotesTable): add showFilters prop * fix: remove filters from invoice/customer credit notes table --- .../creditNote/CreditNotesTable.tsx | 36 ++++++++++--------- .../customers/CustomerCreditNotesList.tsx | 1 + src/pages/InvoiceCreditNoteList.tsx | 1 + 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/creditNote/CreditNotesTable.tsx b/src/components/creditNote/CreditNotesTable.tsx index 278b62cb7..2bb6776ab 100644 --- a/src/components/creditNote/CreditNotesTable.tsx +++ b/src/components/creditNote/CreditNotesTable.tsx @@ -109,6 +109,7 @@ type TCreditNoteTableProps = { variables: LazyQueryHookOptions['variables'] | undefined customerTimezone?: TimezoneEnum tableContainerSize?: ResponsiveStyleValue + showFilters?: boolean } const CreditNoteTableItemSkeleton = () => { @@ -133,6 +134,7 @@ const CreditNotesTable = ({ customerTimezone, error, tableContainerSize, + showFilters = true, }: TCreditNoteTableProps) => { const { translate } = useInternationalization() const navigate = useNavigate() @@ -174,22 +176,24 @@ const CreditNotesTable = ({ return ( <> -
- - - -
+ {showFilters && ( +
+ + + +
+ )} )} diff --git a/src/pages/InvoiceCreditNoteList.tsx b/src/pages/InvoiceCreditNoteList.tsx index 610ac1db4..1aaf3c069 100644 --- a/src/pages/InvoiceCreditNoteList.tsx +++ b/src/pages/InvoiceCreditNoteList.tsx @@ -139,6 +139,7 @@ const InvoiceCreditNoteList = () => { customerTimezone={data?.invoice?.customer.applicableTimezone || TimezoneEnum.TzUtc} error={error} variables={variables} + showFilters={false} /> )}