forked from nus-cs2103-AY2223S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316 from pkwangjoo/branch-ldhc-llbd-dg-diagrams
Branch ldhc llbd dg diagrams
- Loading branch information
Showing
6 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
docs/diagrams/commands/department/ListDepartmentHeadcountActivityDiagram.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@startuml | ||
!pragma useVerticalIf on | ||
start | ||
:User enters ldhc command; | ||
if () then ([else]) | ||
:Error: Invalid command format; | ||
([Command format is valid])elseif () then ([else]) | ||
:Error: Department does not exist in SudoHR; | ||
([Department exists in SudoHr]) elseif () then ([else])) | ||
: Error: Invalid date; | ||
else ([Date is not given or given date is valid]) | ||
:ldhc command successfully executes.; | ||
endif | ||
stop | ||
|
||
@enduml |
106 changes: 106 additions & 0 deletions
106
docs/diagrams/commands/department/ListDepartmentHeadcountSequenceDiagram.puml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
@startuml | ||
!include ../../style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":SudoHrParser" as SudoHrParser LOGIC_COLOR | ||
participant ":ListDepartmentHeadcountCommandParser" as ListDepartmentHeadcountCommandParser LOGIC_COLOR | ||
participant ":ListDepartmentHeadcountCommand" as ListDepartmentHeadcountCommand LOGIC_COLOR | ||
participant "departmentName:DepartmentName" as DepartmentName LOGIC_COLOR | ||
participant "leaveDate:LeaveDate" as LeaveDate LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
box Model MODEL_COLOR_T1 | ||
participant "model:Model" as Model MODEL_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("ldhc d/2023-04-10 n/Human Resources") | ||
activate LogicManager | ||
|
||
LogicManager -> SudoHrParser : parseCommand("ldhc d/2023-04-10 n/Human Resources") | ||
activate SudoHrParser | ||
|
||
create ListDepartmentHeadcountCommandParser | ||
SudoHrParser -> ListDepartmentHeadcountCommandParser | ||
activate ListDepartmentHeadcountCommandParser | ||
|
||
ListDepartmentHeadcountCommandParser --> SudoHrParser | ||
deactivate ListDepartmentHeadcountCommandParser | ||
|
||
SudoHrParser -> ListDepartmentHeadcountCommandParser: parse("d/2023-04-10 n/Human Resources") | ||
activate ListDepartmentHeadcountCommandParser | ||
|
||
create DepartmentName | ||
ListDepartmentHeadcountCommandParser -> DepartmentName | ||
activate DepartmentName | ||
|
||
DepartmentName --> ListDepartmentHeadcountCommandParser | ||
deactivate DepartmentName | ||
|
||
create ListDepartmentHeadcountCommand | ||
ListDepartmentHeadcountCommandParser -> ListDepartmentHeadcountCommand | ||
activate ListDepartmentHeadcountCommand | ||
|
||
ListDepartmentHeadcountCommand --> ListDepartmentHeadcountCommandParser | ||
deactivate ListDepartmentHeadcountCommand | ||
|
||
ListDepartmentHeadcountCommandParser --> SudoHrParser | ||
deactivate ListDepartmentHeadcountCommandParser | ||
|
||
ListDepartmentHeadcountCommandParser -[hidden]-> SudoHrParser | ||
destroy ListDepartmentHeadcountCommandParser | ||
|
||
SudoHrParser --> LogicManager | ||
deactivate SudoHrParser | ||
|
||
LogicManager -> ListDepartmentHeadcountCommand : execute(model) | ||
activate ListDepartmentHeadcountCommand | ||
|
||
ListDepartmentHeadcountCommand -> Model : getDepartment(departmentName) | ||
activate Model | ||
|
||
Model --> ListDepartmentHeadcountCommand | ||
deactivate Model | ||
|
||
create LeaveDate | ||
ListDepartmentHeadcountCommand -> LeaveDate | ||
activate LeaveDate | ||
|
||
LeaveDate --> ListDepartmentHeadcountCommand | ||
deactivate LeaveDate | ||
|
||
ListDepartmentHeadcountCommand -> Model: getLeave(leaveDate) | ||
activate Model | ||
|
||
Model --> ListDepartmentHeadcountCommand | ||
deactivate Model | ||
|
||
|
||
ListDepartmentHeadcountCommand -> Model : updateFilteredDepartmentList | ||
activate Model | ||
|
||
Model --> ListDepartmentHeadcountCommand | ||
deactivate Model | ||
|
||
ListDepartmentHeadcountCommand -> Model: updateFilteredEmployeeList | ||
activate Model | ||
|
||
Model --> ListDepartmentHeadcountCommand | ||
deactivate Model | ||
|
||
|
||
|
||
create CommandResult | ||
ListDepartmentHeadcountCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> ListDepartmentHeadcountCommand | ||
deactivate CommandResult | ||
|
||
ListDepartmentHeadcountCommand --> LogicManager : result | ||
deactivate ListDepartmentHeadcountCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Binary file added
BIN
+22.2 KB
docs/images/commands/department/ListDepartmentHeadcountActivityDiagram.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
BIN
+63.9 KB
docs/images/commands/department/ListDepartmentHeadcountSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters