Skip to content

Commit

Permalink
Merge pull request #297 from RB9823/master
Browse files Browse the repository at this point in the history
UG Collapsible Sections Update
  • Loading branch information
RB9823 authored Nov 13, 2023
2 parents 574ffd3 + 4d66699 commit d0eb3e9
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Ui](docs/images/Ui.png)

**CheckMate is a desktop application for streamlining the process of booking rooms for hotel employees.**
**CheckMate is a desktop application for streamlining the process of booking rooms by hotel employees.**
With a Graphical User Interface (GUI) that provides the necessary information needed at a glance, and the application
being optimised for use via a Command Line Interface (CLI), we have combined elegance and efficiency when it comes to
the process of room booking by hotel receptionists.
Expand Down
158 changes: 158 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ CheckMate is a **desktop app for streamlining the process of room bookings by ho

## Input Formats

<details open>
<summary style="padding-left: 20px;"><strong>Command Format</strong></summary>
<div markdown="1">

### Command Format

* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
Expand All @@ -109,6 +113,15 @@ CheckMate is a **desktop app for streamlining the process of room bookings by ho

* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>Parameter Format</strong></summary>
<div markdown="1">

### Parameter Format

* `r/ROOM`: `ROOM` can be any integer from 1 to 500 inclusive.
Expand All @@ -125,13 +138,21 @@ CheckMate is a **desktop app for streamlining the process of room bookings by ho
</div>
</details>

</div>
</details>

---

<details open>
<summary><strong>Commands</strong></summary>
<div markdown="1">

## Commands

<details open>
<summary style="padding-left: 20px;"><strong>help</strong></summary>
<div markdown="1">

### Viewing help : `help`

Shows a message explaining how to access the help page.
Expand All @@ -140,6 +161,15 @@ Shows a message explaining how to access the help page.

Format: `help`

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>add</strong></summary>
<div markdown="1">

### Adding a booking: `add`

Adds a booking to the bookings book.
Expand All @@ -159,6 +189,15 @@ Examples:
* `add r/1 d/2023-01-01 08:00 to 2023-01-02 12:00 n/John Doe p/98765432 e/[email protected]`
* `add r/256 d/2023-02-01 15:00 to 2023-02-02 23:59 n/Betsy Crowe p/99990000 e/[email protected]`

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>add: Potential Errors</strong></summary>
<div markdown="1">

<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
If your add command is missing one or more parameters except for a remark or has mutliple parameters which do not follow the parameter format, CheckMate will show the following error:
"Invalid command format!
Expand Down Expand Up @@ -194,6 +233,15 @@ If your add command only has the email parameter that does not match the email p
The domain name must end with a domain label that is supported:
- gmail, yahoo, outlook, hotmail, icloud"</div>

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>list</strong></summary>
<div markdown="1">

### Listing all bookings : `list`

Shows a list of all bookings in the bookings book.
Expand All @@ -204,6 +252,15 @@ Format: `list`

* Example image above shows result of command `list`

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>edit</strong></summary>
<div markdown="1">

### Editing a booking : `edit`

Edits an existing booking in the bookings book.
Expand All @@ -226,6 +283,14 @@ The **edit** command makes use of the [Prefix Completion feature](#prefix-comple
Examples:
* `edit 1 p/91234567 e/[email protected]` Edits the phone number and email of the 1st booking to be `91234567` and `[email protected]` respectively.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>edit: Potential Errors</strong></summary>
<div markdown="1">

<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
If your edit command contains an index which is 0 or a negative integer, CheckMate will show the following error:
Expand All @@ -242,6 +307,15 @@ If your edit command does not change any details of the target booking, CheckMat
"No changes made. At least one field to edit must be provided."
</div>

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>find</strong></summary>
<div markdown="1">

### Locating bookings by name or room: `find`

Finds bookings whose bookings contain the room, name, or both.
Expand All @@ -263,6 +337,15 @@ Examples:
* `find 1` returns the booking which contains the room `1`.
* `find john` returns the booking(s) where the name is `john`.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>delete</strong></summary>
<div markdown="1">

### Deleting a booking : `delete`

Deletes the specified booking(s) from the bookings book.
Expand All @@ -282,6 +365,15 @@ Examples:
* `list` followed by `delete 2` deletes the 2nd booking in the bookingPeriod book.
* `find Betsy` followed by `delete 1` deletes the 1st booking in the results of the `find` command.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>delete: Potential Errors</strong></summary>
<div markdown="1">

<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
If your delete command contains an index which is 0 or a negative integer, CheckMate will show the following error:
"Index should be a non-zero unsigned integer."
Expand All @@ -292,6 +384,15 @@ If your delete command contains an index which above the number largest index sh
"The booking index provided is invalid."
</div>

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>undo</strong></summary>
<div markdown="1">

### Undo a deletion : `undo`

Adds the most recently deleted booking back to the system.
Expand All @@ -304,11 +405,29 @@ Format: `undo`
* If the deleted item was manually added back, then undo was performed, the deleted booking will not be added as it
already exists in CheckMate which compares two bookings using their room number and booking period.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>undo: Potential Errors</strong></summary>
<div markdown="1">

<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
If you input an undo command without previously having deleted a booking, CheckMate will show the following error:
"No deletions to undo."
</div>

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>clear</strong></summary>
<div markdown="1">

### Clearing all entries : `clear`

Clears all entries from the bookingPeriod book.
Expand All @@ -319,6 +438,15 @@ Format: `clear`

* Example image above shows the result of command `clear`

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>exit</strong></summary>
<div markdown="1">

### Exiting the program : `exit`

Exits the program.
Expand All @@ -327,10 +455,28 @@ Format: `exit`

* The window will close automatically on command `exit`

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>Saving the data</strong></summary>
<div markdown="1">

### Saving the data

CheckMate data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>Editing the data file</strong></summary>
<div markdown="1">

### Editing the data file

CheckMate data are saved automatically as a JSON file `[JAR file location]/data/checkmate.json`. Advanced users are welcome to update data directly by editing that data file.
Expand All @@ -339,6 +485,15 @@ CheckMate data are saved automatically as a JSON file `[JAR file location]/data/
If your changes to the data file makes its format invalid, CheckMate will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
</div>

</div>
</details>

---

<details open>
<summary style="padding-left: 20px;"><strong>Prefix Completion</strong></summary>
<div markdown="1">

### Prefix Completion

Pressing `tab` while inputting a command will autocomplete relevant command prefix with examples. If no prefixes are found, your input will blink red.
Expand All @@ -354,6 +509,9 @@ Prefix completions only works with `add` and `edit` command and does not validat
</div>
</details>

</div>
</details>

---

<details open>
Expand Down

0 comments on commit d0eb3e9

Please sign in to comment.