diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 4d5ec055b9f..1a44d0fd237 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -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` diff --git a/docs/images/delete-schedules/delete-s-syntax.png b/docs/images/delete-schedules/delete-s-syntax.png new file mode 100644 index 00000000000..bc4f8cf85bb Binary files /dev/null and b/docs/images/delete-schedules/delete-s-syntax.png differ diff --git a/docs/images/delete-schedules/delete-s.png b/docs/images/delete-schedules/delete-s.png new file mode 100644 index 00000000000..24f8a85ab01 Binary files /dev/null and b/docs/images/delete-schedules/delete-s.png differ