Files
investbrain/resources/views/holding/holding-dividends-list.blade.php
T
hackerESQ e6f38d9481 Chore: Upgrade to Laravel 12 + remove Mary and Jetstream dependencies (#141)
* docs: remove requirement for setting APP_KEY manually

* optimize date picker

* clean up modals

* spot light working

* reorganization

* add lazy load

* wip

* remove filament

* styling
2025-09-26 17:41:28 -05:00

41 lines
993 B
PHP

<?php
use App\Models\Holding;
use Livewire\Volt\Component;
new class extends Component
{
// props
public Holding $holding;
protected $listeners = [
'transaction-updated' => '$refresh',
'transaction-saved' => '$refresh',
];
// methods
}; ?>
<div>
@foreach ($holding->dividends->take(5) as $dividend)
<x-ui.list-item :item="$dividend" no-separator>
<x-slot:value>
@php
$owned = ($dividend->purchased - $dividend->sold);
@endphp
{{ Number::currency($dividend->dividend_amount, $holding->market_data->currency) }}
x {{ $owned }}
= {{ Number::currency($owned * $dividend->dividend_amount, $holding->market_data->currency) }}
</x-slot:value>
<x-slot:sub-value>
<span title="{{ __('Ex Dividend Date') }}">{{ $dividend->date->format('F d, Y') }}</span>
</x-slot:sub-value>
</x-ui.list-item>
@endforeach
</div>