Skip to content

Commit

Permalink
Merge branch 'master' into miljyy-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
miljyy authored Nov 13, 2023
2 parents 91b320c + 56ea75a commit 8bc8534
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 28 deletions.
271 changes: 251 additions & 20 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The bulk of the app's work is done by the following four components:

**How the architecture components interact with each other**

The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`.
The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete EID1234-5678`.

<img src="images/ArchitectureSequenceDiagram.png" width="574" />

Expand Down Expand Up @@ -122,7 +122,7 @@ Here's a (partial) class diagram of the `Logic` component:

The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete 1")` API call as an example.

![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png)
![Interactions Inside the Logic Component for the `delete EID1234-5678` Command](images/DeleteSequenceDiagram.png)

<div markdown="span" class="alert alert-info">:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
</div>
Expand Down Expand Up @@ -817,8 +817,6 @@ Given below is an example usage scenario for the command.
* The Employee List will be updated to contain only employees which have leaves taken on the specified date.


_{more aspects and alternatives to be added}_

### Overtime feature

The overtime feature allows HouR users to manage employee overtime hours.
Expand Down Expand Up @@ -1045,23 +1043,247 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

**MSS**

1. User requests to sort employees by given attribute
2. HouR returns the sorted list of employees by given attribute
1. User requests to sort employees by given field and order.
2. HouR returns the sorted list of employees based on given field in given order.

Use case ends.

**Extensions**

* 1a. User leaves out keyword.
* 1a. User leaves out at least one of field or order.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No attribute matches given attribute.
* 1b. Field is not usable for sorting.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Order is not asc or desc.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Add a leave period for an employee**

**MSS**

1. User requests to add a leave period for an employee with a given id from given start date
to given end date.
2. HouR adds the individual dates between the given start and end dates inclusive
as leave appointments for the employee with given id.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id, start date, or end date.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Dates are of invalid order or format.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

* 1d. Leave date to be added already exists.
* 1d1. HouR shows an error message.

Use case returns back to step 1.

* 1e. Adding the leave date causes number of leaves
for employee with given employee id to be over 14 days .
* 1e1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Delete a leave period for an employee**

**MSS**

1. User requests to delete allocated leaves for an employee with a given id that falls between
given start and end dates.
2. HouR deletes the allocated leave dates that fall between the given start and end dates inclusive
for the employee with given id.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id, start date, or end date.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Dates are of invalid order or format.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

* 1d. No allocated leaves found between given start and end dates.
* 1d1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Edit an allocated leave date for an employee**

**MSS**

1. User requests to edit a given allocated leave date for an employee with a given id to the given new leave date.
2. HouR edits the given allocated leave date to the given new leave date for the employee with given id.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id, old leave date, or new leave date.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Dates are of invalid format.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

* 1d. Given allocated date to be edited does not exist.
* 1d1. HouR shows an error message.

Use case returns back to step 1.

* 1e. Given new date is already allocated.
* 1e1. HouR shows an error message.

Use case returns back to step 1.

**Use case: List employees on leave**

**MSS**

1. User requests to view a list of all employees on leave on a given date.
2. HouR filters the displayed employee list to only display employees on leave on the given date.

Use case ends.

**Extensions**

* 1a. User leaves out date.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. Dates are in the wrong format.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Add a remark for an employee**

**MSS**

1. User requests to add a given remark to an employee with a given employee id.
2. HouR adds the remark to the list of remarks associated with the employee with the given employee id and
shows the list to the user.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id or remark.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given employee id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Remark to be added already exists.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Delete a remark for an employee**

**MSS**

1. User requests to delete a given remark from an employee with a given employee id.
2. HouR deletes the remark from the list of remarks associated with the employee with the given employee id
and shows it to the user.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id or remark.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given employee id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Remark does not exist in the list of remarks associated with employee with given employee id.
* 1c1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Increase or decrease employee overtime hours**

**MSS**

1. User requests to increase number of overtime hours taken by employee with given employee id by a given amount.
2. HouR increases the number of overtime hours taken by employee with given employee id by the given amount.

Use case ends.

**Extensions**

* 1a. User leaves out at least one of employee id, operation (inc or dec), and amount.
* 1a1. HouR shows an error message.

Use case returns back to step 1.

* 1b. No employee matches given employee id.
* 1b1. HouR shows an error message.

Use case returns back to step 1.

* 1c. Operation given is neither inc (for increase) nor dec (for decrease).
* 1c1. HouR shows an error message.

Use case returns back to step 1.

* 1d. Amount given is not a positive integer.
* 1d1. HouR shows an error message.

Use case returns back to step 1.

* 1e. Updating the number of leaves causes the number to exceed 72 or fall below 0.
* 1e1. HouR shows an error message.

Use case returns back to step 1.

**Use case: Report employee**

