forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
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 delete-s command to UG #49
Merged
saltedfishxx
merged 10 commits into
AY2324S1-CS2103T-T17-3:master
from
saltedfishxx:update-ug-delete-schedule
Oct 6, 2023
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7fec40f
Add delete-s command to UG
saltedfishxx 04b2405
Formatted subheadings in bold
saltedfishxx 78e523d
Renamed parameter to SCHEDULE_INDEX for clarity
saltedfishxx 0d896c7
Fixed parameter name to SCHEDULE_INDEX
saltedfishxx f27887c
Merge branch 'master' into update-ug-delete-schedule
saltedfishxx 03f3f87
Removed trailing whitespaces
saltedfishxx e54234a
Removed more trailing white spaces
saltedfishxx f75f0e0
Fixed toc and command summary
saltedfishxx 8ddb29d
fixed typo
saltedfishxx 2629482
Merge branch 'master' into update-ug-delete-schedule
saltedfishxx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,11 +50,11 @@ On top of these functionalities, we believe that tuition centre management must | |
## Quick Start | ||
|
||
1. Ensure you have Java `11` installed in your Computer. To verify, perform the following steps: | ||
1. Open a terminal. Refer to the following guides on how: | ||
1. [MacOS](https://support.apple.com/en-sg/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac#:~:text=Terminal%20for%20me-,Open%20Terminal,%2C%20then%20double%2Dclick%20Terminal) | ||
2. [Windows](https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/#:~:text=anywhere%20you%20like.-,Open%20Command%20Prompt%20from%20the%20Run%20Box,open%20an%20administrator%20Command%20Prompt) | ||
2. Type `java -version` and press Enter. | ||
3. If it says a version other than 11 or `command not found`, please install Java 11 by following this [guide](https://www.java.com/en/download/help/download_options.html). | ||
1. Open a terminal. Refer to the following guides on how: | ||
1. [MacOS](https://support.apple.com/en-sg/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac#:~:text=Terminal%20for%20me-,Open%20Terminal,%2C%20then%20double%2Dclick%20Terminal) | ||
2. [Windows](https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/#:~:text=anywhere%20you%20like.-,Open%20Command%20Prompt%20from%20the%20Run%20Box,open%20an%20administrator%20Command%20Prompt) | ||
2. Type `java -version` and press Enter. | ||
3. If it says a version other than 11 or `command not found`, please install Java 11 by following this [guide](https://www.java.com/en/download/help/download_options.html). | ||
|
||
2. Download the latest jar file (tutorconnect.jar) from our [Github Releases](https://github.com/AY2324S1-CS2103T-T17-3/tp/releases). | ||
|
||
|
@@ -63,14 +63,14 @@ On top of these functionalities, we believe that tuition centre management must | |
4. Double-click the jar file to launch the application. | ||
|
||
<div markdown="block" class="alert alert-info"> | ||
**:information_source: Mac Users**<br> | ||
If you are a Mac user, you may encounter a warning that says | ||
the jar file cannot be opened because it is from an unidentified developer. To continue: | ||
1. Right-click on the jar file and select `Open With > JavaLauncher (default)` | ||
2. Press Open when prompted | ||
|
||
**:information_source: Mac Users**<br> | ||
|
||
If you are a Mac user, you may encounter a warning that says | ||
the jar file cannot be opened because it is from an unidentified developer. To continue: | ||
|
||
1. Right-click on the jar file and select `Open With > JavaLauncher (default)` | ||
2. Press Open when prompted | ||
|
||
</div> | ||
|
||
|
@@ -85,17 +85,17 @@ On top of these functionalities, we believe that tuition centre management must | |
**:information_source: Command Format:**<br> | ||
|
||
* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br> | ||
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. | ||
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. | ||
* Items in square brackets are optional.<br> | ||
e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. | ||
e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. | ||
* Items with `…` after them can be used multiple times including zero times.<br> | ||
e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. | ||
e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. | ||
* Parameters can be in any order.<br> | ||
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. | ||
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) | ||
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. | ||
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) | ||
will be ignored.<br> | ||
e.g. if the command specifies `help 123`, it will be interpreted as `help`. | ||
* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple | ||
e.g. if the command specifies `help 123`, it will be interpreted as `help`. | ||
* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple | ||
lines as space characters surrounding line-breaks may be omitted when copied over to the application. | ||
|
||
</div> | ||
|
@@ -120,12 +120,12 @@ Adds a tutor to the address book. | |
**Expected output**: | ||
* `New tutor John Doe 98765432 [email protected] has been added.` | ||
|
||
**Error messages**: | ||
* `Missing parameter: n/`: The tag n/ is missing or tutor’s name is missing. | ||
* `Missing parameter: p/`: The tag p/ is missing or tutor’s phone number is missing. | ||
* `Missing parameter: e/`: The tag e/ is missing or tutor’s email is missing. | ||
* `Wrong input: n/`: The name entered is not a valid string. | ||
* `Wrong input: p/`: The phone number entered does not consist of numbers only. | ||
Error messages: | ||
* `Missing parameter: n/`: The tag n/ is missing or tutor’s name is missing. | ||
* `Missing parameter: p/`: The tag p/ is missing or tutor’s phone number is missing. | ||
* `Missing parameter: e/`: The tag e/ is missing or tutor’s email is missing. | ||
* `Wrong input: n/`: The name entered is not a valid string. | ||
* `Wrong input: p/`: The phone number entered does not consist of numbers only. | ||
* `Wrong input: e/`: The email entered is invalid. | ||
|
||
### Listing all tutors: `list-t` | ||
|
@@ -190,6 +190,29 @@ Find tutors whose names contain any of the given keywords. | |
**Error messages**: | ||
* `Invalid command format!`: No search keyword provided. | ||
|
||
### Deleting a tutor: `delete-t` | ||
|
||
Deletes a tutor in the address book based on their index number in the table. | ||
|
||
![delete tutor](images/deleteTutor.png) | ||
|
||
**Format**: `delete-t TUTOR_INDEX` | ||
|
||
**Examples**: | ||
* `delete-t 5` deletes the tutor that is indexed as 5 in the address book. | ||
* `list` followed by `delete-t 2` deletes the 2nd person in the address book. | ||
|
||
**Acceptable values for each parameter**: | ||
* `TUTOR_INDEX`: Only accepts numerical value | ||
|
||
**Expected output**: | ||
* `Tutor has been deleted: Alex Yeoh; Phone: 87438807; | ||
Email: [email protected]; Address: Blk 30 Geylang Street 29, #06-40` | ||
|
||
**Error messages**: | ||
* `Index number given is out of range`: Given index is out of range. | ||
* `Invalid parameter given`: Parameter given is not a numerical value. | ||
|
||
### Adding a schedule: `add-s` | ||
|
||
Adds a schedule to a specified tutor. | ||
|
@@ -208,17 +231,17 @@ Adds a schedule to a specified tutor. | |
* `END_TIME`: Only datetime in `yyyy-MM-ddTHH:mm:ss` format is accepted | ||
|
||
<div markdown="block" class="alert alert-info"> | ||
**:information_source: Information**<br> | ||
|
||
**:information_source: Information**<br> | ||
|
||
* `yyyy` represents the **year** (e.g., 2023). | ||
* `MM` represents the **month** with a leading zero (e.g., 09 for September, 10 for October). | ||
* `dd` represents the **day** of the month with a leading zero (e.g., 03, 15). | ||
* `T` is a **separator** indicating the start of the time portion. | ||
* `HH` represents the **hour** in **24-hour format** with a leading zero (e.g., 09 for 9 AM, 21 for 9 PM). | ||
* `mm` represents the **minutes** with a leading zero (e.g., 05). | ||
* `ss` represents the **seconds** with a leading zero (e.g., 05). | ||
|
||
</div> | ||
|
||
**Expected output**: | ||
|
@@ -233,33 +256,30 @@ 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.. | ||
|
||
### Deleting a tutor: `delete-t` | ||
### Deleting a schedule: `delete-s` | ||
|
||
Deletes a tutor in the address book based on their index number in the table. | ||
Deletes a schedule in the address book based on their index number in the table of schedules listed. | ||
|
||
![delete tutor](images/deleteTutor.png) | ||
![delete schedule](images/deleteSchedule.png) | ||
|
||
**Format**: `delete-t TUTOR_INDEX` | ||
**Format:** `delete-s SCHEDULE_INDEX` | ||
|
||
**Examples**: | ||
* `delete-t 5` deletes the tutor that is indexed as 5 in the address book. | ||
* `list` followed by `delete-t 2` deletes the 2nd tutor in the address book. | ||
**Example:** | ||
* `delete-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**: | ||
* `TUTOR_INDEX`: Only accepts numerical value | ||
**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**: | ||
* `Tutor has been deleted: Bernice Yu; Phone: 99272758; | ||
Email: [email protected]` | ||
**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 parameter given`: Parameter given is not a numerical value. | ||
|
||
|
||
|
||
* `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`. | ||
|
||
_Details coming soon ..._ | ||
_More details coming soon ..._ | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
@@ -278,13 +298,14 @@ _Details coming soon ..._ | |
|
||
## Command summary | ||
saltedfishxx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
| Action | Format, Examples | | ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------| | ||
| **Add Tutor** | `add-t n/NAME p/PHONE NUMBER e/EMAIL` <br> e.g., `add-t n/John Doe p/98765432 e/[email protected]` | | ||
| **Add Schedule** | `add-s ti/TUTOR_INDEX s/START_TIME e/END_TIME` <br> e.g., `add-s ti/1 s/2023-09-15T09:00:00 e/2023-09-15T11:00:00` | | ||
| **Clear** | `clear` | | ||
| **Delete Tutor** | `delete-t TUTOR_INDEX`<br> e.g., `delete-t 3` | | ||
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…`<br> e.g.,`edit 2 n/James Lee e/[email protected]` | | ||
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` | | ||
| **List Tutor** | `list-t` | | ||
| **Help** | `help` | | ||
| Action | Format, Examples | | ||
|---------------------|-----------------------------------------------------------------------------------------------------------------------------| | ||
| **Add Tutor** | `add-t n/NAME p/PHONE NUMBER e/EMAIL` <br> e.g., `add-t n/John Doe p/98765432 e/[email protected]` | | ||
| **List Tutor** | `list-t` | | ||
| **Delete Tutor** | `delete-t TUTOR_INDEX`<br> e.g., `delete-t 3` | | ||
| **Add Schedule** | `add-s ti/TUTOR_INDEX s/START_TIME e/END_TIME` <br> e.g., `add-s ti/1 s/2023-09-15T09:00:00 e/2023-09-15T11:00:00` | | ||
| **List Schedule** | `list-s` | | ||
| **Delete Schedule** | `delete-s INDEX_NO`<br> e.g., `delete-s 3` | | ||
| **Clear** | `clear` | | ||
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…`<br> e.g.,`edit 2 n/James Lee e/[email protected]` | | ||
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should omit the NUMBER
SCHEDULE_INDEX
: Only numerical input that ranges from 1 to the last schedule shown in the list of schedules.