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

Implement Delete and Edit functionality #30

Closed
rebeccalaujx opened this issue Sep 24, 2021 · 0 comments · Fixed by #57
Closed

Implement Delete and Edit functionality #30

rebeccalaujx opened this issue Sep 24, 2021 · 0 comments · Fixed by #57
Assignees
Milestone

Comments

@rebeccalaujx
Copy link
Collaborator

rebeccalaujx commented Sep 24, 2021

Delete:
Deletes the specified resident from the address book.

As a hall/ residence admin, I can

  • delete a resident’s information from the database
  • delete multiple residents in a single command

so that I can

  • remove the data of a resident who has moved out
  • save a lot of time when deleting multiple residents

Format: delete INDEX...

  • Deletes the resident at the specified INDEX.
  • The index refers to the index number shown in the displayed resident list.
  • The index must be a positive integer 1, 2, 3, …​
  • Able to delete multiple residents at once by inputting multiple indexes, each separated by a space.

Examples:

  • view followed by delete 2 deletes the 2nd person in the address book.
  • view followed by delete 1 2 3 deletes the first 3 people in the address book.
  • search n/Anne followed by delete 1 deletes the 1st person named Anne in the results of the find command.

Edit:
Edits an existing resident in the address book.

As a hall/ residence admin, I can

  • edit each resident’s details
  • edit the particulars of many residents in a single command
  • edit a resident's last FET date

so that I can

  • update the changes in the residents’ details if necessary
  • save a lot of time when editing the details of multiple residents
  • update the current residents’ last FET dates if they have taken a new FET

Format: edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [r/ROOM] [v/VACCINATION_STATUS] [f/FACULTY] [c/CCA]…​

  • Edits the resident at the specified INDEX. The index refers to the index number shown in the displayed resident list. The index must be a positive integer 1, 2, 3, …​
  • At least one of the optional fields must be provided.
  • Existing values will be updated to the input values.
  • Able to edit multiple residents at once by inputting multiple indexes, each separated by a space.

Examples:

  • edit 1 e/johndoe@example.com r/A101 Edits the email address and room number of the 1st person to be johndoe@example.com and A101 respectively.
  • edit 2 n/Betsy Crower c/ Edits the name of the 2nd person to be Betsy Crower and clears all existing CCAs.
  • edit 1 2 3 v/true Sets the vaccination status of the 1st, 2nd, and 3rd resident as vaccinated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants