Todo Alert
Daftar peringatan tindakan yang harus dikerjakan.
Kapan dipakai: Dashboard atau halaman utama, untuk menyorot pekerjaan tertunda. Tidak render apa pun jika todos kosong.
12:055G ▮▮▮
MacBook Air
Kode
@php
$todos = [
['type' => 'danger', 'icon' => 'receipt_long', 'title' => '3 Invoice Jatuh Tempo', 'message' => 'Segera lakukan penagihan.', 'count' => 3, 'action_url' => '/invoices'],
['type' => 'warning', 'icon' => 'schedule', 'title' => 'Absensi belum lengkap', 'message' => 'Ada 2 karyawan belum check-out.', 'count' => 2, 'action_url' => '/attendance'],
['type' => 'info', 'icon' => 'campaign', 'title' => 'Pengumuman baru', 'message' => 'Jadwal libur bersama telah terbit.', 'action_url' => '/announcements'],
];
@endphp
<x-todo-alert :todos="$todos" />
File yang dibawa ke project
resources/views/components/todo-alert.blade.php
Props
| Nama | Tipe | Default | Keterangan |
|---|---|---|---|
todos | array | [] | Tiap item: type (danger|warning|info|success), icon, title, message, count, action_url |
forceUrl | string|null | null | Paksa semua item ke satu URL |