Skip to content

Commit

Permalink
Merge pull request #320 from jerrrren/jerren-DG-update
Browse files Browse the repository at this point in the history
Jerren dg update
  • Loading branch information
kennethk-1201 authored Apr 10, 2023
2 parents c27a53f + 18430d2 commit 9c7c435
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ Sequence Diagram:
##### Flow

1. The user types and enters the command `aelr eid/1 s/2022-03-04 e/2022-03-06` where 1 is the employee id, 2022-03-04 is the start date and 2022-03-06 is the end date.
2. The parser checks that the end date `e/` is after the start date represented by `s/`.The end date `e/` also must be less than 7 days away from the start date `s/`. If both conditions are not satisfied, an error message will be shown.
2. The parser checks that the end date `e/` is not before the start date represented by `s/`.The end date `e/` also must be less than 7 days away from the start date `s/`. If both conditions are not satisfied, an error message will be shown.
3. The parser would instantiate a `Id` constructed from the input of argument `eid/` and a list of `LeaveDate` objects representing every single day in the range between `s/` and `e/` with the end and start dates inclusive.
4. The `Id` and list of `LeaveDate` are passed down to the newly created command.
5. The command is executed. The command first tries to find the `Employee` with ID 1. If the `Employee` does not exist, an error message will be displayed.
Expand Down
15 changes: 1 addition & 14 deletions docs/diagrams/commands/leaves/AddEmployeeToLeave.puml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,12 @@ destroy AddEmployeeToLeaveCommandParser
SudoHrParser --> LogicManager : a
deactivate SudoHrParser

LogicManager -> AddEmployeeToLeaveCommand : execute()
LogicManager -> AddEmployeeToLeaveCommand : execute(model)
activate AddEmployeeToLeaveCommand

AddEmployeeToLeaveCommand -> Model : addEmployeeToLeave(1,2022-03-04)
activate Model

Model --> AddEmployeeToLeaveCommand
deactivate Model

AddEmployeeToLeaveCommand -> Model : updateFilteredEmployeeList
activate Model

Model --> AddEmployeeToLeaveCommand
deactivate Model

AddEmployeeToLeaveCommand -> Model : updateFilteredLeaveList
activate Model


Model --> AddEmployeeToLeaveCommand
deactivate Model

Expand Down
15 changes: 1 addition & 14 deletions docs/diagrams/commands/leaves/AddEmployeeToLeaveFromTo.puml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ destroy AddEmployeeToLeaveFromToCommandParser
SudoHrParser --> LogicManager : a
deactivate SudoHrParser

LogicManager -> AddEmployeeToLeaveFromToCommand : execute()
LogicManager -> AddEmployeeToLeaveFromToCommand : execute(model)
activate AddEmployeeToLeaveFromToCommand

loop 4 times
Expand All @@ -56,19 +56,6 @@ Model --> AddEmployeeToLeaveFromToCommand
deactivate Model
end

AddEmployeeToLeaveFromToCommand -> Model : updateFilteredEmployeeList
activate Model

Model --> AddEmployeeToLeaveFromToCommand
deactivate Model

AddEmployeeToLeaveFromToCommand -> Model : updateFilteredLeaveList
activate Model


Model --> AddEmployeeToLeaveFromToCommand
deactivate Model

create CommandResult
AddEmployeeToLeaveFromToCommand -> CommandResult
activate CommandResult
Expand Down
14 changes: 1 addition & 13 deletions docs/diagrams/commands/leaves/DeleteEmployeeFromLeave.puml
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,13 @@ destroy DeleteEmployeeFromLeaveCommandParser
SudoHrParser --> LogicManager : d
deactivate SudoHrParser

LogicManager -> DeleteEmployeeFromLeaveCommand : execute()
LogicManager -> DeleteEmployeeFromLeaveCommand : execute(model)
activate DeleteEmployeeFromLeaveCommand

DeleteEmployeeFromLeaveCommand -> Model : deleteEmployeeFromLeave(1,2022-03-04)
activate Model


Model --> DeleteEmployeeFromLeaveCommand
deactivate Model

DeleteEmployeeFromLeaveCommand -> Model : updateFilteredEmployeeList
activate Model

Model --> DeleteEmployeeFromLeaveCommand
deactivate Model

DeleteEmployeeFromLeaveCommand -> Model : updateFilteredLeaveList
activate Model

Model --> DeleteEmployeeFromLeaveCommand
deactivate Model

Expand Down
Binary file modified docs/images/commands/leave/AddEmployeeToLeave.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/commands/leave/AddEmployeeToLeaveFromTo.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/commands/leave/DeleteEmployeeFromLeave.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 9c7c435

Please sign in to comment.