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

Successful alert when new related person is added #1764

Closed
jackcmeyer opened this issue Jan 26, 2020 · 7 comments · Fixed by #1875
Closed

Successful alert when new related person is added #1764

jackcmeyer opened this issue Jan 26, 2020 · 7 comments · Fixed by #1875
Assignees
Labels
good first issue indicates an issue is good for a first time contributor in progress indicates that issue/pull request is currently being worked on patients issue/pull request that interacts with patients module v2.x
Milestone

Comments

@jackcmeyer
Copy link
Member

Scenario

AS

A user with write access to a patient

I WANT

A notification that I have successfully added a related person to a patient

SO THAT

I am not confused to whether or not the related person has been successfully added.

Acceptance Criteria

GIVEN

Write access to the patient

AND

I have clicked the add new related person button after successfully filing out the new related person form

WHEN

The related person is successfully created

THEN

I should receive a toast in the top left corner saying I have successfully added the new related person

Related Issues

Technical Notes

@matteovivona matteovivona transferred this issue from HospitalRun/hospitalrun Jan 29, 2020
@matteovivona matteovivona added good first issue indicates an issue is good for a first time contributor v2.x patients issue/pull request that interacts with patients module labels Jan 29, 2020
ocBruno added a commit to ocBruno/hospitalrun-frontend that referenced this issue Jan 30, 2020
@ocBruno
Copy link
Contributor

ocBruno commented Jan 30, 2020

Attempting to start this one implementing the toaster component but running into css issues. Not sure if the styles are compiling as they should be or maybe if it's because of an outdated components library but the compiled scss folder is empty in the current components library.

Edit: (Issue Suggestion) Here is an example of toastify that uses inline styles and also allows options to be passed to the component.
https://codesandbox.io/s/v0lpr78prl
Although I think fixing the external styles keeps things decoupled and applying the options parameter would only benefit the toaster.

@MatthewDorner
Copy link
Contributor

I see, the toast that appears when adding a new patient is also not the right color. This seems like a separate issue though. This issue only needs to make the toast appear after adding the related person, and we can open a new issue to fix the CSS.

@jackcmeyer
Copy link
Member Author

Ageee with @MatthewDorner here. Let’s just get the toaster appearing and we will worry about colors later!

ocBruno added a commit to ocBruno/hospitalrun-frontend that referenced this issue Jan 30, 2020
reorganize imports, add toaster for page wide use, separate async dispatch from synchronous event
handler to better handle promises, add toast on patient creation and error, suggest abstraction of
patients into person of various types to prepare for other facility members

fix HospitalRun#1764
@ocBruno
Copy link
Contributor

ocBruno commented Jan 30, 2020

Hey @jackcmeyer @MatthewDorner


Tried giving this one a shot but was a little unsure on where and how to handle the async action within redux. The css is styling is practically non existant but I added the main functionality. I'm just not sure about the design pattern if anyone has any ideas I tried keeping things decoupled and also added some other organization suggestions.
-There's also a suggestion I think is interesting to start thinking about which I have to remove from a comment. It's about abstracting Patient into a Person with types to prepare for other facility members.

-Not sure if the error toast or other modifications needs their own issues or not but if so I can split the modifications and create the issues.

@oizuldan
Copy link
Contributor

Can I take this issue?

@ocBruno
Copy link
Contributor

ocBruno commented Feb 18, 2020

Can I take this issue?

Hey @oizuldan, I've been really busy these past days so feel free!

@oizuldan
Copy link
Contributor

@jackcmeyer can you assign me to this task?

@jackcmeyer jackcmeyer added the in progress indicates that issue/pull request is currently being worked on label Feb 18, 2020
@matteovivona matteovivona added this to the v2.0.0 milestone Feb 20, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
good first issue indicates an issue is good for a first time contributor in progress indicates that issue/pull request is currently being worked on patients issue/pull request that interacts with patients module v2.x
Projects
None yet
5 participants