Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Reports a day counter #1664

Merged
merged 13 commits into from
Mar 17, 2020
Merged

Reports a day counter #1664

merged 13 commits into from
Mar 17, 2020

Conversation

kevinyang06
Copy link
Contributor

@kevinyang06 kevinyang06 commented Mar 12, 2020

Fixes #1616

Description

Please include a summary of the change.

Any new packages installed?

"Reports a day" counter is reset if the application is restarted

Required followup work

followup work required for query and async

Checklist:

  • I have looked at my code on GitHub and it all looks good (ex: no random commented out code or console.logs)
  • I have added and needed tests for my changes (in particular for new screens)
  • I have added a comment to any confusing code

@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 12, 2020 14:06 Inactive
@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 12, 2020 14:08 Inactive
@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 12, 2020 14:11 Inactive
@kevinyang06
Copy link
Contributor Author

It is weird that we do need initializeAvailableData() in order to make landing page redirect to CAFC

@kevinyang06
Copy link
Contributor Author

I fixed a merge conflict for server.js, please make sure I didn't accidentally remove any useful code

@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 12, 2020 17:32 Inactive
f2/server.js Outdated
console.log('Warning: redirecting request to CAFC')
res.redirect(
req.subdomains.includes('signalez')
? 'http://www.antifraudcentre-centreantifraude.ca/report-signalez-fra.htm'
: 'http://www.antifraudcentre-centreantifraude.ca/report-signalez-eng.htm',
)
} else {
console.log('number of submissions: ' + availableData.numberOfSubmissions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can 🔥 these two new console logs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

(date.getMonth() > 8 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)) +
'/' +
date.getFullYear()
console.log(currentDate)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 this log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

} else {
db.close()
numberofReports = result.length
console.log('number of reports submitted: ' + numberofReports)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 this log

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@sastels sastels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran locally 👍 Awesome work!!
Just a couple debugging console.log()'s to get rid of, and a merge conflict and we'll be ready to go!

@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 16, 2020 18:23 Inactive
@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 16, 2020 18:27 Inactive
Copy link
Contributor

@sastels sastels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! 🚀

@sastels sastels temporarily deployed to rac-prototyp-submitcoun-o7kqj2 March 17, 2020 13:01 Inactive
@kevinyang06 kevinyang06 merged commit 0af1e24 into master Mar 17, 2020
@kevinyang06 kevinyang06 deleted the submitCounter branch March 17, 2020 13:08
sastels added a commit that referenced this pull request Mar 19, 2020
* Minor copy change (typo) (#1639)

* extract data from formidable manually (#1641)

* fix: upgrade mongodb from 3.5.2 to 3.5.3 (#1632)

* fix: upgrade react-scripts from 3.3.1 to 3.4.0 (#1642)

* Fix for Logs in another Azure Subscription (#1619)

* Updating IMAGE_NAME reference (#1597)

* change GNCC to GNC3 (#1655)

* use redirect for equifax links (#1651)

* clear file input after alert (#1662)

* fix keyboard nav (#1660)

* add moneyLost.methodOther field to analyst report (#1647)

* more detailed p and text stories (#1643)

* added stuff to sb docs (#1671)

* added getting started page to storybook (#1661)

* FIX CORS for HTTPS (#1665) (#1669)

* clean up logging a bit (#1663)

* tweak skiplink style (#1658)

* fix target area for upload button (#1653)

* change "go back" button's height to the same height as "cancel report" button (#1666)

* added Messages component.  (#1644)

* fix: upgrade async from 3.1.1 to 3.2.0 (#1680)

* Reports a day counter (#1664)

* Form validation - bump (#1510)

* added helmet in server.js (#1674)

* Combine analyst emails (#1628)

* Prod version number (#1656)

* Fixed Field, added container and layout to sb (#1675)

* Get email addresses from ldap query (#1682)

* restrict file number and size on server (#1648)

* remove submit button if already submitted (#1683)

* Fix for Continuous Deployment (#1690)

* Validation for location fields (#1689)

* cypress pack initial commit (#1247)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Reports a day" counter is reset if the application is restarted
2 participants