diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 48bb9ec8232..9226c85c085 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -23,7 +23,7 @@ konTActs is a **desktop app for managing contacts, optimized for use via a Comma 1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar addressbook.jar` command to run the application.
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
- ![Ui](images/Ui.png) + ![Ui](images/loadingPageOfUi.png) 1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
Some example commands you can try: @@ -44,26 +44,26 @@ konTActs is a **desktop app for managing contacts, optimized for use via a Comma ## Summary of commands -| Action | Format, Examples | -|-----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Action | Format, Examples | +|-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [**Add**](#adding-a-person-add) | `add n/NAME e/EMAIL telegram/TELEGRAM [t/TAG]…​ github/GITHUB`
e.g., `add n/James Ho e/jamesho@example.com telegram/@James t/friend t/colleague github/james-cool` | -| [**Clear**](#clearing-all-entries-clear) | `clear` | -| [**Delete**](#deleting-a-person-delete) | `delete n/NAME`
e.g., `delete n/James` | -| [**Edit**](#editing-a-person-edit) | `edit INDEX [n/NAME] [e/EMAIL] [telegram/TELEGRAM] [t/TAG]…​ [github/GITHUB]`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | -| [**Find**](#finding-persons-by-name-find) | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | -| [**Filter**](#filtering-persons-by-tag-filter) | `filter t/[TAG] t/[MORE_TAG]…​`
e.g., `filter t/friends t/family` | -| [**List**](#listing-all-persons-list) | `list` | -| [**Help**](#viewing-help-help) | `help` | -| [**View**](#viewing-a-contact-s-full-details-view) | `view [n/NAME]`
e.g., `view n/JohnDoe` | -| [**Github**](#launching-github-repository-github) | `github n/NAME`
e.g., `github n/Harry` | -| [**Mark**](#marking-a-student-as-present-mark) | `mark n/NAME w/WEEK NUMBER`
e.g. `mark n/John Doe w/1` | -| [**Unmark**](#unmarking-a-student-as-present-unmark) | `unmark n/NAME w/WEEK NUMBER`
e.g. `unmark n/John Doe w/1` | -| [**Sort**](#sorting-the-displayed-list-sort) | `sort FIELD order/ORDER`
e.g. `sort name order/asc` | -| [**Import**](#importing-data-from-csv-file-import) | `import path/CSV FILE PATH`
e.g `import path/user/data/xxx.csv` | -| [**Export**](#exporting-data-into-csv-file-export) | `export path/DESIRED FILE DESTINATION`
e.g `export path/user/data/xxx.csv` | -| [**Command History**](#accessing-command-history-and) | and |## Features -| [**Add grade**](#adding-grades-to-a-contact-addgrade) | `addGrade n/NAME asgn/ASSIGNMENT_NAME s/SCORE`
e.g. `addGrade n/JohnDoe asgn/Ex01 s/5` | -| [**Remove grade**](#removing-grades-from-a-contact-removegrade) | `removeGrade n/NAME asgn/ASSIGNMENT_NAME`
e.g. `removeGrade n/John Doe asgn/Ex01` | +| [**Clear**](#clearing-all-entries-clear) | `clear` | +| [**Delete**](#deleting-a-person-delete) | `delete n/NAME`
e.g., `delete n/James` | +| [**Edit**](#editing-a-person-edit) | `edit INDEX [n/NAME] [e/EMAIL] [telegram/TELEGRAM] [t/TAG]…​ [github/GITHUB]`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| [**Find**](#finding-persons-by-name-find) | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| [**Filter**](#filtering-persons-by-tag-filter) | `filter t/[TAG] t/[MORE_TAG]…​`
e.g., `filter t/friends t/family` | +| [**List**](#listing-all-persons-list) | `list` | +| [**Help**](#viewing-help-help) | `help` | +| [**View**](#viewing-a-contact-s-full-details-view) | `view [n/NAME]`
e.g., `view n/John Doe` | +| [**Github**](#launching-github-repository-github) | `github n/NAME`
e.g., `github n/Harry` | +| [**Mark**](#marking-a-student-as-present-mark) | `mark n/NAME w/WEEK NUMBER`
e.g. `mark n/John Doe w/1` | +| [**Unmark**](#unmarking-a-student-as-present-unmark) | `unmark n/NAME w/WEEK NUMBER`
e.g. `unmark n/John Doe w/1` | +| [**Sort**](#sorting-the-displayed-list-sort) | `sort FIELD order/ORDER`
e.g. `sort name order/asc` | +| [**Import**](#importing-data-from-csv-file-import) | `import path/CSV FILE PATH`
e.g `import path/user/data/xxx.csv` | +| [**Export**](#exporting-data-into-csv-file-export) | `export path/DESIRED FILE DESTINATION`
e.g `export path/user/data/xxx.csv` | +| [**Command History**](#accessing-command-history-and) | and |## Features +| [**Add grade**](#adding-grades-to-a-contact-addgrade) | `addGrade n/NAME asgn/ASSIGNMENT_NAME s/SCORE`
e.g. `addGrade n/JohnDoe asgn/Ex01 s/5` | +| [**Remove grade**](#removing-grades-from-a-contact-removegrade) | `removeGrade n/NAME asgn/ASSIGNMENT_NAME`
e.g. `removeGrade n/John Doe asgn/Ex01` |

@@ -227,8 +227,8 @@ Find all persons whose names contains any of the given keywords. **Examples:** * `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +* `find alex charlotte` returns `Alex Yeoh`, `Charlotte`
+ ![result for 'find alex charlotte'](images/findAlexCharlotte.png) -------------------------------------------------------------------------------------------------------------------- @@ -256,8 +256,8 @@ Finds persons whose names contain any of the given tag keywords. **Examples:** -* `filter t/friend t/family` returns any contact tagged with `friend` or `family`
- ![result for 'filter t/friend t/family'](images/findAlexDavidResult.png) +* `filter t/friends` returns any contact tagged with `friends`
+ ![result for 'filter t/friend t/family'](images/filterFriendsTagByFilter.png)
-------------------------------------------------------------------------------------------------------------------- @@ -308,7 +308,8 @@ Launches GitHub repository of the specified person on the browser from the addre **Examples:** -* `github n/Betsy` launches the GitHub repository of the person named `Betsy`, using the GitHub username assigned to `Betsy`. +* `github n/Harry` launches the GitHub repository of the person named `Harry`, using the GitHub username assigned to `Harry`. + ![github use case for launching Harry's repository](images/githubUsage.png) -------------------------------------------------------------------------------------------------------------------- @@ -325,7 +326,7 @@ Opens a window at the side with the full details of the specified person from th * View the full details of the selected contact. -* The name refers to the full name of the person shown in the displayed person list. +* `NAME` refers to the full name of the person shown in the displayed person list. * Calling `view` without any name parameter closes any windows previously opened by `view`. @@ -333,8 +334,9 @@ Opens a window at the side with the full details of the specified person from th **Examples:** -* `view n/JohnDoe` opens a window at the side showing the full details of the person named `JohnDoe`. -* Calling `view n/JohnDoe` followed by `view` closes the window showing the full contact details of `JohnDoe`. +* `view n/John Doe` opens a window at the side showing the full details of the person named `John Doe`. +* Calling `view n/John Doe` followed by `view` closes the window showing the full contact details of `John Doe`. + ![viewing John Doe's contact detail in the view window](images/viewWindowScreenshot.png) -------------------------------------------------------------------------------------------------------------------- @@ -351,17 +353,23 @@ Marks a student as present for a particular week. * Marks the particular student as present in that week. -* The name and week number is compulsory. +* The full name and week number is compulsory. * The name is case-sensitive. -* The range of the WEEK NUMBER is between 0 and 13, both inclusive. Rationale being there are 13 weeks per semester. +* The range of the WEEK_NUMBER is between 0 and 13, both inclusive. Rationale being there are 13 weeks per semester. + + +The update of the attendance will only be seen when [`view`](#viewing-a-contact-s-full-details-view) command is executed. + + + **Examples:** -* `mark n/Viswa w/1` marks the student named `Viswa` as present for week 1. - ![result for mark](images/markPresent.png) +* `mark n/Alex Yeoh w/0` marks the student named `Alex Yeoh` as present for week 0. + ![result for mark](images/markAlexPresent.png) -------------------------------------------------------------------------------------------------------------------- @@ -378,17 +386,23 @@ Unmarks a student as present for a particular week. * Unmarks the particular student as present in that week. -* The name and week number is compulsory. +* The full name and week number is compulsory. * The name is case-sensitive. -* The range of the WEEK NUMBER is between 0 and 13, both inclusive. Rationale being there are 13 weeks per semester. +* The range of the WEEK_NUMBER is between 0 and 13, both inclusive. Rationale being there are 13 weeks per semester. + + + + +The update of the attendance will only be seen when [`view`](#viewing-a-contact-s-full-details-view) command is executed. + **Examples:** -* `unmarks n/John Doe w/1` unmarks the student named `JohnDoe` as present for week 1. - ![result for unmark](images/unmarkStudent.png) +* `unmarks n/Alex Yeoh w/0` marks the student named `Alex Yeoh` as absent for week 0. + ![result for unmark](images/markAlexAbsent.png) -------------------------------------------------------------------------------------------------------------------- @@ -418,8 +432,12 @@ Sorts the displayed list based on the given field and order. **Examples:** -* `sort name order/asc` will sort the displayed list based on their name in ascending order. +* `sort name order/desc` will sort the displayed list based on their name in ascending order. + ![result_for_sorting](images/sortByNameDesc.png) + * `sort reset` will reset the displayed list to its default order. + ![result_for_sorting](images/sortReset.png) + -------------------------------------------------------------------------------------------------------------------- @@ -661,5 +679,6 @@ Furthermore, certain edits can cause the AddressBook to behave in unexpected way 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. 2. **If you minimize the Help Window** and then run the `help` command (or use the `Help` menu, or the keyboard shortcut `F1`) again, the original Help Window will remain minimized, and no new Help Window will appear. The remedy is to manually restore the minimized Help Window. - +3. **When using excel to edit telegram username**, typing "@" will trigger the command function which will output a "Function is not valid" error. The remedy is to prefix the telegram username with an apostrophe `'` to escape from the command function. For example: typing `'@james`. +![excel known issue](images/excelKnownIssue.png) -------------------------------------------------------------------------------------------------------------------- diff --git a/docs/images/excelKnownIssue.png b/docs/images/excelKnownIssue.png new file mode 100644 index 00000000000..be1baa27820 Binary files /dev/null and b/docs/images/excelKnownIssue.png differ diff --git a/docs/images/filterFriendsTagByFilter.png b/docs/images/filterFriendsTagByFilter.png new file mode 100644 index 00000000000..152d588cb47 Binary files /dev/null and b/docs/images/filterFriendsTagByFilter.png differ diff --git a/docs/images/findAlexCharlotte.png b/docs/images/findAlexCharlotte.png new file mode 100644 index 00000000000..aeef2234f71 Binary files /dev/null and b/docs/images/findAlexCharlotte.png differ diff --git a/docs/images/findFriendsTagByFilter.png b/docs/images/findFriendsTagByFilter.png new file mode 100644 index 00000000000..f3a780888a9 Binary files /dev/null and b/docs/images/findFriendsTagByFilter.png differ diff --git a/docs/images/githubUsage.png b/docs/images/githubUsage.png new file mode 100644 index 00000000000..b45d539903e Binary files /dev/null and b/docs/images/githubUsage.png differ diff --git a/docs/images/helpMessage.png b/docs/images/helpMessage.png index e87be7934c5..67897617822 100644 Binary files a/docs/images/helpMessage.png and b/docs/images/helpMessage.png differ diff --git a/docs/images/loadingPageOfUi.png b/docs/images/loadingPageOfUi.png new file mode 100644 index 00000000000..f5c103dd6c2 Binary files /dev/null and b/docs/images/loadingPageOfUi.png differ diff --git a/docs/images/markAlexAbsent.png b/docs/images/markAlexAbsent.png new file mode 100644 index 00000000000..00301f09487 Binary files /dev/null and b/docs/images/markAlexAbsent.png differ diff --git a/docs/images/markAlexPresent.png b/docs/images/markAlexPresent.png new file mode 100644 index 00000000000..47c5a1f38d0 Binary files /dev/null and b/docs/images/markAlexPresent.png differ diff --git a/docs/images/markPresent.png b/docs/images/markPresent.png deleted file mode 100644 index 9e71ed7c9d5..00000000000 Binary files a/docs/images/markPresent.png and /dev/null differ diff --git a/docs/images/sortByNameDesc.png b/docs/images/sortByNameDesc.png new file mode 100644 index 00000000000..5340ee79689 Binary files /dev/null and b/docs/images/sortByNameDesc.png differ diff --git a/docs/images/sortExample.png b/docs/images/sortExample.png new file mode 100644 index 00000000000..c9c433ae17a Binary files /dev/null and b/docs/images/sortExample.png differ diff --git a/docs/images/sortReset.png b/docs/images/sortReset.png new file mode 100644 index 00000000000..74ef0ff2107 Binary files /dev/null and b/docs/images/sortReset.png differ diff --git a/docs/images/unmarkStudent.png b/docs/images/unmarkStudent.png deleted file mode 100644 index f825f19bbe9..00000000000 Binary files a/docs/images/unmarkStudent.png and /dev/null differ diff --git a/docs/images/validCSV.png b/docs/images/validCSV.png index 6a97249e5e2..815b0e51f9e 100644 Binary files a/docs/images/validCSV.png and b/docs/images/validCSV.png differ diff --git a/docs/images/validCSV1.png b/docs/images/validCSV1.png index a0603acda7e..dc1db272094 100644 Binary files a/docs/images/validCSV1.png and b/docs/images/validCSV1.png differ diff --git a/docs/images/viewWindowScreenshot.png b/docs/images/viewWindowScreenshot.png new file mode 100644 index 00000000000..e589dfd7dd6 Binary files /dev/null and b/docs/images/viewWindowScreenshot.png differ diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/address/ui/PersonCard.java index 861cd88e186..e0bdd02b70b 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/address/ui/PersonCard.java @@ -7,6 +7,7 @@ import javafx.scene.layout.FlowPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; +import seedu.address.logic.parser.ParserUtil; import seedu.address.model.person.Person; /** @@ -38,6 +39,8 @@ public class PersonCard extends UiPart { private Label telegram; @FXML private Label github; + @FXML + private FlowPane weekLabel; /** * Creates a {@code PersonCode} with the given {@code Person} and index to display. @@ -56,6 +59,27 @@ public PersonCard(Person person, int displayedIndex) { } else { github.setText("GitHub username unspecified"); } + + Label labelOfWeek = new Label("Weeks attended: "); + if (!person.getWeeksPresent().isEmpty()) { + labelOfWeek.getStyleClass().add("information-label"); + weekLabel.getChildren().add(labelOfWeek); + + for (int week = 0; week <= ParserUtil.MAX_WEEK; week++) { + Label weekLabelNode = new Label(String.valueOf(week)); + + if (person.getWeeksPresent().contains(week)) { + weekLabelNode.getStyleClass().add("week-number-marked"); + } else { + weekLabelNode.getStyleClass().add("week-number-unmarked"); + } + weekLabel.getChildren().add(weekLabelNode); + } + } else { + labelOfWeek = new Label("No weeks attended"); + labelOfWeek.getStyleClass().add("information-label"); + weekLabel.getChildren().add(labelOfWeek); + } } } diff --git a/src/main/resources/view/DarkTheme.css b/src/main/resources/view/DarkTheme.css index 71049245c72..1ab6b3e4682 100644 --- a/src/main/resources/view/DarkTheme.css +++ b/src/main/resources/view/DarkTheme.css @@ -132,17 +132,6 @@ -fx-text-fill: #010504; } -.hyperlink { - -fx-font-family: "Segoe UI"; /* Inherit font-family */ - -fx-font-size: 13px; /* Inherit font-size */ - -fx-text-fill: #E2F1E7; /* Change to a lighter color for hyperlinks */ - -fx-underline: true; /* Ensure hyperlink is underlined */ -} - -.hyperlink:hover { - -fx-text-fill: #2b4274; /* Change color on hover */ -} - .stack-pane { -fx-background-color: derive(#1d1d1d, 20%); } @@ -372,6 +361,12 @@ -fx-font-size: 20; } +#weekLabel .information-label { + -fx-font-family: "Segoe UI"; + -fx-text-fill: D6BD98; + -fx-font-size: 12; +} + #weekLabel .week-number-marked { -fx-text-fill: white; -fx-background-color: green; @@ -391,6 +386,7 @@ } #fieldLabel { + -fx-font-family: "Segoe UI"; -fx-text-fill: D6BD98; } diff --git a/src/main/resources/view/PersonListCard.fxml b/src/main/resources/view/PersonListCard.fxml index a355cd7dc4b..ec1e2d34b90 100644 --- a/src/main/resources/view/PersonListCard.fxml +++ b/src/main/resources/view/PersonListCard.fxml @@ -38,7 +38,8 @@