@include('admin.dash.layout.header')

Users / {{$data->name}}

@if(!request()->type)

Students Information

Basic info, like students name and address, that you use on flipacademy.

Basics
Full Name {{$data->name}}
Email {{$data->email}}
Date Created {{$data->created_at}}
@if($data->is_merchant)
Account Number {{$data->account_number}}
Account Name {{$data->account_name}}
Account Number {{$data->account_bank}}
@endif
Attached To @if($data->is_merchant) Merchant @else User @endif
@elseif(request()->type == 'transactions')

Transactions

Basic info, like what Transactions performed.

@php $tnx = DB::table("transactions") ->where(["userid" => $data->id]) ->paginate(7) @endphp @foreach($tnx as $d) @endforeach
ID Amount Status Type Date
{{$d->tnx_id}} {{number_format($d->amount,2)}} NGN {{$d->status}} {{$d->type}} {{$d->created_at}}
@elseif(request()->type == 'ratings' && $data->is_merchant == 1)

Merchant Reviews

Customer reviews and ratings for this merchant's products.

@if(isset($data->rating_stats))

{{ number_format($data->rating_stats['average'], 1) }}

@for($i = 1; $i <= 5; $i++) @if($i <= floor($data->rating_stats['average'])) @elseif($i <= $data->rating_stats['average']) @else @endif @endfor
Average Rating

{{ $data->rating_stats['count'] }}

Total Reviews

{{ $data->products->count() }}

Products

{{ $data->products->where('qty', '>', 0)->count() }}

In Stock
@if($data->ratings && $data->ratings->count() > 0)
Customer Reviews
@foreach($data->ratings as $rating)
@if($rating->customer_image) {{ $rating->customer_name }} @else @endif
{{ $rating->customer_name }}
{{ \Carbon\Carbon::parse($rating->created_at)->format('M d, Y') }}
@for($i = 1; $i <= 5; $i++) @endfor

{{ $rating->comment ?: 'No comment provided' }}

@if($rating->product_image) {{ $rating->product_title }} @endif {{ $rating->product_title }}
@endforeach
@else
No Reviews Yet

This merchant hasn't received any customer reviews yet.

@endif @else

Rating data not available.

@endif
@else

User Orders

Basic info, like what Orders they made.

@foreach( DB::table("orders")->where(["user_id"=>$data->id])->get() as $d) @endforeach
# Total Amount Status  
{{$d->order_id}} NGN {{number_format($d->total_amount,2)}} {{$d->status}}
@endif
{{$data->name}}
@include('admin.dash.layout.footer')