Skip to content

Commit

Permalink
Merge pull request #2218 from HHS/jp/2132/grant-status-filter
Browse files Browse the repository at this point in the history
[TTAHUB-2132] Add grant status to filter select
  • Loading branch information
nvms authored Jun 20, 2024
2 parents 174dedd + 640e2e3 commit 39f3008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/src/components/filter/__tests__/goalFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ describe('goalFilters', () => {
const grantFilter = grantNumberFilter([{
numberWithProgramTypes: 'number EHS',
number: 'number',
status: 'Active',
}]);

const grantFilterWithNoPossibleGrantsYet = grantNumberFilter([]);
Expand Down Expand Up @@ -139,7 +140,7 @@ describe('goalFilters', () => {
const apply = jest.fn();
renderFilter(() => grantFilter.renderInput('1', 'test', [], apply));
const grantNumberInput = await screen.findByLabelText('Select grant numbers to filter by');
await selectEvent.select(grantNumberInput, ['number EHS']);
await selectEvent.select(grantNumberInput, ['number EHS - Active']);
expect(apply).toHaveBeenCalled();
});
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/filter/goalFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const grantNumberFilter = (possibleGrants) => ({
labelText="Select grant numbers to filter by"
options={possibleGrants.map((g) => ({
value: g.number,
label: g.numberWithProgramTypes,
label: `${g.numberWithProgramTypes} - ${g.status}`,
}))}
selectedValues={query}
mapByValue
Expand Down

0 comments on commit 39f3008

Please sign in to comment.