Skip to content

Commit

Permalink
Merge branch 'master' into v1.4-Update-Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jylee-git committed Nov 12, 2018
2 parents 589ef44 + 2132776 commit 9507dce
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
23 changes: 13 additions & 10 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public SetScheduleCommand parse(String args) throws ParseException {
The sequence diagram below demonstrates `parse()` function of `SetScheduleCommandParser`:

.Sequence diagram of SetScheduleCommandParser
image::SetScheduleCommandParserSequenceDiagram.png[width="800"]
image::SetScheduleCommandParserSequenceDiagram.png[]

The sequence diagram below demonstrates `execute()` function of `SetScheduleCommand`:

Expand Down Expand Up @@ -1827,7 +1827,7 @@ Refer to <<UserGuide.adoc#appendix-b-privileges-in-accordance-to-priority-level,
does not have the rights to do so. Status message box shows an error message.
//end::jylee-git_dg_setplvl[]


// tag::Woonhian_setdepartment_test[]
==== Change the department of an employee

. Change the department of an employee from the given index.
Expand All @@ -1842,6 +1842,7 @@ If the employee at index 1 is the logged in employee himself/herself, the depart
Expected: Department name is of the wrong format. Error details is shown in the status message.
.. Test case: `setdepartment 0 d/Top Management` +
Expected: No employee at index 0. Error details is shown in the status message.
// end::Woonhian_setdepartment_test[]

=== Leave Application

Expand Down Expand Up @@ -1947,16 +1948,17 @@ Expected: Successfully set schedule for employee at index 3. Message is shown in
Expected: Time start and time end are the same. Error detail shown in the status message.
// end::schedule_test[]

// tag::Woonhian_filtering/sorting_test[]
=== Filtering/Sorting

==== Locating employees by name

. Finds the employees whose name contains any of the given keywords.

.. Test case: `find KEYWORD` +
Expected: Employees whose name matches with `KEYWORD` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `find KEYWORD1 KEYWORD2` +
Expected: Employees whose name matches with `KEYWORD1` or `KEYWORD2` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `find alex` +
Expected: Employees whose name matches with `alex` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `find alex bernice` +
Expected: Employees whose name matches with `alex` or `bernice` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `find` +
Expected: Invalid command format. Error details is shown in the status message.

Expand All @@ -1978,12 +1980,13 @@ Expected: Invalid command format. Error details is shown in the status message.

. Filters the list with employees who are in the department from the provided keywords.

.. Test case: `filterdepartment KEYWORD` +
Expected: Employees whose department matches with `KEYWORD` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `filterdepartment KEYWORD1 KEYWORD2` +
Expected: Employees whose department matches with `KEYWORD1` or `KEYWORD2` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `filterdepartment junior` +
Expected: Employees whose department matches with `junior` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `filterdepartment junior senior` +
Expected: Employees whose department matches with `junior` or `senior` is listed. Details of the number of employees listed is shown in the status message.
.. Test case: `filterdepartment` +
Expected: Invalid command format. Error details is shown in the status message.
// end::Woonhian_filtering/sorting_test[]

=== Miscellaneous

Expand Down
19 changes: 9 additions & 10 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This user guide will give you step by step instruction on how you can use the fe
image::Ui.png[width="790"]
+
. If the app does not contain any sample data (refer to <<List of sample user accounts at first launch or upon reset, Table 1>>), something went wrong during the download process. Delete the folder `BankAB` and repeat step 1 to 4.
. The following table contains a sample list of persons with the respective account details when the application
. The following table contains a sample list of employees with the respective account details when the application
runs for the first time or when ResetCommand was executed in the previous runtime:

.List of sample user accounts at first launch or upon reset
Expand Down Expand Up @@ -150,6 +150,7 @@ This command will NOT be able to edit the following:
* `Password`
* `Priority Level`
* `Schedule`
* `Mode`
* `Working Rate`
====
Expand Down Expand Up @@ -180,6 +181,7 @@ Format: `add n/NAME ic/NRIC pwd/PASSWORD p/PHONE_NUMBER e/EMAIL d/DEPARTMENT a/A
* An employee can have any number of tags (including 0)
* Priority level will be set to BASIC if left empty
* A recently added employee will have no schedule allocated
* More than 2 decimal places for working rate is acceptable
====

Examples:
Expand Down Expand Up @@ -208,7 +210,7 @@ Examples:

* `delete 1`
====
Deletes the employee with ID 1 in the address book.
Deletes the employee with index 1 in the address book.
====

//tag::jylee-git_login[]
Expand Down Expand Up @@ -246,6 +248,7 @@ image::setOwnPlvl_failed_screenShot.png[width=800]
====
* This operation requires administrator privilege to perform.
* Administrator can only change the departments of other employees but not himself/herself.
* Department names should start with a name, and ends with 'Management'.
====
Changes the department of an employee. +
Format: `setdepartment INDEX d/DEPARTMENT` +
Expand Down Expand Up @@ -575,16 +578,12 @@ image::ListDepartmentAfter.png[width="500"]
[NOTE]
====
* Does not require the user to log in before using the command.
* The keyword `Management` will not be accepted to prevent listing of all departments.
====
Filter departments and list out the employees who are in the department. +
Format: `filterdepartment KEYWORD [MORE KEYWORDS]` +
Alias: `fd`

[NOTE]
====
* The keyword `Management` will not be accepted to prevent listing of all departments
====

* The search is case insensitive. e.g. `junior` will match employees in `Junior Management`
* Only full words will be matched. e.g. `junio` will not match `Junior Management`
* Filtering of more than one department will list out the employees in the departments.
Expand Down Expand Up @@ -619,7 +618,7 @@ Format: `help`

User Guide will open in a separate window shown below:

image:UserGuide.png[]
image:UserGuide.png[width="500"]

==== Selecting an employee : `select`
[NOTE]
Expand Down Expand Up @@ -662,7 +661,7 @@ Pressing the kbd:[&uarr;] and kbd:[&darr;] arrows will display the previous and
// tag::check[]
==== Check in/out working hours: `check`
Updates check in/out status for employees. +
Format: `check m/IN-OUT` +
Format: `check m/MODE` +
Examples: +

* `check m/in`
Expand Down Expand Up @@ -693,7 +692,7 @@ Checked out shows: +
- Checked out date
- Checked out time
- Hours worked
- Salary per day according to employees' working rate per hour.
- Salary per day according to employees' working rate per hour, both rounded off to 2 decimal places.
image::checkedOut.PNG[width="700"]
====
Expand Down
Binary file modified docs/images/CheckCommandSequenceDiagram.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/SetScheduleCommandParserSequenceDiagram.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 9507dce

Please sign in to comment.