-
Notifications
You must be signed in to change notification settings - Fork 434
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 #244 from gyulong1/master
Update DG and PPP
- Loading branch information
Showing
5 changed files
with
139 additions
and
25 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -128,7 +128,7 @@ database, and you are free to access and modify the particulars with other comma | |
However, this function could fail (and ExecutivePro simply does not add any employee), if: | ||
|
||
1. There are missing particulars which are compulsory, you can find these listed in [here](#order-of-fields). | ||
2. The particulars are in the wrong format, the program will prompt you on the correct format. | ||
2. The particulars are in the wrong format, the program will prompt you on the correct format. Alternatively, you can find them [here](#field-formats). | ||
3. The new employee added is a duplicate, i.e. there is someone in the database who already shares the same name and | ||
details. | ||
|
||
|
@@ -495,18 +495,18 @@ This table describes the requirements and order of the fields. | |
|
||
This table describes the requirements for the input format of the fields. | ||
|
||
| Field | Prefix | Requirement | Example | | ||
|----------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------| | ||
| `NAME` | n/ | Only alphanumeric characters and spaces only. | `John Doe`, `Shawn Lee` | | ||
| `PHONE` | p/ | Contain numbers only from 3 digits long to 15 digits long | `80101126`, `973629831`, `999` | | ||
| `DEPARTMENT` | d/ | Only alphanumeric characters | `Sales`, `General Management` | | ||
| `PAYROLL` | pr/ | Can take any value. | `1000 15` | | ||
| `EMAIL` | e/ | Be in the format of [email protected]. "local-part" should contain only alphanumeric characters and/or certain special characters (+\_.-), and cannot start or end with any special characters. "domain" should start and end with alphanumeric characters, must be at least 2 characters long, and can contain hyphens. "ending" part must be at least 2 characters long (e.g. ".com") | `[email protected]`, `[email protected]` | | ||
| `ADDRESS` | a/ | Can take any value. | `311, Clementi Ave 2, #02-25` | | ||
| `LEAVE` | l/ | Must be an integer less than `21`. | `1`, `10`, `20` | | ||
| `DATE_OF_BIRTH` | dob/ | Date in YYYY-MM-DD format. | `2022-01-10` | | ||
| `DATE_OF_JOINING` | doj/ | Date in YYYY-MM-DD format. | `2022-12-10` | | ||
| `TAG` | t/ | Only alphanumeric characters and spaces only. | `Software Engineer`, `Manager` | | ||
| Field | Prefix | Requirement | Example | | ||
|-------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------| | ||
| `NAME` | n/ | Only alphanumeric characters and spaces only. | `John Doe`, `Shawn Lee` | | ||
| `PHONE` | p/ | Contain numbers only from 3 digits long to 15 digits long | `80101126`, `973629831`, `999` | | ||
| `DEPARTMENT` | d/ | Only alphanumeric characters | `Sales`, `General Management` | | ||
| `PAYROLL` | pr/ | Two integers (salary and day of payment) separated by a space. Salary has to be an integer between `1` and `100000` (inclusive). Day of payment has to be an integer between `1` and `28` (inclusive). Salary and day limits are set to fit expected usage by a HR department. | `1000 15`, `10000 3` | | ||
| `EMAIL` | e/ | Be in the format of [email protected]. "local-part" should contain only alphanumeric characters and/or certain special characters (+\_.-), and cannot start or end with any special characters. "domain" should start and end with alphanumeric characters, must be at least 2 characters long, and can contain hyphens. "ending" part must be at least 2 characters long (e.g. ".com") | `[email protected]`, `[email protected]` | | ||
| `ADDRESS` | a/ | Can take any value. | `311, Clementi Ave 2, #02-25` | | ||
| `LEAVE` | l/ | Must be an integer between between `0` and `365` (inclusive). | `1`, `10`, `350` | | ||
| `DATE_OF_BIRTH` | dob/ | Date in YYYY-MM-DD format. | `2022-01-10` | | ||
| `DATE_OF_JOINING` | doj/ | Date in YYYY-MM-DD format. | `2022-12-10` | | ||
| `TAG` | t/ | Only alphanumeric characters and spaces only. | `Software Engineer`, `Manager` | | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
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,71 @@ | ||
@startuml | ||
!include style.puml | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant ":LogicManager" as LogicManager LOGIC_COLOR | ||
participant ":ExecutiveProParser" as ExecutiveProParser LOGIC_COLOR | ||
participant ":LeaveCommandParser" as LeaveCommandParser LOGIC_COLOR | ||
participant "d:LeaveCommand" as LeaveCommand LOGIC_COLOR | ||
participant "e:EditCommand" as EditCommand LOGIC_COLOR | ||
participant ":CommandResult" as CommandResult LOGIC_COLOR | ||
end box | ||
|
||
[-> LogicManager : execute("leave 1 l/3") | ||
activate LogicManager | ||
|
||
LogicManager -> ExecutiveProParser : parseCommand("leave 1 l/3") | ||
activate ExecutiveProParser | ||
|
||
create LeaveCommandParser | ||
ExecutiveProParser -> LeaveCommandParser | ||
activate LeaveCommandParser | ||
|
||
LeaveCommandParser --> ExecutiveProParser | ||
deactivate LeaveCommandParser | ||
|
||
ExecutiveProParser -> LeaveCommandParser : parse("leave 1 l/3") | ||
activate LeaveCommandParser | ||
|
||
create LeaveCommand | ||
LeaveCommandParser -> LeaveCommand | ||
activate LeaveCommand | ||
|
||
LeaveCommand --> LeaveCommandParser : d | ||
deactivate LeaveCommand | ||
|
||
LeaveCommandParser --> ExecutiveProParser : d | ||
deactivate LeaveCommandParser | ||
'Hidden arrow to position the destroy marker below the end of the activation bar. | ||
LeaveCommandParser -[hidden]-> ExecutiveProParser | ||
destroy LeaveCommandParser | ||
|
||
ExecutiveProParser --> LogicManager : d | ||
deactivate ExecutiveProParser | ||
|
||
LogicManager -> LeaveCommand : execute() | ||
activate LeaveCommand | ||
|
||
LeaveCommand -> EditCommand : | ||
activate EditCommand | ||
deactivate EditCommand | ||
|
||
EditCommand --> LeaveCommand : e | ||
|
||
LeaveCommand -> EditCommand : execute() | ||
activate EditCommand | ||
deactivate EditCommand | ||
EditCommand --> LeaveCommand | ||
|
||
create CommandResult | ||
LeaveCommand -> CommandResult | ||
activate CommandResult | ||
|
||
CommandResult --> LeaveCommand | ||
deactivate CommandResult | ||
|
||
LeaveCommand --> LogicManager : result | ||
deactivate LeaveCommand | ||
|
||
[<--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.
Oops, something went wrong.