@extends('user.layouts')
@section('title', 'Users Agent')
@section('header')
{{-- =========================================================
DATATABLE CSS
========================================================== --}}
@endsection
@section('content')
{{-- =========================================================
PAGE HEADER
========================================================== --}}
{{-- =========================================================
AGENT PROFILE
========================================================== --}}
@php
$agentInitial =
!empty($user_agent->name)
? strtoupper(
substr(
trim($user_agent->name),
0,
1
)
)
: 'A';
@endphp
{{ $agentInitial }}
{{ $user_agent->name ?? 'Agent' }}
Agent Code:
{{ $user_agent->agent_code ?? '-' }}
{{-- =========================================================
SUMMARY CARDS
========================================================== --}}
{{-- WALLET BALANCE --}}
Wallet Balance
₹{{ number_format((float) ($user_agent->wallet ?? 0), 2) }}
{{-- TOTAL REWARD --}}
Total Reward
₹{{ number_format((float) ($reward ?? 0), 2) }}
{{-- WITHDRAW --}}
Withdraw
₹{{ number_format((float) ($withdraw ?? 0), 2) }}
{{-- TOTAL REFERRAL --}}
Total Referral
{{ number_format((int) ($referrals ?? 0)) }}
{{-- =========================================================
REFERRAL TABLE
========================================================== --}}
{{-- =====================================================
TABLE HEADER
====================================================== --}}
{{-- =====================================================
TABLE
====================================================== --}}
| SN |
DATE |
AGENT ID |
NAME |
PHONE NO |
REFERRAL ID |
STATUS |
@foreach($referral_users as $user)
@php
$referralInitial =
!empty($user->name)
? strtoupper(
substr(
trim($user->name),
0,
1
)
)
: 'U';
@endphp
{{-- SN --}}
|
{{ $loop->iteration }}
|
{{-- DATE --}}
{{ !empty($user->created_at)
? $user->created_at->format('d-m-Y')
: '-'
}}
|
{{-- AGENT ID --}}
{{ $user->agent_code ?? '-' }}
|
{{-- NAME --}}
{{ $referralInitial }}
{{ $user->name ?? '-' }}
|
{{-- PHONE --}}
{{ $user->phone_number ?? '-' }}
|
{{-- REFERRAL ID --}}
{{ $user_agent->agent_code ?? '-' }}
|
{{-- STATUS --}}
@if($user->is_active)
Active
@else
Inactive
@endif
|
@endforeach
{{-- =========================================================
CONVERT MODAL
Existing functionality preserved
========================================================== --}}
Convert Agent
Are you sure you want to convert this agent
to Jilla Coordinator?
@endsection
@section('footer')
{{-- =========================================================
JILLA ID
========================================================== --}}
{{-- =========================================================
JQUERY
========================================================== --}}
{{-- =========================================================
DATATABLE
========================================================== --}}
{{-- =========================================================
PREVENT DOUBLE CONVERT SUBMIT
========================================================== --}}
@endsection