forked from nus-cs2103-AY2324S1/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 #248 from AY2324S1-CS2103T-W12-1/v1.4-DeveloperGui…
…de-Update Add details of sort and delete leave in DG
- Loading branch information
Showing
10 changed files
with
479 additions
and
21 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,31 @@ | ||
@startuml | ||
'https://plantuml.com/activity-diagram-beta | ||
|
||
start | ||
:User inputs Delete Leave Command; | ||
|
||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid command format]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid ID]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid date format]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([no leave found between start and end dates]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([leaves found between start and end dates]) | ||
: Delete leaves found between start and end dates; | ||
endif | ||
endif | ||
endif | ||
endif | ||
endif | ||
|
||
stop | ||
|
||
@enduml |
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,72 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":DeleteLeaveCommandParser" as DeleteLeaveCommandParser LOGIC_COLOR | ||
participant "r:DeleteLeaveCommand" as DeleteLeaveCommand 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("deleteleave id/EID1234-5678 from/2023-11-01 to/2023-11-02") | ||
activate LogicManager | ||
|
||
LogicManager -> AddressBookParser : parseCommand("deleteleave id/EID1234-5678 from/2023-11-01 to/2023-11-02") | ||
activate AddressBookParser | ||
|
||
create DeleteLeaveCommandParser | ||
AddressBookParser -> DeleteLeaveCommandParser | ||
activate DeleteLeaveCommandParser | ||
|
||
DeleteLeaveCommandParser --> AddressBookParser | ||
deactivate DeleteLeaveCommandParser | ||
|
||
AddressBookParser -> DeleteLeaveCommandParser : parse("id/EID1234-5678 from/2023-11-01 to/2023-11-02") | ||
activate DeleteLeaveCommandParser | ||
|
||
create DeleteLeaveCommand | ||
DeleteLeaveCommandParser -> DeleteLeaveCommand | ||
activate DeleteLeaveCommand | ||
|
||
DeleteLeaveCommand --> DeleteLeaveCommandParser : r | ||
deactivate DeleteLeaveCommand | ||
|
||
DeleteLeaveCommandParser --> AddressBookParser : r | ||
deactivate DeleteLeaveCommandParser | ||
|
||
DeleteLeaveCommandParser -[hidden]-> AddressBookParser | ||
destroy DeleteLeaveCommandParser | ||
|
||
AddressBookParser --> LogicManager : r | ||
deactivate AddressBookParser | ||
|
||
LogicManager -> DeleteLeaveCommand : execute() | ||
activate DeleteLeaveCommand | ||
|
||
DeleteLeaveCommand -> Model : setEmployee(targetEmployee, editedEmployee) | ||
activate Model | ||
|
||
Model --> DeleteLeaveCommand | ||
|
||
DeleteLeaveCommand -> Model : updateFilteredEmployeeList() | ||
|
||
Model --> DeleteLeaveCommand | ||
deactivate Model | ||
|
||
create CommandResult | ||
DeleteLeaveCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> DeleteLeaveCommand | ||
deactivate CommandResult | ||
|
||
DeleteLeaveCommand --> LogicManager : result | ||
deactivate DeleteLeaveCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
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,23 @@ | ||
@startuml | ||
'https://plantuml.com/activity-diagram-beta | ||
|
||
start | ||
:User inputs Sort Command; | ||
|
||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid command format]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid field]) | ||
if () then ([else]) | ||
:Display error message; | ||
else ([Valid order]) | ||
: Sort all employees by specified field and order; | ||
endif | ||
endif | ||
endif | ||
|
||
stop | ||
|
||
@enduml |
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,88 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR | ||
participant ":SortCommandParser" as SortCommandParser LOGIC_COLOR | ||
participant "s:SortCommand" as SortCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
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 | ||
|
||
LogicManager -> AddressBookParser : parseCommand("sort f/salary in/asc") | ||
activate AddressBookParser | ||
|
||
create SortCommandParser | ||
AddressBookParser -> SortCommandParser | ||
activate SortCommandParser | ||
|
||
SortCommandParser --> AddressBookParser | ||
deactivate SortCommandParser | ||
|
||
AddressBookParser -> SortCommandParser : parse("f/salary in/asc") | ||
activate SortCommandParser | ||
|
||
create SortCommand | ||
SortCommandParser -> SortCommand | ||
activate SortCommand | ||
|
||
SortCommand --> SortCommandParser : s | ||
deactivate SortCommand | ||
|
||
SortCommandParser --> AddressBookParser : s | ||
deactivate SortCommandParser | ||
|
||
SortCommandParser -[hidden]-> AddressBookParser | ||
destroy SortCommandParser | ||
|
||
AddressBookParser --> LogicManager : s | ||
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 | ||
|
||
create CommandResult | ||
SortCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> SortCommand | ||
deactivate CommandResult | ||
|
||
SortCommand --> LogicManager : result | ||
deactivate SortCommand | ||
|
||
[<--LogicManager | ||
deactivate LogicManager | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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