forked from nusCS2113-AY1819S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
688 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
= Yeo Su Yia, Denise - Project Portfolio | ||
:site-section: AboutUs | ||
:imagesDir: ../images | ||
:stylesDir: ../stylesheets | ||
|
||
== PROJECT: Inventarie PRO | ||
|
||
--- | ||
|
||
== Overview | ||
|
||
Inventarie PRO is a desktop inventory application intended for use by self-employed provision shop owners who wish to digitise their inventory records. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. | ||
|
||
== Summary of contributions | ||
|
||
* *Major enhancement*: Added *the ability to manage distributors engaged with a provision shop* | ||
** What it does: Allows the user to add, edit, delete and find distributors that the user would like a record of. It also allows the user to see which distributor provides what products for the shop. | ||
** Justification: This feature is an essential part of a digitised inventory management system, given that a self-employed provision shop owner would want | ||
** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands. | ||
** Credits: _{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}_ | ||
|
||
* *Minor enhancement*: added a history command that allows the user to navigate to previous commands using up/down keys. | ||
|
||
* *Code contributed*: [https://github.com[Functional code]] [https://github.com[Test code]] _{give links to collated code files}_ | ||
|
||
* *Other contributions*: | ||
|
||
** Project management: | ||
*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub | ||
** Enhancements to existing features: | ||
*** Updated the GUI color scheme (Pull requests https://github.com[#33], https://github.com[#34]) | ||
*** Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull requests https://github.com[#36], https://github.com[#38]) | ||
** Documentation: | ||
*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com[#14] | ||
** Community: | ||
*** PRs reviewed (with non-trivial review comments): https://github.com[#12], https://github.com[#32], https://github.com[#19], https://github.com[#42] | ||
*** Contributed to forum discussions (examples: https://github.com[1], https://github.com[2], https://github.com[3], https://github.com[4]) | ||
*** Reported bugs and suggestions for other teams in the class (examples: https://github.com[1], https://github.com[2], https://github.com[3]) | ||
*** Some parts of the history feature I added was adopted by several other class mates (https://github.com[1], https://github.com[2]) | ||
** Tools: | ||
*** Integrated a third party library (Natty) to the project (https://github.com[#42]) | ||
*** Integrated a new Github plugin (CircleCI) to the team repo | ||
|
||
_{you can add/remove categories in the list above}_ | ||
|
||
== Contributions to the User Guide | ||
|
||
|
||
|=== | ||
|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._ | ||
|=== | ||
|
||
include::../UserGuide.adoc[tag=undoredo] | ||
|
||
include::../UserGuide.adoc[tag=dataencryption] | ||
|
||
== Contributions to the Developer Guide | ||
|
||
|=== | ||
|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._ | ||
|=== | ||
|
||
include::../DeveloperGuide.adoc[tag=undoredo] | ||
|
||
include::../DeveloperGuide.adoc[tag=dataencryption] | ||
|
||
|
||
== PROJECT: PowerPointLabs | ||
|
||
--- | ||
|
||
_{Optionally, you may include other projects in your portfolio.}_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...in/java/seedu/address/commons/events/ui/DistributorProductPanelSelectionChangedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package seedu.address.commons.events.ui; | ||
|
||
import seedu.address.commons.events.BaseEvent; | ||
import seedu.address.model.distributor.DistributorProduct; | ||
|
||
/** | ||
* Represents a selection change in the Distributor List Panel | ||
*/ | ||
public class DistributorProductPanelSelectionChangedEvent extends BaseEvent { | ||
|
||
|
||
private final DistributorProduct newSelection; | ||
|
||
public DistributorProductPanelSelectionChangedEvent(DistributorProduct newSelection) { | ||
this.newSelection = newSelection; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return getClass().getSimpleName(); | ||
} | ||
|
||
public DistributorProduct getNewSelection() { | ||
return newSelection; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/main/java/seedu/address/logic/commands/ListDistributorProductsCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import seedu.address.commons.core.Messages; | ||
import seedu.address.commons.core.index.Index; | ||
import seedu.address.logic.CommandHistory; | ||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
import seedu.address.model.distributor.Distributor; | ||
import seedu.address.model.distributor.DistributorProduct; | ||
import seedu.address.model.saleshistory.SalesHistory; | ||
|
||
/** | ||
* This command displays all the reminders in the {@link SalesHistory}. | ||
*/ | ||
public class ListDistributorProductsCommand extends Command { | ||
|
||
public static final String COMMAND_WORD = "listdistributorproducts"; | ||
public static final String MESSAGE_USAGE = COMMAND_WORD | ||
+ ": Lists all products that the given distributor is recorded to carry.\n" | ||
+ "Parameters: INDEX (must be a positive integer)\n" | ||
+ "Example: " + COMMAND_WORD + " 1 "; | ||
public static final String NO_DIST_PRODS_MESSAGE = "No products have been recorded for this distributor yet"; | ||
|
||
private final Index index; | ||
|
||
/** | ||
* @param index of the product in the filtered distributor list to list products of | ||
**/ | ||
public ListDistributorProductsCommand(Index index) { | ||
requireNonNull(index); | ||
|
||
this.index = index; | ||
} | ||
|
||
@Override | ||
public CommandResult execute(Model model, CommandHistory history) throws CommandException { | ||
requireNonNull(model); | ||
|
||
List<Distributor> lastShownList = model.getFilteredDistributorList(); | ||
|
||
if (index.getZeroBased() >= lastShownList.size()) { | ||
throw new CommandException(Messages.MESSAGE_INVALID_DIST_DISPLAYED_INDEX); | ||
} | ||
|
||
Distributor distributorToShow = lastShownList.get(index.getZeroBased()); | ||
|
||
Set<DistributorProduct> distProdsSet = distributorToShow.getDistProds(); | ||
|
||
ArrayList<DistributorProduct> distprodsList = new ArrayList<>(distProdsSet); | ||
|
||
if (distprodsList.size() == 0) { | ||
return new CommandResult(NO_DIST_PRODS_MESSAGE); | ||
} | ||
|
||
StringBuilder allDistProds = new StringBuilder(); | ||
|
||
allDistProds.append("Products that " + distributorToShow.getDistName().toString() + " carries:"); | ||
|
||
for (DistributorProduct distributorProduct : distprodsList) { | ||
allDistProds.append(distributorProduct.toString() + "\n"); | ||
} | ||
|
||
return new CommandResult(allDistProds.toString()); | ||
} | ||
} |
Oops, something went wrong.