@extends('front.layouts.app-auth') @push('page_css') @endpush @section('content') @include('front.components.breadcrumbs', [ 'currentPage' => 'Sent Offers', 'breadcrumbs' => [ ] ])

Sent Offers

Manage sponsorship offers you've created and sent to athletes and teams.

{{ $pendingOffers ?? 0 }}
Pending Offers
Awaiting response
{{ $activePartnerships ?? 0 }}
Active Partnerships
Accepted offers
{{ $declinedOffers ?? 0 }}
Declined Offers
Not accepted
{!! \App\Helpers\Helper::price($totalOfferValue ?? 0) !!}
Total Offer Value
All offers combined
All Offers Pending Accepted Declined Expired
@forelse($sponsorships as $sponsorship) @php // Determine display status $displayStatus = $sponsorship->is_expired ? 'expired' : (($sponsorship->is_withdrawal == 1) ? 'withdrawn' : ($sponsorship->status ?? 'pending')); // Generate avatar initials $beneficiaryName = $sponsorship->beneficiary ? $sponsorship->beneficiary->full_name : 'Unknown'; $initials = collect(explode(' ', $beneficiaryName))->map(function($word) { return strtoupper(substr($word, 0, 1)); })->take(2)->join(''); // Random color for avatar $colors = ['#3b82f6', '#8b5cf6', '#10b981', '#f59e0b', '#ef4444', '#ec4899']; $avatarColor = $colors[($sponsorship->id % 6)]; // Get beneficiary sport and organization $beneficiary = $sponsorship->beneficiary; $sport = 'N/A'; $organization = $sponsorship->team_organization ?? 'Independent'; if ($beneficiary) { $primarySport = $beneficiary->sports->first(); $sport = $primarySport ? $primarySport->sport->title : 'N/A'; if ($sponsorship->beneficiary_type === 'team' && $sponsorship->team_organization) { $organization = $sponsorship->team_organization; } elseif ($beneficiary->teamProfile && $beneficiary->teamProfile->organization_name) { $organization = $beneficiary->teamProfile->organization_name; } } // Format duration $durationMonths = $sponsorship->duration ?? 12; $duration = $durationMonths . ' months'; // Format offer type $offerTypeMap = [ 1 => 'Endorsement Deal', 2 => 'Brand Ambassador', 3 => 'Team Partnership', 4 => 'Product Sponsorship', 5 => 'Event Sponsor', 6 => 'Media Partnership', ]; $offerTypeSubtitle = 'Partnership'; if ($sponsorship->offer_type && isset($offerTypeMap[$sponsorship->offer_type])) { $offerTypeSubtitle = $offerTypeMap[$sponsorship->offer_type]; } // Main title from offer_title, fallback to offer type $offerTypeMainTitle = $sponsorship->offer_title ?? $offerTypeSubtitle; // Format dates $sentDate = $sponsorship->created_at ? \App\Helpers\Helper::showdate($sponsorship->created_at, false) : 'N/A'; // Get expiration date - check both expires_at and offer_expire_in $expiresDate = null; if (isset($sponsorship->expires_at) && $sponsorship->expires_at) { $expiresDate = \App\Helpers\Helper::showdate($sponsorship->expires_at, false); } elseif ($sponsorship->offer_expire_in) { $expiresDate = is_string($sponsorship->offer_expire_in) ? \App\Helpers\Helper::showdate($sponsorship->offer_expire_in, false) : \App\Helpers\Helper::showdate(\Carbon\Carbon::parse($sponsorship->offer_expire_in), false); } // Get accepted/declined date from activities $acceptedDate = null; $declinedDate = null; if ($sponsorship->activities) { $acceptedActivity = $sponsorship->activities->where('activity_type', 'offer_accepted')->first(); if ($acceptedActivity) { $acceptedDate = \App\Helpers\Helper::showdate($acceptedActivity->created_at, false); } $declinedActivity = $sponsorship->activities->where('activity_type', 'offer_rejected')->first(); if ($declinedActivity) { $declinedDate = \App\Helpers\Helper::showdate($declinedActivity->created_at, false); } } // View count $viewCount = $sponsorship->view_count ?? 0; @endphp
{{ $initials }}
{{ $beneficiaryName }}
{{ $sport }} • {{ $organization }}
@if($displayStatus === 'pending') Pending @elseif($displayStatus === 'withdrawn') Withdrawn @elseif($displayStatus === 'active') Accepted @elseif($displayStatus === 'declined') Declined @elseif($displayStatus === 'expired') Expired @endif
{{ $offerTypeMainTitle }}
{{ $offerTypeSubtitle }}
{!! \App\Helpers\Helper::price($sponsorship->funding_amount, $sponsorship->currency ?? 'USD') !!}
{{ $duration }}
{{ $viewCount }} views
Sent: {{ $sentDate }}
@if($expiresDate)
@if($displayStatus === 'expired') Expired: {{ $expiresDate }} @else Expires: {{ $expiresDate }} @endif
@elseif($acceptedDate && $displayStatus === 'active')
Accepted: {{ $acceptedDate }}
@elseif($declinedDate && $displayStatus === 'declined')
Declined: {{ $declinedDate }}
@endif
View Details @if($displayStatus === 'pending' && !$sponsorship->is_expired) @elseif(($displayStatus === 'declined' || $displayStatus === 'expired') && !$sponsorship->is_withdrawal) @endif
@empty

No offers found

Create your first sponsorship offer to get started!

@endforelse
@if($sponsorships->hasPages())
{{ $sponsorships->appends(request()->query())->links() }}
@endif
@include('front.accounts.sponsorships.add-edit-modal') @endsection @push('page_script') @if(\Config::get('settings.authorize_client_key') && \Config::get('settings.authorize_login_id')) @endif @endpush