Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/antonTan96/tp into PPP-up…
Browse files Browse the repository at this point in the history
…date-final
  • Loading branch information
antonTan96 committed Nov 13, 2023
2 parents ff94da0 + 0307f48 commit fdea707
Show file tree
Hide file tree
Showing 38 changed files with 696 additions and 502 deletions.
186 changes: 36 additions & 150 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

454 changes: 380 additions & 74 deletions docs/UserGuide.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/diagrams/ArchitectureSequenceDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Participant ":Logic" as logic LOGIC_COLOR
Participant ":Model" as model MODEL_COLOR
Participant ":Storage" as storage STORAGE_COLOR

user -[USER_COLOR]> ui : "delete 1"
user -[USER_COLOR]> ui : "deleteE 1"
activate ui UI_COLOR

ui -[UI_COLOR]> logic : execute("delete 1")
ui -[UI_COLOR]> logic : execute("deleteE 1")
activate logic LOGIC_COLOR

logic -[LOGIC_COLOR]> model : deleteEmployee(p)
Expand Down
5 changes: 1 addition & 4 deletions docs/diagrams/EmployeeClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Class Email
Class Name
Class Phone
Class Tag
Class Project

Class I #FFFFFF
}
Expand All @@ -23,14 +22,12 @@ Employee *-down-> "1" Name
Employee *-down-> "1" Phone
Employee *-down-> "1" Email
Employee *-down-> "1" Address
Employee -down-> "*" Project
Employee -down-> "*" Tag

Name -[hidden]right-> Phone
Phone -[hidden]right-> Email
Email -[hidden]right-> Address
Address -[hidden]right-> Project
Project -[hidden]right-> Tag
Address -[hidden]right-> Tag

hide class fields
@enduml
4 changes: 4 additions & 0 deletions docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ Class UserPrefs

Class UniqueEmployeeList
Class UniqueProjectList
Class TaskList
Class Employee
Class Project
Class Task

Class I #FFFFFF
}
Expand All @@ -36,6 +38,8 @@ TaskHub *--> "1" UniqueEmployeeList
UniqueEmployeeList --> "~* all" Employee
TaskHub *--> "1" UniqueProjectList
UniqueProjectList --> "~* all" Project
Project *--> "1" TaskList
TaskList --> "*" Task

Employee -[hidden]up--> I
UniqueEmployeeList -[hidden]right-> I
Expand Down
8 changes: 4 additions & 4 deletions docs/diagrams/ProjectClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class UniqueEmployeeList
Class Employee
Class TaskList
Class Task
Class ProjectPriority
Class Priority
Class CompletionStatus

Class I #FFFFFF
Expand All @@ -21,14 +21,14 @@ Class I #FFFFFF
Class HiddenOutside #FFFFFF
HiddenOutside ..> Project

Project -down-> "1" Name
Project *-down-> "1" Name
Project -down-> "0..1" Deadline
Project *-down-> "1" UniqueEmployeeList
Project *-down-> "1" TaskList
Project *-down-> "1" ProjectPriority
Project *-down-> "1" Priority
Project *-down-> "1" CompletionStatus

Task *-left-> "0..1" Employee
Task -left-> "0..1" Employee

UniqueEmployeeList --> "~* filtered" Employee
TaskList --> "*" Task
Expand Down
1 change: 1 addition & 0 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ JsonAdaptedProject --> "*" JsonAdaptedEmployee
JsonAdaptedTask -right-> "0..1" JsonAdaptedEmployee
JsonAdaptedEmployee --> "*" JsonAdaptedTag

hide class fields
@enduml
Binary file modified docs/images/ArchitectureSequenceDiagram.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/DataFileWithProject.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/DataFileWithoutProjects.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/Employee.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/EmployeeClassDiagram.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/ModelClassDiagram.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/Project.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/ProjectClassDiagram.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/QuickStartEnd.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/QuickStartStart.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/StorageClassDiagram.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/Tasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 12 additions & 22 deletions docs/team/timleow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ title: Timothy Leow's Project Portfolio Page
TaskHub is a desktop project management application used by project managers to manage projects and their team members in each project. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java.
## Summary of Contributions

