Skip to content

Commit

Permalink
Merge branch 'master' into update-add-UG
Browse files Browse the repository at this point in the history
  • Loading branch information
McNaBry authored Nov 2, 2023
2 parents a53069d + 3847bff commit 3ed7743
Show file tree
Hide file tree
Showing 27 changed files with 631 additions and 116 deletions.
37 changes: 37 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,43 @@ The following activity diagram summarizes what happens when a user executes a ne

_{Explain here how the data archiving feature will be implemented}_

### Apply feature
The apply feature makes use of existing structures to function, notably the `Parser`, `Model` and `Storage`

The following sequence diagram shows how job applications are added to Jobby

<img src="images/apply-command/ApplyCommand.png">

#### Design Considerations
**Aspect: How to store applications**

* **Actual: Applications are stored as a JSON array belonging to their respective organizations**
* Pros: Easy to implement
* Cons: Need to initialise a list of job applications from every organization every time on startup.

* **Alternative 1: Applications are stored as a JSON array separate from the contacts**
* Pros: Applications can be loaded immediately into Jobby without waiting for organizations to be initialised.
* Cons: Can have complications on other features, such as identifying which applications belong to which organizations.

**Aspect: How to show applications**

* **Actual: Applications are shown on a separate list**
* Pros: Easy to implement, less command needed to switch view from split view.
* Cons: Requires syncing the list with organizations, since there is no guarantee that the applications in the UI list are the same as all the ones in organizations.

* **Alternative 1: Use a command to switch list view**
* Pros: More compact, does not require larger screen size.
* Cons: More difficult to implement, requires a command that directly changes the UI.

**Aspect: What should the command syntax be**

* **Actual: Use a separate command for adding applications**
* Pros: Easier to type out the command, does not require a lot of typing.
* Cons: More implementation effort, to implement a new command with new parser.
* **Alternative 1: Reuse add command**
* Pros: Easier to implement, can make use of existing structures surrounding the add command.
* Cons: Overloading the add command too much.


--------------------------------------------------------------------------------------------------------------------

Expand Down
72 changes: 41 additions & 31 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ Acceptable Parameters:

* `ADDRESS` can accept any value. It designates the contact’s physical address.

* `STATUS` must be one of _interested, applied, pending, offered, rejected, current_ (case-insensitive, prefix-only match allowed).

* `POSITION` may be any value. It designates the position you intend to apply to.

* `TAG` can accept any value and may have multiple inputs.


Expand All @@ -122,7 +118,7 @@ Examples:

* `add --org --name Example --url www.organization.org --tag freelance`

* `add --org --name Examinations NUS --phone 65166269 --email [email protected] --url https://luminus.nus.edu.sg/ --stat pending`
* `add --org --name Examinations NUS --phone 65166269 --email [email protected] --url https://luminus.nus.edu.sg/`


