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
- Access staging https://staging.hospitalrun.io/
- Report an incident
- View the list of incidents and notice that the reported by field shows 'some user'
Expected behavior
- The
incident.reportedByshould be the currently logged inuser.idat the time the incident is reported - The list of incidents should display the
user.fullNamebased on theincident.reportedBy
Notes
- See
src/shared/components/navbar/Navbar.tsxon 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