From 21dcd342027d8a61a1d34b381404b40e79c2575c Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:33:16 +0800 Subject: [PATCH 01/17] Specify that last prefix is registered for commands with excessive prefixes --- docs/UserGuide.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ca0e1648c67..b61b520b864 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -229,12 +229,10 @@ It consists of: 2. Prefixes - The identifiers for the various input values, different commands require different prefixes 3. Placeholders - The actual input values for the command. -[//]: # (## 6.4. Trying your first command) - -[//]: # (<-- Insert example context here -->) - - - +
:exclamation: **WARNING:** +If there are multiples of the same prefixes typed in for commands that only accept one value per prefix, SudoHR will +only register the value of the last prefix. +
-------------------------------------------------------------------------------------------------------------------- # 4. Commands From 09df75eade7fdc5d9810358736b8a6539da6c477 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:38:15 +0800 Subject: [PATCH 02/17] Add Title to User guide --- docs/UserGuide.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index b61b520b864..3c1e9392db5 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,6 +1,9 @@ --- layout: page title: User Guide +--- +#SudoHR User Guide + --- # Table of contents: From 3190a22fbf92ec667e09d06682a9cc1a39361601 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:39:45 +0800 Subject: [PATCH 03/17] Add Title to User guide --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 3c1e9392db5..187554279ea 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -2,7 +2,7 @@ layout: page title: User Guide --- -#SudoHR User Guide +# SudoHR User Guide --- # Table of contents: From 401410717c4ce4a21276c730a0be526da3b83e47 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:41:45 +0800 Subject: [PATCH 04/17] Add Title to User guide --- docs/UserGuide.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 187554279ea..039f486f42f 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -2,9 +2,11 @@ layout: page title: User Guide --- -# SudoHR User Guide + +# SudoHR --- + # Table of contents: From d117d155c1510bba3629bbed35556b6f9e27595a Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:42:26 +0800 Subject: [PATCH 05/17] Add Title to User guide --- docs/UserGuide.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 039f486f42f..4f57d368f42 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -3,9 +3,7 @@ layout: page title: User Guide --- -# SudoHR - ---- +# SudoHR User Guide # Table of contents: From b193dbce1fb02b1953f2b08cde7592433b3535aa Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:49:34 +0800 Subject: [PATCH 06/17] Bug fix --- docs/UserGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 4f57d368f42..d9b48ec25e2 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -200,6 +200,7 @@ There is currently no prefix for **KEYWORD** and **OLD_DEPARTMENT_NAME**. List placeholders in the command + | Placeholder | Corresponding Prefix | Description | |-------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **ID** | id/ | ID is the unique identifier for an employee. Leading zeroes are ignored.
**Note: This flag is only used when adding an employee into the app**.
It has the following constraints:
  • Must be a positive integer
    1. 0 is often reserved for administrative use
    2. negative numbers are not conventionally used
  • Cannot be empty

  • Valid Examples:
  • 1
  • 100
  • Invalid Examples:
  • Bob
  • 0
  • -1
  • | From 3d99738c8539b5f8170ae0e14bc12f5cbf08c891 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 15:58:55 +0800 Subject: [PATCH 07/17] Moved ldhc to leave commands in user guide --- docs/UserGuide.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index d9b48ec25e2..c0d0f747c42 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -467,23 +467,7 @@ Examples: * `leid n/Software Engineering` * `leid n/Sales` -### 4.2.10 List department headcount: `ldhc` -List all employees present in the given department on a given date. The department window will display only the given -department and the leave window will display only the given date. - -Format: `ldhc n/DEPARTMENT_NAME [d/DATE]` -* If the date is not specified, employees present on the current date of inputting -the command will be shown for the given department. -* The given date must not be before the current date of inputting the command and must be within one year -of the current date of inputting the command. - -Examples: -* `ldhc n/Human Resources` -* `ldhc n/Sales d/2023-06-03` - - -![result for 'ldhc n/Sales d/2023-06-03'](images/UiListDepartmentHeadcountCommand.png) ## 4.3. Leave Commands @@ -590,6 +574,26 @@ Format: `llbe eid/EMPLOYEE_ID` Examples: * `llbe eid/1` + +### 4.3.7 List department headcount: `ldhc` + +List all employees present in the given department on a given date. The department window will display only the given +department and the leave window will display only the given date. + +Format: `ldhc n/DEPARTMENT_NAME [d/DATE]` +* If the date is not specified, employees present on the current date of inputting + the command will be shown for the given department. +* The given date must not be before the current date of inputting the command and must be within one year + of the current date of inputting the command. + +Examples: +* `ldhc n/Human Resources` +* `ldhc n/Sales d/2023-06-03` + + +![result for 'ldhc n/Sales d/2023-06-03'](images/UiListDepartmentHeadcountCommand.png) + + ## 4.4. General Commands ### 4.4.1. Viewing help : `help` From 131081e8bd6183ef91d1a86788633e837279f13e Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 21:53:57 +0800 Subject: [PATCH 08/17] Added full table of contents --- docs/UserGuide.md | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 311d52baf29..fce3eeb8419 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -5,27 +5,9 @@ title: User Guide # SudoHR User Guide -# Table of contents: - - -1. [Introduction](#1-introduction) - 1. [What is SudoHR?](#11-what-is-sudohr) - 1. [Features](#13-features) -2. [Quick start](#2-quick-start) -3. [Quick Reference Guide](#3-quick-reference-guide) - 1. [Layout](#31-layout) - 2. [Key Definitions](#32-key-definitions) - 3. [Command format](#33-command-format) -4. [Commands](#4-commands) - 1. [Employee commands](#41-employee-commands) - 2. [Department commands](#42-department-commands) - 3. [Leave commands](#43-leave-commands) - 4. [General commands](#44-general-commands) - 5. [Data storage](#45-data-storage) - 6. [Command summary](#46-command-summary) -5. [FAQs](#5-faq) ---- - +* Table of Contents + {:toc} + # 1. Introduction @@ -71,7 +53,7 @@ and 10,000 tags! -------------------------------------------------------------------------------------------------------------------- -# **2. Quick start** +# **2. Quick Start** 1. Ensure you have Java `11` or above installed in your Computer. @@ -86,16 +68,14 @@ and 10,000 tags! 5. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
    Some example commands you can try: - * `exit` : Exits the app. + * `exit` : Exits the app. + * `help` : Brings up the list of commands for reference 6. Refer to the [Command](#4-commands) below for details of each command. -------------------------------------------------------------------------------------------------------------------- - --------------------------------------------------------------------------------------------------------------------- - # **3. Quick Reference Guide** ## 3.1. Layout @@ -126,7 +106,7 @@ employee. ### 3.1.4 Departments The leftmost panel is the Departments section. Here you can view the status of the departments in your -company. The main data displayed is the number of employees available. +company. The main data displayed is the number of employees in each department. ### 3.1.5 Leaves The last panel on the right is the Leaves section. On this panel, you can view the dates in which employees have From cc4137124757c27b5a35919fc3f68558d02f9a40 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:19:13 +0800 Subject: [PATCH 09/17] Made UG changes --- docs/UserGuide.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index fce3eeb8419..b7fbef288b5 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -124,7 +124,7 @@ applied for leave. Each leave date would contain the number of employees who app ### 3.2.1. Employee Employees can be added to SudoHR to better -track their data, involvement in the company, as well as easy retrieval of information. +track their data, such as their leaves and the departments that they belong to. An employee possesses the following attributes: 1. Employee ID @@ -137,7 +137,7 @@ An employee possesses the following attributes: Employees are identified by their IDs. An employee's ID is a unique identification number assigned by the company. So, no two employees should share the same ID. -Similarly, email address and phone number are fields that are not intended for sharing. +Similarly, email address and phone number are fields that belong to a single employee. SudoHR enforces uniqueness for these two fields as well. However, do note that emails are case-sensitive. You cannot add an employee that share any of the following fields with a different employee in SudoHR: @@ -147,7 +147,8 @@ You cannot add an employee that share any of the following fields with a differe ### 3.2.2. Department -A department is made up of a group of employees. A department can have many employees and an employee can be in many departments. +A department is made up of a group of employees. A department can have many employees and an employee can be in many +departments. Every employee in a department must be unique. @@ -182,16 +183,16 @@ List placeholders in the command | Placeholder | Corresponding Prefix | Description | |-------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **ID** | id/ | {::nomarkdown} ID is the unique identifier for an employee. Leading zeroes are ignored.
    **Note: This flag is only used when adding an employee into the app**.
    It has the following constraints:
    • Must be a positive integer
      1. 0 is often reserved for administrative use
      2. negative numbers are not conventionally used
    • Cannot be empty

    Valid Examples:
    • 1
    • 100
    Invalid Examples:
    • Bob
    • 0
    • -1
    {:/} | +| **ID** | id/ | {::nomarkdown} ID is the unique identifier for an employee. Leading zeroes are ignored.
    **Note**: This flag is only used when adding an employee into the app.
    It has the following constraints:
    • Must be a positive integer
      1. 0 is often reserved for administrative use
      2. negative numbers are not conventionally used
    • Cannot be empty

    Valid Examples:
    • 1
    • 100
    • 001000
    Invalid Examples:
    • Bob
    • 0
    • -1
    | | **EMPLOYEE_ID** | eid/ | Similar to ID, The EMPLOYEE_ID represents the ID of an employee.
    It is used for any commands that require referencing an employee.
    It follows the same constraints as ID. {:/} | -| **NAME** | n/ | {::nomarkdown}NAME represents the name of an employee.
    It has the following constraints:
    • It must only contain alphanumerical characters
    • Cannot be empty

    Valid Examples:
  • Kenneth
  • Bob Lim
  • Invalid Examples:
  • Bob*
  • 1Alice
  • {:/} | +| **NAME** | n/ | {::nomarkdown}NAME represents the name of an employee.
    It has the following constraints:
    • It can only contain alphanumerical characters and spaces between these characters.
    • Cannot be empty

    Valid Examples:
  • Kenneth
  • Bob Lim
  • Alice1
  • Invalid Examples:
  • Bob*
  • Alice-1
  • | | **PHONE_NUMBER** | p/ | {::nomarkdown} PHONE_NUMBER represents the phone number of an employee.
    It has the following constraints:
  • It must contain only 8 digits
  • First 4 digits can be space-separated from the last 4 digits
  • it must be unique

  • Valid Examples:
  • 12345678
  • 9762 8372
  • Invalid Examples:
  • 123
  • Hello
  • {:/} | | **EMAIL** | e/ | {::nomarkdown} EMAIL represents the email address of an employee. It must be of the format local-part@domain
    It has the following constraints:
  • It must be unique
  • The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, ( +_.- ). The local-part may not start or end with any special characters.
  • This is followed by a '@' and then a domain name. The domain name is made up of domain labels separated by periods.
  • The domain name must:
    1. End with a domain label at least 2 characters long
    2. Have each domain label start and end with alphanumeric characters
    3. Have each domain label consist of alphanumeric characters, separated only by hyphens, if any.
  • Valid Examples:
  • PeterJack+1190@example.com
  • a1+be.d@example1.com
  • Invalid Examples:
  • peter jack@example.com
  • -peterjack@example.com
  • {:/} | -| **ADDRESS** | a/ | {::nomarkdown} ADDRESS represents the home address of an employee.
    It can take on any value! {:/} | +| **ADDRESS** | a/ | {::nomarkdown} ADDRESS represents the home address of an employee.
    It can take on any value! | | **TAG** | t/ | {::nomarkdown} TAG represents a tag of an employee. This field is optional and is not restrictive in usage.
    For example, it can be used to indicate an employee's position in the department or simple remarks about the employee.
    It has the following constraints:
  • They can only contain alphanumeric characters.

  • Valid Examples:
  • Manager
  • Invalid Examples:
  • *Manager
  • {:/} | -| **DEPARTMENT_NAME** | n/ | {::nomarkdown} DEPARTMENT_NAME is the unique identifier for a department. It is used when creating and deleting a department.
    It has the following constraints:
  • They can only contain alphanumeric characters.

  • Valid Examples:
  • Finance
  • Invalid Examples:
  • *Finance
  • {:/} | -| **OLD_DEPARTMENT_NAME** | NA | {::nomarkdown}OLD_DEPARTMENT_NAME represents the original department name before editing a department. It has the same constraints as DEPARTMENT_NAME.{:/} | -| **NEW_DEPARTMENT_NAME** | n/ | {::nomarkdown}NEW_DEPARTMENT_NAME represents the new department name when editing a department. It has the same constraints as DEPARTMENT_NAME. {:/} | +| **DEPARTMENT_NAME** | n/ | {::nomarkdown} DEPARTMENT_NAME is the unique identifier for a department. It is used when creating and deleting a department.
    It has the following constraints:
  • They can only contain alphanumeric characters and spaces.

  • Valid Examples:
  • Finance
  • Invalid Examples:
  • *Finance
  • | +| **OLD_DEPARTMENT_NAME** | NA | {::nomarkdown}OLD_DEPARTMENT_NAME represents the original department name before editing a department. It has the same constraints as DEPARTMENT_NAME. | +| **NEW_DEPARTMENT_NAME** | n/ | {::nomarkdown}NEW_DEPARTMENT_NAME represents the new department name when editing a department. It has the same constraints as DEPARTMENT_NAME. | | **DATE** | d/ | {::nomarkdown} DATE represents the date of the leave.
    It has the following constraints:
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | | **START_DATE** | s/ | {::nomarkdown} START_DATE represents the start of a range of days where leave is taken.
    It has the following constraints:
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | | **END_DATE** | e/ | {::nomarkdown} START_DATE represents the end of a range of days where leave is taken.
    It has the following constraints:
  • Within a command, the END_DATE cannot be earlier than the START_DATE
  • Within a command, the END_DATE can at most be 6 days later than the START_DATE
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | From 116bf07864b6b0efb6fcc10fd6e5157de6a22681 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:23:19 +0800 Subject: [PATCH 10/17] Made UG changes --- docs/UserGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 9498c4086c4..fc415c6ffd9 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -123,8 +123,8 @@ applied for leave. Each leave date would contain the number of employees who app ### 3.2.1. Employee -Employees can be added to SudoHR to better -track their data, such as their leaves and the departments that they belong to. +Employees can be added to SudoHR to better track their data, such as their leaves and the departments that they +belong to, as well as easy retrieval of information. An employee possesses the following attributes: 1. Employee ID From dabb5a015b49ba941c729fa4eb6a055b7f96a401 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:30:01 +0800 Subject: [PATCH 11/17] Made UG changes --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index fc415c6ffd9..ab5950f8211 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -460,7 +460,7 @@ section. Format: `aetl eid/EMPLOYEE_ID d/DATE`
    **NOTE:** -The employee shouldn't have taken leave on the date provided +The employee should not have taken leave already on the date provided
    **NOTE:** From 0aed8c62313c1897ee566df7082e87e01c6c2e8d Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:31:05 +0800 Subject: [PATCH 12/17] Made UG changes --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ab5950f8211..78f12570712 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -540,7 +540,7 @@ Examples: ### 4.3.5. Listing all leave dates: `llve` -Displays all leaves taken by employees. +Displays all leaves taken by all employees. Format: `llve` From db7db71dfd23842e7724b31ecfebb04247ae049c Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:33:48 +0800 Subject: [PATCH 13/17] Remove first FAQ --- docs/UserGuide.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 78f12570712..5ca5c6b7a5c 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -547,7 +547,7 @@ Format: `llve` ### 4.3.6. Listing all leaves taken by an employee: `llbe` -Lists all the leave date(s) of an employee. +Lists all the leave date(s) taken by an employee. Format: `llbe eid/EMPLOYEE_ID` @@ -656,9 +656,6 @@ If your changes to the data file makes its format invalid, SudoHR will discard a # **5. FAQ** -**Q**: How do I transfer my data to another Computer?
    -**A**: Install the app in the other computer and replace the default empty data file `sudohr.json` with the file that contains the data of your previous SudoHR home folder. - **Q**: There seems to be many commands and prefixes to remember! Is there an easy way to remember them?
    **A**: We understand how the short form command names may be difficult to remember, but don't worry. We have thus created a command summary here in the user guide for you in [section 4.6](#46-command-summary)!
    This list is also available on the app, which can be accessed with the `help` function or by clicking the help tab on the top right corner of the window. From de17408ef38484590c19951ecbbb83e13e1675aa Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 22:58:35 +0800 Subject: [PATCH 14/17] Change DG --- docs/DeveloperGuide.md | 15 +++++++++++---- docs/UserGuide.md | 7 ++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 4fe9f3c4710..6cfe79935d2 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -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. @@ -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. @@ -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. @@ -557,6 +560,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: @@ -1253,7 +1260,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)
    +1. Test case: `edit eid/1 p/99999999` (employee must exist)
    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)
    Expected: No employee is edited. Result display shows correct command format and command constraints. diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 5ca5c6b7a5c..7098bb95a68 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -213,9 +213,10 @@ It consists of: 2. Prefixes - The identifiers for the various input values, different commands require different prefixes 3. Placeholders - The actual input values for the command. -
    :exclamation: **WARNING:** -If there are multiples of the same prefixes typed in for commands that only accept one value per prefix, SudoHR will -only register the value of the last prefix. +
    :exclamation: **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 the last instance of the same prefix will + be processed by the parser.
    -------------------------------------------------------------------------------------------------------------------- From 2cbe693da255a6c663092da068361a7d82838ab0 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 23:16:03 +0800 Subject: [PATCH 15/17] Remove indentation for table of contents --- docs/UserGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index bece8893fd9..8fca2362289 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -5,8 +5,8 @@ title: User Guide # SudoHR User Guide -* Table of Contents - {:toc} +* Table of Contents +{:toc} # 1. Introduction From 46396bbcf7ddd64957e17b80321b7e3e88b62841 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 23:21:09 +0800 Subject: [PATCH 16/17] Edit Prefix markings --- docs/UserGuide.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 8fca2362289..4e3053f13ec 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -7,9 +7,8 @@ title: User Guide * Table of Contents {:toc} - -# 1. Introduction +# **1. Introduction** ## 1.1 What is SudoHR? @@ -183,16 +182,16 @@ List placeholders in the command | Placeholder | Corresponding Prefix | Description | |-------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **ID** | id/ | {::nomarkdown} ID is the unique identifier for an employee. Leading zeroes are ignored.
    **Note**: This flag is only used when adding an employee into the app.
    It has the following constraints:
    • Must be a positive integer
      1. 0 is often reserved for administrative use
      2. negative numbers are not conventionally used
    • Cannot be empty

    Valid Examples:
    • 1
    • 100
    • 001000
    Invalid Examples:
    • Bob
    • 0
    • -1
    | -| **EMPLOYEE_ID** | eid/ | Similar to ID, The EMPLOYEE_ID represents the ID of an employee.
    It is used for any commands that require referencing an employee.
    It follows the same constraints as ID. {:/} | -| **NAME** | n/ | {::nomarkdown}NAME represents the name of an employee.
    It has the following constraints:
    • It can only contain alphanumerical characters and spaces between these characters.
    • Cannot be empty

    Valid Examples:
  • Kenneth
  • Bob Lim
  • Alice1
  • Invalid Examples:
  • Bob*
  • Alice-1
  • | -| **PHONE_NUMBER** | p/ | {::nomarkdown} PHONE_NUMBER represents the phone number of an employee.
    It has the following constraints:
  • It must contain only 8 digits
  • First 4 digits can be space-separated from the last 4 digits
  • it must be unique

  • Valid Examples:
  • 12345678
  • 9762 8372
  • Invalid Examples:
  • 123
  • Hello
  • {:/} | +| **ID** | id/ | {::nomarkdown} ID is the unique identifier for an employee. Leading zeroes are ignored.
    **Note**: This flag is only used when adding an employee into the app.
    It has the following constraints:
    • Must be a positive integer
      1. 0 is often reserved for administrative use
      2. negative numbers are not conventionally used
    • Cannot be empty

    Valid Examples:
    • 1
    • 100
    • 001000
    Invalid Examples:
    • Bob
    • 0
    • -1
    {:/} | +| **EMPLOYEE_ID** | eid/ | Similar to ID, The EMPLOYEE_ID represents the ID of an employee.
    It is used for any commands that require referencing an employee.
    It follows the same constraints as ID. | +| **NAME** | n/ | {::nomarkdown}NAME represents the name of an employee.
    It has the following constraints:
    • It can only contain alphanumerical characters and spaces between these characters.
    • Cannot be empty

    Valid Examples:
  • Kenneth
  • Bob Lim
  • Alice1
  • Invalid Examples:
  • Bob*
  • Alice-1
  • {:/} | +| **PHONE_NUMBER** | p/ | {::nomarkdown} PHONE_NUMBER represents the phone number of an employee.
    It has the following constraints:
  • It must contain only 8 digits
  • First 4 digits can be space-separated from the last 4 digits
  • it must be unique

  • Valid Examples:
  • 12345678
  • 9762 8372
  • Invalid Examples:
  • 123
  • Hello
  • {:/} | | **EMAIL** | e/ | {::nomarkdown} EMAIL represents the email address of an employee. It must be of the format local-part@domain
    It has the following constraints:
  • It must be unique
  • The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, ( +_.- ). The local-part may not start or end with any special characters.
  • This is followed by a '@' and then a domain name. The domain name is made up of domain labels separated by periods.
  • The domain name must:
    1. End with a domain label at least 2 characters long
    2. Have each domain label start and end with alphanumeric characters
    3. Have each domain label consist of alphanumeric characters, separated only by hyphens, if any.
  • Valid Examples:
  • PeterJack+1190@example.com
  • a1+be.d@example1.com
  • Invalid Examples:
  • peter jack@example.com
  • -peterjack@example.com
  • {:/} | -| **ADDRESS** | a/ | {::nomarkdown} ADDRESS represents the home address of an employee.
    It can take on any value! | +| **ADDRESS** | a/ | {::nomarkdown} ADDRESS represents the home address of an employee.
    It can take on any value! {:/} | | **TAG** | t/ | {::nomarkdown} TAG represents a tag of an employee. This field is optional and is not restrictive in usage.
    For example, it can be used to indicate an employee's position in the department or simple remarks about the employee.
    It has the following constraints:
  • They can only contain alphanumeric characters.

  • Valid Examples:
  • Manager
  • Invalid Examples:
  • *Manager
  • {:/} | -| **DEPARTMENT_NAME** | n/ | {::nomarkdown} DEPARTMENT_NAME is the unique identifier for a department. It is used when creating and deleting a department.
    It has the following constraints:
  • They can only contain alphanumeric characters and spaces.

  • Valid Examples:
  • Finance
  • Invalid Examples:
  • *Finance
  • | -| **OLD_DEPARTMENT_NAME** | NA | {::nomarkdown}OLD_DEPARTMENT_NAME represents the original department name before editing a department. It has the same constraints as DEPARTMENT_NAME. | -| **NEW_DEPARTMENT_NAME** | n/ | {::nomarkdown}NEW_DEPARTMENT_NAME represents the new department name when editing a department. It has the same constraints as DEPARTMENT_NAME. | +| **DEPARTMENT_NAME** | n/ | {::nomarkdown} DEPARTMENT_NAME is the unique identifier for a department. It is used when creating and deleting a department.
    It has the following constraints:
  • They can only contain alphanumeric characters and spaces.

  • Valid Examples:
  • Finance
  • Invalid Examples:
  • *Finance
  • {:/} | +| **OLD_DEPARTMENT_NAME** | NA | {::nomarkdown}OLD_DEPARTMENT_NAME represents the original department name before editing a department. It has the same constraints as DEPARTMENT_NAME. {:/} | +| **NEW_DEPARTMENT_NAME** | n/ | {::nomarkdown}NEW_DEPARTMENT_NAME represents the new department name when editing a department. It has the same constraints as DEPARTMENT_NAME. {:/} | | **DATE** | d/ | {::nomarkdown} DATE represents the date of the leave.
    It has the following constraints:
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | | **START_DATE** | s/ | {::nomarkdown} START_DATE represents the start of a range of days where leave is taken.
    It has the following constraints:
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | | **END_DATE** | e/ | {::nomarkdown} START_DATE represents the end of a range of days where leave is taken.
    It has the following constraints:
  • Within a command, the END_DATE cannot be earlier than the START_DATE
  • Within a command, the END_DATE can at most be 6 days later than the START_DATE
  • The date provided must be of the form YYYY-MM-DD. "YYYY" refers to the year , "MM" refers to the month, and "DD" refers to the day of the month for a specfic day in the calender.
  • The date provided must be a valid calender day.

  • {:/} | From 76ba46a2f5616b046b9d1a721c24a3fd6f0d8308 Mon Sep 17 00:00:00 2001 From: jweeyh Date: Mon, 10 Apr 2023 23:30:33 +0800 Subject: [PATCH 17/17] Edit Prefix markings --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index c5930b93e92..ae27e97466f 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -4,7 +4,7 @@ title: User Guide --- * Table of Contents - {:toc} +{:toc} ---