@extends('layouts.customer') @section('content')

Reward Details

@php if($voucherDetails->image && Storage::disk('public')->exists('voucher-image/'.$voucherDetails->image)){ $featuredImage = asset('storage/voucher-image/'.$voucherDetails->image); }else{ $featuredImage = asset('front/image/default-voucher-image.jpg'); } $validity_dates = explode('-',$voucherDetails->validity); $redemmedCount = $voucherDetails->getRewardRedeemedCount(); $totalRedeemedCount = $voucherDetails->getRewardRedeemedCountOfUser(auth()->user()->id); $voucherRedemmedCount = 0; if($voucherDetails->type == 0){ $voucherRedemmedCount = $voucherDetails->getVoucherRewardRedeemedCount(); } $userRedeemedStatus = $voucherDetails->getRewardRedeemedStatus(auth()->user()->id); $link_class = ''; if(auth()->user()->getUserWalletPoints() < $voucherDetails->points_to_pay){ $link_class = 'disabled'; } $redeemBtnHtml = ''; $BadgeHtml = ''; @endphp
@if($voucherDetails->type == 1) @if($redemmedCount >= $voucherDetails->quantity) {!! $BadgeHtml !!} @endif @elseif($voucherDetails->type == 2) @php $discountCoupon = $voucherDetails->discountCoupon; @endphp @if($discountCoupon->discount_apply_allowed == 0 && $userRedeemedStatus) {!! $BadgeHtml !!} @elseif($discountCoupon->discount_apply_allowed == 1 && $totalRedeemedCount >= $discountCoupon->apply_limit) {!! $BadgeHtml !!} @endif @elseif($voucherDetails->type == 0 && $voucherRedemmedCount <= 0) {!! $BadgeHtml !!} @endif
@if($redemmedCount >= $voucherDetails->quantity && $voucherDetails->quantity > 0 && (in_array($voucherDetails->type,[2,1])) || ($voucherDetails->type==0 && $voucherRedemmedCount <= 0)) {{--
--}} @endif
Points : {{ $voucherDetails->points_to_pay ?? "0" }} {{ config('constants.points_name') }} @if($voucherDetails->type == 0 || $voucherDetails->type == 2) | Validity : {{ date('d-M-Y',strtotime($voucherDetails->from_date)) ?? "" }} to {{ date('d-M-Y',strtotime($voucherDetails->to_date)) ?? "" }} @endif
@if(($totalRedeemedCount >= $voucherDetails->quantity && $voucherDetails->quantity > 0 && in_array($voucherDetails->type,[1,2])) || ($voucherDetails->type == 0 && $voucherRedemmedCount <= 0)) {{--

{{ $voucherDetails->title ?? "" }}

@if($voucherDetails->type==0)
Fully Redeemed
@elseif($voucherDetails->type==1)
Redeem Successfully
@else
Fully Redeemed
@endif
--}} @endif

{{ $voucherDetails->title ?? "" }}

Description

{!! $voucherDetails->description ?? "" !!}

Terms & Conditions

{!! $voucherDetails->terms_conditions ?? "" !!}

{{--
  • Lorem ipsum dolor sit amet consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
  • Lorem ipsum dolor sit amet consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
  • Lorem ipsum dolor sit amet
  • Lorem ipsum dolor sit amet consectetur adipisicing elit
  • Lorem ipsum dolor sit amet consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
--}}
@if($voucherDetails->type == 1) @if($redemmedCount < $voucherDetails->quantity) {!! $redeemBtnHtml !!} @endif @elseif($voucherDetails->type == 2) @php $discountCoupon = $voucherDetails->discountCoupon; @endphp @if($discountCoupon->discount_apply_allowed == 0 && $userRedeemedStatus) @elseif($discountCoupon->discount_apply_allowed == 1 && $totalRedeemedCount >= $discountCoupon->apply_limit) @else {!! $redeemBtnHtml !!} @endif @elseif($voucherDetails->type == 0 && $voucherRedemmedCount > 0) {!! $redeemBtnHtml !!} @endif @if(($redemmedCount < $voucherDetails->quantity && $voucherDetails->quantity > 0 && in_array($voucherDetails->type,[1,2])) || ($voucherDetails->type == 0 && $voucherRedemmedCount >= 1)) {{----}} @endif
@endsection @section('scripts') @endsection