minor cleanup
This commit is contained in:
parent
2af7b64d4f
commit
2763eed5b2
@ -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),
|
||||
),
|
||||
]
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -19,9 +19,7 @@
|
||||
</td>
|
||||
<td @click="done">
|
||||
<template v-if="ingredient.food !== null">
|
||||
<a :href="resolveDjangoUrl('view_recipe', ingredient.food.recipe.id)" v-if="ingredient.food.recipe !== null" target="_blank" rel="noopener noreferrer">{{
|
||||
ingredient.food.name
|
||||
}}</a>
|
||||
<a :href="resolveDjangoUrl('view_recipe', ingredient.food.recipe.id)" v-if="ingredient.food.recipe !== null" target="_blank" rel="noopener noreferrer">{{ ingredient.food.name }}</a>
|
||||
<span v-if="ingredient.food.recipe === null">{{ ingredient.food.name }}</span>
|
||||
</template>
|
||||
</td>
|
||||
@ -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")
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user