mirror of
https://github.com/frappe/books.git
synced 2024-09-20 11:29:00 +00:00
fix: tentative fix to single value charts
- i.e. when This Month
This commit is contained in:
parent
55fc6d8b66
commit
281de603e4
@ -13,7 +13,11 @@
|
||||
<span class="ml-2 text-gray-900">{{ t('Outflow') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<PeriodSelector :value="period" @change="(value) => (period = value)" />
|
||||
<PeriodSelector
|
||||
:value="period"
|
||||
@change="(value) => (period = value)"
|
||||
:options="['This Year', 'This Quarter']"
|
||||
/>
|
||||
</div>
|
||||
<LineChart
|
||||
v-if="hasData"
|
||||
|
@ -39,14 +39,20 @@
|
||||
import Dropdown from '@/components/Dropdown';
|
||||
export default {
|
||||
name: 'PeriodSelector',
|
||||
props: ['value'],
|
||||
props: {
|
||||
value: String,
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => ['This Year', 'This Quarter', 'This Month'],
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
Dropdown,
|
||||
},
|
||||
data() {
|
||||
let options = ['This Year', 'This Quarter', 'This Month'];
|
||||
return {
|
||||
periodOptions: options.map((option) => {
|
||||
periodOptions: this.options.map((option) => {
|
||||
return {
|
||||
label: option,
|
||||
action: () => this.selectOption(option),
|
||||
|
@ -5,6 +5,7 @@
|
||||
<PeriodSelector
|
||||
slot="action"
|
||||
:value="period"
|
||||
:options="['This Year', 'This Quarter']"
|
||||
@change="(value) => (period = value)"
|
||||
/>
|
||||
</SectionHeader>
|
||||
|
Loading…
Reference in New Issue
Block a user