BharatSeva / Client-Interface

A client-facing portal where client can access their records, make appointments, and avail other healthcare services.
http://20.51.184.243/client/login?health_id=HID5dd1c870-6308-4713-8&pass=12345
MIT License
9 stars 13 forks source link

Avoid multiple Register submits #18

Closed karthik-script closed 1 month ago

karthik-script commented 1 month ago

Hi @vaibhavyadav-dev, can you please add Labels on this for Hactoberfest? Thanks.

Link to issue: https://github.com/BharatSeva/BharatSeva-Plus-User-Interface/issues/16

Description: When a user attempts to register, clicking the “Register” button multiple times in quick succession triggers multiple submit requests. This can lead to redundant requests being sent to the server, potentially causing performance issues or duplicate registrations.

Steps to Reproduce:

  1. Navigate to the registration page.
  2. Enter valid registration details in all required fields.
  3. Click the “Register” button multiple times rapidly.
  4. Observe that multiple submit requests are sent to the server.

Expected Behavior: Only one registration submit request should be sent, even if the user clicks the “Register” button multiple times.

Current Behavior: Multiple requests are sent if the “Register” button is clicked repeatedly.

Proposed Solution: Disable the “Register” button and display a loading state immediately after the first click until the registration process is complete.

karthik-script commented 1 month ago

@vaibhavyadav-dev can you please check this deploy issue?

image
vaibhavyadav-dev commented 1 month ago

@karthik-script we're going through some major changes in our project, some checks are expected to fail, don't worry we will handle this from our side

vaibhavyadav-dev commented 1 month ago

@karthik-script update your PR once again to pass all the checks.

karthik-script commented 1 month ago

@vaibhavyadav-dev still failing. Thanks.