diff --git a/src/main/java/seedu/address/logic/commands/CreateCommand.java b/src/main/java/seedu/address/logic/commands/CreateCommand.java index df7cff336c9..22982a986f8 100644 --- a/src/main/java/seedu/address/logic/commands/CreateCommand.java +++ b/src/main/java/seedu/address/logic/commands/CreateCommand.java @@ -45,12 +45,12 @@ public class CreateCommand extends Command { + PREFIX_SYMPTOM + "SYMPTOM " + PREFIX_DIAGNOSIS + "DIAGNOSIS " + "Example: " + COMMAND_WORD + " " - + PREFIX_NRIC + "S1234567A " + + PREFIX_NRIC + "S0123456A " + PREFIX_NAME + "John Doe " + PREFIX_PHONE + "98765432 " + PREFIX_EMAIL + "johnd@example.com " + PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 " - + PREFIX_DATEOFBIRTH + "01-01-1990 " + + PREFIX_DATEOFBIRTH + "1990-01-01 " + PREFIX_SEX + "M " + PREFIX_STATUS + "PENDING " + PREFIX_TAG + "Long term medication " @@ -79,7 +79,7 @@ public CommandResult execute(Model model) throws CommandException { } model.addPerson(toAdd); - return new CommandResult(String.format(MESSAGE_SUCCESS, Messages.format(toAdd))); + return new CommandResult(String.format(MESSAGE_SUCCESS, Messages.formatRead(toAdd))); } @Override diff --git a/src/main/java/seedu/address/logic/commands/DeleteCommand.java b/src/main/java/seedu/address/logic/commands/DeleteCommand.java index 978138bf653..4c5a748e1c4 100644 --- a/src/main/java/seedu/address/logic/commands/DeleteCommand.java +++ b/src/main/java/seedu/address/logic/commands/DeleteCommand.java @@ -43,7 +43,7 @@ public CommandResult execute(Model model) throws CommandException { //second checks if the NRIC is in the list Person personToDelete = persons.filtered(person -> person.getNric().equals(targetNric)).get(0); model.deletePerson(personToDelete); - return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, Messages.format(personToDelete))); + return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, Messages.formatRead(personToDelete))); } @Override diff --git a/src/main/java/seedu/address/logic/commands/UpdateCommand.java b/src/main/java/seedu/address/logic/commands/UpdateCommand.java index 1fa311929a3..aa1efceb407 100644 --- a/src/main/java/seedu/address/logic/commands/UpdateCommand.java +++ b/src/main/java/seedu/address/logic/commands/UpdateCommand.java @@ -48,15 +48,15 @@ public class UpdateCommand extends Command { public static final String COMMAND_WORD = "update"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Updates the details of the person identified " - + "by the index number used in the displayed person list. " + + "by the NRIC. " + "Existing values will be overwritten by the input values.\n" - + "Parameters: INDEX (must be a positive integer) " + + "Parameters: NRIC " + "[" + PREFIX_NAME + "NAME] " + "[" + PREFIX_PHONE + "PHONE] " + "[" + PREFIX_EMAIL + "EMAIL] " + "[" + PREFIX_ADDRESS + "ADDRESS] " + "[" + PREFIX_TAG + "TAG]...\n" - + "Example: " + COMMAND_WORD + " 1 " + + "Example: " + COMMAND_WORD + " S1234567A " + PREFIX_PHONE + "91234567 " + PREFIX_EMAIL + "johndoe@example.com"; @@ -98,7 +98,7 @@ public CommandResult execute(Model model) throws CommandException { model.setPerson(personToUpdate, updatedPerson); model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS); - return new CommandResult(String.format(MESSAGE_UPDATE_PERSON_SUCCESS, Messages.format(updatedPerson))); + return new CommandResult(String.format(MESSAGE_UPDATE_PERSON_SUCCESS, Messages.formatRead(updatedPerson))); } /**