Pembaruan akun

Notifikasi

Keputusan resep dan pembaruan penting pesanan Anda.

@forelse($notifications as $notification) @php $kind = $notification->data['kind'] ?? 'prescription_review'; $approved = $kind === 'prescription_review' && ($notification->data['status'] ?? null) === 'approved'; [$title, $subtitle, $icon, $target, $action] = match ($kind) { 'welcome' => ['Selamat datang di Ruang Medis', 'Akun Anda sudah siap digunakan', 'heart', route('home'), 'Mulai belanja'], 'promotion' => ['Promo baru untuk Anda', $notification->data['name'], 'receipt', route('promotions.show', $notification->data['coupon_code']), 'Lihat promo'], 'pharmacy_message' => ['Pesan baru dari apotek', $notification->data['sender_label'], 'message-square', route('pharmacy-chat.show', $notification->data['conversation_id']), 'Buka percakapan'], 'consultation_scheduled' => ['Konsultasi terjadwal', $notification->data['doctor_name'], 'stethoscope', route('consultations.show', $notification->data['consultation_number']), 'Lihat konsultasi'], 'referral_reward' => ['Reward referral diterbitkan', $notification->data['coupon_code'], 'heart', route('referrals.index'), 'Lihat reward'], default => [ $approved ? 'Resep disetujui' : (($notification->data['status'] ?? null) === 'submitted' ? 'Resep sedang diproses' : 'Resep perlu dilengkapi'), $notification->data['order_number'], $approved ? 'check' : 'file-check', ($notification->data['has_order'] ?? true) ? route('orders.show', $notification->data['order_number']) : route('prescriptions.status.index'), ($notification->data['has_order'] ?? true) ? 'Lihat pesanan' : 'Lihat status resep', ], }; @endphp

{{ $title }}

{{ $subtitle }}

{{ $notification->created_at->diffForHumans() }}
@if($kind === 'referral_reward')

Coupon personal senilai Rp{{ number_format($notification->data['amount'],0,',','.') }} sudah tersedia.

@elseif($notification->data['reason'] ?? null)

{{ $notification->data['reason'] }}

@endif
{{ $action }} →@if(!$notification->read_at)
@csrf @method('PATCH')
@endif
@empty

Pembaruan penting Anda akan tampil di sini

Pembaruan resep dan pesanan akan muncul di sini.

@endforelse
{{ $notifications->links() }}