From 2763eed5b2389eed815b03d2272c8bcf57fb15ca Mon Sep 17 00:00:00 2001 From: smilerz Date: Thu, 2 Dec 2021 12:16:28 -0600 Subject: [PATCH] minor cleanup --- .../migrations/0162_userpreference_csv_delim.py | 2 +- cookbook/models.py | 2 +- vue/src/apps/ModelListView/ModelListView.vue | 1 - vue/src/apps/ShoppingListView/ShoppingListView.vue | 4 +--- vue/src/components/IngredientComponent.vue | 13 ++++--------- vue/src/components/RecipeCard.vue | 4 +--- 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/cookbook/migrations/0162_userpreference_csv_delim.py b/cookbook/migrations/0162_userpreference_csv_delim.py index 028eb6be..b7e4e548 100644 --- a/cookbook/migrations/0162_userpreference_csv_delim.py +++ b/cookbook/migrations/0162_userpreference_csv_delim.py @@ -18,6 +18,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='userpreference', name='csv_prefix', - field=models.CharField(blank=True, max_length=3), + field=models.CharField(blank=True, max_length=10), ), ] diff --git a/cookbook/models.py b/cookbook/models.py index e1c339bd..4a592178 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -334,7 +334,7 @@ class UserPreference(models.Model, PermissionModelMixin): default_delay = models.DecimalField(default=4, max_digits=8, decimal_places=4) shopping_recent_days = models.PositiveIntegerField(default=7) csv_delim = models.CharField(max_length=2, default=",") - csv_prefix = models.CharField(max_length=3, blank=True,) + csv_prefix = models.CharField(max_length=10, blank=True,) created_at = models.DateTimeField(auto_now_add=True) space = models.ForeignKey(Space, on_delete=models.CASCADE, null=True) diff --git a/vue/src/apps/ModelListView/ModelListView.vue b/vue/src/apps/ModelListView/ModelListView.vue index 67490c1a..c6d03765 100644 --- a/vue/src/apps/ModelListView/ModelListView.vue +++ b/vue/src/apps/ModelListView/ModelListView.vue @@ -211,7 +211,6 @@ export default { if (e !== "cancel") { switch (this.this_action) { case this.Actions.DELETE: - console.log("delete") this.deleteThis(this.this_item.id) break case this.Actions.CREATE: diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index 22cc9640..b5aa632c 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -687,9 +687,7 @@ export default { }, methods: { // this.genericAPI inherited from ApiMixin - download(type) { - console.log("you just downloaded", type) - }, + addItem() { let api = new ApiApiFactory() api.createShoppingListEntry(this.new_item) diff --git a/vue/src/components/IngredientComponent.vue b/vue/src/components/IngredientComponent.vue index 233b2bfd..06be51a1 100644 --- a/vue/src/components/IngredientComponent.vue +++ b/vue/src/components/IngredientComponent.vue @@ -19,9 +19,7 @@ @@ -179,20 +177,17 @@ export default { }, }, methods: { - calculateAmount: function(x) { + calculateAmount: function (x) { return calculateAmount(x, this.ingredient_factor) }, // sends parent recipe ingredient to notify complete has been toggled - done: function() { + done: function () { this.$emit("checked-state-changed", this.ingredient) }, // sends true/false to parent to save all ingredient shopping updates as a batch - changeShopping: function() { + changeShopping: function () { this.$emit("add-to-shopping", { item: this.ingredient, add: this.shop }) }, - editFood: function() { - console.log("edit the food") - }, }, } diff --git a/vue/src/components/RecipeCard.vue b/vue/src/components/RecipeCard.vue index a871c25c..95b8392a 100755 --- a/vue/src/components/RecipeCard.vue +++ b/vue/src/components/RecipeCard.vue @@ -78,9 +78,7 @@ export default { footer_text: String, footer_icon: String, }, - mounted() { - console.log(this.recipe) - }, + mounted() {}, computed: { detailed: function () { return this.recipe?.steps !== undefined