Andrew Wallo 2 meses atrás
pai
commit
8a4f8c6cfc

+ 10
- 4
resources/views/components/report-summary-section.blade.php Ver arquivo

1
+@php
2
+    use App\Utilities\Currency\CurrencyAccessor;
3
+@endphp
4
+
5
+
1
 @props([
6
 @props([
2
     'reportLoaded' => false,
7
     'reportLoaded' => false,
3
     'summaryData' => [],
8
     'summaryData' => [],
9
         @if($reportLoaded)
14
         @if($reportLoaded)
10
             <div class="flex flex-col md:flex-row items-center md:items-end text-center justify-center gap-4 md:gap-8">
15
             <div class="flex flex-col md:flex-row items-center md:items-end text-center justify-center gap-4 md:gap-8">
11
                 @foreach($summaryData as $summary)
16
                 @foreach($summaryData as $summary)
12
-                    <div class="text-sm">
13
-                        <div class="text-gray-600 dark:text-gray-200 font-medium mb-2">{{ $summary['label'] }}</div>
17
+                    <div class="text-sm w-36 flex-shrink-0">
18
+                        <div
19
+                            class="text-gray-600 dark:text-gray-200 font-medium mb-2 text-center">{{ $summary['label'] }}</div>
14
 
20
 
15
                         @php
21
                         @php
16
                             $isTargetLabel = $summary['label'] === $targetLabel;
22
                             $isTargetLabel = $summary['label'] === $targetLabel;
17
-                            $isPositive = money($summary['value'], \App\Utilities\Currency\CurrencyAccessor::getDefaultCurrency())->isPositive();
23
+                            $isPositive = money($summary['value'], CurrencyAccessor::getDefaultCurrency())->isPositive();
18
                         @endphp
24
                         @endphp
19
 
25
 
20
                         <strong
26
                         <strong
21
                             @class([
27
                             @class([
22
-                                'text-lg',
28
+                                'text-lg text-center block',
23
                                 'text-success-700 dark:text-success-400' => $isTargetLabel && $isPositive,
29
                                 'text-success-700 dark:text-success-400' => $isTargetLabel && $isPositive,
24
                                 'text-danger-700 dark:text-danger-400' => $isTargetLabel && ! $isPositive,
30
                                 'text-danger-700 dark:text-danger-400' => $isTargetLabel && ! $isPositive,
25
                             ])
31
                             ])

Carregando…
Cancelar
Salvar