@extends('layout.master') @section('RSS', 'active open') @section('RFD', 'active') @if ($active == 'all') @section('RFD', 'active') @elseif ($active == 'lft') @section('LFT', 'active') @elseif ($active == 'tbo') @section('TBO', 'active') @elseif ($active == 'tfo') @section('TFO', 'active') @elseif ($active == 'tdo') @section('TDO', 'active') @endif @section('content')
@section($active, 'active')
@if (session()->has('ErrorImage'))
{{ session()->get('ErrorImage') }}
@elseif(session()->has('success'))
{{ session()->get('success') }}
@endif
Franchisor Regional Data
--}} {{--
@php $i = 0; $sectionNames = [1 => 'LFT', 2 => 'TBO', 3 => 'TFO', 4 => 'TDO']; @endphp @foreach ($groupedData as $stateId => $items) {{-- State Header Row --}} @foreach ($items as $imageData) @php $i++; $process = $imageData->status == 1 ? 'hide' : 'unhide'; $btn = $imageData->status == 1 ? 'success' : 'danger'; // Payment lookup key $key = $imageData->fihl_id . '-' . $imageData->state_id; // Default values $startDate = 'Not Found'; $endDate = 'Not Found'; $type = 'FIHL'; $alert = 'black'; // Lookup payment info efficiently if (isset($paymentMap[$key])) { $payment = $paymentMap[$key]; $startDate = $payment->start_date; $endDate = $payment->end_date; $type = $payment->amount == 0 ? 'FIBL' : 'FIHL'; $alert = strtotime($endDate) < strtotime(now()) ? 'red' : 'black'; } // Build upgrade URL params $urlData = [ 'fihl_id' => $imageData->fihl_id, 'state_id' => $imageData->state_id, 'type' => 'franchise', ]; $encodedParams = base64_encode(json_encode($urlData)); @endphp {{-- Data Row --}} @endforeach @endforeach
S.No. Franchisor-ID Type Image Tenure Section State Status Actions
Start Date End Date Edit Delete Upgrade
State: {{ config('constants.stateArr')[$stateId] ?? 'Unknown' }}
{{ $i }} {{ $imageData->fihl_id }} {{ $type }}
{{ $startDate }} {{ $endDate }} {{ $sectionNames[$imageData->brand_section] ?? $imageData->brand_section }} {{ config('constants.stateArr')[$imageData->state_id] ?? 'Not Found' }}
Upgrade
{{ $data->links('pagination::bootstrap-4') }}
@endsection