Skip to content

Commit

Permalink
Ugdg (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krit-K committed Nov 11, 2019
1 parent e6fc937 commit 32de23f
Show file tree
Hide file tree
Showing 12 changed files with 292 additions and 50 deletions.
26 changes: 24 additions & 2 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ image::ArchitectureSequenceDiagram.png[]

The sections below give more details of each component.

// tag::UIcomponent[]
[[Design-Ui]]
=== UI component

Expand All @@ -81,8 +82,7 @@ image::UiClassDiagram.png[]

*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc.
All these, including the `MainWindow`, inherit from the abstract `UiPart` class.
The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `DriverListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.

The `UI` component uses JavaFx UI framework.
The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder.
Expand All @@ -93,6 +93,7 @@ The `UI` component,
* Executes user commands using the `Logic` component.
* Listens for changes to `Model` data so that the UI can be updated with the modified data.

// end::UIcomponent[]
// tag::logic[]
[[Design-Logic]]
=== Logic component
Expand Down Expand Up @@ -345,7 +346,28 @@ image::GeneratePdfActivityDiagram.png[]
** Cons: Harder to manage.
// end::generate-pdf[]

// tag::viewCompleted[]

=== [Proposed] View completed Task delivered for customer or driver

The section allows the user to view the completed tasks by driver or customer
The following activity diagram summarizes what happens when a user executes a new command:

`viewC 10`

image::viewCustomerTaskActivityDiagram.png[]

The following is the sequence diagram summarizes what happens when a user executes a new command:

`viewC 1`

image::viewCustomerTaskCommand.png[]

`viewC 2`

image::viewDriverTaskCommand.png[]

// end::viewCompleted[]

// tag::undoredo[]
=== [Proposed] Undo/Redo feature
Expand Down
32 changes: 11 additions & 21 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ For example, to edit the description of the delivery task (Task ID:3) : `editT 3

List all available commands +
Format: `help`

// tag::go-command[]
==== Navigate between tabs : `go`

Navigates to the specified tab Tl state. +
Expand All @@ -127,7 +127,7 @@ Examples:

* `go statistic`
* `go home`

// end::go-command[]
==== Lists all Task / Driver / Customer : `list`

Displays all Task / Customer / Driver list in it's original state. +
Expand Down Expand Up @@ -298,10 +298,8 @@ Examples:
Deletes task (Task ID: 1) from the task manager.
* `del d/2` +
Deletes driver (Driver ID: 2) from the driver manager.
// end::del-command[]


==== Views completed delivery tasks delivered to Customer `viewC`
// tag::viewC-command[]
==== Views completed delivery tasks delivered to Customer

Displays a list of completed tasks delivered to the customer, located in the completed delivery list under History tab.

Expand All @@ -310,29 +308,21 @@ Examples:
* `viewC 1` +
View the tasks delivered to the customer (Customer ID: 1).

==== Views completed delivery tasks delivered by Driver: `viewD`
==== Views completed delivery tasks delivered by Driver

Displays a list of completed tasks delivered by the driver, located in the completed delivery list under History tab.

Examples:

* `viewD 1` +
View the tasks delivered by the driver (Driver ID: 1).
// end::viewC-command[]



// tag::savepdf-command[]
==== Generates Task Summary or Delivery Orders for a specific date in PDF document: `savepdf`
Document Type: `summary` +
The `Task Summary` is a summary of delivery tasks that is assigned to each driver for the specific date.
Its purpose is for user reference and archive. Refer to <<PdfSummary>> for sample.

Document Type: `order` +
The `Delivery Order` is a document that contain goods' information and requires customers' confirmation.
Its purpose is to act as a proof between the delivery company and receiver that goods are delivered
as per order and accepted in good condition. Refer to <<PdfDeliveryOrder>> for sample.

Format: `savepdf [pdf/DOCUMENT TYPE] [dt/DATE]`
==== Saves assigned delivery tasks for a specific date into PDF document: `savepdf`
The PDF document is arranged in a table format to allow easy reference of the delivery tasks that is assigned to each drivers for the date.
Its purpose is for user reference and archive. +
Refer to <<PdfLayout>> for sample. +
Format: `savepdf [DATE]`

****
* `DATE` format is dd/mm/yyy.
Expand Down
33 changes: 32 additions & 1 deletion docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Class "{abstract}\nUiPart" as UiPart
Class UiManager
Class MainWindow
Class HelpWindow
Class DriverWindow
Class CustomerWindow
Class NotificationWindow
Class ResultDisplay
Class Map

Class DriverListPanel
Class DriverCard
Expand All @@ -24,7 +28,10 @@ Class CompletedTaskListPanel
Class CompletedTaskCard
Class IncompleteTaskListPanel
Class IncompleteTaskCard
Class CommandListPanel
Class CommandCard

Class StatisticPanel

Class StatusBarFooter
Class CommandBox
Expand All @@ -44,6 +51,8 @@ HiddenOutside ..> Ui

UiManager .left.|> Ui
UiManager -down-> MainWindow
UiManager -down-> NotificationWindow

MainWindow --> HelpWindow
MainWindow *-down-> CommandBox
MainWindow *-down-> ResultDisplay
Expand All @@ -52,15 +61,21 @@ MainWindow *-down-> CustomerListPanel
MainWindow *-down-> AssignedTaskListPanel
MainWindow *-down-> UnassignedTaskListPanel
MainWindow *-down-> CompletedTaskListPanel
MainWindow *-down-> IncompleteTaskListPanel
MainWindow *-down-> StatusBarFooter
MainWindow *-down-> StatisticPanel
MainWindow *-down-> CustomerWindow
MainWindow *-down-> CommandListPanel
MainWindow *-down-> DriverWindow
NotificationWindow *-down-> IncompleteTaskListPanel

CustomerWindow --down-> Map
DriverListPanel -down-> DriverCard
CustomerListPanel -down-> CustomerCard
AssignedTaskListPanel -down-> AssignedTaskCard
UnassignedTaskListPanel -down-> UnassignedTaskCard
CompletedTaskListPanel -down-> AssignedTaskCard
IncompleteTaskListPanel -down-> UnassignedTaskCard
CommandListPanel -down-> CommandCard


MainWindow -left-|> UiPart
Expand All @@ -80,22 +95,38 @@ CompletedTaskListPanel --|> UiPart
CompletedTaskCard --|> UiPart
IncompleteTaskListPanel --|> UiPart
IncompleteTaskCard --|> UiPart
CommandListPanel --|> UiPart
CommandCard --|> UiPart
StatisticPanel --|> UiPart


StatusBarFooter --|> UiPart
HelpWindow -down-|> UiPart
DriverWindow -down-|> UiPart
CustomerWindow -down-|> UiPart

DriverCard ..> Model
CustomerCard ..> Model
AssignedTaskCard ..> Model
UnassignedTaskCard ..> Model
CompletedTaskCard ..> Model
IncompleteTaskCard ..> Model
CommandCard ..> Model

UiManager -right-> Logic
MainWindow -left-> Logic
NotificationWindow -left-> Logic

DriverListPanel -[hidden]left- HelpWindow
CustomerListPanel -[hidden]left- HelpWindow
UnassignedTaskListPanel -[hidden]left- HelpWindow
AssignedTaskListPanel -[hidden]left- HelpWindow
CommandListPanel -[hidden]left- HelpWindow
CompletedTaskListPanel -[hidden]left- HelpWindow

HelpWindow -[hidden]left- CommandBox
DriverWindow -[hidden]left- CommandBox
CustomerWindow -[hidden]left- CommandBox
CommandBox -[hidden]left- ResultDisplay
ResultDisplay -[hidden]left- StatusBarFooter

Expand Down
20 changes: 20 additions & 0 deletions docs/diagrams/ViewCustomerTaskActivityDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml
start
:User executes `viewC 10` command;

:Checks if there is Customer ID 10
in the Customer list;

if () then ([has customer ID in the list])
:Filters the completed to tasks
delivered to the customer;
stop

else ([else])
:Notify user that
the taskID
is invalid;
stop

@enduml

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

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":CommandParser" as CommandParser LOGIC_COLOR
participant ":ViewCustomerTaskCommandParser" as ViewCustomerTaskCommandParser LOGIC_COLOR
participant "v:ViewCustomerTaskCommand" as ViewCustomerTaskCommand 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("viewC 1")
activate LogicManager

LogicManager -> CommandParser : parseCommand("viewC 1")
activate CommandParser

create ViewCustomerTaskCommandParser
CommandParser -> ViewCustomerTaskCommandParser
activate ViewCustomerTaskCommandParser

ViewCustomerTaskCommandParser --> CommandParser
deactivate ViewCustomerTaskCommandParser

CommandParser -> ViewCustomerTaskCommandParser : parse("1")
activate ViewCustomerTaskCommandParser

create ViewCustomerTaskCommand
ViewCustomerTaskCommandParser -> ViewCustomerTaskCommand
activate ViewCustomerTaskCommand

ViewCustomerTaskCommand --> ViewCustomerTaskCommandParser : v
deactivate ViewCustomerTaskCommand

ViewCustomerTaskCommandParser --> CommandParser : v
deactivate ViewCustomerTaskCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
ViewCustomerTaskCommandParser -[hidden]-> CommandParser
destroy ViewCustomerTaskCommandParser

CommandParser --> LogicManager : v
deactivate CommandParser

LogicManager -> ViewCustomerTaskCommand : execute()
activate ViewCustomerTaskCommand

ViewCustomerTaskCommand -> Model : viewCustomerTask(1)
activate Model

Model --> ViewCustomerTaskCommand
deactivate Model

create CommandResult
ViewCustomerTaskCommand -> CommandResult
activate CommandResult

CommandResult --> ViewCustomerTaskCommand
deactivate CommandResult

ViewCustomerTaskCommand --> LogicManager : result
deactivate ViewCustomerTaskCommand

[<--LogicManager
deactivate LogicManager
@enduml
69 changes: 69 additions & 0 deletions docs/diagrams/viewDriverTaskCommand.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@startuml
!include style.puml

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":CommandParser" as CommandParser LOGIC_COLOR
participant ":ViewDriverTaskCommandParser" as ViewDriverTaskCommandParser LOGIC_COLOR
participant "v:ViewDriverTaskCommand" as ViewDriverTaskCommand 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("viewD 2")
activate LogicManager

LogicManager -> CommandParser : parseCommand("viewD 2")
activate CommandParser

create ViewDriverTaskCommandParser
CommandParser -> ViewDriverTaskCommandParser
activate ViewDriverTaskCommandParser

ViewDriverTaskCommandParser --> CommandParser
deactivate ViewDriverTaskCommandParser

CommandParser -> ViewDriverTaskCommandParser : parse("2")
activate ViewDriverTaskCommandParser

create ViewDriverTaskCommand
ViewDriverTaskCommandParser -> ViewDriverTaskCommand
activate ViewDriverTaskCommand

ViewDriverTaskCommand --> ViewDriverTaskCommandParser : v
deactivate ViewDriverTaskCommand

ViewDriverTaskCommandParser --> CommandParser : v
deactivate ViewDriverTaskCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
ViewDriverTaskCommandParser -[hidden]-> CommandParser
destroy ViewDriverTaskCommandParser

CommandParser --> LogicManager : v
deactivate CommandParser

LogicManager -> ViewDriverTaskCommand : execute()
activate ViewDriverTaskCommand

ViewDriverTaskCommand -> Model : ViewDriverTask(2)
activate Model

Model --> ViewDriverTaskCommand
deactivate Model

create CommandResult
ViewDriverTaskCommand -> CommandResult
activate CommandResult

CommandResult --> ViewDriverTaskCommand
deactivate CommandResult

ViewDriverTaskCommand --> LogicManager : result
deactivate ViewDriverTaskCommand

[<--LogicManager
deactivate LogicManager
@enduml
Binary file modified docs/images/UiClassDiagram.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 added docs/images/ViewCustomerTaskActivityDiagram.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 added docs/images/ViewCustomerTaskCommand.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 added docs/images/sampleDisplay.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 added docs/images/viewDriverTaskCommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 32de23f

Please sign in to comment.