From 09b0af2fd8c84d90486aae3519afefb00c07e483 Mon Sep 17 00:00:00 2001 From: "MSI\\2Fi" Date: Thu, 12 Sep 2024 16:57:30 +0800 Subject: [PATCH] Hide button for no access right --- .../InvoiceSearch/InvoiceSearch.tsx | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/components/InvoiceSearch/InvoiceSearch.tsx b/src/components/InvoiceSearch/InvoiceSearch.tsx index 8748dca..8f559e2 100644 --- a/src/components/InvoiceSearch/InvoiceSearch.tsx +++ b/src/components/InvoiceSearch/InvoiceSearch.tsx @@ -419,54 +419,54 @@ const InvoiceSearch: React.FC = ({ invoices, projects, abilities }) => { ); const isAddInvoiceRightExist = () => { - const importRight = [IMPORT_INVOICE].some((ability) => abilities.includes(ability)) - return importRight - } - - const isAddReciptRightExist = () => { - const importRight = [IMPORT_RECEIPT].some((ability) => abilities.includes(ability)) + const importRight = [IMPORT_INVOICE, IMPORT_RECEIPT].some((ability) => abilities.includes(ability)) return importRight } return ( <> - - - - + + - - - + id='importExcel' + type='file' + accept='.xlsx, .csv' + hidden + onChange={(event) => {handleRecImportClick(event)}} + /> + {t("Import Invoice Amount Receive Summary")} + + + + } + { // tabIndex == 0 &&