diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 3a0b828cc73e..14439e83be40 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -230,6 +230,56 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa This section describes some noteworthy details on how certain features are implemented. +// tag::set[] +=== Set command feature +==== Current Implementation + +Set command keeps 2 lists of command words, the default command words and the custom user command words, which are both managed by the class `CommandWords`. + +The default command words are stored as a class level reference `COMMANDS`, while the custom command words are stored as a field `commands` in the object. + +`CommandWords` is in the `Logic` component, under `Commands`, as it is required to parse commands in `AddressBookParser`. + +`CommandWords` only deal with commands that have their default command word declared in the class level reference. + +image::SetCommandLogicDiagram.png[width="800"]+ +image::SetCommandModelDiagram.png[width="800"]+ + +As you can see from the diagram, AddressBookParser makes a reference to CommandWords. However, `CommandWords` resides in `UserPrefs` in the `Model` component. + +This is to facilitate the saving of data. + +==== Design Considerations + +===== Aspect: Where to put CommandWords for storage + +* **Alternative 1:** Place `CommandWords` in `UserPrefs` +** Pros: Single Responsibility Principle is maintained as custom command words in `CommandWords` is a user preference. +** Cons: More coupling is required for the AddressBook to retrieve the custom command words. +* **Alternative 2:** Place `CommandWords` in `AddressBook` +** Pros: Direct access to custom words in commands. +** Cons: Single Responsibility Principle will be violated. + +===== Aspect: Access to CommandWords + +* **Alternative 1:** `ModelManager` and member variables gets access and provides API to access `CommandWords`. +** Pros: Write protection. +** Cons: `CommandWords` is frequently accessed, many more APIs are required. +* **Alternative 2 (current choice):** Provide direct access to `CommandWords` when more details are needed and keep minimal API on `ModelManager`. +** Pros: Easy to implement, neat. +** Cons: Accidental modification can lead to bugs, so need to be careful. + + +===== Aspect: Storing the list of default command words + +* **Alternative 1 (current choice):** Store the default list in `CommandWords`. +** Pros: Easier to maintain the Open-Closed Principle, also follows the Single Responsibility Principle. +** Cons: Increased coupling. +* **Alternative 2:** Store the default list in `Commands`. +** Pros: Reduced coupling. +** Cons: `Commands` is an abstract class, it is not appropriate to reference class variables. +// end::set[] + // tag::importexport[] === Import/Export feature #Coming in v2.0# ==== Current Implementation @@ -920,6 +970,17 @@ See this https://github.com/se-edu/addressbook-level4/pull/599[PR] for the step- [none] ** User can archive that may be needed for future reference. Job entries can also be analyse to keep track of the the employees' performance. +*Feature contribution*: + +- Importing job entries from an excel file (major enhancement) +Done by: yuhongherald +User can specify the file path to an excel file containing the job entries in columns, and header fields to indicate the +field contents for each row. User then reviews the changes and generates a feedback document. + +- Setting custom command keywords (minor enhancement) +Done by: yuhongherald +User can set a custom keyword that is not used on top of the original command word. + [appendix] == User Stories diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 3f4ce9f3c4d3..f3a75d84e84f 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -152,23 +152,143 @@ Deletes the 2nd employee in CarviciM. `deletee 1` + Deletes the 1st employee in the results of the `findE` command. +// tag::set[] === Changing a command word : `set` -Selects the employee identified by the index number used in the last employee listing. + +You can set an easy to use word in place of a default command word. + Format: `set OLD_COMMAND_WORD NEW_COMMAND_WORD` -**** -* Sets the OLD_COMMAND_WORD to NEW_COMMAND_WORD -* The OLD_COMMAND_WORD must be in user preferences +[NOTE] +==== +* The OLD_COMMAND_WORD can be either a default command word or one which user has set previously. * The NEW_COMMAND_WORD must be 1 word, with no spacing. -**** +* Any default words or words currently set by users are not allowed. +==== Examples: * `set add a` + -Sets `add` command word to `a` +Sets `add` command word to `a` using default +* `set add s` + +Sets `add` command word to `s` using default +* `set set a` + +Sets `set` command word to `a` using default +* `set a s` + +Invalid command as s is already used by user. * `set a add` + -Sets `a` command word back to `add` +Invalid command as add is a default command. +* `set a set` + +Sets `a` command word back to `set`, its default mapping. +// end::set[] + +// tag::importexport[] +=== Importing jobs from an excel file #Coming in v2.0# +==== Importing a new excel file: import + +You can load your excel file by filename or filepath. +Format: `import PATH_TO_FILE` + +[NOTE] +==== +* Filepath: A text representation of the location of the file used by the computer. +* CarviciM tries to read the file by rows: +** The first row specifies the type of detail in the column. +==== + +Examples: + +* `import excel.xls` + +Imports file excel.xls. + + +==== Accepting and rejecting changes + +You can use 4 commands when reviewing changes: +* accept INDEX +* reject INDEX +* acceptAll +* rejectAll + +===== Accepting 1 job: accept + +Accepts a job specified at position INDEX in imported list. +Format: `accept INDEX` + +Examples: + +* `accept 1` + +Accepts the first job entry and removes it from imported list. + +===== Accepting all remaining imported jobs: acceptAll + +Accepts all remaining jobs. +Format: `acceptAll` + +Examples: + +* `acceptAll` + +Accepts all remaining job entries and clears the imported list. + +===== Rejecting 1 job: reject + +Rejects a job specified at position INDEX in imported list. +Format: `reject INDEX` + +Examples: + +* `reject 1` + +Rejects the first job entry and removes it from imported list. + +===== Rejecting all remaining imported jobs: rejectAll + +Rejects all remaining jobs. +Format: `rejectAll` + +Examples: + +* `rejectAll` + +Rejects all remaining job entries and clears the imported list. + +==== Writing comments to your reviews + +While accepting or rejecting changes, you can enter your comments behind the command +[TIP] +==== +You can type any alphanumeric sentence as a comment, as long as it is after the command. +==== + +Examples: + +* `accept 1` good job` + +Accepts first job and attaches "good job" as a comment to the first job. +* `acceptAll well done` + +Accepts all remaining imported jobs and attaches "well done" as a comment to all the remaining imported jobs. +* `reject 1 Speak to you during tomorrow's meeting.` + +Rejects first job and attaches "Speak to you during tomorrow's meeting." as a comment to the first job. +* `rejectAll Please check the customer details.` + +Rejects all remaining imported jobs and attaches "Please check the customer details." as a comment to all the remaining imported jobs. + +==== Sharing your feedback with your employees + +If you want to share your feedback, you can export it as an excel file, reflecting accept/reject with comments. +Format: `export PATH_TO_FILE` + +[TIP] +==== +* You can type any filename supported by your computer's storage format +* If you forgot to export your feedback, you can find it under C:\User\Documents\CarviciM\feedback.xls +* The feedback file's format is support for future imports. +==== +[NOTE] +==== +Filepath: A text representation of the location of the file used by the computer. +==== + +Examples: + +* `export summary report` +Exports the feedback to "summary report.xls" +// end::importexport[] === Setting a theme : `theme` diff --git a/docs/diagrams/LogicComponentClassDiagram.pptx b/docs/diagrams/LogicComponentClassDiagram.pptx index e38e3de020a3..f6d93955ab8f 100644 Binary files a/docs/diagrams/LogicComponentClassDiagram.pptx and b/docs/diagrams/LogicComponentClassDiagram.pptx differ diff --git a/docs/diagrams/ModelComponentClassDiagram.pptx b/docs/diagrams/ModelComponentClassDiagram.pptx index 418360e10b26..2c5e38061d43 100644 Binary files a/docs/diagrams/ModelComponentClassDiagram.pptx and b/docs/diagrams/ModelComponentClassDiagram.pptx differ diff --git a/docs/images/SetCommandLogicDiagram.png b/docs/images/SetCommandLogicDiagram.png new file mode 100644 index 000000000000..0d40c836f2b6 Binary files /dev/null and b/docs/images/SetCommandLogicDiagram.png differ diff --git a/docs/images/SetCommandModelDiagram.png b/docs/images/SetCommandModelDiagram.png new file mode 100644 index 000000000000..137647738602 Binary files /dev/null and b/docs/images/SetCommandModelDiagram.png differ diff --git a/docs/team/yuhongherald.adoc b/docs/team/yuhongherald.adoc index da159ff8cf8e..7e7571a3dc53 100644 --- a/docs/team/yuhongherald.adoc +++ b/docs/team/yuhongherald.adoc @@ -25,33 +25,24 @@ Coming in v2.0 * *Other contributions*: ** Project management: -*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub +*** Helped to edit PRs for merging for v1.2- (Pull requests https://github.com[#40], https://github.com[#48]) ** Enhancements to existing features: -*** Updated the GUI color scheme (Pull requests https://github.com[#33], https://github.com[#34]) -*** Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull requests https://github.com[#36], https://github.com[#38]) +*** Added JobListPanel to support displaying jobs (Pull requests https://github.com[#53]) ** Documentation: -*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com[#14] ** Community: -*** PRs reviewed (with non-trivial review comments): https://github.com[#12], https://github.com[#32], https://github.com[#19], https://github.com[#42] -*** Contributed to forum discussions (examples: https://github.com[1], https://github.com[2], https://github.com[3], https://github.com[4]) -*** Reported bugs and suggestions for other teams in the class (examples: https://github.com[1], https://github.com[2], https://github.com[3]) -*** Some parts of the history feature I added was adopted by several other class mates (https://github.com[1], https://github.com[2]) ** Tools: -*** Integrated a third party library (Natty) to the project (https://github.com[#42]) -*** Integrated a new Github plugin (CircleCI) to the team repo _{you can add/remove categories in the list above}_ == Contributions to the User Guide - |=== |_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._ |=== -include::../UserGuide.adoc[tag=undoredo] +include::../UserGuide.adoc[tag=set] -include::../UserGuide.adoc[tag=dataencryption] +include::../UserGuide.adoc[tag=importexport] == Contributions to the Developer Guide @@ -59,7 +50,7 @@ include::../UserGuide.adoc[tag=dataencryption] |_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._ |=== -include::../DeveloperGuide.adoc[tag=undoredo] +include::../DeveloperGuide.adoc[tag=set] -include::../DeveloperGuide.adoc[tag=dataencryption] +include::../DeveloperGuide.adoc[tag=importexport]