{isLoading ?
: null}
{error &&
}
{error &&
}
@@ -1058,26 +1077,24 @@ const FetchInvoicesModal = ({ onClose }: { onClose: () => void }) => {
- {data.message.map((ref) => (
+ {data.message.map((ref, index) => (
{
const target = e.target as HTMLElement
- // Do not select the checkbox if the user clicks on the checkbox or the link
- if (target.tagName !== 'INPUT' && !target.className.includes('chakra-checkbox') && !target.className.includes('chakra-link')) {
- onSelectRow(ref)
- }
+ if (target.closest('a')) return
+ onSelectRow(ref, index, e.shiftKey)
}}
- className="cursor-pointer">
-
- {
- if (checked) {
- setSelectedInvoices([...selectedInvoices, ref])
- } else {
- setSelectedInvoices(selectedInvoices.filter((invoice) => invoice !== ref))
- }
- }}
+ className="cursor-pointer select-none">
+ {
+ e.stopPropagation()
+ onSelectRow(ref, index, e.shiftKey)
+ }}>
+
@@ -1105,12 +1122,13 @@ const FetchInvoicesModal = ({ onClose }: { onClose: () => void }) => {
))}
: null}
-
+
+
Invoices: {selectedInvoices.length} /
Total: {formatCurrency(selectedInvoices.reduce((acc, invoice) => acc + invoice.outstanding_amount, 0))}
-
+
diff --git a/frontend/src/components/features/BankReconciliation/logos.ts b/frontend/src/components/features/BankReconciliation/logos.ts
index 463cd5b..2e4edaa 100644
--- a/frontend/src/components/features/BankReconciliation/logos.ts
+++ b/frontend/src/components/features/BankReconciliation/logos.ts
@@ -141,6 +141,10 @@ export const BANK_LOGOS: { keywords: string[], logo: string }[] = [
keywords: ['Bank of Maharashtra', 'BOM'],
logo: 'assets/bank-logos/Bank_of_Maharashtra.svg'
},
+ {
+ keywords: ['City Union Bank', 'CUB'],
+ logo: 'assets/bank-logos/City_Union_bank.svg'
+ },
{
keywords: ['Kotak Mahindra Bank', 'Kotak'],
logo: 'assets/bank-logos/Kotak_Mahindra.svg'