From dc498823a48c9766f51acf84937c05511d287972 Mon Sep 17 00:00:00 2001 From: jianrong7 Date: Thu, 2 Nov 2023 09:07:40 +0800 Subject: [PATCH 1/2] Add clear command --- src/main/java/seedu/address/logic/commands/ClearCommand.java | 4 +++- src/main/resources/view/PropertyListCard.fxml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/address/logic/commands/ClearCommand.java b/src/main/java/seedu/address/logic/commands/ClearCommand.java index 9c86b1fa6e4..9eac2c53e73 100644 --- a/src/main/java/seedu/address/logic/commands/ClearCommand.java +++ b/src/main/java/seedu/address/logic/commands/ClearCommand.java @@ -4,6 +4,7 @@ import seedu.address.model.AddressBook; import seedu.address.model.Model; +import seedu.address.model.PropertyBook; /** * Clears the address book. @@ -11,13 +12,14 @@ public class ClearCommand extends Command { public static final String COMMAND_WORD = "clear"; - public static final String MESSAGE_SUCCESS = "Address book has been cleared!"; + public static final String MESSAGE_SUCCESS = "Customer List and Property List have been cleared!"; @Override public CommandResult execute(Model model) { requireNonNull(model); model.setAddressBook(new AddressBook()); + model.setPropertyBook(new PropertyBook()); return new CommandResult(MESSAGE_SUCCESS); } } diff --git a/src/main/resources/view/PropertyListCard.fxml b/src/main/resources/view/PropertyListCard.fxml index b77c0f1fac5..774a047ba68 100644 --- a/src/main/resources/view/PropertyListCard.fxml +++ b/src/main/resources/view/PropertyListCard.fxml @@ -30,7 +30,7 @@