mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Merge pull request #234 from ankitsinghaniyaz/master
Fix profit and loss graph not reflecting changes correctly
This commit is contained in:
commit
b77f5536ec
@ -1,17 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="flex flex-col h-full">
|
||||
<SectionHeader>
|
||||
<template slot="title" class="font-medium">{{
|
||||
_('Top Expenses')
|
||||
}}</template>
|
||||
<PeriodSelector
|
||||
v-if="hasData"
|
||||
slot="action"
|
||||
:value="period"
|
||||
@change="value => (period = value)"
|
||||
/>
|
||||
</SectionHeader>
|
||||
<div class="flex relative">
|
||||
<div class="flex relative" v-show="hasData">
|
||||
<div class="w-1/2">
|
||||
<div
|
||||
class="mt-5 flex justify-between items-center text-sm"
|
||||
@ -28,7 +27,6 @@
|
||||
<div class="w-1/2">
|
||||
<div class="chart-wrapper" ref="top-expenses"></div>
|
||||
<div
|
||||
v-if="hasData"
|
||||
class="absolute text-base text-center font-semibold"
|
||||
style="right: 6rem; top: 32%;"
|
||||
>
|
||||
@ -40,13 +38,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="totalExpense === 0" class="absolute inset-0 flex-center">
|
||||
</div>
|
||||
<div v-if="totalExpense === 0" class="flex-1 w-full h-full flex-center">
|
||||
<span class="text-base text-gray-600">
|
||||
{{ _('No transactions yet') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -3,14 +3,13 @@
|
||||
<SectionHeader>
|
||||
<template slot="title">{{ _('Profit and Loss') }}</template>
|
||||
<PeriodSelector
|
||||
v-if="hasData"
|
||||
slot="action"
|
||||
:value="period"
|
||||
@change="value => (period = value)"
|
||||
/>
|
||||
</SectionHeader>
|
||||
<div v-if="hasData" class="chart-wrapper" ref="profit-and-loss"></div>
|
||||
<div class="flex-1 w-full h-full flex-center" v-else>
|
||||
<div v-show="hasData" class="chart-wrapper" ref="profit-and-loss"></div>
|
||||
<div class="flex-1 w-full h-full flex-center my-20" v-if="!hasData">
|
||||
<span class="text-base text-gray-600">
|
||||
{{ _('No transactions yet') }}
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user