2024-08-05 22:41:53 -05:00
|
|
|
<x-app-layout>
|
2024-08-05 22:45:34 -05:00
|
|
|
<div x-data>
|
2024-08-05 22:41:53 -05:00
|
|
|
|
|
|
|
|
<x-ib-drawer
|
|
|
|
|
key="manage-portfolio"
|
|
|
|
|
title="{{ $portfolio->title }}"
|
|
|
|
|
>
|
|
|
|
|
|
2024-08-06 20:41:52 -05:00
|
|
|
@livewire('manage-portfolio-form', [
|
|
|
|
|
'portfolio' => $portfolio,
|
|
|
|
|
'hideCancel' => true
|
|
|
|
|
])
|
2024-08-05 22:41:53 -05:00
|
|
|
|
|
|
|
|
</x-ib-drawer>
|
|
|
|
|
|
|
|
|
|
<x-ib-toolbar :title="$portfolio->title">
|
|
|
|
|
|
|
|
|
|
@if($portfolio->wishlist)
|
2024-08-06 20:41:52 -05:00
|
|
|
<x-badge value="{{ __('Wishlist') }}" class="badge-primary mr-3" />
|
2024-08-05 22:41:53 -05:00
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
<x-button
|
2024-08-06 20:41:52 -05:00
|
|
|
title="{{ __('Edit Portfolio') }}"
|
2024-08-05 22:41:53 -05:00
|
|
|
icon="o-pencil"
|
|
|
|
|
class="btn-circle btn-ghost btn-sm text-secondary"
|
|
|
|
|
@click="$dispatch('toggle-manage-portfolio')"
|
|
|
|
|
/>
|
|
|
|
|
</x-ib-toolbar>
|
|
|
|
|
|
2024-08-06 22:59:17 -05:00
|
|
|
@livewire('portfolio-performance-cards', [
|
|
|
|
|
'name' => 'portfolio-'.$portfolio->id,
|
|
|
|
|
'portfolio' => $portfolio
|
|
|
|
|
])
|
2024-08-05 22:41:53 -05:00
|
|
|
|
2024-08-06 22:59:17 -05:00
|
|
|
<div class="grid sm:grid-cols-5 gap-5">
|
|
|
|
|
@php
|
|
|
|
|
$formatter = new NumberFormatter('en_US', NumberFormatter::CURRENCY);
|
|
|
|
|
@endphp
|
2024-08-05 22:41:53 -05:00
|
|
|
|
2024-08-06 22:59:17 -05:00
|
|
|
<x-card class="col-span-5 sm:col-span-1 bg-slate-100 dark:bg-base-200 rounded-lg">
|
|
|
|
|
<div class="text-sm text-gray-400 whitespace-nowrap">{{ __('Market Gain/Loss') }}</div>
|
|
|
|
|
<div class="font-black text-xl"> {{ $formatter->formatCurrency($portfolio->marketGainLoss, 'USD') }} </div>
|
|
|
|
|
</x-card>
|
2024-08-05 22:41:53 -05:00
|
|
|
|
2024-08-06 22:59:17 -05:00
|
|
|
<x-card class="col-span-5 sm:col-span-1 bg-slate-100 dark:bg-base-200 rounded-lg">
|
|
|
|
|
<div class="text-sm text-gray-400 whitespace-nowrap">{{ __('Total Cost Basis') }}</div>
|
|
|
|
|
<div class="font-black text-xl"> {{ $formatter->formatCurrency($portfolio->totalCostBasis, 'USD') }} </div>
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
|
|
<x-card class="col-span-5 sm:col-span-1 bg-slate-100 dark:bg-base-200 rounded-lg">
|
|
|
|
|
<div class="text-sm text-gray-400 whitespace-nowrap">{{ __('Total Market Value') }}</div>
|
|
|
|
|
<div class="font-black text-xl"> {{ $formatter->formatCurrency($portfolio->totalMarketValue, 'USD') }} </div>
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
|
|
<x-card class="col-span-5 sm:col-span-1 bg-slate-100 dark:bg-base-200 rounded-lg">
|
|
|
|
|
<div class="text-sm text-gray-400 whitespace-nowrap">{{ __('Realized Gain/Loss') }}</div>
|
|
|
|
|
<div class="font-black text-xl"> {{ $formatter->formatCurrency($portfolio->realizedGainLoss, 'USD') }} </div>
|
|
|
|
|
</x-card>
|
|
|
|
|
|
|
|
|
|
<x-card class="col-span-5 sm:col-span-1 bg-slate-100 dark:bg-base-200 rounded-lg">
|
|
|
|
|
<div class="text-sm text-gray-400 whitespace-nowrap">{{ __('Dividends Earned') }}</div>
|
|
|
|
|
<div class="font-black text-xl"> {{ $formatter->formatCurrency($portfolio->dividendsEarned, 'USD') }} </div>
|
|
|
|
|
</x-card>
|
|
|
|
|
|
2024-08-05 22:41:53 -05:00
|
|
|
</div>
|
|
|
|
|
|
2024-08-06 22:59:17 -05:00
|
|
|
|
2024-08-05 22:41:53 -05:00
|
|
|
<div class="mt-6 grid md:grid-cols-7 gap-5">
|
|
|
|
|
|
|
|
|
|
<x-ib-card title="All portfolio holdings" class="md:col-span-4">
|
|
|
|
|
|
|
|
|
|
@php
|
|
|
|
|
$users = App\Models\User::take(3)->get();
|
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
|
|
@foreach($users as $user)
|
|
|
|
|
<x-list-item no-separator :item="$user" avatar="profile_photo_url" link="/docs/installation" />
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
|
|
</x-ib-card>
|
|
|
|
|
|
|
|
|
|
<x-ib-card title="Top performers" class="md:col-span-3">
|
|
|
|
|
|
|
|
|
|
@php
|
|
|
|
|
$users = App\Models\User::take(3)->get();
|
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
|
|
@foreach($users as $user)
|
|
|
|
|
<x-list-item no-separator :item="$user" avatar="profile_photo_url" link="/docs/installation" />
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
|
|
</x-ib-card>
|
|
|
|
|
|
|
|
|
|
<x-ib-card title="Top headlines" class="md:col-span-3">
|
|
|
|
|
|
|
|
|
|
@php
|
|
|
|
|
$users = App\Models\User::take(3)->get();
|
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
|
|
@foreach($users as $user)
|
|
|
|
|
<x-list-item no-separator :item="$user" avatar="profile_photo_url" link="/docs/installation" />
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
|
|
</x-ib-card>
|
|
|
|
|
|
|
|
|
|
<x-ib-card title="Recent activity" class="md:col-span-4">
|
|
|
|
|
|
|
|
|
|
@php
|
|
|
|
|
$users = App\Models\User::take(3)->get();
|
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
|
|
@foreach($users as $user)
|
|
|
|
|
<x-list-item no-separator :item="$user" avatar="profile_photo_url" link="/docs/installation" />
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
|
|
</x-ib-card>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</x-app-layout>
|