Commit 975a07b4 authored by BojanSovticEngIT's avatar BojanSovticEngIT
Browse files

Routing fix

parent 4873384d
......@@ -7,12 +7,14 @@ const routes = [
{
path: 'new/:folderId',
component: () => import('@/modules/documentExecution/documentDetails/DocumentDetails.vue'),
props: true
props: true,
name: 'document-details-new-document'
},
{
path: ':docId',
component: () => import('@/modules/documentExecution/documentDetails/DocumentDetails.vue'),
props: true
props: true,
name: 'document-details-edit-document'
}
]
}
......
<template>
<div v-if="viewMode === 'document-detail'" id="document-details-container" class="p-d-flex p-flex-column kn-flex kn-height-full">
<div v-if="viewMode === 'document-detail' || $route.name !== 'document-details-new-document' || $route.name !== 'document-details-new-document'" id="document-details-container" class="p-d-flex p-flex-column kn-flex kn-height-full">
<Toolbar class="kn-toolbar kn-toolbar--primary p-p-0 p-m-0 p-col-12">
<template #start>
{{ $t('documentExecution.documentDetails.title') }}
......@@ -159,7 +159,7 @@ export default defineComponent({
}
},
async created() {
if (this.viewMode !== 'document-detail') return
if (this.viewMode !== 'document-detail' && (this.$route.name !== 'document-details-new-document' || this.$route.name !== 'document-details-new-document')) return
this.isForEdit()
await this.loadPage(this.docId)
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment