@extends('layouts.index') @section('content')
{{-- Breadcrumb Section --}} @php $pages = [] ; $page = [] ; $page['title'] = __('lang.home') ; $page['route'] = route('home') ; $page['color'] = 'text_3' ; $pages[] = $page ; $page['title'] = __('lang.myAccount') ; $page['route'] = 'javascript:void(0)' ; $page['color'] = 'text_3' ; $pages[] = $page ; $page['title'] = __('lang.points_levels') ; $page['route'] = 'javascript:void(0)' ; $page['color'] = 'text_1' ; $pages[] = $page ; @endphp @include('components.breadcrumb',$pages) @php $levels_color = ['AFAEAE','813215','716F6F','B57E10','2F42B4']; $activeLevel = 0 ; $levelProgress = 0 ; $progess = 0 ; if(isset($customerLevel)){ foreach ($pointsLevels as $key => $pointLevel){ if($customerLevel->points_levels_id == $pointLevel->points_levels_id){ $activeLevel = $key ; if(sizeof($pointsLevels) > $key+1){ $nextLevel = $pointsLevels[$key+1]; } } if(sizeof($pointsLevels) == $key+1){ $lastLevel = $pointLevel; } } $from = $customerLevel->points_levels_from ; $to = $customerLevel->points_levels_to ; $levelProgress = ($customer_points - $customerLevel->points_levels_from) * 100 / ($to - $from); $progess = isset($nextLevel) && $nextLevel && $customer_points < $nextLevel->points_levels_from ? (($levelProgress + $activeLevel * 100) * 100 ) / ((sizeof($pointsLevels) - 1 ) * 100 ) : 100 ; } @endphp @if($account->accounts_show_points)
@include('auth.account-menu',['activePage'=>'points_levels','route'=>'pointsLevels'])
@include('includes.errors')
@if(sizeof($pointsLevels) > 1)
@foreach ($pointsLevels as $key => $pointLevel) {{-- @if($key < 5) --}}
{{-- @endif --}} @endforeach
@foreach ($pointsLevels as $key => $pointLevel) {{-- @if($key < 5) --}}
{{-- @endif --}} @endforeach
@foreach ($pointsLevels as $key => $pointLevel) {{-- @if($key < 5) --}}
{{ $pointLevel->points_levels_from }}
{{-- @endif --}} @endforeach
@if(isset($customerLevel) && $customerLevel)
{{ $customerLevel->points_levels_name }} ({{ __('theme6.level') }} {{ $activeLevel + 1 }})
{{ __('theme6.youHaveReachedTheTop') }} @include('points_levels.icon-top')
@endif
{{ __('theme6.youEarned') }}: {{ $customer_points }} {{ __('lang.point') }} @if(isset($customer_points_value) && $customer_points_value > 0) = @include('components.currency',['price'=> $customer_points_value ]) @endif

@if(isset($customerLevel) && $customerLevel )
{{ __('theme6.level') }}: {{ $customerLevel->points_levels_name }}

{{ __('theme6.atLevel',['level'=>$customerLevel->points_levels_name]) }} 100 {{ $locale =='ar' ? __('lang.point') : __('lang.points') }} = @include('components.currency',['price'=> $customerLevel->points_levels_value ])

@endif @if(isset($nextLevel) && $nextLevel)

{{ $nextLevel->points_levels_from - $customer_points }} {{ __('theme6.remainingToReachLevel',['nextLevel'=>$nextLevel->points_levels_name]) }}

@endif
{{-- @if(isset($nextLevel) && $nextLevel) --}}

{{ __('theme6.dearCustomer') }},

    @foreach ($pointsLevels as $key => $pointLevel) {{-- @if($key > $activeLevel) --}}
  • {{ $pointLevel->points_levels_name }} ({{ __('theme6.level') }} {{ $key+1 }})
    {{ __('theme6.atLevel',['level'=>$pointLevel->points_levels_name]) }} 100 {{ __('lang.points') }} = @include('components.currency',['price'=> $pointLevel->points_levels_value ])
  • {{-- @endif --}} @endforeach
{{-- @endif --}} @elseif(sizeof($pointsLevels) > 0)
{{ __('theme6.youEarned') }}: {{ $customer_points }} {{ __('lang.point') }} = @include('components.currency',['price'=> isset($customer_points_value) ? $customer_points_value : 0 ])

{{ __('theme6.startFromPoint',['from'=> $pointsLevels[0]->points_levels_from ]) }} = @include('components.currency',['price'=> $pointsLevels[0]->points_levels_value ])

@endif
@endif
@endsection @push('css') @endpush @push('js') @endpush