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

Provide better feedback in New Appointment/Edit Appointment Form #1917

Closed
jackcmeyer opened this issue Mar 18, 2020 · 5 comments 路 Fixed by #2051
Closed

Provide better feedback in New Appointment/Edit Appointment Form #1917

jackcmeyer opened this issue Mar 18, 2020 · 5 comments 路 Fixed by #2051
Assignees
Labels
馃殌enhancement an issue/pull request that adds a feature to the application 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 scheduling issue/pull request that interacts with scheduling module
Projects
Milestone

Comments

@jackcmeyer
Copy link
Member

馃殌 Feature Proposal

Currently, the only error message that appears in the New Appointment/Edit Appointment form is a banner message that gives an error message.

When possible, we should provide feedback directly on the problematic field using: https://components.hospitalrun.io/?path=/story/textinput--invalid-text-field-with-error-message.

After completing this issue the following should be true:

  • When a user does not enter a patient for the appointment, the given name should highlight in red, and have a feedback message of: Patient is required.
  • When the start date field is empty, it should highlight in red, and have a feedback message of: Start date is required.
  • When the end date field is empty, it should highlight in red, and have a feedback message of: End date is required.
  • When the end date is before the start date, the end date should highlight in red, and have a feedback message of: End date must be after start date.
  • The banner message should read Could not create new appointment./Could not update appointment.

Motivation

Easier feedback cycle for a user.

@jackcmeyer jackcmeyer transferred this issue from HospitalRun/hospitalrun Mar 18, 2020
@jackcmeyer jackcmeyer added 馃殌enhancement an issue/pull request that adds a feature to the application good first issue indicates an issue is good for a first time contributor help wanted indicates that an issue is open for contributions scheduling issue/pull request that interacts with scheduling module labels Mar 18, 2020
@jackcmeyer jackcmeyer added this to To do in Version 2.0 via automation Mar 18, 2020
@jackcmeyer jackcmeyer added this to the v2.0 milestone Mar 18, 2020
@patrick-salvatore
Copy link

Hi @jackcmeyer - may I work on this issue? Seems pretty straight forward.

@jackcmeyer jackcmeyer added in progress indicates that issue/pull request is currently being worked on and removed help wanted indicates that an issue is open for contributions labels Mar 21, 2020
@jackcmeyer
Copy link
Member Author

I've assigned this to you @patrick-salvatore

@patrick-salvatore
Copy link

@jackcmeyer
For clarification - is the ask to trigger the error messaging on click of the "Save" button?

Additionally, looking at date fields - state and the input fields are instantiated with valid values. An empty field won't trigger an update of the input value. The value of the input only changes if given a proper date. Is the ask to remove this functionality for the start date and end date fields? Or keep as is?

@jackcmeyer
Copy link
Member Author

@patrick-salvatore I think that, for now, we only trigger the error messages on the save button being clicked.

For the date fields, I think that you may need to use developer tools to circumvent the default behavior of the date pickers.

@jackcmeyer
Copy link
Member Author

Closed via #2051

Version 2.0 automation moved this from To do to Done May 11, 2020
@jackcmeyer jackcmeyer linked a pull request May 11, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
馃殌enhancement an issue/pull request that adds a feature to the application 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 scheduling issue/pull request that interacts with scheduling module
Projects
Version 2.0
  
Done
2 participants