Theme fixes, logo updated, reduce duplication of components

And many more updates
This commit is contained in:
hackerESQ
2024-08-23 21:59:42 -05:00
parent c255d14f23
commit a0ec39638e
26 changed files with 248 additions and 231 deletions
+18 -37
View File
@@ -90,7 +90,24 @@
])
</x-ib-card>
<x-ib-card title="{{ __('Recent activity') }}" class="md:col-span-3">
@livewire('transactions-list', [
'portfolio' => $portfolio,
'transactions' => $portfolio->transactions
])
</x-ib-card>
<x-ib-card title="{{ __('Top performers') }}" class="md:col-span-3">
@livewire('top-performers-list', [
'holdings' => $portfolio->holdings
])
</x-ib-card>
{{-- <x-ib-card title="{{ __('Top headlines') }}" class="md:col-span-3">
@php
@@ -103,42 +120,6 @@
</x-ib-card> --}}
<x-ib-card title="{{ __('Recent activity') }}" class="md:col-span-3">
@livewire('transactions-list', [
'portfolio' => $portfolio
])
</x-ib-card>
<x-ib-card title="{{ __('Top performers') }}" class="md:col-span-3">
@foreach($portfolio->holdings->sortBy('market_gain_percent')->where('quantity', '>', 0)->take(5) as $holding)
<x-list-item no-separator :item="$holding">
@php
$gainPercent = (($holding->market_data?->market_value - $holding->average_cost_basis) / $holding->average_cost_basis) * 100;
@endphp
<x-slot:value class="flex items-center">
{{ $holding->symbol }}
<x-badge class="{{ $gainPercent > 0 ? 'badge-success' : 'badge-error' }} ml-2 badge-sm" >
<x-slot:value>
{{ Number::percentage($gainPercent) }}
</x-slot:value>
</x-badge>
</x-slot:value>
<x-slot:sub-value>
{{ $holding->market_data?->name }}
</x-slot:sub-value>
</x-list-item>
@endforeach
</x-ib-card>
</div>
</div>
</x-app-layout>