Skip to content

Commit

Permalink
Merge pull request #47 from openimis/feature/CM-838
Browse files Browse the repository at this point in the history
CM-838: fix filter by amount
  • Loading branch information
olewandowski1 authored Mar 26, 2024
2 parents 80cf81f + 2a85443 commit cf231ec
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/components/payroll/BenefitConsumptionPayrollFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ function BenefitConsumptionPayrollFilter({ filters, onChangeFilters, benefitPlan

const filterValue = (filterName) => filters?.[filterName]?.value ?? null;

const onChangeFilter = (filterName) => (value) => {
debouncedOnChangeFilters([
{
id: filterName,
value: value || null,
filter: `${filterName}: ${value}`,
},
]);
};

const onChangeStringFilter = (filterName, lookup = null) => (value) => {
if (lookup) {
debouncedOnChangeFilters([
Expand Down Expand Up @@ -166,7 +156,7 @@ function BenefitConsumptionPayrollFilter({ filters, onChangeFilters, benefitPlan
label={formatMessage('benefitConsumption.amount')}
min={0}
value={filterValue('benefit_Amount')}
onChange={onChangeFilter('benefit_Amount')}
onChange={onChangeStringFilter('benefit_Amount')}
/>
</Grid>
<Grid item xs={2} className={classes.item}>
Expand Down

0 comments on commit cf231ec

Please sign in to comment.