-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(grants): Forecasted UI - - MERGE AFTER PR # 3456 #3346
Open
masimons
wants to merge
6
commits into
main
Choose a base branch
from
ms-forecasted-ui
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d06cadb
feat(forecasted grants): update grants table and details for forecast…
masimons e1b6b7e
feat(grants): formatting fixes for dates
lsr-explore f565549
feat(forecasted grants): return correct opportunity status
lsr-explore 17257bb
feat(grants): fix search for forecasted grants
lsr-explore 036b035
feat(forecasted grants): remove console.log
lsr-explore 9823c85
feat(forecasted grants): update filter for opportunityStatuses
lsr-explore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,6 +548,7 @@ function grantsQuery(queryBuilder, filters, agencyId, orderingParams, pagination | |
CASE | ||
WHEN grants.archive_date <= now() THEN 'archived' | ||
WHEN grants.close_date <= now() THEN 'closed' | ||
WHEN grants.open_date > now() OR grants.opportunity_status = 'forecasted' THEN 'forecasted' | ||
ELSE 'posted' | ||
END IN (${Array(filters.opportunityStatuses.length).fill('?').join(',')})`, filters.opportunityStatuses); | ||
} | ||
|
@@ -730,6 +731,7 @@ async function getGrantsNew(filters, paginationParams, orderingParams, tenantId, | |
'grants.cfda_list', | ||
'grants.open_date', | ||
'grants.close_date', | ||
'grants.close_date_explanation', | ||
'grants.archive_date', | ||
'grants.reviewer_name', | ||
'grants.opportunity_category', | ||
|
@@ -746,11 +748,13 @@ async function getGrantsNew(filters, paginationParams, orderingParams, tenantId, | |
'grants.funding_instrument_codes', | ||
'grants.bill', | ||
'grants.funding_activity_category_codes', | ||
'grants.opportunity_status', | ||
]) | ||
.select(knex.raw(` | ||
CASE | ||
WHEN grants.archive_date <= now() THEN 'archived' | ||
WHEN grants.close_date <= now() THEN 'closed' | ||
WHEN grants.open_date > now() OR grants.opportunity_status = 'forecasted' THEN 'forecasted' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to reviewer: Additional check for open_date in case the status is not correctly populated in grants.gov |
||
ELSE 'posted' | ||
END as opportunity_status | ||
`)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewer: We do not want to display prefix "est." if the dates are null and the status is forecasted.
valid date - "est. 1/2/2056"
date = null - "not yet issued"
We need this as a separate flag because the requirement is to display "est." in italics.