Skip to content

Commit

Permalink
Merge pull request #125 from xinen26/DG-update
Browse files Browse the repository at this point in the history
Update DG
  • Loading branch information
ys112 authored Apr 4, 2024
2 parents 8ff05d9 + 906640d commit 6232c48
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
10 changes: 8 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The **API** of this component is specified in [`Ui.java`](https://github.com/se-

![Structure of the UI Component](images/UiClassDiagram.png)

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.
The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `RoleListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.

The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)

Expand Down Expand Up @@ -175,7 +175,7 @@ to maximize the benefits of inheritance.
* In the `JsonAdaptedPerson` class, subtype declarators are used to declare the inheritance relationship between person
and applicant, hence it can store and differentiate applicants from person when retrieved.
* There is also an input checker reminding users to not declare `/stage` (if they did) as newly added applicants are
assumed to be at the `'initial_application'` stage.
assumed to be at the `'Initial Application'` stage.
* Instance check are done for `Applicant` at `personListPanel` to ensure the applicant card gets displayed and
`JsonSerializableAddressBook` class to ensure the person objects that are `Applicant` are casted accordingly.

Expand All @@ -186,6 +186,12 @@ assumed to be at the `'initial_application'` stage.
### \[Developed\] Edit applicant feature
The `edit` command gives users the ability to edit the applicants' details. The details that can be edited include `Name`, `Phone`, `Email`, `Address`, `Stage`, `Role`, `Note` and `Tag`. Note that at least one field has to be chosen.

#### How the feature is implemented
* The `edit` is implemented using the `EditApplicantCommand`, `EditApplicantDescriptor` and `EditApplicantCommandParser` classes.
* The `EditApplicantCommand` receives an index of the applicant to be edited and an EditApplicantDescriptor class which consists of the updated fields of the applicant.
* Note that checks will be done on the fields that the user want to input to ensure is valid. For example, `Stage` can only be one of the four forms `Initial Application`, `Technical Assessment`, `Interview`, `Decision & Offer`. Hence, if user was to input `edit 1 /stage WaitListed`, this will not be possible and the applicant will not be edited.
* Similarly, a check will be done to ensure that the index is valid.

![EditSequenceDiagram](images/EditSequenceDiagram.png)

### \[Developed\] Note feature
Expand Down
6 changes: 3 additions & 3 deletions docs/diagrams/EditSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("edit 2 /stage waitlisted")
[-> LogicManager : execute("edit 2 /stage Interview")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("edit 2 /stage waitlisted")
LogicManager -> AddressBookParser : parseCommand("edit 2 /stage Interview")
activate AddressBookParser

create EditApplicantCommandParser
Expand All @@ -27,7 +27,7 @@ activate EditApplicantCommandParser
EditApplicantCommandParser --> AddressBookParser
deactivate EditApplicantCommandParser

AddressBookParser -> EditApplicantCommandParser : parse("2 /stage waitlisted"")
AddressBookParser -> EditApplicantCommandParser : parse("2 /stage Interview"")
activate EditApplicantCommandParser

create EditApplicantCommand
Expand Down
8 changes: 8 additions & 0 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Class HelpWindow
Class ResultDisplay
Class PersonListPanel
Class PersonCard
Class RoleListPanel
Class RoleCard
Class ApplicantCard
Class StatusBarFooter
Class CommandBox
Expand All @@ -34,26 +36,32 @@ UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" PersonListPanel
MainWindow *-down-> "1" RoleListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow

PersonListPanel -down-> "*" PersonCard
PersonListPanel -down-> "*" ApplicantCard
RoleListPanel -down-> "*" RoleCard

MainWindow -left-|> UiPart

ResultDisplay --|> UiPart
CommandBox --|> UiPart
PersonListPanel --|> UiPart
PersonCard --|> UiPart
RoleListPanel --|> UiPart
RoleCard --|> UiPart
ApplicantCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart

PersonCard ..> Model
ApplicantCard ..> Model
RoleCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic
RoleListPanel -left-> Logic

PersonListPanel -[hidden]left- HelpWindow
HelpWindow -[hidden]left- CommandBox
Expand Down
Binary file modified docs/images/EditSequenceDiagram.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/UiClassDiagram.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 6232c48

Please sign in to comment.