Skip to content

Commit

Permalink
Add Total Amount filter
Browse files Browse the repository at this point in the history
  • Loading branch information
azizjonnurov committed Jan 13, 2025
1 parent afda17c commit 1545272
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ const InvoicesListFilters = ({
name={FILTERS.LOCK_TOTAL}
onChange={adaptedApplyFilters}
/>
<NumberRangeFilter
id={FILTERS.TOTAL_AMOUNT}
activeFilters={activeFilters[FILTERS.TOTAL_AMOUNT]}
disabled={disabled}
labelId="ui-invoice.invoice.totalAmount"
name={FILTERS.TOTAL_AMOUNT}
onChange={adaptedApplyFilters}
/>
<FiscalYearFilter
id={FILTERS.FISCAL_YEAR}
activeFilters={activeFilters[FILTERS.FISCAL_YEAR]}
Expand Down
1 change: 1 addition & 0 deletions src/invoices/InvoicesList/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const FILTERS = {
EXPENSE_CLASS: 'expenseClass',
FUND_CODE: 'fundCode',
LOCK_TOTAL: 'lockTotal',
TOTAL_AMOUNT: 'total',
FISCAL_YEAR: 'fiscalYearId',
CREATED_BY: 'metadata.createdByUserId',
DATE_CREATED: 'metadata.createdDate',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const useBuildQuery = () => {
[FILTERS.FUND_CODE]: buildArrayFieldQuery.bind(null, ['invoiceLines.fundDistributions']),
[FILTERS.EXPENSE_CLASS]: buildArrayFieldQuery.bind(null, ['invoiceLines.fundDistributions']),
[FILTERS.LOCK_TOTAL]: buildNumberRangeQuery.bind(null, [FILTERS.LOCK_TOTAL]),
[FILTERS.TOTAL_AMOUNT]: buildNumberRangeQuery.bind(null, [FILTERS.TOTAL_AMOUNT]),
},
), []);
};
1 change: 1 addition & 0 deletions translations/ui-invoice/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
"invoice.paymentMethod": "Payment method",
"invoice.approvalDate": "Approval date",
"invoice.lockTotal": "Lock total",
"invoice.totalAmount": "Total Amount",
"invoice.vendorInvoiceNo": "Vendor invoice number",
"invoice.voucherNumber": "Voucher number",
"invoice.vendorName": "Vendor name",
Expand Down

0 comments on commit 1545272

Please sign in to comment.