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
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
@use('App\Models\Currency')
|
||||
|
||||
<x-app-layout>
|
||||
<x-layouts.app>
|
||||
<div x-data>
|
||||
|
||||
<x-ib-alpine-modal
|
||||
<x-ui.modal
|
||||
key="create-transaction"
|
||||
title="{{ __('Create Transaction') }}"
|
||||
>
|
||||
@@ -11,9 +11,9 @@
|
||||
'portfolio' => $portfolio,
|
||||
])
|
||||
|
||||
</x-ib-alpine-modal>
|
||||
</x-ui.modal>
|
||||
|
||||
<x-ib-drawer
|
||||
<x-ui.drawer
|
||||
key="manage-portfolio"
|
||||
title="{{ __('Manage Portfolio') }}"
|
||||
>
|
||||
@@ -22,41 +22,41 @@
|
||||
'hideCancel' => true
|
||||
])
|
||||
|
||||
</x-ib-drawer>
|
||||
</x-ui.drawer>
|
||||
|
||||
<x-ib-toolbar :title="$portfolio->title">
|
||||
<x-ui.toolbar :title="$portfolio->title">
|
||||
|
||||
@if($portfolio->wishlist)
|
||||
<x-badge value="{{ __('Wishlist') }}" title="{{ __('Wishlist') }}" class="badge-secondary mr-3" />
|
||||
<x-ui.badge value="{{ __('Wishlist') }}" title="{{ __('Wishlist') }}" class="badge-secondary badge-outline mr-3" />
|
||||
@endif
|
||||
|
||||
@if(auth()->user()->id !== $portfolio->owner_id)
|
||||
<x-badge value="{{ $portfolio->owner->name }}" title="{{ __('Owner').': '.$portfolio->owner->name }}" class="badge-secondary badge-outline mr-3" />
|
||||
<x-ui.badge value="{{ $portfolio->owner->name }}" title="{{ __('Owner').': '.$portfolio->owner->name }}" class="badge-secondary badge-outline mr-3" />
|
||||
@endif
|
||||
|
||||
@can('fullAccess', $portfolio)
|
||||
<x-button
|
||||
<x-ui.button
|
||||
title="{{ __('Manage Portfolio') }}"
|
||||
icon="o-pencil"
|
||||
class="btn-circle btn-ghost btn-sm text-secondary"
|
||||
@click="$dispatch('toggle-manage-portfolio')"
|
||||
/>
|
||||
@else
|
||||
<x-icon name="o-eye" class="text-secondary w-4" title="{{ __('Read only') }}" />
|
||||
<x-ui.icon name="o-eye" class="text-secondary w-4" title="{{ __('Read only') }}" />
|
||||
@endcan
|
||||
|
||||
<x-ib-flex-spacer />
|
||||
<x-ui.flex-spacer />
|
||||
|
||||
@can('fullAccess', $portfolio)
|
||||
<div>
|
||||
<x-button
|
||||
<x-ui.button
|
||||
label="{{ __('Create Transaction') }}"
|
||||
class="btn-sm btn-primary whitespace-nowrap"
|
||||
@click="$dispatch('toggle-create-transaction')"
|
||||
/>
|
||||
</div>
|
||||
@endcan
|
||||
</x-ib-toolbar>
|
||||
</x-ui.toolbar>
|
||||
|
||||
@livewire('portfolio-performance-chart', [
|
||||
'name' => 'portfolio-'.$portfolio->id,
|
||||
@@ -65,36 +65,31 @@
|
||||
|
||||
<div class="grid sm:grid-cols-5 gap-5">
|
||||
|
||||
<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 truncate">{{ __('Market Gain/Loss') }}</div>
|
||||
<x-ui.card dense="true" sub-title="{{ __('Market Gain/Loss') }}" class="col-span-5 sm:col-span-1">
|
||||
<div class="font-black text-xl"> {{ Number::currency($metrics->get('total_market_gain_dollars', 0)) }} </div>
|
||||
</x-card>
|
||||
</x-ui.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 truncate">{{ __('Total Cost Basis') }}</div>
|
||||
<x-ui.card dense="true" sub-title="{{ __('Total Cost Basis') }}" class="col-span-5 sm:col-span-1">
|
||||
<div class="font-black text-xl"> {{ Number::currency($metrics->get('total_cost_basis', 0)) }} </div>
|
||||
</x-card>
|
||||
</x-ui.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 truncate">{{ __('Total Market Value') }}</div>
|
||||
<x-ui.card dense="true" sub-title="{{ __('Total Market Value') }}" class="col-span-5 sm:col-span-1">
|
||||
<div class="font-black text-xl"> {{ Number::currency($metrics->get('total_market_value', 0)) }} </div>
|
||||
</x-card>
|
||||
</x-ui.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 truncate">{{ __('Realized Gain/Loss') }}</div>
|
||||
<x-ui.card dense="true" sub-title="{{ __('Realized Gain/Loss') }}" class="col-span-5 sm:col-span-1">
|
||||
<div class="font-black text-xl"> {{ Number::currency($metrics->get('realized_gain_dollars', 0)) }} </div>
|
||||
</x-card>
|
||||
</x-ui.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 truncate">{{ __('Dividends Earned') }}</div>
|
||||
<x-ui.card dense="true" sub-title="{{ __('Dividends Earned') }}" class="col-span-5 sm:col-span-1">
|
||||
<div class="font-black text-xl"> {{ Number::currency($metrics->get('total_dividends_earned', 0)) }} </div>
|
||||
</x-card>
|
||||
</x-ui.card>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mt-6 grid md:grid-cols-7 gap-5">
|
||||
|
||||
<x-ib-card title="{{ __('Holdings') }}" class="md:col-span-4 overflow-scroll">
|
||||
<x-ui.card title="{{ __('Holdings') }}" class="md:col-span-4">
|
||||
|
||||
@if($portfolio->holdings->isEmpty())
|
||||
<div class="flex justify-center items-center h-full pb-10 text-secondary">
|
||||
@@ -104,14 +99,14 @@
|
||||
|
||||
@else
|
||||
|
||||
@livewire('holdings-table', [
|
||||
'portfolio' => $portfolio
|
||||
])
|
||||
@livewire('datatables.holdings-table', [
|
||||
'portfolio' => $portfolio
|
||||
])
|
||||
|
||||
@endif
|
||||
</x-ib-card>
|
||||
</x-ui.card>
|
||||
|
||||
<x-ib-card title="{{ __('Recent activity') }}" class="md:col-span-3">
|
||||
<x-ui.card title="{{ __('Recent activity') }}" class="md:col-span-3">
|
||||
|
||||
@if($portfolio->transactions->isEmpty())
|
||||
<div class="flex justify-center items-center h-full pb-10 text-secondary">
|
||||
@@ -126,9 +121,9 @@
|
||||
'transactions' => $portfolio->transactions
|
||||
])
|
||||
|
||||
</x-ib-card>
|
||||
</x-ui.card>
|
||||
|
||||
<x-ib-card title="{{ __('Top performers') }}" class="md:col-span-3">
|
||||
<x-ui.card title="{{ __('Top performers') }}" class="md:col-span-3">
|
||||
|
||||
@if($portfolio->holdings->isEmpty())
|
||||
<div class="flex justify-center items-center h-full pb-10 text-secondary">
|
||||
@@ -142,22 +137,22 @@
|
||||
'holdings' => $portfolio->holdings
|
||||
])
|
||||
|
||||
</x-ib-card>
|
||||
</x-ui.card>
|
||||
|
||||
{{-- <x-ib-card title="{{ __('Top headlines') }}" class="md:col-span-3">
|
||||
{{-- <x-ui.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" />
|
||||
<x-ui.list-item no-separator :item="$user" avatar="profile_photo_url" link="/docs/installation" />
|
||||
@endforeach
|
||||
|
||||
</x-ib-card> --}}
|
||||
</x-ui.card> --}}
|
||||
|
||||
@if(config('services.ai_chat_enabled'))
|
||||
@livewire('ai-chat-window', [
|
||||
@livewire('ui.ai-chat-window', [
|
||||
'chatable' => $portfolio,
|
||||
'suggested_prompts' => [
|
||||
[
|
||||
@@ -184,4 +179,4 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
</x-layouts.app>
|
||||
Reference in New Issue
Block a user