Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AY2324S2-CS2103-F15-2/tp
Browse files Browse the repository at this point in the history
…into command_payment
  • Loading branch information
zoebelle-pang committed Apr 3, 2024
2 parents 8c73656 + 1f078a4 commit 12ccb5d
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 9 deletions.
9 changes: 6 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,16 @@ Step 2.

Step 3. User views all sessions according to days in the current month.

Step 4. User closes ViewWindow.
- Step 4a. User click on right arrow button to view next month, repeat from step 2
Step 4. User click on right/left arrow button to view next/previous month, repeat from step 2

The following sequence diagram shows how a filter operation goes through the `Logic` component:
The following sequence diagram shows how a view operation goes through the `Logic` component:

![ViewSequenceDiagram-Logic](images/ViewSequenceDiagram-Logic.png)

The following sequence diagram shows how a view operation goes through the `UI` component:

![ViewSequenceDiagram-Logic](images/ViewSequenceDiagram-Ui.png)

The following activity diagram summarizes what happens when a tutor executes a view command.

![ViewActivityDiagram](images/ViewActivityDiagram.png)
Expand Down
1 change: 1 addition & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,6 @@ Action | Format, Examples
**Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake`
**Filter**| `filter [g/GRADE] [s/SUBJECT]`
**View Schedule**|`view`
**history**|`history`
**List** | `list`
**Help** | `help`
4 changes: 2 additions & 2 deletions docs/diagrams/ViewActivityDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ start
'Since the beta syntax does not support placing the condition outside the
'diamond we place it as the true branch instead.

:ViewWindow draws calendar;
:MainWindow opens ViewWindow;
:ViewWindow initializes and draws calendar;
:System opens ViewWindow;
stop
@enduml
4 changes: 2 additions & 2 deletions docs/diagrams/ViewSequenceDiagram-Logic.puml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ deactivate AddressBookParser
LogicManager -> ViewCommand : execute()
activate ViewCommand

ViewCommand --> LogicManager : result
ViewCommand --> LogicManager : commandResult
deactivate ViewCommand
ViewCommand -[hidden]-> LogicManager : result
ViewCommand -[hidden]-> LogicManager : commandResult
destroy ViewCommand

[<--LogicManager
Expand Down
36 changes: 36 additions & 0 deletions docs/diagrams/ViewSequenceDiagram-Ui.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box UI UI_COLOR_T1
participant ":MainWindow" as MainWindow UI_COLOR
participant ":ViewWindow" as ViewWindow UI_COLOR
end box

box Logic LOGIC_COLOR_T1
participant ":Logic" as Logic LOGIC_COLOR
end box

[-> MainWindow : MainWindow(stage,logic)
activate MainWindow

MainWindow -> Logic : execute()
activate Logic
Logic --> MainWindow : commandResult
deactivate Logic

create ViewWindow
MainWindow -> ViewWindow : ViewWindow(logic)
activate ViewWindow

ViewWindow -> ViewWindow: drawCalendar()
activate ViewWindow
ViewWindow --> ViewWindow:
deactivate ViewWindow

ViewWindow --> MainWindow :
deactivate ViewWindow

[<--MainWindow
deactivate MainWindow
@enduml
Binary file modified docs/images/ViewActivityDiagram.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/ViewSequenceDiagram-Logic.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/ViewSequenceDiagram-Ui.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/helpMessage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/java/seedu/address/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class HelpWindow extends UiPart<Stage> {
+ " - Filter by Grade / Subject: 'filter <g/GRADE | s/SUBJECT>'\n"
+ " Usage: 'filter g/A s/Maths'\n\n"
+ " - Viewing Calendar : 'view'\n\n"
+ " - Show previous successful commands : 'history'\n\n"
+ " - Clearing all entries : 'clear'\n\n"
+ " - Exiting the program : 'exit'\n\n"
+ "You can view the complete user guide at "
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/seedu/address/ui/ViewWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ private void drawCalendar() {
int dateOffset = LocalDateTime.of(dateFocus.getYear(), dateFocus.getMonthValue(), 1, 0, 0, 0, 0)
.getDayOfWeek().getValue();

for (int i = 0; i < 6; i++) {
for (int j = 0; j < 7; j++) {
int colOfDays = 7;
int rowsOfWeeks = 6;

for (int i = 0; i < rowsOfWeeks; i++) {
for (int j = 0; j < colOfDays; j++) {
StackPane stackPane = new StackPane();
Rectangle rectangle = new Rectangle();
rectangle.setFill(Color.TRANSPARENT);
Expand Down

0 comments on commit 12ccb5d

Please sign in to comment.