From ea1cc17378f7743fd001b4e221f3503de506d588 Mon Sep 17 00:00:00 2001 From: xGladiate Date: Thu, 24 Oct 2024 22:22:23 +0800 Subject: [PATCH 1/5] Create ArchiveSequenceDiagram --- docs/diagrams/ArchiveSequenceDiagram.puml | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 docs/diagrams/ArchiveSequenceDiagram.puml diff --git a/docs/diagrams/ArchiveSequenceDiagram.puml b/docs/diagrams/ArchiveSequenceDiagram.puml new file mode 100644 index 00000000000..a671abd1bf2 --- /dev/null +++ b/docs/diagrams/ArchiveSequenceDiagram.puml @@ -0,0 +1,87 @@ +@startuml +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":ArchiveCommandParser" as ArchiveCommandParser LOGIC_COLOR +participant "a:ArchiveCommand" as ArchiveCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Person" as Person MODEL_COLOR +participant ":DeliveryList" as DeliveryList MODEL_COLOR +end box + +box Ui UI_COLOR_T1 +participant "<>\nInspectWindow" as InspectWindow UI_COLOR +end box + +[-> LogicManager : execute("archive 1 2") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("archive 1 2") +activate AddressBookParser + +create ArchiveCommandParser +AddressBookParser -> ArchiveCommandParser +activate ArchiveCommandParser + +ArchiveCommandParser --> AddressBookParser +deactivate ArchiveCommandParser + +AddressBookParser -> ArchiveCommandParser : parse("1 2") +activate ArchiveCommandParser + +create ArchiveCommand +ArchiveCommandParser -> ArchiveCommand +activate ArchiveCommand + +ArchiveCommand --> ArchiveCommandParser : +deactivate ArchiveCommand + +ArchiveCommandParser --> AddressBookParser : a +deactivate ArchiveCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +ArchiveCommandParser -[hidden]-> AddressBookParser +destroy ArchiveCommandParser + +AddressBookParser --> LogicManager : a +deactivate AddressBookParser + +LogicManager -> ArchiveCommand : execute(m) +activate ArchiveCommand + +ArchiveCommand -> InspectWindow : getInspectedPerson() +activate InspectWindow + +InspectWindow --> ArchiveCommand : inspectedPerson +deactivate InspectWindow + +ArchiveCommand -> Person : getDeliveryList() +activate Person + +Person --> ArchiveCommand : deliveryList +deactivate Person + +ArchiveCommand -> DeliveryList : archiveDeliveries(inspectedPerson, deliveryList) +activate DeliveryList + +DeliveryList --> ArchiveCommand +deactivate DeliveryList + +create CommandResult +ArchiveCommand -> CommandResult +activate CommandResult + +CommandResult --> ArchiveCommand +deactivate CommandResult + +ArchiveCommand --> LogicManager : r +deactivate ArchiveCommand + +[<--LogicManager +deactivate LogicManager +@enduml \ No newline at end of file From 10a6cb0fb8f53fc5e093e615346354092ca5a9d4 Mon Sep 17 00:00:00 2001 From: xGladiate Date: Thu, 24 Oct 2024 22:53:09 +0800 Subject: [PATCH 2/5] Modify ArchiveSequenceDiagram --- docs/diagrams/ArchiveSequenceDiagram.puml | 25 +++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/diagrams/ArchiveSequenceDiagram.puml b/docs/diagrams/ArchiveSequenceDiagram.puml index a671abd1bf2..37d8500e830 100644 --- a/docs/diagrams/ArchiveSequenceDiagram.puml +++ b/docs/diagrams/ArchiveSequenceDiagram.puml @@ -12,17 +12,16 @@ end box box Model MODEL_COLOR_T1 participant ":Person" as Person MODEL_COLOR -participant ":DeliveryList" as DeliveryList MODEL_COLOR end box box Ui UI_COLOR_T1 participant "<>\nInspectWindow" as InspectWindow UI_COLOR end box -[-> LogicManager : execute("archive 1 2") +[-> LogicManager : execute("archive 1") activate LogicManager -LogicManager -> AddressBookParser : parseCommand("archive 1 2") +LogicManager -> AddressBookParser : parseCommand("archive 1") activate AddressBookParser create ArchiveCommandParser @@ -32,7 +31,7 @@ activate ArchiveCommandParser ArchiveCommandParser --> AddressBookParser deactivate ArchiveCommandParser -AddressBookParser -> ArchiveCommandParser : parse("1 2") +AddressBookParser -> ArchiveCommandParser : parse("1") activate ArchiveCommandParser create ArchiveCommand @@ -60,17 +59,21 @@ activate InspectWindow InspectWindow --> ArchiveCommand : inspectedPerson deactivate InspectWindow -ArchiveCommand -> Person : getDeliveryList() +ArchiveCommand -> ArchiveCommand : archiveDeliveries(...) +activate ArchiveCommand + +ArchiveCommand -> Person : deleteDelivery(targetIndex) activate Person -Person --> ArchiveCommand : deliveryList -deactivate Person +Person -[hidden]-> ArchiveCommand -ArchiveCommand -> DeliveryList : archiveDeliveries(inspectedPerson, deliveryList) -activate DeliveryList +ArchiveCommand -> Person : addDelivery(deliveryToArchive) -DeliveryList --> ArchiveCommand -deactivate DeliveryList +Person -[hidden]-> ArchiveCommand +deactivate Person + +ArchiveCommand --> ArchiveCommand +deactivate ArchiveCommand create CommandResult ArchiveCommand -> CommandResult From cef18ead887561632d3ec3baa29bf4135259e772 Mon Sep 17 00:00:00 2001 From: xGladiate Date: Thu, 24 Oct 2024 23:46:15 +0800 Subject: [PATCH 3/5] Update version to prepare for v1.4 release --- src/main/java/seedu/address/MainApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java index 678ddc8c218..bfd019836ed 100644 --- a/src/main/java/seedu/address/MainApp.java +++ b/src/main/java/seedu/address/MainApp.java @@ -36,7 +36,7 @@ */ public class MainApp extends Application { - public static final Version VERSION = new Version(0, 2, 2, true); + public static final Version VERSION = new Version(0, 2, 3, true); private static final Logger logger = LogsCenter.getLogger(MainApp.class); From c5886da37f568d421bc79ad26d706a56d94d36f5 Mon Sep 17 00:00:00 2001 From: xGladiate Date: Fri, 25 Oct 2024 10:54:22 +0800 Subject: [PATCH 4/5] Remove archive placeholder in UI --- src/main/java/seedu/address/ui/DeliveryCard.java | 5 ----- src/main/resources/view/DeliveryListCard.fxml | 9 +++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/seedu/address/ui/DeliveryCard.java b/src/main/java/seedu/address/ui/DeliveryCard.java index 361687d2a19..cf10a2b6c10 100644 --- a/src/main/java/seedu/address/ui/DeliveryCard.java +++ b/src/main/java/seedu/address/ui/DeliveryCard.java @@ -48,8 +48,6 @@ public class DeliveryCard extends UiPart { @FXML private FlowPane tags; @FXML - private Label archive; - @FXML private FlowPane items; /** @@ -73,9 +71,6 @@ public DeliveryCard(Delivery delivery, int displayedIndex) { .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> tags.getChildren().add(new Label(tag.tagName))); - //Can be removed - archive.setText(delivery.getArchive().toString()); - // Update the card style based on the archive status if (delivery.isArchived()) { cardPane.getStyleClass().add("archived"); diff --git a/src/main/resources/view/DeliveryListCard.fxml b/src/main/resources/view/DeliveryListCard.fxml index caa4889c776..023a372d935 100644 --- a/src/main/resources/view/DeliveryListCard.fxml +++ b/src/main/resources/view/DeliveryListCard.fxml @@ -30,7 +30,7 @@