Skip to content

Commit

Permalink
Merge pull request AY2324S1-CS2103T-T17-3#238 from saltedfishxx/updat…
Browse files Browse the repository at this point in the history
…e-ug-delete-schedule

Update delete-s in UG
  • Loading branch information
ruishanteo authored Nov 2, 2023
2 parents 2773c62 + 5d74ea0 commit cd69484
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -776,26 +776,47 @@ You can also refer to [input information](#input-examples) for details about val

#### Deleting a schedule: `delete-s`

Deletes a schedule in the address book based on their index number in the table of schedules listed.
Deletes a schedule from TutorConnect.

![delete schedule](images/deleteSchedule.png)
##### :star: First time users
{:.no_toc}

**Scenario**

Imagine the schedule assigned to **Bernice Yu** on **15 September 9am to 11am** has been cancelled, and you want to remove the schedule.

No worries! Let the delete schedule command help you!

**Follow these steps**

1. Type `list-s` and press enter to get the index number of the schedule to be deleted.
2. Let's say the schedule to be deleted is in position 1 of the schedule list.
3. Type `delete-s 1` and press enter.

**What you can expect to see**

**Format:** `delete-s SCHEDULE_INDEX`
Well done! You have deleted the schedule assigned to **Bernice Yu**.

**Example:**
* `delete-s 5` deletes the schedule that is indexed as 5 in the schedule list.
* `list-s` followed by `delete-s 2` deletes the 2nd schedule in the schedule list.
![delete schedule](images/delete-schedules/delete-s.png)

**Acceptable values for each parameter:**
* `SCHEDULE_INDEX`: Only numerical input that ranges from 1 to the last schedule shown in the list of schedules.
##### :star::star::star: Experienced users
{:.no_toc}

**Command format**
![delete schedule command](images/delete-schedules/delete-s-syntax.png)

**Expected output:**
* `Schedule has been deleted: Tutor: John Doe; Start date: Sep 15, 2023 09:00; End date: Sep 15, 2023 11:00;`
**Errors you might encounter**

**Error messages:**
* `Index number given is out of range`: Given index is out of range.
* `Invalid value in parameter SCHEDULE_INDEX`: Parameter given is not a numerical value.
* `Missing parameter SCHEDULE_INDEX`: A numerical value is not provided when calling the command `delete-s`.
Here is a list of the error messages you may encounter, when the command is entered incorrectly:

| Error Message | Reason |
|------------------------------------------|--------------------------------------------------------------|
| `Invalid command format!` | Invalid or missing `SCHEDULE_INDEX`. |
| `The schedule index provided is invalid` | `SCHEDULE_INDEX` entered is not in the range of number of tutors. |

You can also refer to [input information](#input-examples) for details about valid inputs.

[Back To Top](#table-of-contents)

#### Viewing calendar: `show`

Expand Down
Binary file added docs/images/delete-schedules/delete-s-syntax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/delete-schedules/delete-s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd69484

Please sign in to comment.