Jajared / pe

0 stars 0 forks source link

Clients with duplicate phone numbers allowed to be added #2

Closed Jajared closed 6 months ago

Jajared commented 6 months ago

Describe the bug A client with different name but the same handphone number is allowed to be added.

To Reproduce Steps to reproduce the behavior:

  1. Run the command 'add n/Jenny Chen p/91234567 e/jenjenc@gmail.com a/688, Yio Chu Kang Ave 5, #04-25 m/2024-10-12 14:00'
  2. An appointment is successfully added
  3. Run the command 'add n/Jenny p/91234567 e/jenjenc@gmail.com a/688, Yio Chu Kang Ave 5, #04-25 m/2024-10-12 15:00' (note the different name and appointment timing)
  4. Notice that the command still successfully adds an appointment

Expected behavior In this case, because a client with the same name is not allowed to be added more than once, a client with the same phone number should not be added as well. It is more likely that a client has a unique phone number than unique name (do consider multiple clients having the same name)

Screenshots Screenshot 2024-04-19 at 4.25.49 PM.png

Additional context Nil