### Code Contributed:
My code contributions to TaskHub can be found [here](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=timleow&tabRepo=AY2324S1-CS2103T-T08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false%23%2F):
#### Code Contributed:
My code contributions to TaskHub can be found [here](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=timleow&tabRepo=AY2324S1-CS2103T-T08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false%23%2F).

### Enhancements implemented:
<img src="../images/HelpWindow.png" width="280" />
#### Enhancements implemented:

- **Upgraded Help Window:**
- Modified `Ui` for `HelpWindow.java`.
Expand All @@ -22,7 +21,6 @@ My code contributions to TaskHub can be found [here](https://nus-cs2103-ay2324s1
- Added value to the `help` command.


<img src="../images/TasksUi.png" width="280" />

- **`Task` Model, `addT`, and `deleteT` Command:**
- Created infrastructure for tasks in both the `model` and `Ui` files - the Ui can be seen in the 'Tasks' section of the `Project`s in the screenshot above.
Expand All @@ -31,47 +29,39 @@ My code contributions to TaskHub can be found [here](https://nus-cs2103-ay2324s1
- Enhanced `addT` to allow task assignment to an employee upon creation using the optional `em/` parameter.


### Contributions to the UG:
#### Contributions to the UG:
- **Introductory section**
- Getting Started
- Installing and launching TaskHub
- Understanding the components of TaskHub
- Quick Start
- **Features section**
- Explanation for `addT` command.
- Explanation for `deleteT` command.

### Contributions to the DG:
#### Contributions to the DG:
- **Architecture, UI Component, Logic component, Model Component, Employee, Project, Task components**
- Addition of tasks to the Class Diagram for Ui component
- Minor updates and diagram changes to other components (e.g., removing attributes section, updating command names/links)
- **Implementation Section**
- Upgraded Help Feature
- Add Task feature (created sequence diagram for this)
### Contributions to team-based tasks:

#### Contributions to team-based tasks:
- Set up the GitHub team org/repo
- Updated diagrams in DG related to Tasks
- Created tags to help with bug triaging post PE-D
- Generated table for PR review allocations here:

<img src="../images/PRReview.png" width="280" />

### Review/mentoring contributions:
#### Review/mentoring contributions:
- Within the team, we had decided that each of us were to review 2 of our teammates. I mainly reviewed Anton and Aslam's PRs.
- Helped Anton with centering the TaskHub logo in [this PR ](https://github.com/AY2324S1-CS2103T-T08-3/tp/pull/167/files/9539b1872903d50de0d94125b550a784ac42b0cf), by providing a code block which gave advice on handling positioning of components on Java FXML.
- Gave Aslam code quality suggestions in [this PR](https://github.com/AY2324S1-CS2103T-T08-3/tp/pull/109) so that we could sync up our implementation of deadlines in both `Tasks` and `Projects`.

### Contributions beyond the project team:
To be added soon.
#### Evidence of helping others e.g. responses you posted in our forum, bugs you reported in other team's products,
#### Contributions beyond the project team:
##### Evidence of helping others e.g. responses you posted in our forum, bugs you reported in other team's products,
- Reported an above average bug count of 10 with value-added suggestions to my allocated PE-D team, can be seen from the [PE-D](https://github.com/timleow/ped/issues) repo.
<img src="../images/timPEDbugs.png" width="280" />

#### Evidence of technical leadership e.g. sharing useful information in the forum
##### Evidence of technical leadership e.g. sharing useful information in the forum
- Participated in the forum in this [issue](https://github.com/nus-cs2103-AY2324S1/forum/issues/145).
--- ---

### Contribution to developer guide (extracts)
To be added soon.
### Contribution to user guide (extracts)
To be added soon.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import static java.util.Objects.requireNonNull;

import java.util.List;

import seedu.address.model.Model;
import seedu.address.model.project.Project;


/**
Expand All @@ -21,10 +18,7 @@ public class SortTaskCommand extends Command {
@Override
public CommandResult execute(Model model) {
requireNonNull(model);
List<Project> lastShownProjectList = model.getFilteredProjectList();
for (Project project : lastShownProjectList) {
project.sortTasksByDeadlineAndCompletion();
}
model.sortTasksByDeadlineAndCompletion();
return new CommandResult(MESSAGE_SUCCESS);
}
}
6 changes: 6 additions & 0 deletions src/main/java/seedu/address/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,10 @@ public interface Model {
*/
void updateFilteredProjectList(Predicate<Project> predicate);

/**
* Sorts tasks in tasks list of each project according to completion and deadline.
* Incomplete tasks will appear before complete tasks and tasks will be arranged in ascending deadline order.
*/
void sortTasksByDeadlineAndCompletion();

}
7 changes: 7 additions & 0 deletions src/main/java/seedu/address/model/ModelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ public void updateFilteredProjectList(Predicate<Project> predicate) {
filteredProjects.setPredicate(predicate);
}

@Override
public void sortTasksByDeadlineAndCompletion() {
for (Project project : filteredProjects) {
project.sortTasksByDeadlineAndCompletion();
}
}

@Override
public boolean equals(Object other) {
if (other == this) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@
import static seedu.address.testutil.Assert.assertThrows;
import static seedu.address.testutil.TypicalEmployees.ALICE;

import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.function.Predicate;

import org.junit.jupiter.api.Test;

import javafx.collections.ObservableList;
import seedu.address.commons.core.GuiSettings;
import seedu.address.logic.Messages;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.model.Model;
import seedu.address.model.ReadOnlyTaskHub;
import seedu.address.model.ReadOnlyUserPrefs;
import seedu.address.model.TaskHub;
import seedu.address.model.employee.Employee;
import seedu.address.model.project.Project;
import seedu.address.testutil.EmployeeBuilder;
import seedu.address.testutil.ModelStub;

public class AddEmployeeCommandTest {

Expand Down Expand Up @@ -86,110 +80,6 @@ public void toStringMethod() {
assertEquals(expected, addEmployeeCommand.toString());
}

/**
* A default model stub that have all the methods failing.
*/
private class ModelStub implements Model {
@Override
public void setUserPrefs(ReadOnlyUserPrefs userPrefs) {
throw new AssertionError("This method should not be called.");
}

@Override
public ReadOnlyUserPrefs getUserPrefs() {
throw new AssertionError("This method should not be called.");
}

@Override
public GuiSettings getGuiSettings() {
throw new AssertionError("This method should not be called.");
}

@Override
public void setGuiSettings(GuiSettings guiSettings) {
throw new AssertionError("This method should not be called.");
}

@Override
public Path getTaskHubFilePath() {
throw new AssertionError("This method should not be called.");
}

@Override
public void setTaskHubFilePath(Path taskHubFilePath) {
throw new AssertionError("This method should not be called.");
}

@Override
public void addEmployee(Employee employee) {
throw new AssertionError("This method should not be called.");
}

@Override
public void addProject(Project project) {
throw new AssertionError("This method should not be called.");
}

@Override
public void setTaskHub(ReadOnlyTaskHub newData) {
throw new AssertionError("This method should not be called.");
}

@Override
public ReadOnlyTaskHub getTaskHub() {
throw new AssertionError("This method should not be called.");
}

@Override
public boolean hasEmployee(Employee employee) {
throw new AssertionError("This method should not be called.");
}

@Override
public boolean hasProject(Project project) {
throw new AssertionError("This method should not be called.");
}

@Override
public void deleteEmployee(Employee target) {
throw new AssertionError("This method should not be called.");
}

@Override
public void deleteProject(Project project) {
throw new AssertionError("This method should not be called.");
}
@Override
public void setEmployee(Employee target, Employee editedEmployee) {
throw new AssertionError("This method should not be called.");
}

@Override
public ObservableList<Employee> getFilteredEmployeeList() {
throw new AssertionError("This method should not be called.");
}

@Override
public ObservableList<Project> getFilteredProjectList() {
throw new AssertionError("This method should not be called.");
}

@Override
public void updateFilteredEmployeeList(Predicate<Employee> predicate) {
throw new AssertionError("This method should not be called.");
}

@Override
public void setProject(Project projectToEdit, Project editedProject) {
throw new AssertionError("This method should not be called.");
}

@Override
public void updateFilteredProjectList(Predicate<Project> predicate) {
throw new AssertionError("This method should not be called.");
}
}

/**
* A Model stub that contains a single employee.
*/
Expand Down
Loading

0 comments on commit fdea707

Please sign in to comment.