Skip to content

Commit

Permalink
Merge pull request #366 from juliusgambe/365-ui-delivery-list-message
Browse files Browse the repository at this point in the history
Fix Customer and Delivery
  • Loading branch information
jianyangg authored Nov 2, 2023
2 parents 530e7a2 + 5beda81 commit acb78d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class CustomerListCommand extends CustomerCommand {

public static final String COMMAND_WORD = CustomerCommand.COMMAND_WORD + " " + "list";
public static final String MESSAGE_SUCCESS = "Listed all Customers";
public static final String MESSAGE_SUCCESS = "Listed Customers";
public static final String MESSAGE_EMPTY = "There are currently no customers to be listed.";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
public class DeliveryListCommand extends DeliveryCommand {
public static final String COMMAND_WORD = DeliveryCommand.COMMAND_WORD + " " + "list";
public static final String MESSAGE_SUCCESS = "Listed all Deliveries";
public static final String MESSAGE_SUCCESS = "Listed Deliveries";
public static final String MESSAGE_EMPTY = "There are currently no deliveries to be listed.";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Lists all deliveries or the deliveries filtered and "
+ "sorted by the specified filters or sort.\n\n"
Expand Down Expand Up @@ -96,9 +96,9 @@ public CommandResult execute(Model model) throws CommandException {

// sort by expected delivery date
model.sortFilteredDeliveryList(
sortType.equals(Sort.ASC) ? Comparator.comparing(Delivery::getDeliveryDate) : Comparator.comparing(
Delivery::getDeliveryDate)
.reversed());
sortType.equals(Sort.ASC) ? Comparator.comparing(Delivery::getDeliveryDate) : Comparator.comparing(
Delivery::getDeliveryDate)
.reversed());

//TODO: UI
return new CommandResult(MESSAGE_SUCCESS, true);
Expand Down Expand Up @@ -126,7 +126,7 @@ public boolean equals(Object other) {
}

if (this.deliveryDate != null && otherDeliveryListCommand.deliveryDate != null
&& !this.deliveryDate.equals(otherDeliveryListCommand.deliveryDate)) {
&& !this.deliveryDate.equals(otherDeliveryListCommand.deliveryDate)) {
return false;
}

Expand Down

0 comments on commit acb78d2

Please sign in to comment.