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

Add list-s command to UG #50

Merged
38 changes: 30 additions & 8 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,28 +171,50 @@ Adds a schedule to a specified tutor.
* `Wrong input: s/`: The start time entered is not in datetime format.
* `Wrong input: e/`: The end time entered is not in datetime format..

### List all schedules: `list-s`

Displays a list of all schedules in the address book in a table format.


![view schedule](images/viewSchedule.png)

**Format:** `list-s`

**Example:**
* `list-s` shows all recorded schedules in the address book.

**Expected output:**
* Displays a table of schedules with columns for List number, Tutor Name, Start Time, and End Time
* If there are no schedules in the address book, displays a message telling the user to add a tutor with `add-s`.

![empty schedule list](images/emptyScheduleList.png)

**Error messages:**
* `Too many parameters`: `list-s` does accept any parameters other than its own command. (E.g. `list-s 1` will result in an error).
saltedfishxx marked this conversation as resolved.
Show resolved Hide resolved


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

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

![delete schedule](images/deleteSchedule.png)

Format: `delete-s INDEX_NO`
**Format:** `delete-s SCHEDULE_INDEX`

Example:
**Example:**
* `delele-s 5` deletes the schedule that is indexed as 5 in the schedule list.
* `list` followed by `delete-s 2` deletes the 2nd schedule in the schedule list.

Acceptable values for each parameter:
* `INDEX_NO`: NUMBER Only numerical input that ranges from 1 to the last schedule shown in the list of schedules
**Acceptable values for each parameter:**
* `SCHEDULE_INDEX`: NUMBER Only numerical input that ranges from 1 to the last schedule shown in the list of schedules

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

Error messages:
**Error messages:**
* `Index number given is out of range`: Given index is out of range.
* `Invalid value in parameter INDEX_NO`: Parameter given is not a numerical value.
* `Missing parameter INDEX_NO`: A numerical value is not provided when calling the command `delete-s`.
* `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`.


_More details coming soon ..._
Expand Down
Binary file added docs/images/emptyScheduleList.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/viewSchedule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.