Skip to content

Commit

Permalink
Fix bugs in UG and DG
Browse files Browse the repository at this point in the history
  • Loading branch information
yyihaoc committed Nov 10, 2024
1 parent 9289531 commit 3b810bd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
2 changes: 0 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ The following sequence diagram shows how a mark operation goes through the `Logi

</div>

Similarly, how an undo operation goes through the `Model` component is shown below:

![MarkAttendanceSequenceDiagram-Model](images/MarkAttendanceSequenceDiagram-Model.png)

The `unmark` command does the opposite with the similar flow between `Logic` and `Model` component.
Expand Down
60 changes: 34 additions & 26 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,26 @@ Adds a person to the address book.
#### Format
```
add n/NAME p/PHONE_NUMBER e/EMAIL t/TELEGRAM [r/ROLE]…​ [f/]
add n/NAME p/PHONE_NUMBER e/EMAIL t/TELEGRAM [r/ROLE]…​ [f/ or nf/ (NOT BOTH)]
```
#### Alias
`a` can be used in place of `add`.
#### Parameters
| Parameter | Prefix | Compulsory? | Remarks |
|----------------|--------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `NAME` | `n/` | Yes | Represents the name of a contact.<br/> Should contain non-numeric characters and spaces, and should not be blank. |
| `PHONE_NUMBER` | `p/` | Yes | Represents the phone number of a contact.<br/> Should be a valid Singapore phone number (i.e. have 8 digits and start with 3, 6, 8, or 9). |
| `EMAIL` | `e/` | Yes | Represents the email of a contact.<br/> Should be a valid email address (follow the restrictions provided in the error message). |
| `TELEGRAM` | `t/` | Yes | Represents the telegram handle of a contact.<br/> Should be alphanumeric characters, and be between 5-32 characters long. |
| `ROLE` | `r/` | No | Represents the role(s) held by the contact.<br/> Should be between 1-20 characters long. |
| | `f/` | No | Represents the favouriting of a contact.<br/> This keyword should be included only if you intend for this contact to be a favourite contact. |
| Parameter | Prefix | Compulsory? | Remarks |
|----------------|--------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `NAME` | `n/` | Yes | Represents the name of a contact.<br/> Should contain non-numeric characters and spaces, and should not be blank. |
| `PHONE_NUMBER` | `p/` | Yes | Represents the phone number of a contact.<br/> Should be a valid Singapore phone number (i.e. have 8 digits and start with 3, 6, 8, or 9). |
| `EMAIL` | `e/` | Yes | Represents the email of a contact.<br/> Should be a valid email address (follow the restrictions provided in the error message). |
| `TELEGRAM` | `t/` | Yes | Represents the telegram handle of a contact.<br/> Should be alphanumeric characters, and be between 5-32 characters long. |
| `ROLE` | `r/` | No | Represents the role(s) held by the contact.<br/> Should be between 1-20 characters long. |
| | `f/` | No | Represents the favouriting of a contact.<br/> This keyword should be included only if you intend for this contact to be a favourite contact. |
| | `nf/` | No | Represents the non-favouriting of a contact.<br> This keyword should be included to optionally indicate that the contact is not a favourite contact. Contacts are not favourite by default. |
* Both `f/` and `nf/` cannot be present in the command at once.
* Both `f/` and `nf/` can be absent in the command, in which the contact is not favourited by default.
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**<br/>
A person is uniquely identified by his/her **telegram handle**
Expand Down Expand Up @@ -144,7 +148,7 @@ Edits an existing person in the address book.
#### Format
```
edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/ROLE]…​
edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [t/TELEGRAM] [r/ROLE]…​ [f/ or nf/ (NOT BOTH)]
```
#### Alias
`e` can be used in place of `edit`.
Expand Down Expand Up @@ -206,6 +210,10 @@ When using `find`, at least **one** of the optional parameters must be included.
* The search is case-insensitive for all parameters. E.g `hans` will match `Hans`
* Persons matching at least one keyword will be returned (i.e. `OR` search).
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**<br/>
Invalid parameters will be accepted and 0 people will be returned.
</div>
#### Example
##### Usage: Find by name
* `find n/david` returns `David Li`<br>
Expand Down Expand Up @@ -495,19 +503,19 @@ Furthermore, certain edits can cause the AddressBook to behave in unexpected way
## Command summary
| Action | Format | Example Usage |
|-----------------------|-------------------------------------------------------------------------|-------------------------------------------------------------------------|
| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [r/ROLE]…​` | `add n/James Ho p/82224444 e/[email protected] t/jamesho r/logistics` |
| **Clear** | `clear` | `clear` |
| **Delete** | `delete INDEX` | `delete 3` |
| **Delete Profile** | `deleteProfile PROFILE` | `deleteProfile alice` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/ROLE]…​` | `edit 2 n/James Lee e/[email protected]` |
| **Find** | `find [n/NAMEKEYWORD]…​ [r/ROLEKEYWORD]…​ [t/TELEGRAMKEYWORD]…​ [f/]` | `find n/James Jake` |
| **Sort** | `sort ORDER` | `sort ASC` |
| **Switch** | `switch PROFILE` | `switch alice` |
| **List** | `list` | `list` |
| **Help** | `help` | `help` |
| **Attendance** | `attendance` | `attendance` |
| **Mark Attendance** | `mark t/TELEGRAM…​ d/DATE` | `mark t/berniceYu t/alexYeoh d/2024-11-02` |
| **Unmark Attendance** | `unmark t/TELEGRAM…​ d/DATE` | `unmark t/berniceYu d/2024-11-02` |
| **View** | `view t/TELEGRAM_HANDLE` | `view t/bob12` |
| Action | Format | Example Usage |
|-----------------------|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL t/TELEGRAM [r/ROLE]…​ [f/ or nf/ (NOT BOTH)]` | `add n/James Ho p/82224444 e/[email protected] t/jamesho r/logistics` |
| **Clear** | `clear` | `clear` |
| **Delete** | `delete INDEX` | `delete 3` |
| **Delete Profile** | `deleteProfile PROFILE` | `deleteProfile alice` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [t/TELEGRAM] [r/ROLE] [f/ or nf/ (NOT BOTH)]` | `edit 2 n/James Lee e/[email protected]` |
| **Find** | `find [n/NAMEKEYWORD]…​ [r/ROLEKEYWORD]…​ [t/TELEGRAMKEYWORD]…​ [f/]` | `find n/James n/Jake` |
| **Sort** | `sort ORDER` | `sort ASC` |
| **Switch** | `switch PROFILE` | `switch alice` |
| **List** | `list` | `list` |
| **Help** | `help` | `help` |
| **Attendance** | `attendance` | `attendance` |
| **Mark Attendance** | `mark t/TELEGRAM…​ d/DATE` | `mark t/berniceYu t/alexYeoh d/2024-11-02` |
| **Unmark Attendance** | `unmark t/TELEGRAM…​ d/DATE` | `unmark t/berniceYu d/2024-11-02` |
| **View** | `view t/TELEGRAM` | `view t/bob12` |

0 comments on commit 3b810bd

Please sign in to comment.