Skip to content

Commit 732fa34

Browse files
authored
Merge pull request #183 from ReganChoy/branch-DG_v1.4b
Update UG and DG for v1.4
2 parents 2768965 + e337385 commit 732fa34

File tree

7 files changed

+134
-8
lines changed

7 files changed

+134
-8
lines changed

docs/DeveloperGuide.md

Lines changed: 76 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,63 @@ The following sequence diagram shows the lastmet operation:
209209

210210

211211
### Setting last met overdue duration feature
212+
The setting last met overdue duration feature allows users to choose the number of days before clients show up in the Last Met Display.
213+
214+
#### Implementation
215+
216+
The updating of last met command is facilitated by the `SetCommandParser` class which is created by the `AddressBookParser`.
217+
218+
The `SetCommandParser#parse()` overrides `Parser#parse()` in the `Parser` interface.
219+
- `SetCommandParser#parse()` - Parses the input arguments by storing the prefixes of it respective values in a `ArgumentMultimap` object.
220+
- It will then convert the String input into an Integer object before creating a new `SetCommand` object with the formatted integer.
221+
222+
The `SetCommand` object is then executed by the `Logic` component.
223+
224+
The `SetCommand` object then communicates with the `Model` component to update the static lastMetDuration value in the Last Met class.
225+
Upon updating the new lastMetDuration value, the `SetCommand` object then calls the `checkOverdue` function in all the `Person` objects in the addressbook
226+
to update the `isOverdue` boolean in all the `Person` objects. The Last Met Display then shows all the updated `Person` objects with `isOverdue` equals to `true`.
227+
228+
The method `SetCommand#execute()` returns a CommandResult object which contains the success message to be displayed to the user.
212229

213230

214231
### Adding schedule feature
232+
The adding schedule feature allows users to make appointments to track all their upcoming appointments with clients.
233+
234+
#### Implementation
235+
236+
The updating of schedule command is facilitated by the `ScheduleCommandParser` class which is created by the `AddressBookParser`.
237+
238+
The `ScheduleCommandParser#parse()` overrides `Parser#parse()` in the `Parser` interface.
239+
- `ScheduleCommandParser#parse()` - Parses the input arguments by storing the prefixes of it respective values in a `ArgumentMultimap` object.
240+
- It will then convert the String input into a DateTime object before creating a new `ScheduleCommand` object with the formatted dateTime.
241+
242+
The `ScheduleCommand` object is then executed by the `Logic` component.
243+
244+
The `ScheduleCommand` object then communicates with the `Model` component to update the Schedule to the client. The `Model` component then updates the `Person` object with the new Schedule.
245+
- `Model#setPerson(Person, Person)` - Sets the client in the existing client list to the new `Person` object which has been edited by the `ScheduleCommand#execute()` which contains the new Schedule.
246+
- `Model#setDisplayClient(Person)` - Updates the displayed client in the UI to the client that has been edited with the new Schedule.
247+
248+
The method `ScheduleCommand#execute()` returns a CommandResult object which contains the success message to be displayed to the user.
215249

216250

217251
### Marking schedule feature
252+
The marking schedule feature allows users to close upcoming appointments to track all their upcoming appointments with clients.
253+
254+
#### Implementation
255+
256+
The marking of schedule command is facilitated by the `MarkCommandParser` class which is created by the `AddressBookParser`.
257+
258+
The `MarkCommandParser#parse()` overrides `Parser#parse()` in the `Parser` interface.
259+
- `MarkCommandParser#parse()` - Parses the input arguments by storing the prefixes of it respective values in a `ArgumentMultimap` object.
260+
- It will then convert the String input into a DateTime object before creating a new `MarkCommand` object with the formatted dateTime.
261+
262+
The `MarkCommand` object is then executed by the `Logic` component.
263+
264+
The `MarkCommand` object then communicates with the `Model` component to update the Schedule to the client. The `Model` component then updates the `Person` object with the new Schedule with `isDone` set to `true`.
265+
- `Model#setPerson(Person, Person)` - Sets the client in the existing client list to the new `Person` object which has been edited by the `MarkCommand#execute()` which contains the new Schedule.
266+
- `Model#setDisplayClient(Person)` - Updates the displayed client in the UI to the client that has been edited with the new Schedule.
267+
268+
The method `MarkCommand#execute()` returns a CommandResult object which contains the success message to be displayed to the user.
218269

