1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 17:16:59 -05:00

various fixes and improvements

This commit is contained in:
vabene1111
2025-05-27 16:53:10 +02:00
parent 40a7db086f
commit fa8af5596f
47 changed files with 410 additions and 38 deletions

View File

@@ -12,7 +12,7 @@
</v-row>
<v-row>
<v-col>
<component :is="editorComponent" :item-id="id" @delete="router.go(-1)" @create="(obj: any) => objectCreated(obj)"></component>
<component :is="editorComponent" :item-id="id" @delete="objectDeleted" @create="(obj: any) => objectCreated(obj)"></component>
</v-col>
</v-row>
</v-container>
@@ -53,6 +53,17 @@ function objectCreated(obj: any) {
}
}
/**
* determines where to redirect user after object deletion based on selected model
*/
function objectDeleted(){
if (props.model.toLowerCase() == 'recipe'){
router.push({name : 'StartPage'})
} else {
router.go(-1)
}
}
</script>
<style scoped>