Skip to content

Commit

Permalink
Update Timetable window to access exit command
Browse files Browse the repository at this point in the history
Timetable window currently cannot access exit command (bug).

Adding ability for timetable to access exit command helps to enhance user experience.

Let's update timetable window to access exit command.
  • Loading branch information
dohaduong committed Apr 6, 2023
1 parent f1243d0 commit 49594d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,12 @@ If your changes to the data file makes its format invalid, AddressBook will disc
* Commands that start with *(M)* could only be accessed from Main Window
* Commands that start with *(T)* could only be accessed from Timetable Window
* Commands that start with *(B)* could be accessed from both Main and Customer Window
* Commands that start with *(A)* could be accessed from all 3 windows: Main, Customer and Timetable Window.


| Action | Format, Examples |
|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ***(C)* Add Customer** | Click on `Customers` in menu bar > `Address Book` then input `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` <br/><br/>e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/friend t/colleague` |
| ***(B)* Clear all entries** | `clear` |
| ***(C)* Delete Customer** | Click on `Customers` in menu bar > `Address Book` then input `delete INDEX`<br> e.g., `delete 3` |
| ***(C)* Edit Customer details** | Click on `Customers` in menu bar > `Address Book` then input `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br><br/> e.g.,`edit 2 n/James Lee e/[email protected]` |
| ***(C)* Find Customer** | Click on `Customers` in menu bar > `Address Book` then input `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` |
Expand All @@ -495,7 +495,8 @@ If your changes to the data file makes its format invalid, AddressBook will disc
| ***(M)* Show List of Completed Jobs** | `timetable_completed`<br/>OR<br/>Click on `Timetable` in menu bar > `Completed Jobs` |
| ***(M)* Show List of Unscheduled Jobs** | `timetable_unscheduled`<br/>OR<br/>Click on `Timetable` in menu bar > `Unscheduled Jobs` |
| ***(M)* Show Statistics** | `stats`<br/>OR<br/>Click on `Statistics` in menu bar > `Display Statistics` |
| ***(B)* Help** | `help`<br/>Or<br/>Click on `Help` in menu bar > `Help` |
| ***(B)* Exit** | `exit`<br/>Or<br/>Click on `Exit` in menu bar > `Exit` |
| ***(B)* Clear all entries** | `clear` |
| ***(A)* Help** | `help`<br/>Or<br/>Click on `Help` in menu bar > `Help` |
| ***(A)* Exit** | `exit`<br/>Or<br/>Click on `Exit` in menu bar > `Exit` |


Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.regex.Pattern;

import seedu.address.logic.commands.Command;
import seedu.address.logic.commands.ExitCommand;
import seedu.address.logic.commands.HelpCommand;
import seedu.address.logic.commands.timetable.TimetableCompletedCommand;
import seedu.address.logic.commands.timetable.TimetableDateCommand;
Expand Down Expand Up @@ -42,6 +43,9 @@ public Command parseCommand(String userInput) throws ParseException {
case HelpCommand.COMMAND_WORD:
return new HelpCommand();

case ExitCommand.COMMAND_WORD:
return new ExitCommand();

case TimetableDateCommand.COMMAND_WORD:
return new TimetableDateCommandParser().parse(arguments);

Expand Down

0 comments on commit 49594d0

Please sign in to comment.