**MSS**
Expand All @@ -1083,15 +1305,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case returns back to step 1.

**Use case: Clear employee book**

**MSS**

1. User requests to clear employee book
2. HouR clears employee book

Use case ends.

**Use case: Reset field of all employees**

**MSS**
Expand All @@ -1113,6 +1326,24 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case returns back to step 1.

**Use case: Clear employee book**

**MSS**

1. User requests to clear employee book
2. HouR clears employee book

Use case ends.

**Use case: Open help page**

**MSS**

1. User requests to open help page
2. HouR shows a link that the user can copy and paste on a browser

Use case ends.

**Use case: Exit HouR**

**MSS**
Expand All @@ -1122,7 +1353,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case ends.

*{More to be added}*

### Non-Functional Requirements

Expand Down Expand Up @@ -1610,9 +1840,10 @@ This project has been a very invaluable experience where we got to have a taste

One of the things that we are most proud of is the bettering of the UI. Though the change was not very extravagant, the change in colour scheme was a feat in itself since we honestly did not aim to care a lot about our UI. We also managed to add icons beside the employee attributes in each employee card which we believe made it more readable for the users.

Another feature we are proud of is our `report` feature that allows our users to generate reports as txt files for each employee. While it might not contain a lot of information yet, we believe that it was a great starting point considering the time-constraint we had for this project and we plan to extend and further develop this feature, improving the experience for our users.
Another feature we are proud of is our `report` feature that allows our users to generate reports as txt files for each employee. While it might not contain a lot of information yet, we believe that it was a great starting point considering the time-constraint we had for this project, and we plan to extend and further develop this feature, improving the experience for our users.

Overall, we are proud of our project, and we believe that we have done our best with all the constraints and challenges we faced. We are happy with the result and believe that our product will meet the needs of our target audience.

Overall, we are proud of our project and we believe that we have done our best with all the constraints and challenges we faced. We are happy with the result and believe that our product will meet the needs of our target audience.

## Planned Enhancements

Expand Down
10 changes: 5 additions & 5 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ HouR is a **desktop app for managing employee records, optimized for use via a C
- [Using this guide](#using-this-guide)
- [Useful Notations and Glossary](#useful-notations-and-glossary)
- [Quick Start](#quick-start)
- [Navigating the GUI](#navigating-the-graphical-user-interface--gui-)
- [Navigating the GUI](#navigating-the-gui)
- [Features](#features)
- [General Commands](#general-commands)
- [Viewing Help](#viewing-help--help): `help`
Expand Down Expand Up @@ -69,7 +69,7 @@ The following glossary table provides clarification on commonly-used terms as we
| Symbol | Meaning |
|:----------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| GUI | GUI stands for Graphical User Interface and it represents the visual display of HouR that users can see when the application is run. |
| GUI component | A subsection of the GUI. For more information on specific GUI components, refer to this [section](#navigating-the-graphical-user-interface--gui-). |
| GUI component | A subsection of the GUI. For more information on specific GUI components, refer to this [section](#navigating-the-gui). |
| CLI | CLI stands for Command Line Interface and it represents a text-based user interface to interact with the application. |
| Command | An input from the user that tells HouR to perform an action. View HouR's [command summary](#command-summary). |
| Parameter | Parameters are like fields in a form you are required to fill up. They are information needed to be passed together with the command so that it can be executed. More information regarding parameters can be found [here](#parameter-information). |
Expand Down Expand Up @@ -144,9 +144,9 @@ Performing these instructions may result in non-deterministic behaviour of data

--------------------------------------------------------------------------------------------------------------------

## Navigating the Graphical User Interface (GUI)
## Navigating the GUI

HouR comes with a GUI to allow for nice visual feedback for our users. Here is a quick run-through of the different sections of our GUI, as well as some notes regarding the use of the GUI.
HouR comes with a Graphical User Interface (GUI) to allow for nice visual feedback for our users. Here is a quick run-through of the different sections of our GUI, as well as some notes regarding the use of the GUI.

### Quick Orientation

Expand Down Expand Up @@ -323,7 +323,7 @@ Format: `list`

![list success](images/ug-pics/list.png)

### Finding employees: `find`
### Finding employees : `find`

Finds employees whose name, position, department, phone number, email, or ID contain any of the given keywords.

Expand Down
6 changes: 3 additions & 3 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR

user -[USER_COLOR]> ui : "delete 1"
user -[USER_COLOR]> ui : "delete EID1234-5678"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
ui -[UI_COLOR]> logic : execute("delete EID1234-5678")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deletePerson(p)
logic -[LOGIC_COLOR]> model : deleteEmployee(p)
activate model MODEL_COLOR

model -[MODEL_COLOR]-> logic
Expand Down
Binary file modified docs/images/ArchitectureSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8bc8534

Please sign in to comment.