Skip to content

Commit

Permalink
Update DG and Ha Duong PPP
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaduong committed Apr 9, 2023
1 parent c69e712 commit 8ed01a5
Show file tree
Hide file tree
Showing 38 changed files with 363 additions and 120 deletions.
182 changes: 129 additions & 53 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/diagrams/DeleteDeliveryJobSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ end box
[-> LogicManager : execute("delete_job ABCDEF", g -> !g.equals(CommandGroup.PERSON))
activate LogicManager

LogicManager -> DukeDriverParser : parseCommandGroup("delete_job ABCDEF")
activate DukeDriverParser

DukeDriverParser --> LogicManager : CommandGroup of "delete_job ABCDEF"


LogicManager -> DukeDriverParser : parse("delete_job ABCDEF")
Expand Down
46 changes: 46 additions & 0 deletions docs/diagrams/TimetableCompletedSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@startuml
!include style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":DukeDriverParser" as DukeDriverParser LOGIC_COLOR
participant "t:TimetableCompleteCommand" as TimetableCompleteCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute("timetable_completed")
activate LogicManager

LogicManager -> DukeDriverParser : parseCommand("timetable_completed")
activate DukeDriverParser

create TimetableCompleteCommand
DukeDriverParser -> TimetableCompleteCommand
activate TimetableCompleteCommand

TimetableCompleteCommand --> DukeDriverParser : t
deactivate TimetableCompleteCommand

DukeDriverParser --> LogicManager : t
deactivate DukeDriverParser

LogicManager -> TimetableCompleteCommand : execute()
activate TimetableCompleteCommand
TimetableCompleteCommand -> Model : updateSortedDeliveryJobList(new SortbyTimeAndEarn())
TimetableCompleteCommand -> Model : getCompletedDeliveryJobList()
activate Model


Model --> TimetableCompleteCommand
deactivate Model

TimetableCompleteCommand --> LogicManager : result
deactivate TimetableCompleteCommand
TimetableCompleteCommand -[hidden]-> LogicManager : result
destroy TimetableCompleteCommand

[<--LogicManager
deactivate LogicManager
@enduml
65 changes: 42 additions & 23 deletions docs/diagrams/TimetableDateSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,64 @@

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant "t:TimetableCommand" as TimetableCommand LOGIC_COLOR
participant ":DukeDriverParser" as DukeDriverParser LOGIC_COLOR
participant ":TimetableDateCommandParser" as TimetableDateCommandParser LOGIC_COLOR
participant "t:TimetableDateCommand" as TimetableDateCommand LOGIC_COLOR
participant ":CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute(timetable)
[-> LogicManager : execute("timetable_date date/2023-03-03")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(timetable)
activate AddressBookParser
LogicManager -> DukeDriverParser : parseCommand("timetable_date date/2023-03-03")
activate DukeDriverParser

create TimetableCommand
AddressBookParser -> TimetableCommand
activate TimetableCommand
create TimetableDateCommandParser
DukeDriverParser -> TimetableDateCommandParser
activate TimetableDateCommandParser

TimetableCommand --> AddressBookParser
deactivate TimetableCommand
TimetableDateCommandParser --> DukeDriverParser
deactivate TimetableDateCommandParser

AddressBookParser --> LogicManager : t
deactivate AddressBookParser
DukeDriverParser -> TimetableDateCommandParser : parse("2023-03-03")
activate TimetableDateCommandParser

LogicManager -> TimetableCommand : execute()
activate TimetableCommand
create TimetableDateCommand
TimetableDateCommandParser -> TimetableDateCommand
activate TimetableDateCommand

TimetableCommand -> Model : updateFocusDate()
TimetableCommand -> Model : updateSortedDeliveryJobList()
TimetableCommand -> Model : updateSortedDeliveryJobListByDate()
TimetableCommand -> Model : updateWeekDeliveryJobList()
TimetableDateCommand --> TimetableDateCommandParser : t
deactivate TimetableDateCommand

TimetableDateCommandParser --> DukeDriverParser : t
deactivate TimetableDateCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
TimetableDateCommandParser -[hidden]-> DukeDriverParser
destroy TimetableDateCommandParser

DukeDriverParser --> LogicManager : t
deactivate DukeDriverParser

LogicManager -> TimetableDateCommand : execute()

activate TimetableDateCommand

TimetableDateCommand -> Model : updateFocusDate(LocalDate.now())
TimetableDateCommand -> Model : updateSortedDeliveryJobList(new SortbyTimeAndEarn())
TimetableDateCommand -> Model : updateSortedDeliveryJobListByDate()
TimetableDateCommand -> Model : updateWeekDeliveryJobList(LocalDate.now())
activate Model

Model --> TimetableCommand
Model --> TimetableDateCommand
deactivate Model

TimetableCommand --> LogicManager : result
deactivate TimetableCommand
TimetableCommand -[hidden]-> LogicManager : result
destroy TimetableCommand
TimetableDateCommand --> LogicManager : result
deactivate TimetableDateCommand
TimetableDateCommand -[hidden]-> LogicManager : result
destroy TimetableDateCommand

[<--LogicManager
deactivate LogicManager
Expand Down
21 changes: 11 additions & 10 deletions docs/diagrams/TimetableSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,35 @@

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":DukeDriverParser" as DukeDriverParser LOGIC_COLOR
participant "t:TimetableCommand" as TimetableCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute(timetable)
[-> LogicManager : execute("timetable")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(timetable)
activate AddressBookParser
LogicManager -> DukeDriverParser : parseCommand("timetable")
activate DukeDriverParser

create TimetableCommand
AddressBookParser -> TimetableCommand
DukeDriverParser -> TimetableCommand
activate TimetableCommand

TimetableCommand --> AddressBookParser
TimetableCommand --> DukeDriverParser : t
deactivate TimetableCommand

AddressBookParser --> LogicManager : t
deactivate AddressBookParser
DukeDriverParser --> LogicManager : t
deactivate DukeDriverParser

LogicManager -> TimetableCommand : execute()
activate TimetableCommand

TimetableCommand -> Model : updateSortedDeliveryJobList()
TimetableCommand -> Model : updateFocusDate(LocalDate.now())
TimetableCommand -> Model : updateSortedDeliveryJobList(new SortbyTimeAndEarn())
TimetableCommand -> Model : updateSortedDeliveryJobListByDate()
TimetableCommand -> Model : updateWeekDeliveryJobList(LocalDate.now())
activate Model


Expand Down
46 changes: 46 additions & 0 deletions docs/diagrams/TimetableUnscheduledSequenceDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@startuml
!include style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":DukeDriverParser" as DukeDriverParser LOGIC_COLOR
participant "t:TimetableUnscheduleCommand" as TimetableUnscheduleCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute("timetable_unscheduled")
activate LogicManager

LogicManager -> DukeDriverParser : parseCommand("timetable_unscheduled")
activate DukeDriverParser

create TimetableUnscheduleCommand
DukeDriverParser -> TimetableUnscheduleCommand
activate TimetableUnscheduleCommand

TimetableUnscheduleCommand --> DukeDriverParser : t
deactivate TimetableUnscheduleCommand

DukeDriverParser --> LogicManager : t
deactivate DukeDriverParser

LogicManager -> TimetableUnscheduleCommand : execute()
activate TimetableUnscheduleCommand
TimetableUnscheduleCommand -> Model : updateSortedDeliveryJobList(new SortbyTimeAndEarn())
TimetableUnscheduleCommand -> Model : getUnscheduledDeliveryJobList()
activate Model


Model --> TimetableUnscheduleCommand
deactivate Model

TimetableUnscheduleCommand --> LogicManager : result
deactivate TimetableUnscheduleCommand
TimetableUnscheduleCommand -[hidden]-> LogicManager : result
destroy TimetableUnscheduleCommand

[<--LogicManager
deactivate LogicManager
@enduml
16 changes: 12 additions & 4 deletions docs/diagrams/UiClassDiagramMainWindow.puml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ package Statistics <<Rectangle>> {
Class StatisticsWindow
}

package TimeTable <<Rectangle>> {
Class TimeTableWindow
package Timetable <<Rectangle>> {
Class TimetableWindow
Class CompleteWindow
Class UnscheduleWindow
Class UnscheduledDeliveryJobListPanel
Class DeliveryJobCard
}

package Reminder <<Rectangle>> {
Expand All @@ -54,14 +56,20 @@ DeliveryJobListPane -down-> "*" JobListCard
DeliveryJobDetailPane -down-> "2" PersonCard

MainWindow *-down-> "1" JobSystem
MainWindow *-down-> "1" TimeTable
MainWindow *-down-> "1" Timetable
MainWindow *--> "1" AddressBook
MainWindow *--> "1" Reminder
MainWindow *-down-> "1" Statistics

TimeTableWindow -[hidden]- CompleteWindow
TimetableWindow -[hidden]- CompleteWindow
CompleteWindow -[hidden]- UnscheduleWindow

CompleteWindow *-down-> "1" UnscheduledDeliveryJobListPanel
UnscheduledDeliveryJobListPanel *-down-> "*" DeliveryJobCard

UnscheduleWindow *-down-> "1" UnscheduledDeliveryJobListPanel
UnscheduledDeliveryJobListPanel *-down-> "*" DeliveryJobCard

JobSystem *-down-> "1" AddressBook
Statistics -[hidden]down- Reminder

Expand Down
42 changes: 42 additions & 0 deletions docs/diagrams/UiClassDiagramTimetableWindow.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor UI_COLOR_T4
skinparam classBackgroundColor UI_COLOR

package UI <<Rectangle>>{

package TimetableWindow <<Rectangle>> {
Class StatusBarFooter
Class CommandBox
Class ResultDisplay
Class HelpWindow

}
package TimetableDetailPanel <<Rectangle>> {
Class DayOfWeekPanel
Class DayOfMonthPanel
Class WeekJobListPanel
Class DayJobListPanel
Class DayDeliveryJobCard
}


}

Class MainWindow
MainWindow *-down-> "1" TimetableWindow

HelpWindow -[hidden]down- CommandBox
CommandBox -[hidden]down- ResultDisplay
ResultDisplay -[hidden]down- StatusBarFooter

TimetableWindow *-down-> "1" TimetableDetailPanel

DayOfWeekPanel -[hidden]down- DayOfMonthPanel
WeekJobListPanel -[hidden]left- DayOfWeekPanel
WeekJobListPanel *-down-> "7" DayJobListPanel
DayJobListPanel *-down-> "*" DayDeliveryJobCard


@enduml
Binary file added docs/images/TimetableCompletedSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/TimetableDateSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/TimetableSequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/UiClassDiagramTimetableWindow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/team/dohaduong.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Given below are my contributions to the project.

* **Documentation**:
* User Guide:
* Added "How to use this Guide?"" and "Windows and Features Overview" sections (PR #253)
* Added _How to use this Guide?_ and _Windows and Features Overview_ sections (PR #253)
* Added documentation for Timetable commands (PR #184)
* Added and updated documentation for Delivery Job commands (PR #184, #253)
* Added documentation for Job Detail (UI) in Main Window (PR #254)
Expand All @@ -49,9 +49,9 @@ Given below are my contributions to the project.
* Re-format, touch up, fix minor bugs and finalize UG (PR #200, #205, #260)

* Developer Guide:
* Added implementation details for Timetable functions (PR #128)
* Added sequence diagram for `delete_job` command
* Added user stories, use cases and glossary (PR #20, #23, #34)
* Added implementation details and diagrams for `UI component`, `Timetable` and `delete_job` (PR #128, #270)
* Added user stories for timetable, reminder; use cases for timetable and glossary (PR #20, #23, #34, #270)
* Added Appendix: Effort (PR #270)

* **Community**:
* PRs reviewed (with non-trivial review comments): #180, #156, #264
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import seedu.address.logic.commands.CommandResult;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.model.Model;
import seedu.address.model.jobs.sorters.SortbyTimeAndEarn;

/**
* Finds and lists unscheduled jobs - those with invalid slot/date
*/
public class TimetableCompletedCommand extends Command {
public static final CommandGroup COMMAND_GROUP = CommandGroup.TIMETABLE;
public static final SortbyTimeAndEarn SORTER_BY_DATE = new SortbyTimeAndEarn();

public static final String COMMAND_WORD = "timetable_completed";

Expand All @@ -23,7 +25,8 @@ public class TimetableCompletedCommand extends Command {
@Override
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);

model.updateSortedDeliveryJobList(SORTER_BY_DATE);
model.getCompletedDeliveryJobList();

return new CommandResult(MESSAGE_SUCCESS, false, false, false, true, false, false, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class TimetableDateCommand extends Command {
+ "\nExample: " + COMMAND_WORD + " "
+ PREFIX_DATE + "2023-03-15";

public static final String SHOWING_TIMETABLE_MESSAGE = "Show timetable of the week containing day: %s.";
public static final String SHOWING_TIMETABLE_MESSAGE = "Showed timetable of the week containing day: %s.";

public static final SortbyTimeAndEarn SORTER = new SortbyTimeAndEarn();
private final LocalDate jobDate;
Expand Down
Loading

0 comments on commit 8ed01a5

Please sign in to comment.