From 7e2cef7602ca2d01d745908126b00285159f43bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Fri, 4 Oct 2024 12:12:24 +0100 Subject: [PATCH] wip --- lang/ro/report.php | 2 +- .../components/forms/report/content.blade.php | 2 +- .../components/reports/table/list.blade.php | 96 ++++++++++--------- .../reports/table/statistic.blade.php | 78 ++++++++------- 4 files changed, 92 insertions(+), 86 deletions(-) diff --git a/lang/ro/report.php b/lang/ro/report.php index b67c068c..fcad1fd3 100644 --- a/lang/ro/report.php +++ b/lang/ro/report.php @@ -57,7 +57,7 @@ 'location' => 'Locații', 'category' => 'Fișă raportare', 'period' => 'Perioada de raportare', - 'status' => 'Stare', + 'status' => 'Status', ], 'type' => [ diff --git a/resources/views/components/forms/report/content.blade.php b/resources/views/components/forms/report/content.blade.php index fd1b5d6c..a0ac500b 100644 --- a/resources/views/components/forms/report/content.blade.php +++ b/resources/views/components/forms/report/content.blade.php @@ -1,3 +1,3 @@ -
+
{{ $getChildComponentContainer() }}
diff --git a/resources/views/components/reports/table/list.blade.php b/resources/views/components/reports/table/list.blade.php index 5fe9e672..93cafb95 100644 --- a/resources/views/components/reports/table/list.blade.php +++ b/resources/views/components/reports/table/list.blade.php @@ -4,58 +4,60 @@ 'actions' => null, ]) - - @if (null !== $columns) - - - @foreach ($columns as $column) - - {{ $column['label'] }} - - @endforeach +
+
+ @if (null !== $columns) + + + @foreach ($columns as $column) + + {{ $column['label'] }} + + @endforeach - @if (filled(data_get($data, '0.actions'))) - - @endif - - - @endif + @if (filled(data_get($data, '0.actions'))) + + @endif + + + @endif - - @foreach ($data as $row) - - @foreach ($columns as $column) - @php - $cell = data_get($row, $column['name']); - @endphp + + @foreach ($data as $row) + + @foreach ($columns as $column) + @php + $cell = data_get($row, $column['name']); + @endphp - @if (is_array($cell)) - @foreach ($cell as $d) + @if (is_array($cell)) + @foreach ($cell as $d) + + {{ $d ?? '–' }} + + @endforeach + @else - {{ $d ?? '–' }} + {{ $cell ?? '–' }} - @endforeach - @else + @endif + @endforeach + + @if (filled($actions = data_get($row, 'actions'))) - {{ $cell ?? '–' }} +
+ @foreach ($actions as $url => $label) + + {{ $label }} + + + + @endforeach +
@endif - @endforeach - - @if (filled($actions = data_get($row, 'actions'))) - -
- @foreach ($actions as $url => $label) - - {{ $label }} - - - - @endforeach -
-
- @endif -
- @endforeach - -
+ + @endforeach + + +
diff --git a/resources/views/components/reports/table/statistic.blade.php b/resources/views/components/reports/table/statistic.blade.php index 59278eac..85ea9f02 100644 --- a/resources/views/components/reports/table/statistic.blade.php +++ b/resources/views/components/reports/table/statistic.blade.php @@ -3,44 +3,48 @@ 'data' => null, ]) - - @if (null !== $columns) - - - +
+
+ @if (null !== $columns) + + + - @foreach ($columns as $key => $label) - - @endforeach - - - @endif + @foreach ($columns as $key => $label) + + @endforeach + + + @endif - - @foreach ($data as $label => $columns) - - + + @foreach ($data as $label => $columns) + + - @foreach ($columns as $data) - @if (is_array($data)) - @foreach ($data as $d) - + @endforeach + @else + - @endforeach - @else - - @endif - @endforeach - - @endforeach - -
- {{ $label }} -
+ {{ $label }} +
- {{ $label }} -
+ + {{ $label }} + + - {{ $d }} + @foreach ($columns as $data) + @if (is_array($data)) + @foreach ($data as $d) + + {{ $d }} + + {{ $data }} - {{ $data }} -
+ @endif + @endforeach + + @endforeach + + +