@extends('layouts.user') @section('title') My Account @endsection @section('content') @php // NEXUS Session State for home page $nexusActive = \App\Nexus\Engine\NexusConfig::isNexusActive(); $homeSessionOpen = false; $homeSessionEndTime = null; $homeNextSessionTime = null; $homeActiveSessionName = null; $homeActiveSessionNumber = null; $homeNextSessionName = null; $homeNextSessionNumber = null; $homeSessionNames = [1 => 'Dawn', 2 => 'Midday', 3 => 'Dusk']; $homeSessionTimes = [ 1 => (int) \App\Nexus\Engine\NexusConfig::get('session_1_start_utc'), 2 => (int) \App\Nexus\Engine\NexusConfig::get('session_2_start_utc'), 3 => (int) \App\Nexus\Engine\NexusConfig::get('session_3_start_utc'), ]; if ($nexusActive) { $homeSc = new \App\Nexus\Engine\SessionController(); $homeActiveSession = $homeSc->getActiveSession(); $homeSessionOpen = ($homeActiveSession !== null); if ($homeSessionOpen) { $homeActiveSessionNumber = $homeActiveSession->session_number; $homeActiveSessionName = $homeSessionNames[$homeActiveSessionNumber] ?? 'Session'; $homeDuration = \App\Nexus\Engine\NexusConfig::getInt('session_duration_minutes', 60); $homeSessionEndTime = \Carbon\Carbon::parse($homeActiveSession->actual_start) ->addMinutes($homeDuration) ->toIso8601String(); } else { $homeNextSessionTime = $homeSc->getNextSessionTime()->toIso8601String(); $curHour = now()->utc()->hour; $homeNextNum = 1; foreach ($homeSessionTimes as $num => $hour) { if ($hour > $curHour) { $homeNextNum = $num; break; } } $homeNextSessionNumber = $homeNextNum; $homeNextSessionName = $homeSessionNames[$homeNextNum] ?? 'Session'; } } @endphp
@include('partials.pilot.banner')
{{-- ── Sidebar ── --}}
@include('partials.pilot.sidebar')
{{-- ── Main content ── --}}
@include('partials.pilot.wins-ticker') @php $heroPayload = \App\Pilot\Services\PilotHeroStateService::forUser(auth()->user()); @endphp @include('partials.pilot.hero', $heroPayload) {{-- ── Wallet card ── --}}
My Wallet

Manage your balances

