Incident - reportedBy should store the currently logged in user id

Author: blestabCreated Jan 4, 2021Updated Sep 19, 2022
Labels🐛bugin progressgood first issueincidents

Bug Report

Report incident is currently hardcoded to set reportedBy to some user instead of the currently logged in user's id. This needs to be corrected to user the current user id from the redux store.

To Reproduce

Expected behavior

  • The incident.reportedBy should be the currently logged in user.id at the time the incident is reported
  • The list of incidents should display the user.fullName based on the incident.reportedBy

Notes

  • See src/shared/components/navbar/Navbar.tsx on how to access the user from the store

Your Environment

  • node version: 6,8,10
  • fastify version: >=1.0.0
  • os: Mac, Windows, Linux
  • any other relevant information

Source: HospitalRun/hospitalrun-frontend