Fix 'Analytics' menu item not getting highlighted.

This commit is contained in:
Kailash Nadh 2021-09-17 22:20:56 +05:30
parent 1bb630cf83
commit 6eb589444a
2 changed files with 5 additions and 2 deletions

View file

@ -82,7 +82,7 @@
icon="file-image-outline" :label="$t('globals.terms.templates')"></b-menu-item> icon="file-image-outline" :label="$t('globals.terms.templates')"></b-menu-item>
<b-menu-item :to="{name: 'campaignAnalytics'}" tag="router-link" <b-menu-item :to="{name: 'campaignAnalytics'}" tag="router-link"
:active="activeItem.analytics" data-cy="analytics" :active="activeItem.campaignAnalytics" data-cy="analytics"
icon="chart-bar" :label="$t('globals.terms.analytics')"></b-menu-item> icon="chart-bar" :label="$t('globals.terms.analytics')"></b-menu-item>
</b-menu-item><!-- campaigns --> </b-menu-item><!-- campaigns -->

View file

@ -48,7 +48,10 @@
<div class="chart columns" v-for="(v, k) in charts" :key="k"> <div class="chart columns" v-for="(v, k) in charts" :key="k">
<div class="column is-9"> <div class="column is-9">
<b-loading v-if="v.loading" :active="v.loading" :is-full-page="false" /> <b-loading v-if="v.loading" :active="v.loading" :is-full-page="false" />
<h4 v-if="v.chart !== null">{{ v.name }} ({{ counts[k] }})</h4> <h4 v-if="v.chart !== null">
{{ v.name }}
<span class="has-text-grey-light">({{ $utils.niceNumber(counts[k]) }})</span>
</h4>
<div :ref="`chart-${k}`" :id="`chart-${k}`"></div> <div :ref="`chart-${k}`" :id="`chart-${k}`"></div>
</div> </div>
<div class="column is-2 donut-container"> <div class="column is-2 donut-container">