Skip to content

Commit

Permalink
Merge pull request AY2324S1-CS2103T-W10-3#246 from techjay-c/add-fix-…
Browse files Browse the repository at this point in the history
…last-bugs

UPDATE LAST BUGS
  • Loading branch information
techjay-c authored Nov 14, 2023
2 parents e04e4b8 + 1b3c22b commit d24353e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 28 deletions.
18 changes: 7 additions & 11 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ By doing so, we maintain a clean and user-friendly design while offering detaile

#### Deleting a Treatment

The `delete-t reatment` command deletes a treatment record in ToothTracker.
The `delete-treatment` command deletes a treatment record in ToothTracker.

The activity diagram for deleting a treatment is illustrated as follows:

Expand Down Expand Up @@ -695,8 +695,8 @@ Enhances the overall user experience by providing a familiar and intuitive comma

### List-Treatment Feature Enhancement
#### Overview
The current 'list-treatment' command outputs all available treatment names in a text box due to time and UI constraints. Including additional details such as duration and cost would overcrowd the command box.
To address these limitations, a future enhancement for the 'list-treatment' command could be the introduction of a new popup window. This window would present a table with columns for treatment name, cost, and duration when the command is entered.
The current <code>list-treatment</code> command outputs all available treatment names in a text box due to time and UI constraints. Including additional details such as duration and cost would overcrowd the command box.
To address these limitations, a future enhancement for the <code>list-treatment</code> command could be the introduction of a new popup window. This window would present a table with columns for treatment name, cost, and duration when the command is entered.

#### Benefits

Expand Down Expand Up @@ -1928,6 +1928,7 @@ Prerequisite: There is at least one Appointment stored in ToothTracker with Dent
`filter-appointment dentist 4`

Expected Output in the Appointment List: Appointments with Dentist `Bernard Tan` is displayed.

Expected Output in the Command Output Box: Appointments with dentist whose dentist ID is 4 listed.

`filter-appointment dentist -1`
Expand All @@ -1941,9 +1942,12 @@ Prerequisite: There is at least one Appointment stored in ToothTracker with Pati
`filter-appointment patient 2`

Expected Output in the Appointment List: Appointments with Patient `Tommy Tan Chuk Yong` is displayed.

Expected Output in the Command Output Box: Appointments with patient whose patient ID is 2 listed.

`filter-appointment patient -1`


Expected Output in the Command Output Box: Error message for invalid ID provided.


Expand Down Expand Up @@ -2030,11 +2034,3 @@ Expected Output in the Command: ToothTracker cleared success message.
`exit`

Expected Output: ToothTracker application closes.

### Saving data

1. Dealing with missing/corrupted data files

1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_

2. _{ more test cases …​ }_
51 changes: 35 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ Edits one or more attributes of the dentist with the specified `DENTIST_ID`. Thi

<div markdown="block" class="alert alert-info">
**:information_source: Notes about editing tags:**<br>
When editing tags, you must include any previous tags that were already associated with the dentist, or else these tags will be removed.
This also implies that you can use `t/` to remove all tags from a dentist using the <code>edit-dentist</code> command.
When editing tags for a dentist, ensure to include all existing tags to avoid their removal. For instance, if a dentist has 2 tags, use the <code>edit-dentist</code> command with 2 tags (e.g., t/TAG1 t/TAG2).
Replace TAG1 and TAG2 with the desired tags. Note that tags cannot contain spaces. To remove all tags, use t/ in the <code>edit-dentist</code> command.
</div>

