refactored widget charts
This commit is contained in:
parent
47f9f478d0
commit
f6e0c4dfc2
@ -92,7 +92,7 @@ class CashFlow extends Widget
|
|||||||
])
|
])
|
||||||
->fill(false);
|
->fill(false);
|
||||||
|
|
||||||
return $this->view('widgets.cash_flow', [
|
return $this->view('widgets.line_chart', [
|
||||||
'chart' => $chart,
|
'chart' => $chart,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class ExpensesByCategory extends Widget
|
|||||||
|
|
||||||
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), 0, 160, 6);
|
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), 0, 160, 6);
|
||||||
|
|
||||||
return $this->view('widgets.expenses_by_category', [
|
return $this->view('widgets.donut_chart', [
|
||||||
'chart' => $chart,
|
'chart' => $chart,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class IncomeByCategory extends Widget
|
|||||||
|
|
||||||
$chart = $this->getDonutChart(trans_choice('general.incomes', 1), 0, 160, 6);
|
$chart = $this->getDonutChart(trans_choice('general.incomes', 1), 0, 160, 6);
|
||||||
|
|
||||||
return $this->view('widgets.income_by_category', [
|
return $this->view('widgets.donut_chart', [
|
||||||
'chart' => $chart,
|
'chart' => $chart,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
6
public/css/custom.css
vendored
6
public/css/custom.css
vendored
@ -39,13 +39,13 @@ button:focus
|
|||||||
/*--------Forgot Text Finish--------*/
|
/*--------Forgot Text Finish--------*/
|
||||||
|
|
||||||
|
|
||||||
/*--------Dashboard Categories--------*/
|
/*--------Chart Donut Height--------*/
|
||||||
.dashboard-categories
|
.chart-donut
|
||||||
{
|
{
|
||||||
position:relative !important;
|
position:relative !important;
|
||||||
height:23vh !important;
|
height:23vh !important;
|
||||||
}
|
}
|
||||||
/*--------Dashboard Categories Finish--------*/
|
/*--------Chart Donut Height Finish--------*/
|
||||||
|
|
||||||
|
|
||||||
/*--------Cursor Pointer--------*/
|
/*--------Cursor Pointer--------*/
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
@include('partials.widgets.standard_header')
|
@include('partials.widgets.standard_header')
|
||||||
|
|
||||||
<div class="card-body" id="expenses-category-doughnut">
|
<div class="card-body" id="widget-donut-{{ $model->id }}">
|
||||||
<div class="dashboard-categories">
|
<div class="chart-donut">
|
||||||
{!! $chart->container() !!}
|
{!! $chart->container() !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
@push('charts')
|
@push('charts')
|
||||||
<script>
|
<script>
|
||||||
var expenses_category_doughnut = new Vue({
|
var widget_donut_{{ $model->id }} = new Vue({
|
||||||
el: '#expenses-category-doughnut',
|
el: '#widget-donut-{{ $model->id }}',
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
@ -1,23 +0,0 @@
|
|||||||
<div id="widget-{{ $model->id }}" class="{{ $model->settings->width }}">
|
|
||||||
<div class="card">
|
|
||||||
@include('partials.widgets.standard_header')
|
|
||||||
|
|
||||||
<div class="card-body" id="income-category-doughnut">
|
|
||||||
<div class="dashboard-categories">
|
|
||||||
{!! $chart->container() !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@push('charts')
|
|
||||||
<script>
|
|
||||||
var income_category_doughnut = new Vue({
|
|
||||||
el: '#income-category-doughnut',
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
|
|
||||||
@push('body_scripts')
|
|
||||||
{!! $chart->script() !!}
|
|
||||||
@endpush
|
|
@ -2,7 +2,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
@include('partials.widgets.standard_header')
|
@include('partials.widgets.standard_header')
|
||||||
|
|
||||||
<div class="card-body" id="cashflow">
|
<div class="card-body" id="widget-line-{{ $model->id }}">
|
||||||
<div class="chart">
|
<div class="chart">
|
||||||
{!! $chart->container() !!}
|
{!! $chart->container() !!}
|
||||||
</div>
|
</div>
|
||||||
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
@push('charts')
|
@push('charts')
|
||||||
<script>
|
<script>
|
||||||
var cash_flow = new Vue({
|
var widget_line_{{ $model->id }} = new Vue({
|
||||||
el: '#cashflow',
|
el: '#widget-line-{{ $model->id }}',
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="icon icon-shape bg-white text-danger rounded-circle shadow">
|
<div class="icon icon-shape bg-white text-danger rounded-circle shadow">
|
||||||
<i class="fa fa-shopping-cart"></i>
|
<i class="fa fa-shopping-cart"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="mt-3 mb-0 text-sm cursor-default">
|
<p class="mt-3 mb-0 text-sm cursor-default">
|
||||||
<span class="text-white">{{ trans('widgets.receivables') }}</span>
|
<span class="text-white">{{ trans('widgets.receivables') }}</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
content="{{ trans('widgets.open_invoices') }}: {{ $totals['open'] }} / {{ trans('widgets.overdue_invoices') }}: {{ $totals['overdue'] }}"
|
content="{{ trans('widgets.open_invoices') }}: {{ $totals['open'] }} / {{ trans('widgets.overdue_invoices') }}: {{ $totals['overdue'] }}"
|
||||||
effect="light"
|
effect="light"
|
||||||
:open-delay="200"
|
:open-delay="200"
|
||||||
placement="top"
|
placement="top"
|
||||||
popper-class="text-dark">
|
popper-class="text-dark">
|
||||||
<span class="text-white font-weight-bold float-right">{{ $totals['open'] }} / {{ $totals['overdue'] }}</span>
|
<span class="text-white font-weight-bold float-right">{{ $totals['open'] }} / {{ $totals['overdue'] }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user