Deposit Funds
{{-- Main Balance --}}
${{ number_format(auth()->user()->balance, 2) }}
Main Wallet · USDT
@if(auth()->user()->type != 'marketer') {{-- ── ICTP Balance ── --}}
{{-- Candlestick/trading icon --}}
${{ number_format(auth()->user()->ictp_balance ?? 0, 2) }}
ICTP
Inhouse Capital Traders Program
Move
{{-- Rebate Bonus --}}
${{ number_format(auth()->user()->rebates, 2) }}
Rebate Bonus
@csrf
{{-- Store Setup Bonus --}}
${{ number_format(auth()->user()->store_bonus, 2) }}
Referral Store Bonus
@csrf
{{-- AI Referral Bonus --}}
${{ number_format(auth()->user()->ai_bonus, 2) }}
AI Referral Purchase Bonus
@csrf
{{-- Grant Funds --}}
@php $grantBalance = auth()->user()->grant_balance ?? 0; $grantCapital = auth()->user()->grant_capital ?? 0; $grantProfit = max(0, $grantBalance - $grantCapital); @endphp
${{ number_format($grantBalance, 2) }}
@php $activeGrant = \App\Models\Grant::where('user_id', auth()->id()) ->where('status', 1) ->where('expires_at', '>', now()) ->orderByDesc('expires_at') ->first(); @endphp @if($activeGrant) Active · Expires {{ $activeGrant->expires_at->format('d M') }} @endif
🏅 Grant Funds @if($grantCapital > 0) · Capital: ${{ number_format($grantCapital, 2) }} @endif
{{-- Only show Move button if there is profit above capital --}} @if($grantProfit > 0) Move @else No profit yet @endif
@endif
{{-- ── Pilot Mode: How it works preview (only for new + ictp states) ── --}} @php $pilotStats = null; if (isset($heroPayload['state']) && in_array($heroPayload['state'], ['new','ictp'], true)) { $pilotStats = app(\App\Pilot\Services\PilotStatsService::class)->dashboardSnapshot(); } @endphp @if ($pilotStats !== null) @include('partials.pilot.pilot-preview', ['stats' => $pilotStats]) @endif {{-- ── Pilot Mode: Top Pilots strip (only for non-following states) ── --}} @php $topPilots = []; if (isset($heroPayload['state']) && in_array($heroPayload['state'], ['new','ictp','balance'], true)) { $topPilots = app(\App\Pilot\Services\PilotTopPilotsService::class)->topThree(); } @endphp @include('partials.pilot.top-pilots', ['topPilots' => $topPilots]) {{-- ── NEXUS Session Module (hidden when inactive) ── --}} @if($nexusActive)
@if($homeSessionOpen)
Trading Session Open
{{ $homeActiveSessionName }} / Session {{ $homeActiveSessionNumber }}
Place your bids now. Session closes automatically.
@else
Next Session
{{ $homeNextSessionName }} / Session {{ $homeNextSessionNumber }}
Browse markets and get your bids ready.
@endif
--:--
{{ $homeSessionOpen ? 'remaining' : 'until open' }}
@foreach($homeSessionTimes as $num => $hour) @php $isActive = $homeSessionOpen && $homeActiveSessionNumber === $num; $isNext = !$homeSessionOpen && $homeNextSessionNumber === $num; $pClass = $isActive ? 'hp-active' : ($isNext ? 'hp-next' : ''); @endphp
Session {{ $num }}
@endforeach
Browse Markets
@endif {{-- ── Inventory ── --}}
@php $total = 0; foreach($ownerships as $o){ $total += $o->value * $o->quantity; } @endphp
My Inventory Store Value: ${{ number_format($total, 2) }} USDT
    @forelse($ownerships as $ownership)
  • {{ $ownership->product?->name }}

    {{ $ownership->product?->name }}

    ${{ number_format($ownership->value, 2) }}

    {{ $ownership->product?->market?->name }} · Qty {{ $ownership->quantity }}

    @php $pendingSell = $ownership->sells?->where('status', 0)->first(); @endphp @if($pendingSell) In Sale... @else Sell Off @endif
  • @empty
    store

    You have no items in your store!

    Add Items
    @endforelse
{{-- ── Performance Chart ── --}}
Manual Performance Chart @if(empty(auth()->user()->chart_first)) @else @endif
@if(empty(auth()->user()->chart_first))

@else

@endif
{{-- ── Bid & Sell History ── --}}
Manual Bid & Sell History
{{-- Bids panel --}}
@forelse($bids as $bid)
{{ strtoupper(substr($bid->market?->name ?? '?', 0, 1)) }}
{{ $bid->product?->name }}@if($bid->quantity > 1) ×{{ $bid->quantity }}@endif
{{ $bid->market?->name }} · {{ \Carbon\Carbon::parse($bid->bid_time)->diffForHumans(['parts' => 1, 'short' => true]) }}
${{ number_format($bid->amount * $bid->quantity, 2) }}
@if($bid->status == 0)
● In Progress
@elseif($bid->status == 1)
✓ Successful
@elseif($bid->status == 2)
✕ Unsuccessful
@endif
@empty
No manual bids yet.
@endforelse
{{-- Sells panel --}}
@forelse($sells as $sell)
{{ strtoupper(substr($sell->market?->name ?? '?', 0, 1)) }}
{{ $sell->product?->name }}@if($sell->quantity > 1) ×{{ $sell->quantity }}@endif
{{ $sell->market?->name }} · {{ \Carbon\Carbon::parse($sell->sell_time)->diffForHumans(['parts' => 1, 'short' => true]) }}
${{ number_format($sell->amount * $sell->quantity, 2) }}
@if($sell->status == 0)
● In Progress
@elseif($sell->status == 1)
✓ Successful
@elseif($sell->status == 2)
✕ Unsuccessful
@endif
@empty
No manual sells yet.
@endforelse
{{-- end main --}}
@include('components.grants-celebration-modal') @include('components.social-modal') @php $updatedChartBool = empty(auth()->user()->chart_first) ? 'true' : 'false'; @endphp @if($nexusActive) @endif @endsection