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:
@@ -0,0 +1,38 @@
|
||||
@props([
|
||||
'small' => false,
|
||||
'percent' => null,
|
||||
'costBasis' => null,
|
||||
'marketValue' => null
|
||||
])
|
||||
|
||||
@php
|
||||
if (!is_null($percent)) {
|
||||
|
||||
$isUp = $percent > 0;
|
||||
|
||||
} else {
|
||||
|
||||
$isUp = $costBasis <= $marketValue;
|
||||
$percent = $costBasis ? (($marketValue - $costBasis) / $costBasis) * 100 : 0;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if(!empty($percent))
|
||||
|
||||
<x-ui.badge
|
||||
class="{{ $small ? 'badge-xs' : 'badge-sm' }} {{ $isUp ? 'badge-success' : 'badge-error' }} badge-outline ml-2"
|
||||
title="{{ Number::percentage(
|
||||
$percent,
|
||||
$percent < 1 ? 2 : 0
|
||||
) }}"
|
||||
>
|
||||
<x-slot:value>
|
||||
{!! $isUp ? '▲' :'▼' !!}
|
||||
{{ Number::percentage(
|
||||
abs($percent),
|
||||
($percent && $small) < 1 ? 2 : 0
|
||||
) }}
|
||||
</x-slot:value>
|
||||
</x-ui.badge>
|
||||
|
||||
@endif
|
||||
Reference in New Issue
Block a user