From 47afdd2f19e9df2559973ae5560634c685f72af0 Mon Sep 17 00:00:00 2001 From: ok236449 Date: Fri, 14 Oct 2022 23:09:16 +0200 Subject: [PATCH] Hide sections if there are no data --- .../views/admin/overview/index.blade.php | 114 +++++++++--------- 1 file changed, 60 insertions(+), 54 deletions(-) diff --git a/resources/views/admin/overview/index.blade.php b/resources/views/admin/overview/index.blade.php index 21983781..eaddb308 100644 --- a/resources/views/admin/overview/index.blade.php +++ b/resources/views/admin/overview/index.blade.php @@ -256,32 +256,36 @@
-
- {{__('Last month')}}: - - - - - - - - - - - - @foreach($counters['payments']['lastMonth'] as $currency => $income) - - - - - - @endforeach - -
{{__('Currency')}}{{__('Number of payments')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->total}}
-
-
+ @if($counters['payments']['lastMonth']->count()) +
+ {{__('Last month')}}: + + + + + + + + + + + + @foreach($counters['payments']['lastMonth'] as $currency => $income) + + + + + + @endforeach + +
{{__('Currency')}}{{__('Number of payments')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->total}}
+
+
+ @endif + @if($counters['payments']['lastMonth']->count())
+ @else
@endif {{__('This month')}}:
- {{__('Last year')}}: - - - - - - - - - - - - - - @foreach($counters['taxPayments']['lastYear'] as $currency => $income) - - - - - - - - @endforeach - -
{{__('Currency')}}{{__('Number of payments')}}{{__('Base amount')}}{{__('Total taxes')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->price}}{{$income->taxes}}{{$income->total}}
-
+ @if($counters['taxPayments']['lastYear']->count()) + {{__('Last year')}}: + + + + + + + + + + + + + + @foreach($counters['taxPayments']['lastYear'] as $currency => $income) + + + + + + + + @endforeach + +
{{__('Currency')}}{{__('Number of payments')}}{{__('Base amount')}}{{__('Total taxes')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->price}}{{$income->taxes}}{{$income->total}}
+
+ @endif {{__('This year')}}: