Skip to content

Commit

Permalink
CM-838: fix filter by amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Mar 26, 2024
1 parent 09ae580 commit 2a85443
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 2a85443

Please sign in to comment.