fix: router to contact after creation

This commit is contained in:
Shariq Ansari 2023-11-09 14:31:12 +05:30
parent 8f256843f2
commit 86fb7dbafa

View File

@ -74,6 +74,7 @@
<script setup>
import { FormControl, Dialog, call } from 'frappe-ui'
import { ref, defineModel, nextTick, watch, computed } from 'vue'
import { useRouter } from 'vue-router';
const props = defineProps({
contact: {
@ -82,6 +83,8 @@ const props = defineProps({
},
})
const router = useRouter()
const show = defineModel()
const contacts = defineModel('reloadContacts')
@ -111,6 +114,10 @@ async function updateContact(close) {
})
if (d.name) {
contacts.value.reload()
router.push({
name: 'Contact',
params: { contactId: d.name },
})
}
}
close()