Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

fix(2494): Incidents: Add the ability to edit incident details #2604

Closed
wants to merge 17 commits into from

Conversation

riiniii
Copy link
Contributor

@riiniii riiniii commented Mar 7, 2021

fix #2494

Fixes #2494.

Changes proposed in this pull request:

  • merge code from master to current branch
  • change useResolveIncident hook to useUpdateIncident
  • in ViewIncidentDetails page, implement controlled inputs/forms with useState and useEffect, and make relevant fields editable:
    1a. department
    1b. category
    1c. category item
    1d. description
    1e. incident reported to (*) - (to-do, need more info on whether this maps to another user or is just string field)
    1f. patient impacted
  • make ViewIncidentDetails.test.tsx reflect that form should be editable
  • make it so that patient field is always visible, with on view/update, allows user to update the patient field from previously null/empty/undeff to a new patient value
  • add reportedTo

to do:

  • add tests to search for update button

Merge HospitalRun/hospitalrun-frontend to riiniii/hospitalrun-frontend
@vercel
Copy link

vercel bot commented Mar 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/4dXSAb5V13DeCW3Q3VAWgfainYaU
✅ Preview: https://hospitalrun-frontend-git-fork-riiniii-fix-2494-hospitalrun.vercel.app

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ riiniii
✅ tehKapa
❌ Renee Huang


Renee Huang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@matteovivona matteovivona added the in progress indicates that issue/pull request is currently being worked on label Mar 7, 2021
@matteovivona matteovivona added this to the v2.0 milestone Mar 7, 2021
@matteovivona matteovivona changed the title fix(2494): Incidents: Add the ability to edit incident details WIP: fix(2494): Incidents: Add the ability to edit incident details Mar 7, 2021
@matteovivona
Copy link
Contributor

Hi @riiniii. Is this a WIP PR?

@matteovivona matteovivona marked this pull request as draft March 7, 2021 13:03
@riiniii
Copy link
Contributor Author

riiniii commented Mar 8, 2021

Hi @riiniii. Is this a WIP PR?

yes, it is. will add WIP next time!

@riiniii riiniii changed the title WIP: fix(2494): Incidents: Add the ability to edit incident details fix(2494): Incidents: Add the ability to edit incident details May 1, 2021
@riiniii riiniii marked this pull request as ready for review May 1, 2021 22:19
@riiniii
Copy link
Contributor Author

riiniii commented May 1, 2021

@tehkapa some of the tests are not passing due to enzyme module not found on git... do you know how this error can be fixed? assuming this has to do w github and not mines as its a test running remotely

otherwise this is ready for review

@matteovivona
Copy link
Contributor

@riiniii I've tested locally and it doesn't work on my Mac either. Could you please show me a screenshot of the tests that run on your PC?

@matteovivona matteovivona requested review from a team, jameszheng405 and cynthiachen7 and removed request for a team May 16, 2021 21:39
@jameszheng405
Copy link

@riiniii Hi, can you sign the cla? Also, regarding the test failing, it might be that you are in a stale branch that hasn't completed the conversion to RTL. Perhaps you could run git merge and update this branch.

@riiniii
Copy link
Contributor Author

riiniii commented Jun 1, 2021

@riiniii Hi, can you sign the cla? Also, regarding the test failing, it might be that you are in a stale branch that hasn't completed the conversion to RTL. Perhaps you could run git merge and update this branch.

ok! shall try, ty!

@riiniii
Copy link
Contributor Author

riiniii commented Jun 2, 2021

@jameszheng405 closing this pr in favor of #2689 where i cherry picked the relevant commits from here + tests pass.

@riiniii riiniii closed this Jun 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in progress indicates that issue/pull request is currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incidents: Add the ability to edit incident details
4 participants