#### Adding a recruiter contact: `add --rec`
Expand Down Expand Up @@ -240,20 +236,6 @@ Jobby data are saved automatically as a JSON file `[JAR file location]/data/jobb
If your changes to the data file makes its format invalid, Jobby will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
</div>

### Applying to an organization: `Apply`

Format: `add index/ id <additional parameters and values...>`


App a contact to the address book of the given class type: Organization or Recruiter.

Applying to a Organization by indicating it with the organization's index in the address book or the organization's unique id.

This can be done by supplying the organization's `index` or `id` as the preamble.

Details specifically will be explained the next sections.


#### Applying to an Organization: `apply`

Format: `apply INDEX/ID --title TITLE [--desc DESCRIPTION] [--by DEADLINE: DD-MM-YYYY] [--stage APPLICATION STAGE: resume | online assessment | interview] [--stat STATUS: pending | offered | accepted | turned down]`
Expand Down Expand Up @@ -306,24 +288,52 @@ Examples:
* `edit --application 1 --stat rejected`
* `edit --application 1 --stage interview`

### Sort `sort`
### Sorting contacts/job applications: `sort`
Sorts contacts or applications by the specified flag.

Format: `sort --FLAG_TO_SORT`

* Currently only the following sorting functions are supported:
* For contacts:
* `--addr`
* `--email`
* `--name`
* `--id`
* `--phone`
* `--url`
* For job applications
* `--stale`: Sorts by last updated applications
The following sorting flags are supported:
* For contacts:
* `--address`
* `--email`
* `--name`
* `--id`
* `--phone`
* `--url`
* For job applications:
* `--deadline`: Sorts by application deadline
* `--stage`: Sorts by application stage
* `--stale`: Sorts by last updated applications
* `--status`: Sorts by application status
* `--title`: Sorts by job title
* To reset the sorting arrangement:
* `--none`

Supplying `--ascending` or `--descending` sorts the contacts or applications in the specified order.
If not specified, the default order is used:
* Chronological (for deadlines)
* According to the stage/status order (for application stages and statuses)
* Alphabetical (for the rest)
Neither order flag may be supplied if `-none` is the specified sorting flag.

Examples:
* `sort --name`
* `sort --deadline --descending`
* `sort --title --ascending`
* `sort --none`

### Reminding about deadlines: `remind`
Reminds the user of upcoming deadlines for job applications.

Format: `remind --earliest/--latest`

Specifying `--earliest` will list the application deadlines in order of urgency, from earliest to latest.
Specifying `--latest` will list the application deadlines in order of reverse urgency, from latest to earliest.

Examples:
* `remind --earliest`
* `remind --latest`
--------------------------------------------------------------------------------------------------------------------

## FAQ
Expand All @@ -343,7 +353,7 @@ Format: `sort --FLAG_TO_SORT`

Action | Format, Examples
----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Add Organization** | `add --org --name <NAME> [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--stat STATUS] [--pos POSITION] [--tag TAG]...`<br> e.g., `add --org --name NUS --phone 0123456789 --email [email protected] --url https://www.nus.edu.sg/ --stat pending --pos Research`
**Add Organization** | `add --org --name <NAME> [--id ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`<br> e.g., `add --org --name NUS --phone 0123456789 --email [email protected] --url https://www.nus.edu.sg/`
**Add Recruiter** | `add --rec --name <NAME> [--id ID] [--oid ORG_ID] [--phone NUMBER] [--email EMAIL] [--url URL] [--addr ADDRESS] [--tag TAG]...`<br> e.g., `add --rec --name John Doe --oid paypal-sg`
**Clear** | `clear`
**Delete** | `delete INDEX [--recursive]` or <br> `delete --id ID [--recursive]` <br> e.g., `delete 3`, `delete --id 55tg`
Expand Down
6 changes: 6 additions & 0 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Class Url
Class Phone
Class Tag

Class JobApplicationList
Class JobApplication

Class I #FFFFFF
}

Expand All @@ -47,6 +50,9 @@ Contact *--> Url
Contact *--> Address
Contact *--> "*" Tag

ModelManager *-down-> "1" JobApplicationList
JobApplicationList -down-> "*" JobApplication

Contact -[hidden]up--> I
UniqueContactList -[hidden]right-> I

Expand Down
2 changes: 2 additions & 0 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Class "<<interface>>\nAddressBookStorage" as AddressBookStorage
Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedContact
Class JsonAdaptedApplication
Class JsonAdaptedTag
}

Expand All @@ -39,5 +40,6 @@ JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedContact
JsonAdaptedContact --> "*" JsonAdaptedTag
JsonAdaptedContact --> "*" JsonAdaptedApplication

@enduml
13 changes: 12 additions & 1 deletion docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ Class HelpWindow
Class ResultDisplay
Class ContactListPanel
Class ContactCard
Class ApplicationListPanel
Class ApplicationCard
Class StatusBarFooter
Class CommandBox
Class AutoCompleteTextField
}

