From 096da300d9b40bed78bbb4cb04b359935927738f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 18 Aug 2022 19:52:45 +0300 Subject: [PATCH 1/2] styling --- resources/views/components/reports/summary.blade.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/views/components/reports/summary.blade.php b/resources/views/components/reports/summary.blade.php index 44741e6a2..2be5685b2 100644 --- a/resources/views/components/reports/summary.blade.php +++ b/resources/views/components/reports/summary.blade.php @@ -5,8 +5,7 @@ @include($class->views['summary.content.header']) @foreach($class->tables as $table_key => $table_name) -
+
@include($class->views['summary.table']) @if (! $is_print) From 143e2a6c3f13156dbe48c8082310bd3ed02e2bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 18 Aug 2022 19:53:19 +0300 Subject: [PATCH 2/2] fixed chart formatter for multiple tables --- app/Abstracts/Report.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index b2643f11a..e45e22a71 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -304,8 +304,19 @@ abstract class Report public function setChartLabelFormatter() { - $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + if (count($this->tables) > 1) { + foreach ($this->tables as $table_key => $table) { + if (empty($this->chart[$table_key])) { + continue; + } + + $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); + $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + } + } else { + $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); + $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + } } public function setYear()