Change step deletion confirmation

This commit is contained in:
harry 2023-10-18 21:30:17 +01:00
parent 8bbbc1b9ef
commit d09eb64a41

View File

@ -1089,7 +1089,8 @@ export default {
}
},
removeStep: function (step) {
if (confirm(this.$t("confirm_delete", {object: this.$t("Step")}))) {
const step_index = this.recipe.steps.indexOf(step)
if (confirm(this.$t("delete_confirmation", {source: `${this.$t("Step")} "${step.name || step_index}"`}))) {
this.recipe.steps = this.recipe.steps.filter((item) => item !== step)
}
},