From 0ac02680eef9378689a134c78df0706e02c6e338 Mon Sep 17 00:00:00 2001 From: xczheng Date: Thu, 7 Nov 2024 22:47:38 +0800 Subject: [PATCH 01/10] Add credits for star png image --- docs/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.md b/docs/index.md index dc818c67bf0..1a931825bda 100644 --- a/docs/index.md +++ b/docs/index.md @@ -22,3 +22,4 @@ * Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5) * This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org/). +* Image credit - star png for favourite icon: https://www.pngegg.com/en/png-wzqts From 82c4c6188a416c30f309cd19a6efe56591473e83 Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 22:50:34 +0800 Subject: [PATCH 02/10] Update HelpWindow.css --- src/main/resources/view/HelpWindow.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/view/HelpWindow.css b/src/main/resources/view/HelpWindow.css index e03c3837db2..944376f9f06 100644 --- a/src/main/resources/view/HelpWindow.css +++ b/src/main/resources/view/HelpWindow.css @@ -57,8 +57,9 @@ } .table-view .table-row-cell { + -fx-font-weight: bold; -fx-border-color: black; - -fx-border-width: 0 1 1 0; /* Only bottom border */ + -fx-border-width: 0 0 1 0; /* Only bottom border */ -fx-pref-height: 30; } From 4a6a0850ca7f6087be2d5ba6b10c78fc5fbccfc1 Mon Sep 17 00:00:00 2001 From: Chen Lei Yu <128605764+ChenLeiyu@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:00:09 +0800 Subject: [PATCH 03/10] Update add command descriptions --- docs/UserGuide.md | 6 +++--- src/main/java/seedu/address/logic/commands/AddCommand.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ada5829e871..d4be62dd515 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -130,17 +130,17 @@ Format: `list` Adds a person to the address book. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]... [t/TAG]... [pt/PREFERRED TIME]…​` +Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/PREFERRED TIME]…​` **Tip:** A person can have any number of tags, games and preferred times (including 0) -**Tip:** PREFERRED TIME should be in the form of "Day HHmm" with exactly 1 space in between +**Tip:** PREFERRED TIME should be in the form of "HHmm-HHmm" Examples: * `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal pt/Monday 2100` +* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal pt/2100-2300` diff --git a/src/main/java/seedu/address/logic/commands/AddCommand.java b/src/main/java/seedu/address/logic/commands/AddCommand.java index 4abac2a25a6..11e22ea2c62 100644 --- a/src/main/java/seedu/address/logic/commands/AddCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddCommand.java @@ -28,9 +28,9 @@ public class AddCommand extends Command { public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. " + "Parameters: " + PREFIX_NAME + "NAME " - + PREFIX_PHONE + "PHONE " - + PREFIX_EMAIL + "EMAIL " - + PREFIX_ADDRESS + "ADDRESS " + + "[" + PREFIX_PHONE + "PHONE] " + + "[" + PREFIX_EMAIL + "EMAIL] " + + "[" + PREFIX_ADDRESS + "ADDRESS] " + "[" + PREFIX_GAME + "GAME]... " + "[" + PREFIX_TAG + "TAG]... " + "[" + PREFIX_PREFERREDTIME + "PREFERRED TIME]...\n" From 8836f5456a8e70dd3f6ad2e58f023450de038d7b Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:03:44 +0800 Subject: [PATCH 04/10] Update UI inconsistencies --- .../java/seedu/address/ui/commandpopup/CommandTextFlow.java | 3 ++- .../java/seedu/address/ui/commandpopup/PopUpCommandsSet.java | 1 + src/main/resources/view/HelpWindow.fxml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java index 08f43e87556..ad19fb6b993 100644 --- a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java +++ b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java @@ -76,7 +76,7 @@ private String getDetailForCommand(String command) { return switch (command.toLowerCase()) { case "help" -> "help - Shows program help instructions and command summary"; case "list" -> "list - Shows a list of all persons in the gamer address book"; - case "add" -> "add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]... [t/TAG]... [pt/PREFERRED_TIME]..."; + case "add" -> "add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/PREFERRED_TIME]..."; case "edit" -> "edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... " + "[t/TAG]... [pt/PREFERRED_TIME]..."; case "addgame" -> "addgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]"; @@ -86,6 +86,7 @@ private String getDetailForCommand(String command) { case "unfavgame" -> "unfavgame INDEX g/GAME"; case "find" -> "find KEYWORD [MORE_KEYWORDS] - Finds persons whose names contain any of the keywords"; case "findtime" -> "find HHmm-HHmm [HHmm-HHmm]"; + case "findgame" -> "findgame g/GAME"; case "delete" -> "delete INDEX - Deletes the specified person (e.g., delete 3)"; case "clear" -> "clear - Clears all entries from the gamer address book"; case "undo" -> "undo - Undoes the previous command (aside from save and load)"; diff --git a/src/main/java/seedu/address/ui/commandpopup/PopUpCommandsSet.java b/src/main/java/seedu/address/ui/commandpopup/PopUpCommandsSet.java index 5ee8e131c35..c8f9cb0a77d 100644 --- a/src/main/java/seedu/address/ui/commandpopup/PopUpCommandsSet.java +++ b/src/main/java/seedu/address/ui/commandpopup/PopUpCommandsSet.java @@ -23,6 +23,7 @@ public static SortedSet commands() { commandSet.add("unfavgame"); commandSet.add("find"); commandSet.add("findtime"); + commandSet.add("findgame"); commandSet.add("delete"); commandSet.add("clear"); commandSet.add("undo"); diff --git a/src/main/resources/view/HelpWindow.fxml b/src/main/resources/view/HelpWindow.fxml index 577f771c9b6..edc53eda247 100644 --- a/src/main/resources/view/HelpWindow.fxml +++ b/src/main/resources/view/HelpWindow.fxml @@ -11,7 +11,7 @@ - + @@ -41,7 +41,7 @@ - + From 897858da62fd2e58c57371f854d7fa36b70493df Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:06:15 +0800 Subject: [PATCH 05/10] Update HelpWindow.java --- src/main/java/seedu/address/ui/HelpWindow.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 82bba826958..7654bff3487 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -153,6 +153,7 @@ protected void updateItem(String item, boolean empty) { new HelpCommand("UnFavGame", "`unfavgame INDEX g/GAME`\n"), new HelpCommand("Find", "`find KEYWORD [MORE_KEYWORDS]`\n"), new HelpCommand("FindTime", "`findtime TIME-TIME [TIME-TIME]`\n"), + new HelpCommand("FindGame", "`findgame g/GAME'\n"), new HelpCommand("Delete", "`delete INDEX`\n"), new HelpCommand("Clear", "`clear`"), new HelpCommand("Undo", "`undo`"), From 469755b6a334336c9a4cb1cef24a8272e6b68d46 Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:14:20 +0800 Subject: [PATCH 06/10] Update CommandTextFlowTest.java --- .../address/ui/commandpopup/CommandTextFlowTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java b/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java index 77f7bddc0ae..453712b05ff 100644 --- a/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java +++ b/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java @@ -36,8 +36,8 @@ public void setUp() { public void testCommandTextFlowConstruction() { assertNotNull(commandTextFlow); assertEquals("add", commandTextFlow.getCommandText()); - assertEquals("add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]... [t/TAG]... " - + "[pt/PREFERRED_TIME]...", commandTextFlow.getDetailText()); + assertEquals("add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]..." + + " [pt/PREFERRED_TIME]...", commandTextFlow.getDetailText()); } @Test @@ -52,8 +52,8 @@ public void testHighlightedCommandText() { public void testDetailText() { // Check that the detail text is correctly set Text detailText = (Text) commandTextFlow.getChildren().get(2); - assertEquals("add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]... [t/TAG]... " - + "[pt/PREFERRED_TIME]...", detailText.getText()); + assertEquals("add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]..." + + " [pt/PREFERRED_TIME]...", detailText.getText()); } @Test From d61da5f43f28e744c0816e1da0685b05d5fab15f Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:25:31 +0800 Subject: [PATCH 07/10] Update CommandTextFlow.java --- .../java/seedu/address/ui/commandpopup/CommandTextFlow.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java index ad19fb6b993..e426b0193fe 100644 --- a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java +++ b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java @@ -76,16 +76,16 @@ private String getDetailForCommand(String command) { return switch (command.toLowerCase()) { case "help" -> "help - Shows program help instructions and command summary"; case "list" -> "list - Shows a list of all persons in the gamer address book"; - case "add" -> "add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/PREFERRED_TIME]..."; + case "add" -> "add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/TIME]..."; case "edit" -> "edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... " - + "[t/TAG]... [pt/PREFERRED_TIME]..."; + + "[t/TAG]... [pt/TIME]..."; case "addgame" -> "addgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]"; case "editgame" -> "editgame INDEX g/GAME [u/USERNAME] [s/SKILL_LEVEL] [r/ROLE]"; case "deletegame" -> "deletegame INDEX g/GAME"; case "favgame" -> "favgame INDEX g/GAME"; case "unfavgame" -> "unfavgame INDEX g/GAME"; case "find" -> "find KEYWORD [MORE_KEYWORDS] - Finds persons whose names contain any of the keywords"; - case "findtime" -> "find HHmm-HHmm [HHmm-HHmm]"; + case "findtime" -> "find TIME-TIME [TIME-TIME]"; case "findgame" -> "findgame g/GAME"; case "delete" -> "delete INDEX - Deletes the specified person (e.g., delete 3)"; case "clear" -> "clear - Clears all entries from the gamer address book"; From f026d3fbde2948d6d7a682c060fc2c690ab94ac2 Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:34:42 +0800 Subject: [PATCH 08/10] Fix Testcases --- .../address/ui/commandpopup/CommandTextFlow.java | 4 ++-- src/main/resources/images/address_book_32old.png | Bin 4214 -> 0 bytes .../ui/commandpopup/CommandTextFlowTest.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 src/main/resources/images/address_book_32old.png diff --git a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java index e426b0193fe..b270664006d 100644 --- a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java +++ b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java @@ -76,9 +76,9 @@ private String getDetailForCommand(String command) { return switch (command.toLowerCase()) { case "help" -> "help - Shows program help instructions and command summary"; case "list" -> "list - Shows a list of all persons in the gamer address book"; - case "add" -> "add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/TIME]..."; + case "add" -> "add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/TIME-TIME]..."; case "edit" -> "edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... " - + "[t/TAG]... [pt/TIME]..."; + + "[t/TAG]... [pt/TIME-TIME]..."; case "addgame" -> "addgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]"; case "editgame" -> "editgame INDEX g/GAME [u/USERNAME] [s/SKILL_LEVEL] [r/ROLE]"; case "deletegame" -> "deletegame INDEX g/GAME"; diff --git a/src/main/resources/images/address_book_32old.png b/src/main/resources/images/address_book_32old.png deleted file mode 100644 index 29810cf1fd938e8568946ad28ee0c678564804b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4214 zcmV-+5Q*=JP)X+uL$Nkc;* zP;zf(X>4Tx07wm;mUmQB*%pV-y*Itk5+Wca^cs2zAksTX6$DXM^`x7XQc?|s+0 z08spb1j2M!0f022SQPH-!CVp(%f$Br7!UytSOLJ{W@ZFO_(THK{JlMynW#v{v-a*T zfMmPdEWc1DbJqWVks>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k44D$Ei9kCR(ujs|+l^-&R018$U3aiEbI~RXKr>qkjc?P z{kJ@P@V?6YLkIRroUP$b0cx06K##S9dJGVZfQ%atLjZtPipl|N08`QE6mX)VK?xO* z_;HxawfSY4oByL+F7wxK%FOJd<3IrPSiB;foQ=hd4v`ex(}%Jqs+ZbO&^z+W&RdY zIp7WPAagaG8v|E7E`Gl%UtCypN)uGcrtwnY=twNL*OYvIeo;RCdO=Q39+VTu_u~Kv z2?&`)OwBswY7&+j8ok!2dXCAdBq#yXmu^U_)e;)v^?WBG5-duckrDak@}K=81Y)}M zL&nEOa3|-8TUZ#Bm@!g*yX|1uR0&xlAk_Mbnt$dscgD8>ocX0DZMreJeaQ(+E$< ze-;zg0Tvn9gAr6m9)XG3!2hHdaC(dG4wkLWIO}6_4SfBV6MyN%RREEZ?!Ja$gaGh_)F5wr*v$ zF-Y;9$Imh6aS=nh%YWyX&m;K*VwPDUeNgHj0j`2%!42?ydJ)Ls#LBG>NqVcX? zL*q%;XsC1|#+c6RmT{OaK4? diff --git a/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java b/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java index 453712b05ff..aa644eb5ecb 100644 --- a/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java +++ b/src/test/java/seedu/address/ui/commandpopup/CommandTextFlowTest.java @@ -37,7 +37,7 @@ public void testCommandTextFlowConstruction() { assertNotNull(commandTextFlow); assertEquals("add", commandTextFlow.getCommandText()); assertEquals("add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]..." - + " [pt/PREFERRED_TIME]...", commandTextFlow.getDetailText()); + + " [pt/TIME-TIME]...", commandTextFlow.getDetailText()); } @Test @@ -53,7 +53,7 @@ public void testDetailText() { // Check that the detail text is correctly set Text detailText = (Text) commandTextFlow.getChildren().get(2); assertEquals("add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]..." - + " [pt/PREFERRED_TIME]...", detailText.getText()); + + " [pt/TIME-TIME]...", detailText.getText()); } @Test @@ -93,7 +93,7 @@ public void testEditCommand() { CommandTextFlow editCommandTextFlow = new CommandTextFlow("edit", "edit"); assertEquals("edit", editCommandTextFlow.getCommandText()); assertEquals("edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... " - + "[t/TAG]... [pt/PREFERRED_TIME]...", editCommandTextFlow.getDetailText()); + + "[t/TAG]... [pt/TIME-TIME]...", editCommandTextFlow.getDetailText()); // Check highlight for the "edit" command Text highlightedText = (Text) editCommandTextFlow.getChildren().get(0); From 9cde70ead8061564986671ca1e1292764fc2fbf5 Mon Sep 17 00:00:00 2001 From: Chen Lei Yu <128605764+ChenLeiyu@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:37:39 +0800 Subject: [PATCH 09/10] Update user guide findtime command --- docs/UserGuide.md | 54 +++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index d4be62dd515..80167a915bc 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -87,25 +87,25 @@ Underneath each suggested command is the syntax for that command and what parame ## Command summary -| Action | Format, Examples | -|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Help** | `help` | -| **List** | `list` | -| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]… [t/TAG]… [pt/TIME]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/Overwatch t/friend t/colleague pt/2130-2359` | -| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/Game]… [t/TAG]… [pt/TIME]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | -| **AddGame** | `addgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]​`
e.g.,`addgame 1 g/Overwatch u/Potato` | -| **EditGame** | `editgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]​`
e.g.,`editgame 1 g/Overwatch u/Potato` | -| **DeleteGame** | `deletegame INDEX g/GAME`
e.g.,`deletegame 1 g/Overwatch` | -| **FavGame** | `favgame INDEX g/GAME`
e.g.,`favgame 2 g/Overwatch` | -| **UnFavGame** | `unfavgame INDEX g/GAME`
e.g.,`unfavgame 2 g/Overwatch` | -| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | -| **FindTime** | `find TIME-TIME [TIME-TIME]`
e.g., `findtime 1800-1900 2000-2200 ` | -| **Delete** | `delete INDEX`
e.g., `delete 3` | -| **Clear** | `clear` | -| **Undo** | `undo` | -| **Save** | `save` | -| **Load** | `load` | -| **Exit** | `exit` | +| Action | Format, Examples | +|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Help** | `help` | +| **List** | `list` | +| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GAME]… [t/TAG]… [pt/TIME-TIME]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/Overwatch t/friend t/colleague pt/2130-2359` | +| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/Game]… [t/TAG]… [pt/TIME-TIME]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| **AddGame** | `addgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]​`
e.g.,`addgame 1 g/Overwatch u/Potato` | +| **EditGame** | `editgame INDEX g/GAME [u/USERNAME] [s/SKILLLEVEL] [r/ROLE]​`
e.g.,`editgame 1 g/Overwatch u/Potato` | +| **DeleteGame** | `deletegame INDEX g/GAME`
e.g.,`deletegame 1 g/Overwatch` | +| **FavGame** | `favgame INDEX g/GAME`
e.g.,`favgame 2 g/Overwatch` | +| **UnFavGame** | `unfavgame INDEX g/GAME`
e.g.,`unfavgame 2 g/Overwatch` | +| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| **FindTime** | `find TIME-TIME [TIME-TIME]`
e.g., `findtime 1800-1900 2000-2200 ` | +| **Delete** | `delete INDEX`
e.g., `delete 3` | +| **Clear** | `clear` | +| **Undo** | `undo` | +| **Save** | `save` | +| **Load** | `load` | +| **Exit** | `exit` | -------------------------------------------------------------------------------------------------------------------- ## Commands @@ -130,12 +130,12 @@ Format: `list` Adds a person to the address book. -Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/PREFERRED TIME]…​` +Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GAME]... [t/TAG]... [pt/TIME-TIME]…​` **Tip:** A person can have any number of tags, games and preferred times (including 0) -**Tip:** PREFERRED TIME should be in the form of "HHmm-HHmm" +**Tip:** Preferred time `pt/` TIME-TIME should be in the form of "HHmm-HHmm" and a valid time range that is not overnight Examples: @@ -248,15 +248,19 @@ Examples: Finds persons whose preferred time ranges overlap with any of given time range. -Format: `findtime RANGE [MORE_RANGE]` +Format: `findtime TIME-TIME...` -**Tip:** RANGE should be in the form of "HHmm-HHmm" with no extra space -and `HHmm` should be valid 0000-2359 4-digit number, while the first time should be before the second time +**Tips:** TIME-TIME should be in the form of "HHmm-HHmm" with no extra space +and `HHmm` should be a valid 4-digit number within 0000-2359, while the first time should be before the second time. + +You can enter more than one time range to search for. + +You can enter the same time twice e.g. `2300-2300` to only search that time. -* The search is border-insensitive. e.g. `1200-1300` will not match `1300-1400` +* The search is border-sensitive. e.g. `1200-1300` will match `1300-1400` * The order of ranges does not matter. * Persons matching at least one range will be returned(i.e. `OR` search). From 830c993fba3e57627ddeea77851e0a588f5b0779 Mon Sep 17 00:00:00 2001 From: flyingsalsa <107453007+flyingsalsa@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:49:14 +0800 Subject: [PATCH 10/10] Update UI --- src/main/java/seedu/address/ui/HelpWindow.java | 2 +- .../java/seedu/address/ui/commandpopup/CommandTextFlow.java | 4 ++-- src/main/resources/view/HelpWindow.fxml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 4e2b862e3da..21e9bbd170c 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -153,7 +153,7 @@ protected void updateItem(String item, boolean empty) { new HelpCommand("UnFavGame", "`unfavgame INDEX g/GAME`\n"), new HelpCommand("Find", "`find KEYWORD [MORE_KEYWORDS]`\n"), new HelpCommand("FindTime", "`findtime TIME-TIME [TIME-TIME]`\n"), - new HelpCommand("FindGame", "`findgame g/GAME'\n"), + new HelpCommand("FindGame", "`findgame KEYWORD [MORE_KEYWORDS]'\n"), new HelpCommand("Delete", "`delete INDEX`\n"), new HelpCommand("Clear", "`clear`"), new HelpCommand("Undo", "`undo`"), diff --git a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java index b270664006d..9729fa030f9 100644 --- a/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java +++ b/src/main/java/seedu/address/ui/commandpopup/CommandTextFlow.java @@ -85,8 +85,8 @@ private String getDetailForCommand(String command) { case "favgame" -> "favgame INDEX g/GAME"; case "unfavgame" -> "unfavgame INDEX g/GAME"; case "find" -> "find KEYWORD [MORE_KEYWORDS] - Finds persons whose names contain any of the keywords"; - case "findtime" -> "find TIME-TIME [TIME-TIME]"; - case "findgame" -> "findgame g/GAME"; + case "findtime" -> "find TIME-TIME [TIME-TIME] - Finds persons whose preferred time contains any TIMES"; + case "findgame" -> "findgame KEYWORD [MORE_KEYWORDS] - Finds persons whose games contain any of the keywords"; case "delete" -> "delete INDEX - Deletes the specified person (e.g., delete 3)"; case "clear" -> "clear - Clears all entries from the gamer address book"; case "undo" -> "undo - Undoes the previous command (aside from save and load)"; diff --git a/src/main/resources/view/HelpWindow.fxml b/src/main/resources/view/HelpWindow.fxml index 2b767bd8170..e0bc480d2d1 100644 --- a/src/main/resources/view/HelpWindow.fxml +++ b/src/main/resources/view/HelpWindow.fxml @@ -11,7 +11,7 @@ - + @@ -20,8 +20,8 @@ - - + +