forked from nus-cs2103-AY1718S1/addressbook-level4-old
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from charlesgoh/v1.3-remarks
[v1.3][REMARKS] Add support for a remark field
- Loading branch information
Showing
12 changed files
with
143 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,8 @@ e.g. typing *`help`* and pressing kbd:[Enter] will open the help window. | |
|
||
* *`help`*: opens this page in a new window | ||
* *`list`* : lists all contacts | ||
* **`add`**`n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01` : adds a contact named `John Doe` to the Address Book. | ||
* **`add`**`n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 r/This remark is a stub` : | ||
adds a contact named `John Doe` to the Address Book. | ||
* **`delete`**`3` : deletes the 3rd contact shown in the current list | ||
* *`exit`* : exits the app | ||
|
||
|
@@ -70,19 +71,19 @@ Alternatively, you may opt to use the keyboard shortcut `F1`. | |
|
||
You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. + | ||
`add` can be replaced by `a` for faster input. + | ||
Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` + | ||
Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` + | ||
|
||
**** | ||
* A person can have any number of tags (including 0) + | ||
* The `EMAIL` should be in the format [email protected] + | ||
* You can set a person's `Name`, `Phone`, `Email` or `Address` to be private by placing a `p` in front of the prefix. + | ||
* You can set a person's `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. + | ||
**** | ||
|
||
Examples: | ||
|
||
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 b/11-11-1995` | ||
* `add n/Betsy Crowe t/friend e/[email protected] b/29-02-1996 a/Newgate Prison p/1234567 t/criminal` | ||
* `add n/Ima Hidearu b/ a/ e/ p/ t/secretive` | ||
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears` | ||
* `add n/Betsy Crowe t/friend e/[email protected] b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall` | ||
* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive` | ||
* `add n/Luke Groundswimmer p/ a/ e/ c/` | ||
* `add pn/Neville Shorttop pp/46492787 pe/[email protected] pa/Gryphon Gate c/` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK; | ||
|
||
|
@@ -41,6 +42,8 @@ public class CommandTestUtil { | |
public static final String VALID_EMAIL_BOB = "[email protected]"; | ||
public static final String VALID_ADDRESS_AMY = "Block 312, Amy Street 1"; | ||
public static final String VALID_ADDRESS_BOB = "Block 123, Bobby Street 3"; | ||
public static final String VALID_REMARK_AMY = "She sells sea shells on the sea shore"; | ||
public static final String VALID_REMARK_BOB = "He eats, shoots and leaves"; | ||
public static final String VALID_TAG_HUSBAND = "husband"; | ||
public static final String VALID_TAG_FRIEND = "friend"; | ||
public static final String VALID_TAG_COLLEAGUE = "colleague"; | ||
|
@@ -62,6 +65,8 @@ public class CommandTestUtil { | |
public static final String EMAIL_DESC_BOB = " " + PREFIX_EMAIL + VALID_EMAIL_BOB; | ||
public static final String ADDRESS_DESC_AMY = " " + PREFIX_ADDRESS + VALID_ADDRESS_AMY; | ||
public static final String ADDRESS_DESC_BOB = " " + PREFIX_ADDRESS + VALID_ADDRESS_BOB; | ||
public static final String REMARK_DESC_AMY = " " + PREFIX_REMARK + VALID_REMARK_AMY; | ||
public static final String REMARK_DESC_BOB = " " + PREFIX_REMARK + VALID_REMARK_BOB; | ||
public static final String TAG_DESC_FRIEND = " " + PREFIX_TAG + VALID_TAG_FRIEND; | ||
public static final String TAG_DESC_HUSBAND = " " + PREFIX_TAG + VALID_TAG_HUSBAND; | ||
public static final String NAME_DESC_AMY_PRIVATE = " " + PREFIX_NAME_PRIVATE + VALID_NAME_AMY; | ||
|
@@ -72,6 +77,8 @@ public class CommandTestUtil { | |
public static final String EMAIL_DESC_BOB_PRIVATE = " " + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB; | ||
public static final String ADDRESS_DESC_AMY_PRIVATE = " " + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY; | ||
public static final String ADDRESS_DESC_BOB_PRIVATE = " " + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB; | ||
public static final String REMARK_DESC_AMY_PRIVATE = " " + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY; | ||
public static final String REMARK_DESC_BOB_PRIVATE = " " + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB; | ||
|
||
public static final String TASK_NAME_DESC_PENCIL = " " + PREFIX_NAME + VALID_TASK_NAME_PENCIL; | ||
public static final String TASK_NAME_DESC_PAPER = " " + PREFIX_NAME + VALID_TASK_NAME_PAPER; | ||
|
@@ -97,10 +104,10 @@ public class CommandTestUtil { | |
static { | ||
DESC_AMY = new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY) | ||
.withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY) | ||
.withTags(VALID_TAG_FRIEND).build(); | ||
.withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build(); | ||
DESC_BOB = new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB) | ||
.withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB) | ||
.withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build(); | ||
.withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build(); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND; | ||
import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND; | ||
|
||
|
@@ -26,11 +28,11 @@ public class TypicalPersons { | |
|
||
public static final ReadOnlyPerson ALICE = new PersonBuilder().withName("Alice Pauline") | ||
.withAddress("123, Jurong West Ave 6, #08-111").withEmail("[email protected]") | ||
.withPhone("85355255") | ||
.withPhone("85355255").withRemark("Alice from wonderland") | ||
.withTags("friends").build(); | ||
public static final ReadOnlyPerson BENSON = new PersonBuilder().withName("Benson Meier") | ||
.withAddress("311, Clementi Ave 2, #02-25") | ||
.withEmail("[email protected]").withPhone("98765432") | ||
.withEmail("[email protected]").withPhone("98765432").withRemark("Teammate") | ||
.withTags("owesMoney", "friends").build(); | ||
public static final ReadOnlyPerson CARL = new PersonBuilder().withName("Carl Kurz").withPhone("95352563") | ||
.withEmail("[email protected]").withAddress("wall street").build(); | ||
|
@@ -51,10 +53,11 @@ public class TypicalPersons { | |
|
||
// Manually added - Person's details found in {@code CommandTestUtil} | ||
public static final ReadOnlyPerson AMY = new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY) | ||
.withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).build(); | ||
.withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY) | ||
.withTags(VALID_TAG_FRIEND).build(); | ||
public static final ReadOnlyPerson BOB = new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB) | ||
.withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND) | ||
.build(); | ||
.withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB) | ||
.withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build(); | ||
|
||
public static final String KEYWORD_MATCHING_MEIER = "Meier"; // A keyword that matches MEIER | ||
|
||
|
Oops, something went wrong.