Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AY2324S1-CS2103T-W12-1/tp
Browse files Browse the repository at this point in the history
…into v1.4-jasonray168-PPP-Update
  • Loading branch information
JasonRay168 committed Nov 13, 2023
2 parents 08aa0b6 + ee41728 commit 4786008
Show file tree
Hide file tree
Showing 30 changed files with 1,117 additions and 762 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![CI Status](https://github.com/AY2324S1-CS2103T-W12-1/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2103T-W12-1/tp/actions)

![Ui](docs/images/ug-pics/Ui.png)
![Ui](docs/images/Ui.png)

* The project simulates an ongoing software project for a desktop application (called _HouR_) used for managing employee records.
* It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
* It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 12 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
* It comes with a **reasonable level of user and developer documentation**.
* It is named `HouR` because it was created with the aim of helping HR personnels handle their data efficiently.
* For the detailed documentation of this project, see the **[HouR Product Website](https://ay2324s1-cs2103t-w12-1.github.io/tp/)**.
Expand Down
1,513 changes: 891 additions & 622 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

84 changes: 46 additions & 38 deletions docs/UserGuide.md

Large diffs are not rendered by default.

41 changes: 11 additions & 30 deletions docs/diagrams/AddActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,18 @@ start
:User inputs add command;

if () then ([else])
:Display error message;
:Display error message;
else ([Valid command format])
if () then ([else])
:Display error message;
else ([Valid and unique employee ID])
if () then ([else])
:Display error message;
else ([Valid name])
if () then ([else])
:Display error message;
else ([Valid position])
if () then ([else])
:Display error message;
else ([Valid email])
if () then ([else])
:Display error message;
else ([Valid phone number])
if () then ([else])
:Display error message;
else ([Valid salary])
if () then ([else])
:Display error message;
else ([Valid department(s) if present])
:Add employee to employee list;
:Display success message;
endif
endif
endif
endif
endif
endif
if () then ([else])
:Display error message;
else ([Valid and unique employee ID])
if () then ([else])
:Display error message;
else ([Valid employee fields])

:Add employee to employee list;
:Display success message;
endif
endif
endif
stop
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
27 changes: 16 additions & 11 deletions docs/diagrams/BetterModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

AddressBook *-right-> "1" UniquePersonList
AddressBook *-right-> "1" UniqueTagList
UniqueTagList -[hidden]down- UniquePersonList
UniqueTagList -[hidden]down- UniquePersonList
AddressBook *-right-> "1" UniqueEmployeeList
AddressBook *-right-> "1" UniqueDepartmentList
UniqueDepartmentList -[hidden]down- UniqueEmployeeList
UniqueDepartmentList -[hidden]down- UniqueEmployeeList

UniqueTagList -right-> "*" Tag
UniquePersonList -right-> Person
UniqueDepartmentList -right-> "*" Department
UniqueEmployeeList -right-> Employee

Person -up-> "*" Tag
Employee -up-> "*" Department

Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Employee *--> Name
Employee *--> Position
Employee *--> Id
Employee *--> Phone
Employee *--> Email
Employee *--> Salary
Employee *--> LeaveList
Employee *--> OvertimeHours
Employee *--> RemarkList
@enduml
44 changes: 27 additions & 17 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ Class AddressBook
Class ModelManager
Class UserPrefs

Class UniquePersonList
Class Person
Class Address
Class UniqueEmployeeList
Class Employee
Class Id
Class Email
Class Name
Class Phone
Class Tag
Class Position
Class Salary
Class LeaveList
Class OvertimeHours
Class RemarkList
Class Department

Class I #FFFFFF
}
Expand All @@ -35,20 +40,25 @@ ModelManager -left-> "1" AddressBook
ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs

AddressBook *--> "1" UniquePersonList
UniquePersonList --> "~* all" Person
Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> Address
Person *--> "*" Tag
AddressBook *--> "1" UniqueEmployeeList
UniqueEmployeeList --> "~* all" Employee
Employee *--> Name
Employee *--> Phone
Employee *--> Email
Employee *--> Id
Employee *--> Position
Employee *--> Salary
Employee *--> LeaveList
Employee *--> OvertimeHours
Employee *--> RemarkList
Employee *--> "*" Department

Person -[hidden]up--> I
UniquePersonList -[hidden]right-> I
Employee -[hidden]up--> I
UniqueEmployeeList -[hidden]right-> I

Name -[hidden]right-> Phone
Phone -[hidden]right-> Address
Address -[hidden]right-> Email
Name -[hidden]right-> Position
Id -[hidden]right-> Phone
Phone -[hidden]right-> Email

ModelManager --> "~* filtered" Person
ModelManager --> "~* filtered" Employee
@enduml
24 changes: 24 additions & 0 deletions docs/diagrams/OvertimeActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml
'https://plantuml.com/activity-diagram-beta

start
:User inputs overtime command;

if () then ([else])
:Display error message;
else ([valid command])
if () then ([else])
:Display error message;
else ([valid ID])
if () then ([else])
:Display error message;
else ([valid operation])
if () then ([else])
:Display error message;
else ([valid amount])
:Update employee's overtime hours;
:Display overtime success message;
endif
endif

@enduml
72 changes: 72 additions & 0 deletions docs/diagrams/OvertimeSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@startuml
!include style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":OvertimeCommandParser" as OvertimeCommandParser LOGIC_COLOR
participant "r:OvertimeCommand" as OvertimeCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute("overtime id/EID1234-5678 o/inc a/2")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("overtime id/EID1234-5678 o/inc a/2")
activate AddressBookParser

create OvertimeCommandParser
AddressBookParser -> OvertimeCommandParser
activate OvertimeCommandParser

OvertimeCommandParser --> AddressBookParser
deactivate OvertimeCommandParser

AddressBookParser -> OvertimeCommandParser : parse("overtime id/EID1234-5678 o/inc a/2")
activate OvertimeCommandParser

create OvertimeCommand
OvertimeCommandParser -> OvertimeCommand
activate OvertimeCommand

OvertimeCommand --> OvertimeCommandParser : r
deactivate OvertimeCommand

OvertimeCommandParser --> AddressBookParser : r
deactivate OvertimeCommandParser

OvertimeCommandParser -[hidden]-> AddressBookParser
destroy OvertimeCommandParser

AddressBookParser --> LogicManager : r
deactivate AddressBookParser

LogicManager -> OvertimeCommand : execute()
activate OvertimeCommand

OvertimeCommand -> Model : setEmployee(employeeToUpdate, updatedEmployee)
activate Model

Model --> OvertimeCommand

OvertimeCommand -> Model : updateFilteredEmployeeList()

Model --> OvertimeCommand
deactivate Model

create CommandResult
OvertimeCommand -> CommandResult
activate CommandResult

CommandResult --> OvertimeCommand
deactivate CommandResult

OvertimeCommand --> LogicManager : result
deactivate OvertimeCommand

[<--LogicManager
deactivate LogicManager
@enduml
20 changes: 0 additions & 20 deletions docs/diagrams/SortSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
participant ":AddressBook" as AddressBook MODEL_COLOR
participant ":UniqueEmployeeList" as UniqueEmployeeList MODEL_COLOR
end box
[-> LogicManager : execute("sort f/salary in/asc")
activate LogicManager
Expand Down Expand Up @@ -49,27 +47,9 @@ deactivate AddressBookParser
LogicManager -> SortCommand : execute()
activate SortCommand

SortCommand -> SortCommand : handleSortingOrder(model, "salary", "asc")
activate SortCommand

SortCommand --> SortCommand
deactivate SortCommand

SortCommand -> Model : updateSortedEmployeeListAscending("salary");
activate Model

Model -> AddressBook : updateSortedEmployeeListAscending("salary")
activate AddressBook

AddressBook -> UniqueEmployeeList : sortEmployeesAscending("salary");
activate UniqueEmployeeList

UniqueEmployeeList --> AddressBook
deactivate UniqueEmployeeList

AddressBook --> Model
deactivate AddressBook

Model --> SortCommand
deactivate Model

Expand Down
12 changes: 8 additions & 4 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ package "AddressBook Storage" #F4F6F6{
Class "<<interface>>\nAddressBookStorage" as AddressBookStorage
Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedPerson
Class JsonAdaptedTag
Class JsonAdaptedEmployee
Class JsonAdaptedDepartment
Class JsonAdaptedLeave
Class JsonAdaptedRemark
}

}
Expand All @@ -37,7 +39,9 @@ Storage -right-|> AddressBookStorage
JsonUserPrefsStorage .up.|> UserPrefsStorage
JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedPerson
JsonAdaptedPerson --> "*" JsonAdaptedTag
JsonSerializableAddressBook --> "*" JsonAdaptedEmployee
JsonAdaptedEmployee --> "*" JsonAdaptedDepartment
JsonAdaptedEmployee --> "*" JsonAdaptedLeave
JsonAdaptedEmployee --> "*" JsonAdaptedRemark

@enduml
16 changes: 8 additions & 8 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
Class PersonListPanel
Class PersonCard
Class EmployeeListPanel
Class EmployeeCard
Class StatusBarFooter
Class CommandBox
}
Expand All @@ -32,26 +32,26 @@ UiManager .left.|> Ui
UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" PersonListPanel
MainWindow *-down-> "1" EmployeeListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow

