Aplikasi Keuangan yang mengatur lalu lintas transaksi antara bank dan aplikasi internal Kampus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
2.4 KiB

<div>
<a
class="btn btn-link nav-link d-flex align-items-center"
data-bs-toggle="dropdown"
aria-expanded="false"
href="#"
role="button"
>
@if ($this->notifications->filter(fn ($value, $key) => ! $value->read_at)->count() > 0)
<x-tabler-bell-exclamation class="w-full" />
@else
<x-tabler-bell class="w-full" />
@endif
</a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-md p-0">
<ul class="list-unstyled list-group m-0 p-0">
@forelse ($this->notifications as $notification)
<li @class([
'border-bottom p-3 list-group-item',
'list-group-item-dark' => ! $notification->read_at,
])>
<div class="d-flex gap-3">
<div class="small flex-grow-1">
<p class="mb-0">{{ $notification->data['title'] }}</p>
<p class="mb-1">{{ $notification->data['message'] }}</p>
<div class="text-secondary">{{ $notification->created_at->diffForHumans() }}</div>
</div>
@if (! $notification->read_at)
<x-button
theme="primary"
wire:click="read('{{ $notification->id }}')"
class="btn-icon btn-sm rounded-circle"
>
<x-tabler-check width="20" />
</x-button>
@endif
</div>
</li>
@empty
<li class="border-bottom p-3">
<div class="d-flex gap-3">
<div class="small flex-grow-1">
<p class="mb-0">{{ __('ui/notification.empty') }}</p>
</div>
</div>
</li>
@endforelse
@if ($this->notifications->filter(fn ($value, $key) => ! $value->read_at)->count() > 1)
<li class="px-4 py-3 text-center">
<x-button
wire:click="readAll"
theme="primary"
class="w-full"
>{{ __('ui/notification.read_all') }}</x-button>
</li>
@endif
</ul>
</div>
</div>