<SourcesChart/> toggle visibility

This commit is contained in:
Avris 2021-08-21 23:36:08 +02:00
parent aafa242951
commit b830dce1d6
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,10 @@
<template>
<div v-if="publishDates !== null && $isGranted('sources')" class="card">
<div class="card-body">
<a class="card-header cursor-pointer" href="#" @click.prevent="open = !open">
<Icon v="chart-line"/>
Chart
</a>
<div class="card-body" v-if="open">
<p class="small">
<Icon v="chart-line"/>
This chart is only visible for the admins.
@ -17,6 +21,11 @@
sources: { required: true },
label: { required: true },
},
data() {
return {
open: false,
}
},
computed: {
publishDates() {
if (this.sources === undefined) {