@php $brandColor = $settings->brand_color ?: '#2563EB'; $isStory = $imageSize === 'story'; $isSquare = $imageSize === 'square'; $isFacebook = $imageSize === 'facebook'; $isLight = $imageTheme === 'light'; $outcomeTotal = max(1, $report['wins'] + $report['losses'] + $report['breakeven']); $winPercent = round(($report['wins'] / $outcomeTotal) * 100, 1); $lossPercent = round(($report['losses'] / $outcomeTotal) * 100, 1); $lossStop = min(100, $winPercent + $lossPercent); $equityValues = collect($report['equityCurve'])->pluck('value'); $equityMin = (float) $equityValues->min(); $equityMax = (float) $equityValues->max(); $equityRange = max(1, $equityMax - $equityMin); $equityCount = max(1, count($report['equityCurve']) - 1); $equityPoints = collect($report['equityCurve'])->values()->map(function ($point, $index) use ($equityMin, $equityRange, $equityCount) { $x = round(($index / $equityCount) * 100, 2); $y = round(76 - ((((float) $point['value'] - $equityMin) / $equityRange) * 58), 2); return $x.','.$y; })->implode(' '); $sessionMax = max(1, max($report['sessionBreakdown'])); $avatarUrl = $user->profileImageUrl(); $appHost = request()->getSchemeAndHttpHost(); if (str_starts_with($avatarUrl, 'http') && ! str_starts_with($avatarUrl, $appHost)) { $defaultReportAvatar = \App\Models\Avatar::defaultImagePath(); $avatarUrl = str_starts_with($defaultReportAvatar, 'avatars/') ? asset('storage/'.$defaultReportAvatar) : asset($defaultReportAvatar); } $logoPath = $settings->report_logo_path ? asset('storage/'.$settings->report_logo_path) : asset($isLight ? 'images/brand/vizutrade-logo-dark.png' : 'images/brand/vizutrade-logo-light.png'); $panel = $isLight ? 'bg-white/80 text-slate-950 ring-blue-100/80' : 'bg-white/12 text-white ring-white/15'; $softPanel = $isLight ? 'bg-blue-50/85 text-slate-950 ring-blue-100' : 'bg-slate-950/28 text-white ring-white/10'; $label = $isLight ? 'text-blue-700' : 'text-blue-100'; @endphp
ViZuTrade
@unless($isFacebook || $isSquare)

Your Trading Mirror

Trade. Journal. Improve.

@endunless

{{ $report['typeLabel'] }}

{{ $report['dateRange'] }}

@if($isFacebook)
@include('reports.share.template-parts.profile') @include('reports.share.template-parts.charts') @include('reports.share.template-parts.insights')
@elseif($isSquare)
{{ $user->name }}

Trader

{{ $user->name }}

Discipline Score

{{ $report['discipline']['score'] }}%

@foreach ([['Trades', $report['totalTrades']], ['Wins', $report['wins']], ['Losses', $report['losses']], ['BE', $report['breakeven']]] as [$metricLabel, $metricValue])

{{ $metricLabel }}

{{ $metricValue }}

@endforeach

Win/Loss

{{ $report['winRate'] }}%

Equity Curve

Profit/Loss

@if ($showProfit)

{{ $report['totalProfitLoss'] >= 0 ? '+' : '' }}{{ number_format($report['totalProfitLoss'], 2) }}

@else

Hidden

@endif
@foreach ([ ['Best Pair', $report['bestPair']], ['Best Session', $report['bestSession']], ['Top Mistake', $report['topMistake']], ['Badge', $settings->show_badges ? $report['badgeEarned'] : 'Hidden'], ] as [$insightLabel, $insightValue])

{{ $insightLabel }}

{{ $insightValue }}

@endforeach
@else
{{ $user->name }}

Trader

{{ $user->name }}

Discipline Score

{{ $report['discipline']['score'] }}%

@foreach ([['Trades', $report['totalTrades']], ['Wins', $report['wins']], ['Losses', $report['losses']], ['BE', $report['breakeven']]] as [$metricLabel, $metricValue])

{{ $metricLabel }}

{{ $metricValue }}

@endforeach
@include('reports.share.template-parts.charts')
@include('reports.share.template-parts.insights')
@endif