@extends('layout.master') @section('RSS', 'active open') @section('RDD', 'active') @if ($active == 'all') @section('RDD', 'active') @elseif ($active == 'pbo') @section('DPBO', 'active') @elseif ($active == 'sbo') @section('DSBO', 'active') @elseif ($active == 'tfo') @section('DTFO', 'active') @elseif ($active == 'fbo') @section('DFBO', 'active') @endif @section('content')
@section($active, 'active')
@if (session()->has('ErrorImage'))
{{ session()->get('ErrorImage') }}
@elseif(session()->has('success'))
{{ session()->get('success') }}
@endif
Dealer Regional Data
@php $i = 0; $sectionNames = [1 => 'PBO', 2 => 'SBO', 3 => 'TFO', 4 => 'FBO']; @endphp @foreach ($groupedData as $stateId => $dealers) @foreach ($dealers as $imageData) @php $process = $imageData->status == 1 ? 'hide' : 'unhide'; $btn = $imageData->status == 1 ? 'success' : 'danger'; $startDate = 'Not Found'; $endDate = 'Not Found'; $alert = 'black'; $type = 'FIHL'; foreach ($startEndDate as $dateData) { if ( $dateData->franchisor_id == $imageData->fihl_id && $dateData->state_id == $imageData->state_id ) { $startDate = $dateData->start_date; $endDate = $dateData->end_date; $type = $dateData->amount == 0 ? 'FIBL' : 'FIHL'; $alert = strtotime($endDate) < strtotime(now()) ? 'red' : 'black'; } } $i++; @endphp @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] ?? 'Not Found' }}
{{ $i }} {{ $imageData->fihl_id }} {{ $type }}
{{ $startDate }} {{ $endDate }} {{ $sectionNames[$imageData->brand_section] ?? $imageData->brand_section }} {{ config('constants.stateArr')[$imageData->state_id] ?? 'Not Found' }}
@php $urlData = [ 'fihl_id' => $imageData->fihl_id, 'state_id' => $imageData->state_id, 'type' => 'dealer', ]; $encodedParams = base64_encode(json_encode($urlData)); @endphp
{{ $data->links('pagination::bootstrap-4') }}
@endsection