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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user