Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Transfer patient pop-up behavior #8187

Closed
3 tasks
nihal467 opened this issue Jul 22, 2024 · 4 comments · Fixed by #8245
Closed
3 tasks

Modify Transfer patient pop-up behavior #8187

nihal467 opened this issue Jul 22, 2024 · 4 comments · Fixed by #8245

Comments

@nihal467
Copy link
Member

nihal467 commented Jul 22, 2024

Describe the bug

When the patient transfer pop-up comes in front of the user for checkbox selection, accidently user click outside the pop-up, it will close the pop-up and take user to the patient list page

To Reproduce
Steps to reproduce the behavior:

  1. Go to patient registration page, and input +919999999999 to phone number column
  2. Click outside the transfer pop-up after that
  3. See error

Expected behavior

  • When user click outside the pop-up, the user should be returned back to the patient registration form itself, with the inputted phone number cleared
  • Rename the "Cancel Registration" button to "Close"
  • when user click on the close button, the user should be returned back to the patient registration form itself, with the inputted phone number cleared

Implement similar behavior for both duplicate phone number check and transfer patient dialogue

Screenshots

image

@github-project-automation github-project-automation bot moved this to Triage in Care Jul 22, 2024
@rithviknishad rithviknishad self-assigned this Jul 23, 2024
@rithviknishad rithviknishad removed their assignment Jul 24, 2024
@renoseHarsh
Copy link
Contributor

When the user clicks the close button, is it fine if the page refreshes to clear the inputted phone number?

@rithviknishad
Copy link
Member

@renoseHarsh

Nope, that'll also clear all other fields right? That is not expected behaviour.

@renoseHarsh
Copy link
Contributor

I was able to change the pop-up so that it closes instead of redirecting but I can't figure out how to clear the phone number field

<PhoneNumberFormField
  {...field("phone_number")}
  required
  label="Phone Number"
  onChange={(event) => {
    if (!id) duplicateCheck(event.value);
    field("phone_number").onChange(event);
    if (isEmergencyNumberEnabled) {
      field("emergency_phone_number").onChange({
        name: field("emergency_phone_number").name,
        value: event.value,
      });
    }
  }}
  types={["mobile", "landline"]}
/>

Could you help with this? Thanks!

@rithviknishad
Copy link
Member

On the popup's close callback, you could do: field("phone_number").handleChange("+91")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants