@extends('frontend.layout') @section('content')

 Profile Settings

@csrf
Public info
@if(session('error')) @endif
@if(is_null($user->dp))
@else
@endif @if ($errors->has('dp')) {{ $errors->first('dp') }} @endif

@php use Carbon\Carbon; $today_date = Carbon::now()->format('Y-m-d'); @endphp
Name: {{$user->name}}
Package: {{\App\Models\PackagesTb::where(['package_count' => $user->package_id])->pluck('package_name')->first()}} (Score : {{\App\Models\PackagesTb::where(['package_count' => $user->package_id])->pluck('score_value')->first()}})
Package Points : @if(is_null( $user->wallet_total )) 0 @else {{ $user->wallet_total }} @endif Pts
Wallet Points: @if(is_null( $user->total_earnings )) 0 @else {{ $user->total_earnings }} @endif Pts
Amount in QR: {{\App\Models\PackagesTb::where(['package_count' => $user->package_id])->pluck('score_value')->first()*$user->total_earnings}} QR
Join Date: {{date('j F, Y', strtotime($user->join_date))}}
Hobbies
@if(session('error')) @endif @if(session('success')) @endif @if(count($errors)) @endif
@if(isset($token))
{{ __('Reset Password') }}
@csrf
@error('email') {{ $message }} @enderror
@error('password') {{ $message }} @enderror
@endif
Change Password
@if (session('status')) @endif
@csrf @foreach ($errors->all() as $error)

{{ $error }}

@endforeach

 Gift Cards

@if(session('error')) @endif @if(session('success')) @endif @if(count($errors)) @endif
@csrf
50 QR
{{ $user->total_earnings }} Points Remaining
XXX XXX XXX XXX
Use this code to redeem your gift card
@csrf
100 QR
{{ $user->total_earnings }} Points Remaining
XXX XXX XXX XXX
Use this code to redeem your gift card
@csrf
200 QR
{{ $user->total_earnings }} Points Remaining
XXX XXX XXX XXX
Use this code to redeem your gift card
@csrf
500 QR
{{ $user->total_earnings }} Points Remaining
XXX XXX XXX XXX
Use this code to redeem your gift card
@if( $giftCards->count()>0) @php $count = 0 @endphp @foreach($giftCards as $card) @if( $card->status == 0) {{++$count}}
{{$card->card_amount}} QR
Generated : {{date('d-m-Y', strtotime($card->created_at))}}
{{$card->card_id}}
{!! DNS1D::getBarcodeHTML($card->card_id, "C128",1.5,24) !!}
This card is valid till {{date('d-m-Y', strtotime($card->expiry_date))}}
@endif @endforeach @else
0 QR
you haven't purchased any giftcards yet!

@endif
@if( $giftCards->count()>0) @php $count = 0 @endphp @foreach($giftCards as $card) @if( $card->status == 1) {{++$count}}
Redeemed
> REDEEMED {{date('d-m-Y', strtotime($card->redeemed_date))}} {{$card->card_amount}}
{{$card->card_amount}} QR
Generated : {{date('d-m-Y', strtotime($card->created_at))}}
{{$card->card_id}}
{!! DNS1D::getBarcodeHTML($card->card_id, "C128",1.4,22) !!}
This card is no longer valid
@endif @endforeach @else
0 QR
you haven't Redeemed any giftcards yet!

@endif
Wallet Points : @if(is_null( $user->total_earnings )) 0 @else {{ $user->total_earnings }} @endif Pts
History
@foreach($soa as $single) @endforeach
Uploaded Date Transaction Type Business Name Cash QR Credit QR Return QR Redeemed QR Points
Pts
{{date('d M, y', strtotime($single->created_at))}} @if($single->point_type === 'giftcard') {{$single->point_type}} @elseif($single->point_type === 'cheque') {{$single->point_type}} @elseif($single->point_type === 'return') {{$single->point_type}} @else {{$single->point_type}} @endif @if(is_null($single->business_name)) Not Available @else {{$single->business_name}} @endif @if(is_null($single->cash_amount)) Nil @else {{$single->cash_amount}} @endif @if(is_null($single->credit_amount)) Nil @else {{$single->credit_amount}} @endif @if(is_null($single->return_amount)) Nil @else {{$single->return_amount}} @endif @if(is_null($single->redeemed_amount)) Nil @else {{$single->redeemed_amount}} @endif @if(is_null($single->points)) Nil @else {{$single->points}} @endif
Wallet Points : @if(is_null( $user->total_earnings )) 0 @else {{ $user->total_earnings }} @endif Pts
ACTIVITY
    @foreach($soa as $single)
  • {{ \Carbon\Carbon::parse($single->created_at)->diffForHumans() }}
    {{$single->point_type}}
    @if($single->point_type === 'giftcard')

    Bought GiftCard...

    @elseif($single->point_type === 'cheque')

    Purchased on Credit...

    @elseif($single->point_type === 'return')

    Returned Purchased Item...

    @else

    Purchased on Cash...

    @endif
  • @endforeach

  My Timeline


@foreach($months as $link)
{{$link->month_name}}
Bills : {{$link->count}}
Number of Bills in the month
Amount : {{floor($link->total_amount)}} QR
Amount of Bills.
Earned : {{floor($link->total_points)}} Points
Points earned on each bills.
@foreach($giftcard_nt_rmd as $key => $val) @if($val['month_name'] == $link->month_name) Savings : {{$val['total_redeemed']}} QR
Amount Used to purchase giftcards @endif @endforeach
@foreach($giftcard_rmd as $key => $val) @if($val['month_name'] == $link->month_name) Redeemed : {{$val['total_redeemed']}} QR
@endif @endforeach
@endforeach
No More Available

 My Gift Cards

 My Bills

@if( $data->count()>0) @foreach($data as $single)
{{$single->name}}

Bill Number: {{$single->bill_number}}

Business: {{\App\Models\Branches::where(['id' => $single->business_id])->pluck('company_name')->first()}}
Earned: {{ floor($single->points) }} Points
Amount: {{ floor($single->amount) }} QR

@endforeach @else
{{Auth::user()->name}}

 

 

No Bills Found!


@endif
@endsection