Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Recipe functionality #23

Merged
merged 25 commits into from
Sep 27, 2020
Merged

Conversation

Rahul0506
Copy link

Refactor code base to be more general, add functionality to add recipes.
TODO:

  • Delete Legacy
  • Fix JavaDocs
  • Fix and add test cases

Copy link

@aqcd aqcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review. Mostly cosmetic since functionality isn't complete.

Initial apple having [1...6] for locationId and recipeId may not be intentional (bug?)
Initial recipes have item ids of items that don't exist.

src/main/java/seedu/address/InventoryMainApp.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/logic/Logic.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/logic/Logic.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/logic/Logic.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/logic/LogicManager.java Outdated Show resolved Hide resolved
@@ -18,4 +18,10 @@
public static final Prefix PREFIX_ITEM_DESCRIPTION = new Prefix("-d ");
public static final Prefix PREFIX_ITEM_LOCATION = new Prefix("-l ");

// recipes start here
public static final Prefix PREFIX_RECIPE_PRODUCT_NAME = new Prefix("-n ");
public static final Prefix PREFIX_RECIPE_INGREDIENTS = new Prefix("-items ");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can consider shorter prefix

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was specified in user guide, can be changed easily regardless

Copy link

@khenghun khenghun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one bug, also need to remove test cases or update, LGTM

src/main/java/seedu/address/model/util/SampleDataUtil.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/model/recipe/Recipe.java Outdated Show resolved Hide resolved
* Represents a Recipe's product's quantity number in the inventory.
* Guarantees: immutable; is valid as declared in {@link #isValidQuantity(String)}
*/
public class ProductQuantity {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can extend Quantity class if you want

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good note, modified

@Rahul0506 Rahul0506 merged commit 17e8286 into AY2021S1-CS2103T-F13-1:master Sep 27, 2020
@Rahul0506 Rahul0506 added this to the v1.1 milestone Oct 1, 2020
blackonyyx added a commit that referenced this pull request Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a user, I want to be able to create a recipe for an item so I can reference it in the future.
3 participants