@php $records = collect($alerts ?? []); $stages = $records->where('alert_type', 'stage'); $withdrawls = $records->where('alert_type', 'withdrawl'); @endphp {{-- ========================= --}} {{-- TOOLBAR --}} {{-- ========================= --}}
{{-- ========================= --}} {{-- STAGE TABLE --}} {{-- ========================= --}}

Stage Alerts

@forelse($stages as $record) @empty @endforelse
Stage Green Yellow Amber Red
{{ $record->stage_name }} {{ $record->green_days }} {{ $record->yellow_days }} {{ $record->amber_days }} {{ $record->red_days }}
No stage alerts found
{{-- ========================= --}} {{-- WITHDRAWL TABLE --}} {{-- ========================= --}}

Withdrawl Alerts

@forelse($withdrawls as $record) @empty @endforelse
Withdrawl Green Yellow Amber Red
{{ $record->stage_name }} {{ $record->green_days }} {{ $record->yellow_days }} {{ $record->amber_days }} {{ $record->red_days }}
No withdrawl alerts found
{{-- ========================= --}} {{-- MODAL --}} {{-- ========================= --}}
{{-- HEADER --}}

Alert Configuration

{{-- BODY --}}
@csrf {{-- ========================= --}} {{-- TABS --}} {{-- ========================= --}}
{{-- ========================= --}} {{-- STAGE TAB --}} {{-- ========================= --}}
@php $stageRows = [ '1st_tranche_to_plinth', 'plinth_to_2nd_tranche', '2nd_tranche_to_lintel', 'lintel_to_3rd_tranche', '3rd_tranche_to_roof', 'roof_to_4th_tranche', 'overall_1st_tranche_to_roof' ]; @endphp
@foreach($stageRows as $i => $stage)
{{ ucwords(str_replace('_', ' ', $stage)) }}
@endforeach
{{-- ========================= --}} {{-- WITHDRAWL TAB --}} {{-- ========================= --}} {{-- ========================= --}} {{-- FOOTER --}} {{-- ========================= --}}
{{-- ========================= --}} {{-- JS --}} {{-- ========================= --}}