Unverified Commit c6f74a0b authored by Alberto Nale's avatar Alberto Nale Committed by GitHub
Browse files

[KNOWAGE-7115][KNOWAGE-7109]

Bugfix:

KNOWAGE-7115
KNOWAGE-7109
parents 8ac5d618 4d24c46e
......@@ -125,7 +125,7 @@
<div class="p-d-flex p-flex-row">
<i class="pi pi-external-link kn-cursor-pointer p-mr-2" @click="openPopupDialog(parameter)"></i>
<ScrollPanel class="lookupScrollPanel">
<Chip class="parameterValueChip" v-for="(parameterValue, index) in parameter.parameterValue" :key="index">{{ parameterValue.description }}</Chip>
<Chip class="parameterValueChip" v-for="(parameterValue, index) in parameter.parameterValue" :key="index">{{ parameterValue.description ?? parameterValue.value }}</Chip>
</ScrollPanel>
</div>
</div>
......@@ -144,7 +144,7 @@
<div class="p-d-flex p-flex-row">
<i class="pi pi-external-link kn-cursor-pointer p-mr-2" @click="openTreeDialog(parameter)"></i>
<div>
<Chip v-for="(parameterValue, index) in parameter.parameterValue" :key="index">{{ parameterValue.description }}</Chip>
<Chip v-for="(parameterValue, index) in parameter.parameterValue" :key="index">{{ parameterValue.description ?? parameterValue.value }}</Chip>
</div>
</div>
</div>
......@@ -436,7 +436,7 @@ export default defineComponent({
Object.keys(this.parameters.filterStatus).forEach((key: any) => {
const parameter = this.parameters.filterStatus[key]
if (!parameter.multivalue) {
parameters.push({ label: parameter.label, value: parameter.parameterValue[0].value, description: parameter.parameterValue[0].description })
parameters.push({ label: parameter.label, value: parameter.parameterValue[0].value, description: parameter.parameterValue[0].description ?? '' })
} else {
parameters.push({ label: parameter.label, value: parameter.parameterValue?.map((el: any) => el.value), description: parameter.parameterDescription ?? '' })
}
......
......@@ -32,6 +32,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import { AxiosResponse } from 'axios'
import { getRouteDocumentType } from './documentBrowserHelper'
import DocumentBrowserHome from './documentBrowserHome/DocumentBrowserHome.vue'
import DocumentBrowserTab from './DocumentBrowserTab.vue'
import Menu from 'primevue/menu'
......@@ -52,7 +53,8 @@ export default defineComponent({
selectedItem: null as any,
id: 0,
iFrameContainers: [] as any[],
menuItem: null
menuItem: null,
getRouteDocumentType
}
},
watch: {
......@@ -154,41 +156,6 @@ export default defineComponent({
this.activeIndex = this.tabs.length
},
getRouteDocumentType(item: any) {
let routeDocumentType = ''
switch (item.typeCode) {
case 'DATAMART':
routeDocumentType = 'registry'
break
case 'DOCUMENT_COMPOSITE':
routeDocumentType = 'document-composite'
break
case 'OFFICE_DOC':
routeDocumentType = 'office-doc'
break
case 'OLAP':
routeDocumentType = 'olap'
break
case 'MAP':
routeDocumentType = 'map'
break
case 'REPORT':
routeDocumentType = 'report'
break
case 'KPI':
routeDocumentType = 'kpi'
break
case 'DOSSIER':
routeDocumentType = 'dossier'
break
case 'ETL':
routeDocumentType = 'etl'
break
}
return routeDocumentType
},
toggle(event: any) {
this.createMenuItems()
const menu = this.$refs.menu as any
......@@ -270,7 +237,7 @@ export default defineComponent({
},
onDocumentSaved(document: any) {
this.selectedItem.functionalityId = null
this.selectedItem.item = { name: document.name, label: document.id, routerId: crypto.randomBytes(16).toString('hex'), id: document.id }
this.selectedItem.item = { name: document.name, label: document.id, routerId: crypto.randomBytes(16).toString('hex'), id: document.id, showMode: 'documentDetail' }
this.$router.push(`/document-browser/document-details/${document.id}`)
}
}
......
export function getRouteDocumentType(item: any) {
let routeDocumentType = ''
switch (item.typeCode) {
case 'DATAMART':
routeDocumentType = 'registry'
break
case 'DOCUMENT_COMPOSITE':
routeDocumentType = 'document-composite'
break
case 'OFFICE_DOC':
routeDocumentType = 'office-doc'
break
case 'OLAP':
routeDocumentType = 'olap'
break
case 'MAP':
routeDocumentType = 'map'
break
case 'REPORT':
routeDocumentType = 'report'
break
case 'KPI':
routeDocumentType = 'kpi'
break
case 'DOSSIER':
routeDocumentType = 'dossier'
break
case 'ETL':
routeDocumentType = 'etl'
break
}
return routeDocumentType
}
\ No newline at end of file
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