219270

220271
### Add policy feature
@@ -598,7 +649,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
598649
* 1c. Invalid command usage in the request.
599650
* 1c1. ClientCare shows command usage.
600651
* 1c2. User enters new data.<br>
601-
Steps 1d1-1d2 are repeated until the data entered are correct.<br>
652+
Steps 1c1-1c2 are repeated until the data entered are correct.<br>
602653
Use case ends.
603654
* 1d. Future date.
604655
* 1d1. ClientCare lets user know he cannot meet someone in the future.
@@ -611,7 +662,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
611662

612663
**MSS**
613664
1. User enters the last met overdue duration to the new desired value.
614-
2. ClientCare updates the new last met overdue duration.<br>
665+
2. ClientCare updates the new last met overdue duration.
666+
3. ClientCare refreshes the Last Met Display for all clients that meets the new last met overdue duration.<br>
615667
Use case ends.
616668

617669
**Extensions**
@@ -631,7 +683,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
631683

632684
**MSS**
633685
1. User schedules a date and time to meet with a client.
634-
2. ClientCare sets up the appointment.<br>
686+
2. ClientCare sets up the appointment.
687+
3. ClientCare shifts a client from the Last Met Display to the Schedule Display if he exists in the Last Met Display.<br>
635688
Use case ends.
636689

637690
**Extensions**
@@ -645,9 +698,14 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
645698
* 1b2. User enters new data.<br>
646699
Steps 1b1-1b2 are repeated until the data entered are correct.<br>
647700
Use case ends.
648-
* 1c. Invalid command usage in the request.
649-
* 1c1. ClientCare shows command usage.
650-
* 1c2. User enters new data.<br>
701+
* 1c. The client does not exist.
702+
* 1c1. ClientCare shows an error message.
703+
* 1c2. User enters new data.<br>
704+
Steps 1c1-1c2 are repeated until the data entered are correct.<br>
705+
Use case ends.
706+
* 1d. Invalid command usage in the request.
707+
* 1d1. ClientCare shows command usage.
708+
* 1d2. User enters new data.<br>
651709
Steps 1c1-1c2 are repeated until the data entered are correct.<br>
652710
Use case ends.
653711

@@ -656,7 +714,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
656714

657715
**MSS**
658716
1. User marks an appointment with client as done.
659-
2. ClientCare updates appointment has done and updates last met.<br>
717+
2. ClientCare updates appointment has done.
718+
3. ClientCare shifts the client from the Schedule Display to Last Met Display if his last met date is still overdue.<br>
660719
Use case ends.
661720

662721
**Extensions**
@@ -671,7 +730,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
671730
* 1c. Invalid command usage in the request.
672731
* 1c1. ClientCare shows command usage.
673732
* 1c2. User enters new data.<br>
674-
Steps 1d1-1d2 are repeated until the data entered are correct.<br>
733+
Steps 1c1-1c2 are repeated until the data entered are correct.<br>
675734
Use case ends.
676735

677736

@@ -792,6 +851,15 @@ testers are expected to do more *exploratory* testing.
792851

793852
## **Appendix: Planned Enhancements**
794853

854+
1. **Feature Flaw** - Currently, users can only schedule one appointment per client. In future versions, we will support multiple appointments per client.
855+
2. **Feature Flaw** - Currently, names are case-sensitive. `John` and `john` are regarded as different clients. In future versions, names will be case-insensitive.
856+
3. **Feature Flaw** - Currently, tags only allow alphanumeric values. Spaces and special characters are not allowed. In future versions, we will support the use of spaces and special characters for tags.
857+
4. **Feature Flaw** - Currently, users are not allowed to use special characters like `/` when adding or editing the client name. In future versions, we will support the use of special characters like `/` for names.
858+
5. **Feature Flaw** - Currently, users must fulfill all compulsory parameters to add a person. In future versions, we will make more parameters optional.
859+
6. **Feature Flaw** - Currently, users must re-sort the client list after adding, editing or updating clients. Client List does not auto update or re-sort itself upon adding/editing or updating. In future versions, we will support the auto sorting when clients are updated.
860+
7. **UI Bug** - Currently, the policy name and policy id may get truncated if there are too many characters. In future versions, we will support the wrapping of fields in the Policy Display.
861+
8. **UI Bug** - Currently, the phone number and remark may get truncated if they are too long. In future versions, we will support the wrapping of all fields in the Client View Display.
862+
795863
--------------------------------------------------------------------------------------------------------------------
796864

797865
## **Appendix: Effort**

docs/UserGuide.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,64 @@ Alternatively, [Command Summary](#command-summary) has all of them under one pag
238238
**CAUTION**: If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as the command format may be copied over incorrectly.
239239
</box>
240240

241+
<div style="page-break-after: always;"></div>
242+
243+
### Handling ClientCare Error Messages
244+
While using ClientCare, you may encounter errors when you mistype or missed something out in your commands.
245+
Not to worry, you will learn how to handle these error messages with ease in this section.
246+
247+
There are **4** types of error messages you may encounter in the Feedback Display.
248+
249+
##### 1) Invalid Command
250+
This occurs when you have mis-spelt the command keyword or the keyword does not exist. If you do not remember what are the command keywords available, you can easily refer them again under [Command Summary](#command-summary).
251+
252+
253+
![Invalid Command](images/ug/error_command.png =450x)
254+
255+
##### 2) Invalid Command Format
256+
This occurs when you have missed certain required fields or prefixes in the commands.
257+
258+
For example: adding a policy to a client requires an index, policy name and policy ID. Missing any one of these will throw an invalid command format error.
259+
`addpolicy 1 i/02141` will cause an error as you have missed out the `n/` prefix and its input value.
260+
261+
262+
![Invalid Command Format](images/ug/error_commandformat.png =450x)
263+
264+
<div style="page-break-after: always;"></div>
265+
266+
##### 3) Invalid Fields
267+
This occurs when you have all the prefixes required in a command but may have typed an invalid value.
268+
There are 2 possible situations where this is possible.
269+
270+
* Invalid field format:
271+
For example: A phone number can only accept numbers. Putting alphabets in a phone number is not allowed.
272+
Typing `edit 2 c/123vad43` causes invalid field format error.
273+
274+
275+
![Invalid Phone](images/ug/error_phone.png =450x)
276+
277+
* Invalid field value:
278+
For example: You are not allowed to type a future date when using the command `met` even though your date format is correct.
279+
If today is 5 Jan 2024, typing `met 2 d/2024-10-08` which is 8 Oct 2024 will cause an invalid field value error.
280+
281+
282+
![Future met](images/ug/error_futuremet.png =450x)
283+
284+
##### 4) Invalid Index
285+
This occurs when you gave ClientCare an index value that is larger than your current client list.
286+
287+
For example: If you only have 7 clients, then your index should be a value from 1 to 7.
288+
`edit 27 n/Bob` will cause an error as you have less than 27 clients.
289+
290+
291+
![Invalid Index](images/ug/error_index.png =450x)
292+
293+
<box type="info">
294+
295+
**Note:** ClientCare will only show you **one** error message at a time. If you have multiple errors, not to worry!
296+
ClientCare will be with you to correct each error!
297+
</box>
298+
241299
--------------------------------------------------------------------------------------------------------------------
242300
<div style="page-break-after: always;"></div>
243301

docs/images/ug/error_command.png

53.6 KB
Loading
64.1 KB
Loading

docs/images/ug/error_futuremet.png

56.8 KB
Loading

docs/images/ug/error_index.png

57.1 KB
Loading

docs/images/ug/error_phone.png

56.3 KB
Loading

0 commit comments

Comments
 (0)