@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
List {{ $title_menu }}
{{-- alert --}} @include('components.alert')

@php $no = 1; @endphp @foreach ($table_detail as $item) @php $rowStyle = ''; if ($item->isactive == '0') { $rowStyle = 'background-color: #ffc2cd !important;'; } elseif ($item->tanggal_akhir == date('Y-m-d')) { $rowStyle = 'background-color: #fff3cd !important;'; } @endphp @endforeach
No ID Broadcast Vendor Pesan Status Tanggal Awal Tanggal Akhir Action
{{ $no++ }} {{ $item->id }} {{ Str::limit($item->vendor_names, 30) }} {!! Str::limit(strip_tags($item->pesan), 50) !!} @if ($item->isactive == '0') Inactive @elseif ($item->status == 'posted') Posted @else Entry @endif {{ $item->tanggal_awal }} {{ $item->tanggal_akhir }} {{-- View Button --}} {{-- Edit Button (show when active and entry status) --}} @if ($authorize->edit == '1' && $item->status == 'entry' && $item->isactive == '1') @endif {{-- Toggle Status Button (Deactivate/Activate) - Only for isactive column --}} @if ($authorize->delete == '1') @if ($item->isactive == '1')
@csrf
@else {{-- Activate button redirects to edit page to update dates --}} @endif @endif {{-- Post Button (show when entry status and active) --}} @if ($authorize->approval == '1' && $item->status == 'entry' && $item->isactive == '1')
@csrf
@endif {{-- Unpost Button (show when posted status and active) --}} @if ($authorize->approval == '1' && $item->status == 'posted' && $item->isactive == '1')
@csrf
@endif
{{-- Legend Note --}}
@endsection @push('js') @endpush