@extends('app') @section('content') @include('layout.header') @include('components.loader')
@php $imagePath = 'organization_image/' . $participant->image; $imageUrl = null; if (Storage::exists('public/' . $imagePath) && $participant->image) { $imageUrl = asset('storage/' . $imagePath); } else { $imageUrl = Vite::asset('resources/images/profile_img.webp'); } @endphp
Organization image {{ $participant->first_name . ' ' . $participant->last_name }} - {{ $participant->code . '-' . $participant->personal_code }}

Welcome, {{ $participant->first_name . ' ' . $participant->last_name }}!

image

{{ $authUser->apps_sales_goal ?? 0 }}

Activity Goal

App Sales Amount - ${{ number_format((($yearlySubscription ?? 0) + ($monthlySubscription ?? 0)), 2, '.', ',') ?: '0.00' }}
image
Yearly Subscription - ${{ number_format($yearlySubscription, 2, '.', ',') ?: '0.00' }}
image

image

{{ $authUser->apps_per_participants ?? 0 }}

Personal Goal

Total Apps Sold - {{ ($sponsorPaymentCount ?? 0) + ($giftApp ?? 0) }}
image
Apps Bought - {{ $sponsorPaymentCount ?? 0 }}
Apps Gifted - {{ $giftApp ?? 0 }}
image
Total Sales - ${{ number_format(($payItForward ?? 0) + ($kickItBack ?? 0) + ($totalSales ?? 0), 2, '.', ',') ?: '0.00' }}
image
App Sales Amount - ${{ number_format($totalSales, 2, '.', ',') }}
Pay it Forward™ - ${{ number_format(($payItForward ?? 0), 2, '.', ',') }}
Kick it Back™ - ${{ number_format(($kickItBack ?? 0), 2, '.', ',') }}
image

Progress Bar

{{ $progressPercentage }}%

Personal Code

{{ $participant->code . '-' . $participant->personal_code }}

Personal Goal

{{ $participant->activity_description ?? "----" }}

Organization

{{ $participant->name }}

{{--

Activity/Cause

{{ $authUser->cause }}

--}}

{{ $participant->first_name ?? '' }} {{ $participant->last_name ?? '' }} : You have sold {{ $sponsorPaymentCount ?? 0 }} {{ ($sponsorPaymentCount ?? 0) <= 1 ? 'app' : 'apps' }} and gifted {{ $giftApp ?? 0 }} {{ ($giftApp ?? 0) <= 1 ? 'app' : 'apps' }} :

@php // Group the sponsor payments by sponsor_id and calculate the sums $groupedPayments = $sponserPayments ->groupBy('sponsor_id') ->map(function ($group) { return [ 'first_name' => $group->first()->first_name, 'last_name' => $group->first()->last_name, 'email' => $group->first()->email, 'name' => $group->first()->name, 'pay_it_forward' => $group->sum('pay_it_forward'), 'kick_it_back' => $group->sum('kick_it_back'), ]; }); @endphp @foreach ($groupedPayments as $sponserPayment) @endforeach
# Name Email Address Subscriptions Pay It Forward™ Kick It Back™
{{ $loop->iteration }} {{ $sponserPayment['first_name'] ?? '' }} {{ $sponserPayment['last_name'] ?? '' }} {{ $sponserPayment['email'] }} {{ $sponserPayment['name'] }} ${{ number_format(($sponserPayment['pay_it_forward']?? 0), 2) }} ${{ number_format(($sponserPayment['kick_it_back'] ?? 0), 2) }}
@vite(['resources/js/pagination.js']) @vite(['resources/js/pages/admin/participant_details.js']) @include('layout.footer') @endsection