@extends('layouts.app') @section('title', __('Team performance')) @section('content')

{{ __('Your network') }}

{{ __('Team performance') }}

{{ __('A clear view of your left and right team volume, sales, and matching progress.') }}

{{ __('View binary tree') }}
@foreach([ ['label' => __('Left volume'), 'value' => number_format($leftVolume, 2), 'icon' => 'chart', 'tone' => 'bg-sky-50 text-sky-700'], ['label' => __('Right volume'), 'value' => number_format($rightVolume, 2), 'icon' => 'chart', 'tone' => 'bg-violet-50 text-violet-700'], ['label' => __('Matched volume'), 'value' => number_format(min($leftVolume, $rightVolume), 2), 'icon' => 'transfer', 'tone' => 'bg-emerald-50 text-emerald-700'], ['label' => __('Personal sales'), 'value' => '৳'.number_format($personalSales, 2), 'icon' => 'receipt', 'tone' => 'bg-orange-50 text-orange-700'], ] as $stat)

{{ $stat['label'] }}

{{ $stat['value'] }}

@endforeach

{{ __('Binary team volume') }}

{{ __('Your current left and right organization volume.') }}

{{ __('View matching bonus') }} →
@php($maxVolume = max($leftVolume, $rightVolume, 1))
@foreach([ ['label' => __('Left team'), 'value' => $leftVolume, 'style' => 'from-sky-500 to-blue-700'], ['label' => __('Right team'), 'value' => $rightVolume, 'style' => 'from-violet-500 to-indigo-700'], ] as $volume)
{{ $volume['label'] }} {{ number_format($volume['value'], 2) }}
@endforeach

{{ __('Direct binary team') }}

{{ __('Members placed directly on each side.') }}

@if($children->isEmpty())

{{ __('No members on this side yet') }}

{{ __('Your binary team placements will appear here.') }}

@else
@foreach($children as $placement)

{{ $placement->user?->name ?? __('Unknown member') }}

{{ $placement->user?->member_id }}

{{ __($placement->side === 'left' ? 'Left team' : 'Right team') }}
@endforeach
@endif {{ __('Explore full binary tree') }}
@endsection