-
Notifications
You must be signed in to change notification settings - Fork 548
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 #182 from HolmesJJ/fix-bugs
- Loading branch information
Showing
30 changed files
with
223 additions
and
128 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
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 |
---|---|---|
|
@@ -9,28 +9,31 @@ | |
|
||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
import seedu.address.model.member.Id; | ||
import seedu.address.model.member.Member; | ||
|
||
/** | ||
* Adds a member to the ezFoodie. | ||
*/ | ||
public class AddMemberCommand extends AddCommand { | ||
|
||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a member to the ezFoodie. " | ||
+ "Parameters: " | ||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a member to the ezFoodie.\n" | ||
+ "Parameters:\n" | ||
+ PREFIX_MEMBER + " " | ||
+ PREFIX_NAME + " " + "NAME " | ||
+ PREFIX_PHONE + " " + "PHONE " | ||
+ PREFIX_EMAIL + " " + "EMAIL " | ||
+ PREFIX_ADDRESS + " " + "ADDRESS\n" | ||
+ "Example: " + COMMAND_WORD + " " | ||
+ PREFIX_NAME + "NAME " | ||
+ PREFIX_PHONE + "PHONE " | ||
+ PREFIX_EMAIL + "EMAIL " | ||
+ PREFIX_ADDRESS + "ADDRESS\n" | ||
+ "Example:\n" | ||
+ COMMAND_WORD + " " | ||
+ PREFIX_MEMBER + " " | ||
+ PREFIX_NAME + " " + "John Doe " | ||
+ PREFIX_PHONE + " " + "98765432 " | ||
+ PREFIX_EMAIL + " " + "[email protected] " | ||
+ PREFIX_ADDRESS + " " + "311, Clementi Ave 2, #02-25"; | ||
+ PREFIX_NAME + "John Doe " | ||
+ PREFIX_PHONE + "98765432 " | ||
+ PREFIX_EMAIL + "[email protected] " | ||
+ PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25"; | ||
|
||
public static final String MESSAGE_SUCCESS = "New member added: %1$s"; | ||
public static final String MESSAGE_FULL = "Member ID has reached " + Id.MAX; | ||
public static final String MESSAGE_DUPLICATE_MEMBER = "This member already exists in the ezFoodie"; | ||
|
||
private final Member toAdd; | ||
|
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
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 |
---|---|---|
|
@@ -44,24 +44,24 @@ public class EditMemberCommand extends EditCommand { | |
+ "by the index number used in the displayed member list or the member ID. " | ||
+ "Existing values will be overwritten by the input values.\n" | ||
+ "Parameters:\n" | ||
+ "Edit by index number: " + PREFIX_MEMBER + " [" + PREFIX_INDEX + " INDEX] " | ||
+ "Edit by index number: " + PREFIX_MEMBER + " " + PREFIX_INDEX + "INDEX " | ||
+ "(INDEX must be a positive integer) " | ||
+ "[" + PREFIX_NAME + " NAME] " | ||
+ "[" + PREFIX_PHONE + " PHONE] " | ||
+ "[" + PREFIX_EMAIL + " EMAIL] " | ||
+ "[" + PREFIX_ADDRESS + " ADDRESS]\n" | ||
+ "Edit by member ID: " + PREFIX_MEMBER + " [" + PREFIX_ID + " ID] " | ||
+ "[" + PREFIX_NAME + " NAME] " | ||
+ "[" + PREFIX_PHONE + " PHONE] " | ||
+ "[" + PREFIX_EMAIL + " EMAIL] " | ||
+ "[" + PREFIX_ADDRESS + " ADDRESS]\n" | ||
+ "[" + PREFIX_NAME + "NAME] " | ||
+ "[" + PREFIX_PHONE + "PHONE] " | ||
+ "[" + PREFIX_EMAIL + "EMAIL] " | ||
+ "[" + PREFIX_ADDRESS + "ADDRESS]\n" | ||
+ "Edit by member ID: " + PREFIX_MEMBER + " " + PREFIX_ID + "ID " | ||
+ "[" + PREFIX_NAME + "NAME] " | ||
+ "[" + PREFIX_PHONE + "PHONE] " | ||
+ "[" + PREFIX_EMAIL + "EMAIL] " | ||
+ "[" + PREFIX_ADDRESS + "ADDRESS]\n" | ||
+ "Example:\n" | ||
+ "Edit by index number: " + COMMAND_WORD + " " + PREFIX_MEMBER + " " + PREFIX_INDEX + " 1 " | ||
+ PREFIX_PHONE + " 91234567 " | ||
+ PREFIX_EMAIL + " [email protected]\n" | ||
+ "Edit by member ID: " + COMMAND_WORD + " " + PREFIX_MEMBER + " " + PREFIX_ID + " 10001 " | ||
+ PREFIX_PHONE + " 91234567 " | ||
+ PREFIX_EMAIL + " [email protected]"; | ||
+ "Edit by index number: " + COMMAND_WORD + " " + PREFIX_MEMBER + " " + PREFIX_INDEX + "1 " | ||
+ PREFIX_PHONE + "91234567 " | ||
+ PREFIX_EMAIL + "[email protected]\n" | ||
+ "Edit by member ID: " + COMMAND_WORD + " " + PREFIX_MEMBER + " " + PREFIX_ID + "10001 " | ||
+ PREFIX_PHONE + "91234567 " | ||
+ PREFIX_EMAIL + "[email protected]"; | ||
|
||
public static final String MESSAGE_SUCCESS = "Edited Member: %1$s"; | ||
public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided."; | ||
|
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
Oops, something went wrong.