:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
+
+
+**Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
than attempting to perform the undo.
-
+
The following sequence diagram shows how the undo operation works:
-![UndoSequenceDiagram](images/UndoSequenceDiagram.png)
+:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
+
-
+**Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
+
+
Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged.
-![UndoRedoState4](images/UndoRedoState4.png)
+:information_source: **Note:** These instructions only provide a starting point for testers to work on;
-testers are expected to do more *exploratory* testing.
-
-
+:link: **Link**: Read [this Gradle Tutorial from the se-edu/guides](https://se-education.org/guides/tutorials/gradle.html) to learn more about using Gradle.
-
+
+The user guide splits HRMate's features into 3 main categories: [Employee-related operations](#employee-related-operations), [Leave-related operations](#leave-related-operations), and [other operations](#other-operations).
+
+## Employee-related operations
+
+HRMate allows you to manage your employees' contact details, such as their name, phone number, email address, and home address.
+
+For instance you can [add](#add-an-employee-record) a new employee, [find](#find-an-employee-record) specific employees, [edit](#edit-an-employee-record) an employee's information, [delete](#delete-an-employee-record) an employee, or [import/export](#import-export-employee-records) employee records in CSV format.
+
+### Add an employee record
+When a new employee joins, use the [`add`](#adding-an-employee-add) command to add their information into HRMate.
+
+#### Adding an employee: `add`
+
+Use the `add` command to add an employee to the employee list.
+
+Here's how to add an employee:
+
+1. Type in the following command in the [command box](#glossary): `add n/NAME p/PHONE_NUMBER e/EMAIL_ADDRESS a/HOME_ADDRESS [t/TAG]...`, replace `NAME` with employee name, `PHONE_NUMBER` with employee phone number `EMAIL_ADDRESS` with employee email address and `HOME_ADDRESS` with employee home address. `[t/TAG]...` is an optional field with one or more tags, with `TAG` being the name of the tag.
+ - For instance, if you have an employee name John Doe with phone number 98765432, email johnd@example.com, home address John Street, block 123 #01-01 and tags full-time and remote, type in the command `add n/John Doe p/98765432 e/johnd@example.com a/John Street, block 123 #01-01 t/full-time t/remote`
+ - If your employee does not require any tags, using the same information as above, the command would be `add n/John Doe p/98765432 e/johnd@example.com a/John Street, block 123 #01-01`
+ - Please refer to [how to interpret command formats](#how-to-interpret-command-formats) for more information
+2. Press "enter" on your keyboard and you should see the person information at the end of the employee list.
+
+
+
+Here are the potential error messages that you may receive and here's how to fix them:
+
+| Error message | Why it happens | Fix |
+|--------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `add n/NAME p/PHONE_NUMBER e/EMAIL_ADDRESS a/HOME_ADDRESS [t/TAG]...`, replacing `NAME` with employee name, `PHONE_NUMBER` with employee phone number, `EMAIL_ADDRESS` with employee email address, `HOME_ADDRESS` with employee home address. `[t/TAG]...` is optional, with `[t/TAG]` representing one or more tags and `TAG` being the tag name. |
+| `FIELD should FORMAT` where `FIELD` is an input like `Names` or `Phone numbers` and `FORMAT` contains additional information about the field's format. | The input does not follow the format prescribed. For example, the entered phone number might contain alphabets. | Follow the on screen message to fix the field in question. For example, `Phone numbers should only contain numbers, and it should be at least 3 digits long` means that the input phone number does not follow the prescribed format. |
+| `This employee already exists in the address book` | The provided employee name is already found in HRMate | Use another name for the employee. For example, if trying to add another "John Doe", use the name "John Doe (HR)" to differentiate between the existing John Doe. HRMate does this name checking to prevent unintentional duplicate employee entries. |
+
+
+
+Currently, HRmate's user interface is able to hold 35 to 160 characters on a single line, depending on the letters used. For any inputs longer than the character limit, HRmate will display ... for the remaining characters after the character limit.
+
+
+
+
+
+
+HRmate's names are case-sensitive. This means that the names `Alex` and `alex` are interpreted as different names.
+
+
+
+HRmate's tags are case-sensitive. This means that tags `Part-Time` and `part-time` are interpreted as different tags. Having redundant tags with similar spelling may decrease efficiency and add unnecessary workload. To see all current tags in use, you may refer to the `view-tag` command.
+
+
+
+
+### Find an employee record
+HRMate makes it easy to find an employee and there are multiple ways of doing so. You can use the [`list`](#listing-all-employees-list) command to list all employees, or use the [`find`](#finding-employees-by-name-find) command to find employees by name. You can also use the [`find-all-tag`](#finding-employees-by-all-specified-tags-find-all-tag) and [`find-some-tag`](#finding-employees-by-at-least-one-specified-tag-find-some-tag) commands to find employees by their associated [tags](#glossary).
+
+#### Listing all employees: `list`
+
+Use the `list` command to view all employees that are currently listed in the employee list.
+
+Here's how to use the `list` command:
+
+1. Type in the following command in the command box: `list`.
+2. Press "enter" on your keyboard and you should see the information of all employees listed in the employee list.
+
+
+This command does not require any parameters. However, to account for possible typing mistakes, HRMate reads in inputs like `list 123`, `list abc`, and `list 1a2b` all as the command `list`.
+
+
+Here are the potential error messages that you may receive and here's how to fix them:
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Unknown command` | The command you inputted is not part of the commands available in HRmate. | Please check the spelling and try again.
+
+#### Finding employees by name: `find`
+
+Use the `find` command to find employees by name. This command will find employees whose names contain the specified words that you enter.
+
+Here's how to find employees by name:
+
+ 1. Type in the following command in the command box `find NAME....` where `NAME...` are to be replaced with one or more names of the employees for search.
+ * The words for search are case insensitive, meaning you do not have to worry about the capitalization of the words entered.
+ - For instance, to find employees whose names contain `Martin`, type `find martin` to the command box.
+ - Take another example, suppose we have employees `alex` and `Alex`, for input `find alex`, both employees will be shown as a reult.
+ - For another instance, to find employees whose names contain either "*Harry*" or "*Redknapp*, type `find harry redknapp` to the command box.
+ - However, if you want to find employees whose names contain `martin` but only entered `mar`, NO employee named Martin will be found, instead employee named Mar will be found. Note that he search looks for names containing the entire specified word.
+ 2. Press "enter" on your keyboard and you should see the employees matched being listed in the employee list.
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `find NAME...` where `NAME` is the specified name of the employee to search (case-insensitive).
+
+* **For advanced users:**
+ * Employees are displayed in the order in which they are arranged in the employee list.
+
+#### Viewing All Tags: `view-tag`
+
+To view all tags currently in use within the employee list, use the `view-tag` command. This will be
+useful if you want to find employees by their associated tags using the [`find-all-tag`](#finding-employees-by-all-specified-tags-find-all-tag) and [`find-some-tag`](#finding-employees-by-at-least-one-specified-tag-find-some-tag) commands.
+
+Here's how to view all currently used tags:
+
+1. Type in the following command in the command box: `view-tag`.
+2. Press "enter" on your keyboard and you should see a list of all tags currently in use within the employee list.
+
+
+
+This command does not require any parameters. However, to account for possible typing mistakes, HRMate reads in inputs like `view-tag 123`, `view-tag abc`, and `view-tag 1a2b` all as the command `view-tag`.
+
+
+Here are the potential error messages that you may receive and here's how to fix them:
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Unknown command` | The command you inputted is not part of the commands available in HRmate. | Please check the spelling and try again.
+
+
+
+
+#### Finding employees by all specified tags: `find-all-tag`
+
+To find employees by a set of specified tags, use the `find-all-tag` command. This command will find employees that are currently associated with all the specified tags that you enter.
+
+Here's how to use the `find-all-tag` command:
+
+1. Type in the following command in the command box `find-all-tag t/TAG [t/MORE_TAGS]...` where `TAG` is to be replaced with the name of the tags.
+ * At least one tag should be entered for search and more tags can be entered if you want to search for more.
+ * The tag names are case sensitive, meaning the capitalization of the words entered matters.
+ - For instance, to find employees with both tag `remote` and tag `full time`, type `find-all-tag t/remote t/full time` to the command box.
+ - However, if you want to find employees with tag `remote`, but only entered `re` as the tag name, NO employees with tag `remote` will be found, instead, employees with tag `re` will be found. Note that only tags containing the entire specified word are matched.
+2. Press "enter" on your keyboard and you should see the employees matched being listed in the employee list. Note that employees with additional tags other than the specified ones will also be displayed.
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `find-all-tag t/TAG [t/MORE_TAGS]...` where `TAG` is to be replaced with the name of the tags, and capitalization of the tag names mattered (case-sensitive). At least one tag should be entered for search and more tags can be entered if you want to search for more. |
+| `Tags names only allow alphanumeric characters, spaces, and dashes.` | The tags input contains illegal characters | Remove the illegal characters from the input. |
+
+* **For advanced users:**
+ * Employees are displayed in the order in which they are arranged in the employee list.
+
+#### Finding employees by at least one specified tag: `find-some-tag`
+
+To find employees by at least one of the specified tags, use the `find-some-tag` command. This command will find employees that are currently associated with at least one of the specified tags that you enter.
+
+Here's how to use the `find-some-tag` command:
+
+1. Type in the following command in the command box `find-some-tag t/TAG [t/MORE_TAGS]...` where `TAG` is to be replaced with the name of the tags.
+ * At least one tag should be entered for search and more tags can be entered if you want to search for more.
+ * The tag names are case sensitive, meaning the capitalization of the words entered matters.
+ - For instance, to find employees with either tag `remote` and tag `full time`, type `find-some-tag t/remote t/full time` to the command box.
+ - However, if you want to find employees with tag `remote`, but only entered `re` as the tag name, NO employees with tag `remote` will be found, instead, employees with tag `re` will be found. Note that only tags containing the entire specified word are matched.
+2. Press "enter" on your keyboard and you should see the employees matched being listed in the employee list. Note that employees with additional tags other than the specified ones will also be displayed.
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `find-all-tag t/TAG [t/MORE_TAGS]...` where `TAG` is to be replaced with the name of the tags, and capitalization of the tag names mattered (case-sensitive). At least one tag should be entered for search and more tags can be entered if you want to search for more. |
+| `Tags names only allow alphanumeric characters, spaces, and dashes.` | The tags input contains illegal characters | Remove the illegal characters from the input. |
+
+* **For advanced users:**
+ * Employees are displayed in the order in which they are arranged in the employee list.
+
+
+
+### Edit an employee record
+HRMate offers different commands for editing employee records. [`add-tag`](#adding-tags-to-employees-add-tag) and [`delete-tag`](#removing-tags-from-employees-delete-tag) would add and remove an employee's tags while [`edit`](#editing-employee-information-edit) is for editing name, phone number, email address, home address and tags.
+
+#### Adding tags to employees: `add-tag`
+
+Use the `add-tag` command to add tags to an employee. This command will add the specified tags to an employee specified by their index in the employee list.
+
+Here's how to use the `add-tag` command:
+
+1. Find the employee under the employee list.
+
+
+If the employee is not found, consider using list or any find commands to locate the employee in the employee list.
+
+
+2. Type in the following command in the command box `add-tag INDEX t/TAG...` where `INDEX` is the [index](#glossary) of the employee in the list currently, `TAG` is the name of the tag to be added and `t/TAG...` representing one or more tags.
+ - For instance, if you want to add the tags full-time and remote to the employee indexed 2, type `add-tag 2 t/full-time t/remote` to the command box.
+ - Please refer to [how to interpret command formats](#how-to-interpret-command-formats) for more information
+3. Press "enter" on your keyboard and you should see the input tags added to the employee specified.
+
+Here are the potential error messages that you may receive and here's how to fix them:
+
+| Error message | Why it happens | Fix |
+|-----------------------------------------------------------------------|-----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `Invalid command format!` | The command you input does not follow the specfied format | Ensure the command you entered follows the following format: `add-tag INDEX t/TAG...`, replacing INDEX with the index of the employee currently, `TAG` is the name of the tag to be added and `t/TAG...` representing one or more tags. |
+| `At least one tag must be provided` | No tags were provided | Add tags to the command in the command box. Note that the tags must have a t/ [prefix](#glossary). For example, to add the tag full-time, use `t/full-time`. |
+| `The person index provided is invalid` | The index specified does not refer to any employee | Double check if the index appears in the employee list. Alternatively, use [list](#listing-all-employees-list) or any [find commands](#find-an-employee-record) to locate the employee in the employee list. Afterwards, use the correct employee index in the `add-tag` command. |
+| `The employee already has some of the tags` | The employee already has some of the tags which you are trying to add | Remove the tags the employee has from the input command. For example, for an employee who already has the full-time tag, the command `add-tag 2 t/full-time t/remote` would not work. Instead, try `add-tag 2 t/remote`. |
+| `Tags names only allows alphanumeric characters, spaces, and dashes.` | The tags input contains illegal characters | Remove the illegal characters from the input. |
+#### Removing tags from employees: `delete-tag`
+
+Use the `delete-tag` command to remove tags from an employee. This command will remove the specified tags from an employee specified by their index in the employee list.
+
+Here's how to use the `delete-tag` command:
+
+1. Get the [index](#glossary) of the employee in the employee list.
+
+
+If the employee is not found, consider using [list](#listing-all-employees-list) or any [find commands](#find-an-employee-record) to locate the employee in the employee list.
+
+
+2. Type in the following command in the command box `delete-tag INDEX t/TAG...` where `INDEX` is the index of the employee in the list currently, `TAG` is the name of the tag to be deleted and `t/TAG...` representing one or more tags.
+ - For instance, if you want to remove the tags full-time and remote to the employee indexed 2, type `delete-tag 2 t/full-time t/remote` to the command box.
+ - Please refer to [how to interpret command formats](#how-to-interpret-command-formats) for more information
+3. Press "enter" on your keyboard and you should see the input tags removed from the employee specified.
+
+Here are the potential error messages you may receive and here's how to fix them:
+
+| Error message | Why it happens | Fix |
+|---------------|----------------|-----|
+| `Invalid command format!` | The command you input does not follow the specfied format | Ensure the command you entered follows the following format: `delete-tag INDEX t/TAG...`, replacing INDEX with the index of the employee currently, `TAG` is the name of the tag to be deleted and `t/TAG...` representing one or more tags. |
+| `At least one tag must be provided` | No tags were provided | Add tags to the command in the command box. Note that the tags must have a t/ [prefix](#glossary). For example, to remove the tag full-time, use `t/full-time` |
+| `The person index provided is invalid` | The index specified does not refer to any employee | Double check if the index appears in the employee list. Alternatively, use [list](#listing-all-employees-list) or any [find commands](#find-an-employee-record) to locate the employee in the employee list. Afterwards, use the correct employee index in the `delete-tag` command. |
+| `Some of the tags are not found on this employee.` | The employee does not have some of the tags you are trying to delete | Remove the tags not found on the employee from the input command. For example, for an employee without the tag full-time, the command `delete-tag 2 t/full-time t/remote` does not work. Instead try `delete-tag 2 t/remote`.|
+| `Tags names only allows alphanumeric characters, spaces, and dashes.` | The tags input contains illegal characters | Remove the illegal characters from the input. |
+
+
+
+#### Editing employee information : `edit`
+
+For a more comprehensive editing of an employee's information, use the `edit` command. This command will edit the specified fields of an employee specified by their index in the employee list.
+
+Here's how to use the `edit` command to edit an employee's information:
+
+1. Get the [index](#glossary) of the employee under the employee list.
+
+
+If the employee is not found, consider using list or any find commands to locate the employee in the employee list.
+
+
+2. Type in the following command in the command box `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL_ADDRESS] [a/HOME_ADDRESS] [t/TAG]...` where `INDEX` is the index of the employee in the list currently, `[n/NAME]`, `[p/PHONE_NUMBER]`, `[e/EMAIL_ADDRESS]`, `[a/HOME_ADDRESS]` are optional fields which require changing, replacing `NAME` with employee name, `PHONE_NUMBER` with employee phone number, `EMAIL_ADDRESS` with employee email address and `HOME_ADDRESS` with employee home address. `[t/TAG]...` is an optional field representing one or more tags where `TAG` is the tag name. Note that at least one field to edit must be present and only the fields present will be edited.
+ - For example, to change the phone number, email address and tags of the employee indexed 2 to 98765432, johndoe@example.com and full-time and remote, type in the command `edit 2 p/98765432 e/johndoe@example.com t/full-time t/remote`. Note that the name and home address will remain unchanged.
+ - In another example, to change the home address of the employee indexed 1 to John street, block 123 #01-01 and remove all tags from the employee, type in the command `edit 1 a/John street, block 123 #01-01 t/`. Note that the name, phone number and email_address will remain unchanged.
+ - Please refer to [how to interpret command formats](#how-to-interpret-command-formats) for more information
+
+
+If the tag prefix is specified, all existing tags under the employee will be removed and replaced with the new tags in the command.
+In the first example, the employee will have all tags removed and replaced by 2 tags: full-time and remote.
+In the second example, the employee will have all tags removed. No tags will be added since no tags are specified.
+Therefore, to avoid unintentionally losing any information while editing tags, we recommend using the add tag and delete-tag commands instead for editing tags.
+
+
+3. Press "enter" on your keyboard and you should see the changes applied to the employee.
+
+| Error message | Why it happens | Fix |
+|--------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL_ADDRESS] [a/HOME_ADDRESS] [t/TAG]...` where `INDEX` is the index of the employee in the list currently, `[n/NAME]`, `[p/PHONE_NUMBER]`, `[e/EMAIL_ADDRESS]`, `[a/HOME_ADDRESS]` are optional fields which require changing, replacing `NAME` with employee name, `PHONE_NUMBER` with employee phone number, `EMAIL_ADDRESS` with employee email address and `HOME_ADDRESS` with employee home address. `[t/TAG]...` is an optional field representing one or more tags where `TAG` is the tag name. Also check if the index is a positive integer, having an invalid index such as zero, negative numbers, non-integers, and characters can lead to this error message.|
+| `FIELD should FORMAT` where `FIELD` is an input like `Names` or `Phone numbers` and `FORMAT` contains additional information about the field's format. | The input does not follow the format prescribed. For example, the entered phone number might contain alphabets. | Follow the on screen message to fix the field in question. For example, `Phone numbers should only contain numbers, and it should be at least 3 digits long` means that the input phone number does not follow the prescribed format. |
+| `The person index provided is invalid` | The index specified does not refer to any employee | Double check if the index appears in the employee list. Alternatively, use [list](#listing-all-employees-list) or any [find commands](#find-an-employee-record) to locate the employee in the employee list. Afterwards, use the correct employee index in the `edit` command. |
+| `At least one field to edit must be provided` | The command you input does not contain any fields to edit | Check if there is any input fields in the command inputted. An input like `edit 1` is not accepted as there is no edits to be made. |
+| `This employee already exists in the address book` | The provided employee name is already found in HRMate | Use another name for the employee. For example, if trying to add another "John Doe", use the name "John Doe (HR)" to differentiate between the existing John Doe. HRMate does this name checking to prevent unintentional duplicate employee entries. |
+
+* **For advanced users:**
+ * You can remove all the tags of an employee with `edit INDEX t/` (see warning above)
+
+
+
+### Delete an employee record
+
+Delete employee records from HRMate using the [`delete`](#deleting-a-record-delete) command.
+
+#### Deleting a record : `delete`
+
+Use the `delete` command to delete an employee record from HRMate. This command will delete the specified employee from the employee list.
+
+Here's how to delete an employee record:
+
+1. Get the [index](#glossary) of the employee under the employee list. View this image in [quick start](#quick-start) for more information.
+
+If the employee is not found, consider using list or any find commands to locate the employee in the employee list.
+
+2. Type in the following command in the command box `delete INDEX` where `INDEX` is to be replaced with the index of the employee in the list currently
+ - For instance, to remove the whole record of the employee indexed 1, type `delete 1` to the command box.
+![Before Delete](images/before-delete.png)
+
+Once you delete the record, the records will be no longer available in HRMate and cannot be recovered.
+Therefore, to avoid unintentionally losing any information of the employee, if you just want to modify some information, we recommend using the
+edit command instead to modify the record.
+
+
+3. Press "enter" on your keyboard and you should see the employee removed from the employee list with all leaves related to that employee in the leave list being removed.
+![After Delete](images/after-delete.png)
+
+| Error message | Why it happens | Fix |
+|----------------------------------------|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `Invalid command format!` | The command you input does not follow the specified format | Ensure the command you entered follows the following format: `delete INDEX` where `INDEX` is the index of the employee in the list currently. Also check if the index is a positive integer, having an invalid index such as zero, negative numbers, non-integers, and characters can lead to this error message. |
+| `The person index provided is invalid` | The index specified is not positive or does not refer to any employee | Double check if the index is positive and appears in the employee list. Alternatively, use [list](#listing-all-employees-list) or any [find commands](#find-an-employee-record) to locate the employee in the employee list. Afterwards, use the correct employee index in the `delete` command. |
+|
+
+
+
+### Import/export employee records
+It's painful having to add in each employee into HRMate manually. That's why HRMate provides [`import`](#importing-employee-records-import) and [`export`](#exporting-employee-records-export) commands,
+so you can bring in all your records from Excel with just a single command!
+
+With the import and export commands, HRMate can read and save files in [CSV](#csv) format, which is supported
+by major spreadsheet applications such as Microsoft Excel.
+
+
+#### Importing employee records: `import`
+
+Use the `import` command to import employee records from a CSV file. This command will import the employee records from
+the specified CSV file into HRMate.
+
+
+Imported employee records will overwrite existing employee records in HRMate. Remember to make a copy of your existing
+employee records if you want to save them! You can do so by exporting your current records.
+
+
+Here's how you can bring over your records from Excel:
-**:information_source: Notes about the command format:**
+1. Export your Excel save file in CSV format. Ensure that the separator is set to be a semicolon(`;`), and that you have
+the following fields: Name, Phone, Email, Address, Tags. Note that tags in the Tags field have to be separated by commas.
+ * You may skip this step if you already have a CSV file (e.g. you are importing a previously exported CSV file generated by
+ HRMate)
-* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
+
+If you have saved or edited your CSV file in Excel, please note that Excel will likely change the separator into a comma,
+which will cause problems when trying to import employee records. To fix this problem,
+click here to find out how you
+can change the separator to semicolons in Excel. Note that this workaround is currently available only for Windows users.
+
-* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
+2. If you are unsure how your file should look like, you may refer to the following images:
+ * Here's how your CSV file should look like if you open it up in Notepad:
+ ![import-employee-notepad](images/import-employee-notepad.png)
+ * It is okay if your CSV file does not contain the first line `sep=;`, as this is a line added to files exported by HRMate
+ to help Excel open the file. Do ensure the next line has to be the following:
+ `Name;Phone;Email;Address;Tags` in order for HRMate to read it. Also note that tags are separated by commas
+ (see `colleagues, friends` under `Bernice Yu`'s row).
+ * If you open your CSV file in Excel, your file should look like this:
+
+
+ ![import-employee-excel](images/import-employee-excel.png)
+
+
+ * Do ensure that the first row contains the following headers: `Name`, `Phone`, `Email`, `Address`, and `Tags`.
+ Note that tags, if present, should be separated by commas (see cell `E3` for an example).
-* Items with `…` after them can be used multiple times including zero times.
- e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
+3. In HRMate, type in the following command in the command box: `import`
+4. In the file dialog that opens up, go to where you saved your exported CSV file, click on it, and click on the Open button.
+5. You should see your employee records show up in HRMate, along with the message "Employee records have been imported from [your file name]!"
-* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
+Here are some possible error messages you might encounter and here's how you can fix them:
-* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
- e.g. if the command specifies `help 123`, it will be interpreted as `help`.
+| Error Message | Why it happens | Fix |
+|----------------------------------------------------------------------|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
+| Employee records were not imported. | You did not select a file in the file dialog | Retype the command, and make sure to select a CSV file when the file dialog opens |
+| Records in file [file name] could not be imported, import cancelled. | Your file likely contains illegal characters or is corrupted | Ensure that your data fulfils the following constraints (to be added) |
+| No valid records found in file [file name], import cancelled | Your file either is empty or does not contain a single valid employee record | Ensure that your file is non-empty and fulfils the abovementioned constraints |
-* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.
-
-### Viewing help : `help`
+#### Exporting employee records : `export`
-Shows a message explaning how to access the help page.
+Not only can you bring your data into HRMate, you can also bring your data out of HRMate. HRMate's export feature allows you
+to export either the entire set of employee records, or employee records with a particular filter applied (e.g. only export
+all full-time employees, which are tagged with "Full time"). You can then either store your exported CSV file for future use,
+open it in a different application, or send it to another employee for them to import!
-![help message](images/helpMessage.png)
+Here's how you can export your data out of HRMate:
-Format: `help`
+1. In HRMate, type in the following command in the command box: `export [file name]`, replacing `[file name]` with the name
+you will like to give your file. Your files will be saved in CSV format automatically.
+ - For instance, if you would like to save your file as `employees.csv`, type in the command `export employees`
+2. You should see the message "Employee records have been saved to [file name]!"
+3. To retrieve your exported file, go to the folder in which HRMate is stored in your File Explorer (if using Windows) or
+Finder (if using Mac OS). From there, click on the `export` folder.
+4. You should see your file in the `export` folder.
+Here are potential error messages that you may receive and here's how to fix them:
-### Adding a person: `add`
+| Error Message | Why it happens | Fix |
+|---------------------------------------------------------------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Employee records could not be saved! | You do not have the permission to write the file | Try renaming your file name when typing out the command, especially if the previous name refers to an existing file. If not, move HRMate to a different folder where you can create files, and run the command again. |
-Adds a person to the address book.
-Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
-:exclamation: **Caution:**
-If your changes to the data file makes its format invalid, AddressBook 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.
-
-### Archiving data files `[coming in v2.0]`
-_Details coming soon ..._
--------------------------------------------------------------------------------------------------------------------
-## FAQ
+