forked from nus-cs2103-AY1920S2/addressbook-level3
-
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.
Merge pull request #115 from beatricetay/planning-feature-list
More commands for planned recipes
- Loading branch information
Showing
38 changed files
with
681 additions
and
322 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
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 |
---|---|---|
@@ -1,31 +1,3 @@ | ||
{ | ||
"plannedRecipes" : [ { | ||
"recipe" : { | ||
"name" : "Barley Pilaf", | ||
"time" : "50", | ||
"isFavourite" : true, | ||
"grains" : [ "0.5cup, small pieces of broken spaghetti" ], | ||
"vegetables" : [ "2.0tbsp, chives (chopped)", "50.0g, small onion (chopped)" ], | ||
"proteins" : [ "2.5cup, low-sodium chicken broth" ], | ||
"fruits" : [ ], | ||
"others" : [ "1.0cup, hulled barley", "10.0g, Salt & Pepper", "1.0tbsp, unsalted butter" ], | ||
"steps" : [ "Melt butter in saucepan over medium heat. Add onion and cook until soft and light golden brown.", "Add barley and stir until grains are coated in butter.", "Add broth and 0.5 tsp salt, bring to a boil.", "Reduce heat to medium low, cover, and simmer for 20mins.", "Uncover and quickly stir in spaghetti. Cover and continue to simmer, stirring occasionally.", "Once most liquid is absorbed and barley and spaghetti are tender, remove from hit and let sit.", "Season to taste with salt and pepper and sprinkle with chopped chives." ], | ||
"goals" : [ "Wholesome Wholemeal" ] | ||
}, | ||
"date" : "2020-02-02" | ||
}, { | ||
"recipe" : { | ||
"name" : "Asian BBQ Chicken", | ||
"time" : "15", | ||
"isFavourite" : false, | ||
"grains" : [ ], | ||
"vegetables" : [ "1.0tbsp, garlic & ginger (finely chopped)" ], | ||
"proteins" : [ "100.0g, chicken breast" ], | ||
"fruits" : [ ], | ||
"others" : [ "2.0tbsp, char siew sauce", "1.0tsp, honey", "1.0tsp, rice vinegar", "1.0tsp, Salt & pepper", "0.5tsp, sesame oil" ], | ||
"steps" : [ "In a bowl, mix all the ingredients to create marinade. Mix the chicken with the marinade.", "Pan sear the chicken from both sides.", "Serve with rice." ], | ||
"goals" : [ "Bulk like the Hulk" ] | ||
}, | ||
"date" : "2020-03-03" | ||
} ] | ||
"plannedRecipes" : [ ] | ||
} |
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
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
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
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
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
src/main/java/seedu/recipe/logic/commands/plan/ClearPlanCommand.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.recipe.logic.commands.plan; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import seedu.recipe.logic.commands.Command; | ||
import seedu.recipe.logic.commands.CommandResult; | ||
import seedu.recipe.model.Model; | ||
import seedu.recipe.model.plan.PlannedBook; | ||
import seedu.recipe.ui.tab.Tab; | ||
|
||
/** | ||
* Deletes all planned recipes. | ||
*/ | ||
public class ClearPlanCommand extends Command { | ||
public static final String COMMAND_WORD = "clearplan"; | ||
public static final String MESSAGE_SUCCESS = "Planned recipes have been cleared!"; | ||
private final Tab planTab = Tab.PLANNING; | ||
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
requireNonNull(model); | ||
model.setPlannedBook(new PlannedBook()); | ||
model.commitRecipeBook(); | ||
return new CommandResult(MESSAGE_SUCCESS, false, planTab, false); | ||
} | ||
} |
Oops, something went wrong.