package Model <<Rectangle>> {
Expand All @@ -33,25 +36,33 @@ UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" ContactListPanel
MainWindow *-down-> "1" ApplicationListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow

ContactListPanel -down-> "*" ContactCard
ApplicationListPanel -down-> "*" ApplicationCard
CommandBox -down-> "0..1" AutoCompleteTextField

MainWindow -left-|> UiPart
MainWindow --|> UiPart

ResultDisplay --|> UiPart
CommandBox --|> UiPart
ContactListPanel --|> UiPart
ContactCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart
AutoCompleteTextField --|> UiPart
ApplicationListPanel --|> UiPart
ApplicationCard --|> UiPart

ContactCard ..> Model
ApplicationCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic

ContactListPanel -[hidden]left- HelpWindow
ApplicationListPanel -[hidden]left- ContactListPanel
HelpWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
ResultDisplay -[hidden]left- StatusBarFooter
Expand Down
70 changes: 70 additions & 0 deletions docs/diagrams/apply-command/ApplyCommand.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AppParser" as AddressBookParser LOGIC_COLOR
participant ":ApplyCommandParser" as ApplyCommandParser LOGIC_COLOR
participant ":ApplyCommand" as ApplyCommand 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("apply 1 --title SWE")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("apply 1 --title SWE")
activate AddressBookParser

create ApplyCommandParser
AddressBookParser -> ApplyCommandParser
activate ApplyCommandParser

ApplyCommandParser --> AddressBookParser
deactivate ApplyCommandParser

AddressBookParser -> ApplyCommandParser : parse(" --title SWE")
activate ApplyCommandParser

create ApplyCommand
ApplyCommandParser -> ApplyCommand
activate ApplyCommand

ApplyCommand --> ApplyCommandParser :
deactivate ApplyCommand

ApplyCommandParser --> AddressBookParser :
deactivate ApplyCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
ApplyCommandParser -[hidden]-> AddressBookParser
destroy ApplyCommandParser

AddressBookParser --> LogicManager :
deactivate AddressBookParser

LogicManager -> ApplyCommand : execute()
activate ApplyCommand

ApplyCommand -> Model : addJobApplication()
activate Model

Model --> ApplyCommand
deactivate Model

create CommandResult
ApplyCommand -> CommandResult
activate CommandResult

CommandResult --> ApplyCommand
deactivate CommandResult

ApplyCommand --> LogicManager : result
deactivate ApplyCommand

[<--LogicManager
deactivate LogicManager
@enduml
79 changes: 79 additions & 0 deletions docs/diagrams/apply-command/style.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/'
'Commonly used styles and colors across diagrams.
'Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more
'comprehensive list of skinparams.
'/


'T1 through T4 are shades of the original color from lightest to darkest

!define UI_COLOR #1D8900
!define UI_COLOR_T1 #83E769
!define UI_COLOR_T2 #3FC71B
!define UI_COLOR_T3 #166800
!define UI_COLOR_T4 #0E4100

!define LOGIC_COLOR #3333C4
!define LOGIC_COLOR_T1 #C8C8FA
!define LOGIC_COLOR_T2 #6A6ADC
!define LOGIC_COLOR_T3 #1616B0
!define LOGIC_COLOR_T4 #101086

!define MODEL_COLOR #9D0012
!define MODEL_COLOR_T1 #F97181
!define MODEL_COLOR_T2 #E41F36
!define MODEL_COLOR_T3 #7B000E
!define MODEL_COLOR_T4 #51000A

!define STORAGE_COLOR #A38300
!define STORAGE_COLOR_T1 #FFE374
!define STORAGE_COLOR_T2 #EDC520
!define STORAGE_COLOR_T3 #806600
!define STORAGE_COLOR_T2 #544400

!define USER_COLOR #000000

skinparam Package {
BackgroundColor #FFFFFF
BorderThickness 1
FontSize 16
}

skinparam Class {
FontColor #FFFFFF
FontSize 15
BorderThickness 1
BorderColor #FFFFFF
StereotypeFontColor #FFFFFF
FontName Arial
}

skinparam Actor {
BorderColor USER_COLOR
Color USER_COLOR
FontName Arial
}

skinparam Sequence {
MessageAlign center
BoxFontSize 15
BoxPadding 0
BoxFontColor #FFFFFF
FontName Arial
}

skinparam Participant {
FontColor #FFFFFFF
Padding 20
}

skinparam ArrowFontStyle bold
skinparam MinClassWidth 50
skinparam ParticipantPadding 10
skinparam Shadowing false
skinparam DefaultTextAlignment center
skinparam packageStyle Rectangle

hide footbox
hide members
hide circle
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 modified docs/images/StorageClassDiagram.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/Ui.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.
Binary file added docs/images/apply-command/ApplyCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3ed7743

Please sign in to comment.