feat(header): tambahkan fitur notifikasi pada header
- Menambahkan dropdown untuk menampilkan notifikasi yang belum dibaca. - Menampilkan informasi notifikasi termasuk judul dan pesan. - Menyediakan tombol untuk menandai semua notifikasi sebagai dibaca.
This commit is contained in:
parent
99f8aeffc3
commit
b3ce06e03c
@ -47,6 +47,43 @@
|
||||
</div>
|
||||
<div class="border-b border-b-gray-200">
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<div class="scrollable-y-auto" data-scrollable="true" data-scrollable-dependencies="#header"
|
||||
data-scrollable-max-height="auto" data-scrollable-offset="200px">
|
||||
<div class="flex flex-col gap-5 py-5 divider-y divider-gray-200">
|
||||
@foreach (auth()->user()->unreadNotifications as $notification)
|
||||
<div class="flex items-center grow gap-2.5 px-5">
|
||||
<div
|
||||
class="flex items-center justify-center size-8 bg-success-light rounded-full border border-success-clarity">
|
||||
<i class="ki-filled ki-check text-lg text-success">
|
||||
</i>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
<span class="text-2sm font-medium text-gray-700">
|
||||
{{ formatNotifikasi($notification)['title'] }}<br>
|
||||
{{ formatNotifikasi($notification)['message'] }}<br>
|
||||
|
||||
</span>
|
||||
<span class="font-medium text-gray-500 text-2xs">
|
||||
{{ $notification->created_at->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@if(!$loop->last)
|
||||
<div class="border-b border-b-gray-200"></div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-b border-b-gray-200">
|
||||
</div>
|
||||
<div class="grid grid-cols-2 p-5 gap-2.5" id="notifications_all_footer">
|
||||
<button class="btn btn-sm btn-light justify-center">
|
||||
Mark all as read
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu" data-menu="true">
|
||||
|
Loading…
x
Reference in New Issue
Block a user