@extends('customerDashboard.layout') @section('content') {{-- summery view section --}}
Summary
Active Policies
@if ($active_quotes_count != 0)
{{ $active_quotes_count }}
@else
No Active Policies
@endif
Expired Policies
@if ($expired_quotes_count != 0)
{{ $expired_quotes_count }}
@else
No Expired Policies
@endif
Available Promotions
@if ($promo_count != 0)
{{ $promo_count }}
@else
No Available Promotions
@endif
{{-- Active Policies section --}}
Active Policies
@foreach($active_quotes as $qoute)
{{ $qoute->title }}
Product
{{ $qoute->vehicle_type }} {{ $qoute->pet_category }} {{ $qoute->pa_occupation }} {{ $qoute->travel_type }} {{ $qoute->phone_model }} | {{ $qoute->product }}
Vehicle No.
@if($qoute->insurance_code == 'MT') {{ $qoute->vehicle_number }} @else N/A @endif

@if($qoute->insurance_code == 'MT' ) Enhance @else @endif
@if($qoute->renewal_status == 'Renew' && $qoute->insurance_code != 'TR' && $qoute->insurance_code != 'MT') {{ $qoute->renewal_status }} @else @endif
@if(!empty(json_decode($qoute->document_paths)) ) @endif
@endforeach
{{-- Expired policies section --}}
Expired Policies
@foreach($expired_quotes as $qoute)
{{ $qoute->title }}
Product
{{ $qoute->vehicle_type }} {{ $qoute->pet_category }} {{ $qoute->pa_occupation }} {{ $qoute->travel_type }} {{ $qoute->phone_model }} | {{ $qoute->product }}
Vehicle No.
@if($qoute->insurance_code == 'MT') {{ $qoute->vehicle_number }} @else N/A @endif

@endforeach
{{-- Promotion section --}}
Available Promotions
@if ($promotions == [] || $promotions == '' || $promotions == null)
No Available Promotions
@endif
@foreach($promotions as $key1 => $promotion)
@if($promotion->is_percentage == 0) LKR {{ number_format($promotion->discount, 0, '.', ',') }} @endif
@if($promotion->is_percentage) {{ number_format($promotion->discount, 0, '.', ',') }} % @endif
@foreach ($promotion->coupons as $key => $code)
@endforeach
{{ $promotion->name }}
@php $applicable_products = $promotion->applicable_products; $data = json_decode($applicable_products); $Products = App\Models\InsuranceTypes::whereIn('id', $data)->get(); @endphp
    @php foreach ($Products as $Product) { echo("
  • ". $Product->title . "
  • "); } @endphp
Valid until {{ $promotion->end_date }}
@endforeach
{{-- Buy new Policy --}}
Buy New Policy
@foreach($all_policies as $policy)
{{ $policy->title }}
@endforeach
@endsection