PersonListPanel -down-> "*" PersonCard
EmployeeListPanel -down-> "*" EmployeeCard

MainWindow -left-|> UiPart

ResultDisplay --|> UiPart
CommandBox --|> UiPart
PersonListPanel --|> UiPart
PersonCard --|> UiPart
EmployeeListPanel --|> UiPart
EmployeeCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart

PersonCard ..> Model
EmployeeCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic

PersonListPanel -[hidden]left- HelpWindow
EmployeeListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
ResultDisplay -[hidden]left- StatusBarFooter
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/UndoRedoState1.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
skinparam ClassBackgroundColor #FFFFAA

title After command "delete 5"
title After command "delete EID1234-5678"

package States <<rectangle>> {
class State1 as "<u>ab0:AddressBook</u>"
Expand Down
2 changes: 1 addition & 1 deletion docs/diagrams/UndoRedoState2.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skinparam ClassFontColor #000000
skinparam ClassBorderColor #000000
skinparam ClassBackgroundColor #FFFFAA

title After command "add n/David"
title After command "add n/David..."

package States <<rectangle>> {
class State1 as "<u>ab0:AddressBook</u>"
Expand Down
Binary file modified docs/images/AddActivityDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Binary file modified docs/images/BetterModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/ModelClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/OvertimeActivityDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/OvertimeSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/SortSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/StorageClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified docs/images/UiClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/UndoRedoState1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/UndoRedoState2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4786008

Please sign in to comment.