@foreach($oldPayments as $oldPayment) @continue($oldPayment->status == 'confirmed') {{-- @if((Auth::user()->admin == 1 || Auth::user()->id == $oldPayment->content['user_id']) && !empty($oldPayment->parent_id)) (Shopping cart) View course approval @endif --}} parent_id)) href="#" @elseif($oldPayment->content) href="/product/payment-page/{{ $oldPayment->content['id'] }}" @else href="#" @endif class="list-group-item list-group-item-action text-2xl" style="margin-top: 15px; @if($oldPayment->status == 'confirmed') color: green; @elseif(!empty($oldPayment->parent_id)) color: grey; @else color: red; @endif " >
{{ $oldPayment->content['title'] ?? ($oldPayment->mode_of_payment === 'subscription' ? 'Subscription' : 'N/A') }}
{{ currencySign().number_format($oldPayment['amount']) }} | {{ $oldPayment->created_at->diffForHumans() }} | @if($oldPayment->status != 'confirmed' && $oldPayment->content && Auth::user()->id !== $oldPayment->content['user_id']) You are yet to complete payment @endif
{{$oldPayment->user['email'] }} @if (!empty($oldPayment->coupon_id))
Coupon: {{$oldPayment->coupon['code']}} @endif @if(empty($oldPayment->parent_id)) @if(Auth::user()->admin == 1 || ($oldPayment->content && Auth::user()->id == $oldPayment->content['user_id']))
@if (!empty($oldPayment->status !== 'confirmed')) {!! Form::open(['route' => ['payments.update', $oldPayment->id], 'method' => 'patch', 'style'=>'display:inline']) !!} @if(Auth::user()->admin == 1 || ($oldPayment->content && Auth::user()->id == $oldPayment->content['user_id']))   {!! Form::button(' Approve', ['type' => 'submit', 'class' => 'btn btn-success btn-xs', 'onclick' => "return confirm('Are you sure you want to APPROVE this?')"]) !!} @endif {!! Form::close() !!} @endif Update   {!! Form::open(['route' => ['payments.destroy', $oldPayment->id], 'method' => 'delete', 'style'=>'display:inline']) !!} @if(Auth::user()->admin == 1) {!! Form::button(' Delete', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure you want to delete this?')"]) !!} @endif {!! Form::close() !!} @if(Auth::user()->admin == 1) @if($oldPayment->reminded) @else Remind @endif @endif



@endif @endif @endforeach @foreach($userSubscriptions as $userSubscription) @if($userSubscription->status == 'pending')
Subscription: {{ optional($userSubscription->tier)->name ?? 'All-Access' }}
{{ strtoupper($userSubscription->billing_cycle ?? 'monthly') }} plan | Started {{ $userSubscription->created_at->diffForHumans() }} | Payment not completed
@if(Auth::user()->admin == 1 && !empty($userSubscription->user)) {{$userSubscription->user->email }} @endif
@endif @endforeach