Skip to content

Commit

Permalink
Merge pull request #307 from jweeyh/GUI-branch
Browse files Browse the repository at this point in the history
Update prefix table, add title to user guide
  • Loading branch information
kennethk-1201 authored Apr 10, 2023
2 parents 510f87c + 76ba46a commit e8d8d22
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 57 deletions.
15 changes: 11 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ This section describes some noteworthy details, alongside considerations and con
### 4.1. Design considerations:

#### 4.1.1. Employee
An important design consideration to note for Employee is the multiple different fields that qualify as candidate _keys_, such as an employee id, email address, and phone number.
An important design consideration to note for Employee is the multiple different fields that qualify as _keys_, such as an employee id, email address, and phone number.

These are fields to guard against duplication. An employee's id is any uniquely generated identifier assigned to it by the company upon joining. Two employees should not share email field or phone number as those two fields are understood to be unique.

Expand Down Expand Up @@ -226,12 +226,11 @@ The attributes of an Employee are:

**Note**:
1. For the commands in this section, the order in which the prefixes (if any) are placed does not matter.
1. `edit eid/37 a/ntu p/8461 4872` will invoke the same result as `edit eid/37 p/8461 4872 a/ntu`
1. `edit eid/37 a/ntu p/8461 4872` will return the same result as `edit eid/37 p/8461 4872 a/ntu`
2. If duplicated prefixes are provided, only the argument associated with last instance of the same prefix will be processed by the parser.
3. We make a distinction between the prefixes `id/` and `eid/`. The former is used in commands during adding of an employee or editing of an employee’s Id field whereas the latter is used in commands that references an employee that exists in SudoHR.



#### 4.2.1 Adding an employee

The `add` command adds a new employee, with the specified fields, into SudoHR. Note that only the 'Tag' field is optional.
Expand Down Expand Up @@ -358,6 +357,10 @@ The attributes of a department are:

The uniqueness of each department in `UniqueDepartmentList` is enforced by checking against the `DepartmentName`. This will be explained in the _Adding a department_ section.

**Note**
1. For the commands in this section, the order in which the prefixes (if any) are placed does not matter.
2. If duplicated prefixes are provided, only the argument associated with last instance of the same prefix will be processed by the parser.

#### 4.3.1. Adding a department

The `adep` command adds a new `Department` in SudoHr.
Expand Down Expand Up @@ -578,6 +581,10 @@ The attributes of a leave are:
- `LeaveDate`: The date of the leave, which is also the unique identifier for a leave
- `UniqueEmployeeList` : The employees who applied for this leave, the list must not contain duplicate employees.

**Note**
1. For the commands in this section, the order in which the prefixes (if any) are placed does not matter.
2. If duplicated prefixes are provided, only the argument associated with last instance of the same prefix will be processed by the parser.

#### 4.4.1. Adding an employee's leave
The `aetl` command adds an employee's leave on a specific day:

Expand Down Expand Up @@ -1274,7 +1281,7 @@ testers are expected to do more *exploratory* testing.

#### 7.2.3. Editing an employee

1. Test case: `edit eid/1 p/9999999` (employee must exist) <br>
1. Test case: `edit eid/1 p/99999999` (employee must exist) <br>
Expected: Employee with ID 1 is edited. Details of the edited employee is shown in the result display.
2. Test case: `edit 1 p/88888888` (incorrect format) <br>
Expected: No employee is edited. Result display shows correct command format and command constraints.
Expand Down
Loading

0 comments on commit e8d8d22

Please sign in to comment.