diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 1e65c1ac200..68201fd9cb6 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -864,10 +864,10 @@ This behaviour is intentional and not a bug. * Date range starts from 1970 onwards ** Date of year input starts from 1970 onwards. This is enough to fit our use case. Anything lower will be rejected. -* Auto truncation of labels +* Auto truncation of labels and values ** the X-axis labels will adjust automatically based on the range of inputs. This is intended to give users the flexibility with regards to the range of dates to be inputted. Above a certain range the interval between x-axis data -will decrease e.g 2 months +will decrease e.g 2 months. Above a certain values, labels will be replaced by standard notation e.g 9999999E8 * Stats window data not updating ** If you already have a stats window open and you complete an order, diff --git a/src/main/java/seedu/address/ui/cards/ArchivedOrderCard.java b/src/main/java/seedu/address/ui/cards/ArchivedOrderCard.java index c6d3c83c69f..d638f5af7b6 100644 --- a/src/main/java/seedu/address/ui/cards/ArchivedOrderCard.java +++ b/src/main/java/seedu/address/ui/cards/ArchivedOrderCard.java @@ -65,6 +65,8 @@ public class ArchivedOrderCard extends UiPart { private FlowPane scheduleTags; @FXML private FlowPane customerTags; + @FXML + private FlowPane phoneTags; public ArchivedOrderCard(Order order, int displayedIndex) { @@ -107,6 +109,11 @@ public ArchivedOrderCard(Order order, int displayedIndex) { .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> customerTags.getChildren().add(new Label(tag.tagName))); } + if (order.getPhone() != null) { + order.getPhone().getTags().stream() + .sorted(Comparator.comparing(tag -> tag.tagName)) + .forEach(tag -> phoneTags.getChildren().add(new Label(tag.tagName))); + } order.getTags().stream() .sorted(Comparator.comparing(tag -> tag.tagName)) diff --git a/src/main/java/seedu/address/ui/cards/OrderCard.java b/src/main/java/seedu/address/ui/cards/OrderCard.java index 5068648d15d..e6f71d361ac 100644 --- a/src/main/java/seedu/address/ui/cards/OrderCard.java +++ b/src/main/java/seedu/address/ui/cards/OrderCard.java @@ -62,6 +62,8 @@ public class OrderCard extends UiPart { private FlowPane scheduleTags; @FXML private FlowPane customerTags; + @FXML + private FlowPane phoneTags; public OrderCard(Order order, int displayedIndex) { super(FXML); @@ -100,6 +102,11 @@ public OrderCard(Order order, int displayedIndex) { .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> customerTags.getChildren().add(new Label(tag.tagName))); } + if (order.getPhone() != null) { + order.getPhone().getTags().stream() + .sorted(Comparator.comparing(tag -> tag.tagName)) + .forEach(tag -> phoneTags.getChildren().add(new Label(tag.tagName))); + } order.getTags().stream() .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> tags.getChildren().add(new Label(tag.tagName))); diff --git a/src/main/resources/view/ArchivedOrderListCard.fxml b/src/main/resources/view/ArchivedOrderListCard.fxml index 47eb6bb356e..19f773b3f1b 100644 --- a/src/main/resources/view/ArchivedOrderListCard.fxml +++ b/src/main/resources/view/ArchivedOrderListCard.fxml @@ -95,6 +95,10 @@