{% include page-break.html %}
Expand Down Expand Up @@ -614,8 +614,8 @@ To check the `PATIENT_ID` of a patient, you can simply enter the command `list-p
<div markdown="span" class="alert alert-info">
<span id="text">
**:information_source: Notes about editing tags:**<br>
When editing tags, you must include any previous tags that were already associated with the patient, or else these tags will be removed.
This also implies that you can use `t/` to remove all tags from a patient using the <code>edit-patient</code> command.
When editing tags for a patient, ensure to include all existing tags to avoid their removal. For instance, if a patient has 2 tags, use the <code>edit-patient</code> command with 2 tags (e.g., t/TAG1 t/TAG2).
Replace TAG1 and TAG2 with the desired tags. Note that tags cannot contain spaces. To remove all tags, use t/ in the <code>edit-patient</code> command.
</span>
</div>

Expand Down Expand Up @@ -727,7 +727,7 @@ This is useful when:
:bulb: **Tip:**
`DENTIST_ID` refers to the ID shown in the displayed list of dentists. <br>
You may use `list-dentist` to check out the `DENTIST_ID` first.
</span>>
</span>
</div>

**Example:**
Expand Down Expand Up @@ -929,7 +929,7 @@ Check that your system has the correct Java version (**Java 11 and above**) inst


The following image shows an example of what will show up on macOS. You can expect a similar result if you’re using another operating system.
![System Java Version](images/ug/SystemJavaVersion.png){: .centered-image }
![System Java Version](images/ug/SystemJavaVersion.png){: .centered-image-full-size }

The number in the red box highlights the Java version your system currently has.
In the example, the system is running Java 11.0.19, which meets the requirement for ToothTracker.
Expand Down Expand Up @@ -967,24 +967,43 @@ you may use `list-appointment` before using `view-calendar`.

## Known issues

1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only
the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the
application before running the application again.

### 1. Multi-screen Display:

- **Issue:** When moving the application from a secondary screen to the primary screen, the GUI may open off-screen.
- **Remedy:** Delete the `preferences.json` file before relaunching the application.

### 2. List Treatment Command:

- **Issue:** Extra comma displayed at the end when using the `list-treatment` command.

### 3. Incomplete Treatment Information:

- **Issue:** The `list-treatment` command only displays the names of treatments without additional information such as the cost of treatment and duration, which were fields requested during the initial addition of treatments into ToothTracker.

### 4. Phone Number Validation:

- **Issue:** Validation checks for phone numbers in `add-patient` and `add-dentist` commands are currently based on 8 digits and do not verify if the phone number starts with an 8 or 9.

### 5. Filter Command Validation:

2. When using the `list-treatment` command, a list of treatments (e.g., Braces, Cleaning,) is displayed with an extra comma at the end.
- **Issue:** The `filter-patient` and `filter-dentist` commands only perform validation checks on the attribute to filter by and not the keywords. For example, `filter-dentist a/phone k/myphone` will still execute the command.

### 6. Tag Error in Edit Commands:

3. The `list-treatment` command only displays the names of treatments without additional information such as the cost of treatment and duration,
which were fields requested during the initial addition of treatments into ToothTracker.
- **Issue:** When using non-alphanumeric characters in tags on the `edit-dentist` or `edit-patient` commands, an "Unknown command" error is sometimes displayed.

### 7. Limited Tag Editing:

4. The validation checks of phone number for `add-patient` and `add-dentist` commands is currently based on 8 digits and does not verify if the phone
number starts with an 8 or 9.
- **Issue:** If a patient was initially added to ToothTracker with 3 tags, only 3 tags can be edited afterward—no more, no less. Additional tags cannot be added, and attempting to edit with a different number of tags results in an error.
- **Remedy:** To modify tags, the number must exactly match the tags initially assigned during patient creation via `add-patient`. If additional tags are required or if tags need removal, the patient or dentist must be deleted and added again.
Resetting tags to empty using `edit-patient [PATIENT_ID] t/` is possible, but subsequent tag editing must adhere to the original number of tags.

### 8. Editing Patient Without Tags or Editing Patient previously deleted:

5. The `filter-patient` and `filter-dentist` commands only performs validation checks on the attribute to filter by and not the keywords.
(e.g filter-dentist a/phone k/myphone will still execute the command.)
- **Issue:** Attempting to edit a patient record that originally had no tags and adding tags during the edit or editing a patient record that was previously deleted to have tags will result in a "Multiple values specified for the following single-valued field(s): t/" error.
When editing a patient record that initially had no tags, adding tags during the editing process triggers an error related to the `t/` (tags) field. The system recognizes this as an attempt to assign multiple values to a field that is intended to be single-valued.
- **Remedy:** To avoid this error, ensure that the patient record has at least one tag during the initial creation. If tags need to be added later, consider deleting the patient and adding them again with the desired tags.

{% include page-break.html %}

Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Let's learn what each of these components does!

| | Component | Description |
|---|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 | Menu Bar | The menu bar contains menu options to [exit](#exiting-the-program-exit) ToothTracker and access [help](#viewing-help--help) resources. |
| 1 | Menu Bar | The menu bar contains menu options to [exit]( #exiting-the-program--exit) ToothTracker and access [help](#viewing-help--help) resources. |
| 2 | Command Input | The command input is where you can enter your commands to instruct ToothTracker on the tasks that you want to get done. To learn more about ToothTracker's CLI, refer to the [next section](#using-toothtrackers-cli). |
| 3 | Result Display | The result display area shows you the outcomes or feedback from your entered commands. |
| 4 | Patient List | This panel lists all patients currently registered in your clinic. It includes vital information such as names, contact details, and other fields. |
Expand Down

0 comments on commit d24353e

Please sign in to comment.