added save confirm
This commit is contained in:
parent
5b916e955c
commit
5f2320a3e7
@ -408,7 +408,7 @@
|
|||||||
el: '#id_base_container',
|
el: '#id_base_container',
|
||||||
data: {
|
data: {
|
||||||
recipe: undefined,
|
recipe: undefined,
|
||||||
recipe_changed: false,
|
recipe_changed: undefined,
|
||||||
keywords: [],
|
keywords: [],
|
||||||
keywords_loading: false,
|
keywords_loading: false,
|
||||||
foods: [],
|
foods: [],
|
||||||
@ -428,9 +428,9 @@
|
|||||||
recipe: {
|
recipe: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler() {
|
handler() {
|
||||||
if (!this.loading) {
|
if (this.recipe_changed === undefined) {
|
||||||
|
this.recipe_changed = false
|
||||||
console.log('CHANGED')
|
} else {
|
||||||
this.recipe_changed = true
|
this.recipe_changed = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,7 +456,6 @@
|
|||||||
this.$http.get("{% url 'api:recipe-detail' recipe.pk %}").then((response) => {
|
this.$http.get("{% url 'api:recipe-detail' recipe.pk %}").then((response) => {
|
||||||
this.recipe = response.data;
|
this.recipe = response.data;
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.recipe_changed = false
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user