Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
masimons committed Sep 15, 2024
1 parent 920dd50 commit f2914c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/client/src/components/GrantsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ export default {
txt.innerHTML = t;
return txt.value;
};
const generateCloseDate = (date, status, close_date_explanation) => {
const generateCloseDate = (date, status, closeDateExplanation) => {
const formattedDate = new Date(date).toLocaleDateString('en-US', { timeZone: 'UTC' });
const dateExists = date && date !== '2100-01-01';
if (!dateExists){
return close_date_explanation ? 'See details' : 'Not yet issued';
if (!dateExists) {
return closeDateExplanation ? 'See details' : 'Not yet issued';
}
if (status === 'forecasted') {
return `est. ${formattedDate}`;
Expand Down
6 changes: 3 additions & 3 deletions packages/server/src/lib/grants-ingest.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ function mapSourceDataToGrant(source) {
} else if (today.isSameOrAfter(moment(grant.close_date), 'date')) {
grant.opportunity_status = 'closed';
} else if (today.isBefore(moment(grant.open_date), 'date')) {
// depending on how we model the estimated open date, we may need to do the
// depending on how we model the estimated open date, we may need to do the
// date comparison with the new field for estimated date
grant.opportunity_status = 'forecasted'
// Note: in the knex query, we are deriving the status based on
grant.opportunity_status = 'forecasted';
// Note: in the knex query, we are deriving the status based on
// archive_date and close_date. Probably we just want to pass
// the opportunity_status to the frontend, and not re-derive it here?
} else {
Expand Down

0 comments on commit f2914c8

Please sign in to comment.