diff --git a/app/app.scss b/app/app.scss
index 1c0dec23..ed3edea0 100644
--- a/app/app.scss
+++ b/app/app.scss
@@ -14,6 +14,11 @@ $gray9: #212529;
$orange: #ff5200;
$fabRipple: #ff864d;
$red: #c92a2a;
+$breakfast: #ffb180;
+$lunch: #ceff80;
+$dinner: #80ceff;
+$snacks: #b180ff;
+
// Global SCSS styling
// @see https://docs.nativescript.org/ui/styling
@@ -79,11 +84,13 @@ Page,
color: $gray4;
background: $gray3;
}
- .count {
+ .count,
+ .marker {
color: $gray1;
background: $gray9;
}
- .instruction {
+ .instruction,
+ .dayContainer {
border-color: $gray9;
}
MDProgress {
@@ -142,11 +149,13 @@ Page,
color: $gray8;
background: #111;
}
- .count {
+ .count,
+ .marker {
color: $gray9;
background: $gray1;
}
- .instruction {
+ .instruction,
+ .dayContainer {
border-color: $gray1;
}
MDProgress {
@@ -362,6 +371,7 @@ RadListView {
// -----------------------------
// SETTINGS
.group-header {
+ text-transform: uppercase;
padding: 8;
}
.main-container {
@@ -533,6 +543,52 @@ TextField.combinationToken {
border-width: 0;
}
// -----------------------------
+// MEAL PLANNER
+.mealPlanner {
+ padding: 16 16 128;
+ width: 100%;
+ .dayContainer {
+ padding: 8 0;
+ color: $gray9;
+ &.breakfast {
+ border-radius: 4 4 0 0;
+ background: $breakfast;
+ }
+ &.lunch {
+ background: $lunch;
+ }
+ &.dinner {
+ background: $dinner;
+ }
+ &.snacks {
+ border-radius: 0 0 4 4;
+ background: $snacks;
+ }
+ .periodLabel {
+ text-transform: uppercase;
+ vertical-alignment: center;
+ font-size: 16;
+ padding: 0 0 0 16;
+ }
+ .recipes {
+ margin: 8 8 0;
+ .recipeTitle {
+ font-size: 14;
+ padding: 6 8;
+ line-height: 4;
+ }
+ .closeBtn {
+ margin: 0 8;
+ vertical-alignment: top;
+ }
+ }
+ MDRipple,
+ MDButton {
+ ripple-color: rgba($gray6, 0.2);
+ }
+ }
+}
+// -----------------------------
// DIALOGS
.dialogContainer {
width: 100%;
diff --git a/app/components/App.vue b/app/components/App.vue
index c3216d88..de0edc22 100644
--- a/app/components/App.vue
+++ b/app/components/App.vue
@@ -32,7 +32,7 @@
-
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+ />
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -760,9 +758,7 @@ export default {
removeInstruction(index) {
if (this.recipeContent.instructions[index].length) {
this.fieldDeletionConfirm("instruction").then((res) => {
- if (res) {
- this.recipeContent.instructions.splice(index, 1)
- }
+ res && this.recipeContent.instructions.splice(index, 1)
})
} else this.recipeContent.instructions.splice(index, 1)
},
diff --git a/app/components/EnRecipes.vue b/app/components/EnRecipes.vue
index 6f613db2..65ef3c79 100644
--- a/app/components/EnRecipes.vue
+++ b/app/components/EnRecipes.vue
@@ -71,7 +71,7 @@
columns="112, *"
androidElevation="1"
>
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ />
require("nativescript-ui-sidedrawer").RadSideDrawer
diff --git a/app/store.js b/app/store.js
index 34defbca..552bd0b6 100644
--- a/app/store.js
+++ b/app/store.js
@@ -334,6 +334,14 @@ export default new Vuex.Store({
if (setDate) state.recipes[index].lastTried = new Date()
EnRecipesDB.updateDocument(id, recipe)
},
+ setRecipeAsTried(state, { id, recipe }) {
+ let index = state.recipes.indexOf(
+ state.recipes.filter((e) => e.id === id)[0]
+ )
+ state.recipes[index].tried = true
+ state.recipes[index].lastTried = new Date()
+ EnRecipesDB.updateDocument(id, recipe)
+ },
setLastTriedDate(state, index) {
state.recipes[index].lastTried = new Date()
EnRecipesDB.updateDocument(state.recipes[index].id, state.recipes[index])
@@ -406,6 +414,9 @@ export default new Vuex.Store({
toggleStateAction({ commit }, toggledRecipe) {
commit("toggleState", toggledRecipe)
},
+ setRecipeAsTriedAction({ commit }, recipe) {
+ commit("setRecipeAsTried", recipe)
+ },
setLastTriedDateAction({ commit }, index) {
commit("setLastTriedDate", index)
},
diff --git a/package-lock.json b/package-lock.json
index 7de80d77..120f6c27 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5893,6 +5893,15 @@
"resolved": "https://registry.npmjs.org/nativescript-toast/-/nativescript-toast-2.0.0.tgz",
"integrity": "sha512-xqyNfFS894oGfrEVO7CjpioAQLiLNNcd77Euq9XIUTf1U3W0PsIgAJbLP7+kkVGIJxdLtlBkbcQ4wDmf2DCi1w=="
},
+ "nativescript-ui-calendar": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/nativescript-ui-calendar/-/nativescript-ui-calendar-7.0.2.tgz",
+ "integrity": "sha512-yzSZPLFsboYj73BnVG0IYsiKHpPtmL/35QcXd7hC7kWdfjoaiE1eZgtqIRiTsNJaGAp9MeSrBdvuOCe7hI9rEA==",
+ "requires": {
+ "nativescript-ui-core": "~4.0.0",
+ "ts-node": "^8.10.2"
+ }
+ },
"nativescript-ui-core": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/nativescript-ui-core/-/nativescript-ui-core-4.0.0.tgz",
diff --git a/package.json b/package.json
index ef4efee4..9d767853 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"nativescript-imagecropper": "^4.0.1",
"nativescript-plugin-filepicker": "^1.0.0",
"nativescript-toast": "^2.0.0",
+ "nativescript-ui-calendar": "^7.0.2",
"nativescript-ui-listview": "^9.0.4",
"nativescript-ui-sidedrawer": "^9.0.3",
"nativescript-vue": "^2.6.1",