Andrew Wallo 2 meses atrás
pai
commit
8a4f8c6cfc

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

@@ -1,3 +1,8 @@
1
+@php
2
+    use App\Utilities\Currency\CurrencyAccessor;
3
+@endphp
4
+
5
+
1 6
 @props([
2 7
     'reportLoaded' => false,
3 8
     'summaryData' => [],
@@ -9,17 +14,18 @@
9 14
         @if($reportLoaded)
10 15
             <div class="flex flex-col md:flex-row items-center md:items-end text-center justify-center gap-4 md:gap-8">
11 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 21
                         @php
16 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 24
                         @endphp
19 25
 
20 26
                         <strong
21 27
                             @class([
22
-                                'text-lg',
28
+                                'text-lg text-center block',
23 29
                                 'text-success-700 dark:text-success-400' => $isTargetLabel && $isPositive,
24 30
                                 'text-danger-700 dark:text-danger-400' => $isTargetLabel && ! $isPositive,
25 31
                             ])

Carregando…
Cancelar
Salvar