Skip to content

Commit

Permalink
Merge pull request #175 from Benson15912/branch-updateDG
Browse files Browse the repository at this point in the history
Update DG
  • Loading branch information
YowSiaoKang authored Apr 14, 2024
2 parents aa3f0c8 + 83436d9 commit 231779f
Show file tree
Hide file tree
Showing 11 changed files with 653 additions and 159 deletions.
699 changes: 563 additions & 136 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions docs/diagrams/AssignActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@startuml
skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
start
:User assigns a volunteer;
:Parse arguments;
if () then ([Invalid arguments])
#red:Shows error message;
else ([Valid Arguments])
:Check whether volunteer is available on that day;
if () then ([Volunteer not available])
#red:Shows error message;

else ([Volunteer available])
:Check whether volunteer already has an assignment on that day;
if () then ([Already has an assignment])
#red:Shows error message;

else ([No assignments])
:Check for duplicate assignments;
if () then ([Duplicate assignments])
#red:Shows error message;

else ([No duplicate assignments])
#green:Create assignment and add;
endif
endif
endif
endif
stop
@enduml
17 changes: 17 additions & 0 deletions docs/diagrams/AssignmentClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

Package Assignment as ModelPackage <<Rectangle>>{
Class Person
Class Availability
Class Assignment
Class AssignmentDetails
Class I #FFFFFF
}
Assignment *--> "1" Person
Assignment *--> "1" AssignmentDetails
Assignment *--> "1" Availability
@enduml
33 changes: 11 additions & 22 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ Class UserPrefs

Class UniquePersonList
Class Person
Class Email
Class Name
Class Phone
Class Availability
Class Tag


Class AssignmentList
Class Assignment
Class AssignmentDetails


Class I #FFFFFF
}
Expand All @@ -35,30 +31,23 @@ AddressBook .up.|> ReadOnlyAddressBook
ModelManager .up.|> Model
Model .right.> ReadOnlyUserPrefs
Model .left.> ReadOnlyAddressBook
ModelManager -left-> "1" AddressBook
ModelManager -down-> "1" AddressBook
ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs

AddressBook *--> "1" UniquePersonList
AddressBook *--> "1" AssignmentList
UniquePersonList --> "*" Person
Person *--> Name
Person *--> Phone
Person *--> Email
Person *--> "*" Availability
Person *--> "*" Tag
AddressBook *-down-> "1" UniquePersonList
AddressBook *-down-> "1" AssignmentList
UniquePersonList -down--> "*" Person

AssignmentList *--> "*" Assignment
Assignment *--> "1"Person
Assignment *--> "1" AssignmentDetails
Assignment *--> "1" Availability

AssignmentList -down--> "*" Assignment
Assignment -left--> "1"Person

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

Name -[hidden]right-> Phone
Phone -[hidden]right-> Email
Email -[hidden]right-> Availability


ModelManager --> "~* filtered" Person
ModelManager --> "~* filtered" Assignment
@enduml
25 changes: 25 additions & 0 deletions docs/diagrams/PersonClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR

Package Person as ModelPackage <<Rectangle>>{
Class Person
Class Email
Class Name
Class Phone
Class Availability
Class Tag
Class I #FFFFFF
}

Person *--> "1"Name
Person *--> "1"Phone
Person *--> "1"Email
Person *--> "*" Availability
Person *--> "*" Tag
Name -[hidden]right-> Phone
Phone -[hidden]right-> Email
Email -[hidden]right-> Availability
@enduml
Binary file added docs/images/AssignActivityDiagram.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/AssignmentClassDiagram.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/PersonClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CommandResult {
private final boolean exit;

/** Application List Panel Selection */

// ListPanelView to switch views is inspired by https://github.com/AY2324S1-CS2103T-W08-4/tp
public enum ListPanelView {
NO_EFFECT,
PERSON,
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ private void setWindowDefaultSize(GuiSettings guiSettings) {
}
}

//@@author Benson15912 - reused and modified
//Reused from https://github.com/AY2324S1-CS2103T-W08-4/tp
// with minor modifications
/**
* Sets the display of the panel between Assignments and Person
* @param display
Expand All @@ -159,6 +162,7 @@ private void handleListPanel(CommandResult.ListPanelView display) {
}
}

//@@author
/**
* Opens the help window or focuses on it if it's already opened.
*/
Expand Down

0 comments on commit 231779f

Please sign in to comment.