Skip to content

Commit 0cfeb06

Browse files
hvangeffenwkramer
authored andcommitted
Add notification to menu when no data is present
1 parent 19a962f commit 0cfeb06

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/components/general/ColumnMenu.vue

+26-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,26 @@
4040
>
4141
<v-list-item-title>{{ child.name }}</v-list-item-title>
4242
<template v-slot:append>
43-
<v-icon v-if="child.children">mdi-chevron-right</v-icon>
44-
<v-icon v-else-if="child.icon" small>{{ child.icon }}</v-icon>
43+
<v-tooltip v-if="child.nodata">
44+
<template v-slot:activator="{ props }">
45+
<v-icon v-bind="props" class="allow-disabled-hover"
46+
>mdi-alert-octagon-outline</v-icon
47+
>
48+
</template>
49+
<div v-if="child.children">
50+
<div>{{ child.name }}'s children are missing data:</div>
51+
<ul class="ml-4">
52+
<li v-for="grandChild in child.children">
53+
{{ grandChild.name }}
54+
</li>
55+
</ul>
56+
</div>
57+
<span v-else>{{ child.name }} has no data.</span>
58+
</v-tooltip>
59+
<div v-else>
60+
<v-icon v-if="child.children">mdi-chevron-right</v-icon>
61+
<v-icon v-else-if="child.icon" small>{{ child.icon }}</v-icon>
62+
</div>
4563
</template>
4664
</v-list-item>
4765
</template>
@@ -151,3 +169,9 @@ function recursiveFind(stack: ColumnItem[], id: string): boolean {
151169
return false
152170
}
153171
</script>
172+
173+
<style scoped>
174+
.allow-disabled-hover {
175+
pointer-events: auto;
176+
}
177+
</style>

0 commit comments

Comments
 (0)