fix: router to contact after creation
This commit is contained in:
parent
8f256843f2
commit
86fb7dbafa
@ -74,6 +74,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { FormControl, Dialog, call } from 'frappe-ui'
|
import { FormControl, Dialog, call } from 'frappe-ui'
|
||||||
import { ref, defineModel, nextTick, watch, computed } from 'vue'
|
import { ref, defineModel, nextTick, watch, computed } from 'vue'
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
contact: {
|
contact: {
|
||||||
@ -82,6 +83,8 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const show = defineModel()
|
const show = defineModel()
|
||||||
const contacts = defineModel('reloadContacts')
|
const contacts = defineModel('reloadContacts')
|
||||||
|
|
||||||
@ -111,6 +114,10 @@ async function updateContact(close) {
|
|||||||
})
|
})
|
||||||
if (d.name) {
|
if (d.name) {
|
||||||
contacts.value.reload()
|
contacts.value.reload()
|
||||||
|
router.push({
|
||||||
|
name: 'Contact',
|
||||||
|
params: { contactId: d.name },
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user