From 99a36c968ebd5ea96f6dd3888bb2b4b97ca131cb Mon Sep 17 00:00:00 2001 From: mari <2312138+masimons@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:50:57 -0300 Subject: [PATCH] clean up --- packages/server/src/lib/grants-ingest.js | 6 +++--- packages/server/src/routes/grants.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/lib/grants-ingest.js b/packages/server/src/lib/grants-ingest.js index 8d501fbaeb..f376981d7a 100644 --- a/packages/server/src/lib/grants-ingest.js +++ b/packages/server/src/lib/grants-ingest.js @@ -62,9 +62,9 @@ function mapSourceDataToGrant(source) { // 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' - // This may be extraneous code - // because in the knex query, we are deriving the status based on - // archive_date and close_date + // 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 { grant.opportunity_status = 'posted'; } diff --git a/packages/server/src/routes/grants.js b/packages/server/src/routes/grants.js index 2c9246ea8a..b77e57b661 100755 --- a/packages/server/src/routes/grants.js +++ b/packages/server/src/routes/grants.js @@ -216,7 +216,6 @@ router.get('/exportCSV', requireUser, async (req, res) => { // Generate CSV const formattedData = data.map((grant) => ({ ...grant, - //opportunity_status: titleize(grant.opportunity_status), interested_agencies: grant.interested_agencies .map((v) => v.agency_abbreviation) .join(', '),