Skip to content
Snippets Groups Projects
Commit cf59636d authored by Robert Kossessa's avatar Robert Kossessa Committed by Janis Streib
Browse files

FIX: The infamous loading bug still exists :sob:

parent 331da334
No related branches found
No related tags found
No related merge requests found
......@@ -36,13 +36,13 @@ export default {
},
watch: {
data(val) {
if (val == null) {
if (val === null) {
this.loaded = false
} else {
let loaded = true
if (Array.isArray(val)) {
for (const item of val) {
if (item == null) {
if (item === null) {
loaded = false
}
}
......
<template>
<div>
<template v-if="filter_match">
<p>
<b-button variant="link" class="mr-2 px-2 py-1" v-b-toggle="ou.short_name + '-children'"
:style="{color: (ou.short_name + ou.name).toHSL()}"
v-if="ous_by_parent[ou.short_name] && ous_by_parent[ou.short_name].length > 0">
<netvs-icon class="collapse-icon" icon="collapse"></netvs-icon>
</b-button>
<b-link class="mr-3" :to="'/org/ou/'+ou.short_name">{{ ou.name }} ({{ ou.short_name }})</b-link>
<b-button variant="link" :id="'edit-ou-' + ou.short_name"
@click="edit_ou(ou)" class="m-0 p-0">
<netvs-icon icon="edit"></netvs-icon>
</b-button>
</p>
</template>
<p v-if="filter_match">
<b-button variant="link" class="mr-2 px-2 py-1" v-b-toggle="ou.short_name + '-children'"
:style="{color: (ou.short_name + ou.name).toHSL()}"
v-if="ous_by_parent[ou.short_name] && ous_by_parent[ou.short_name].length > 0">
<netvs-icon class="collapse-icon" icon="collapse"></netvs-icon>
</b-button>
<b-link class="mr-3" :to="'/org/ou/'+ou.short_name">{{ ou.name }} ({{ ou.short_name }})</b-link>
<b-button variant="link" :id="'edit-ou-' + ou.short_name"
@click="edit_ou(ou)" class="m-0 p-0">
<netvs-icon icon="edit"></netvs-icon>
</b-button>
</p>
<div class="pl-4 ml-2" v-if="ous_by_parent[ou.short_name]"
:style="{'border-left': `6px solid ${(ou.short_name + ou.name).toHSL()}`, borderRadius: '14px'}">
<b-collapse :id="ou.short_name + '-children'" visible>
......@@ -60,7 +58,9 @@ export default {
},
computed: {
filter_match() {
return this.filter === '' || this.ou.name.toLowerCase().includes(this.filter.toLowerCase())
return this.filter === '' ||
this.ou.name.toLowerCase().includes(this.filter.toLowerCase()) ||
this.ou.short_name.toLowerCase().includes(this.filter.toLowerCase())
}
},
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment