@extends('layouts.dashboard') @section('title', __('Tutor marketplace')) @section('page_title', __('Tutor marketplace')) @section('content') {{-- How it works + numbers --}}
{{ __('One-to-one help') }}

{{ $isStudent ? __('Post what you need, pick the best offer.') : __('Find students who need your expertise.') }}

{{ $isStudent ? __('Instructors send you a price and a proposal. Accept one, pay securely, and mark it done when you are happy.') : __('Bid with a price and a short proposal. When the student accepts and pays, the job shows up here and your share goes to Earnings.') }}
{{ $stats['open'] }}
{{ __('Open') }}
{{ $stats['in_progress'] }}
{{ __('Active') }}
{{ $stats['earned'] !== null ? money($stats['earned']) : $stats['completed'] }}
{{ $stats['earned'] !== null ? __('Earned') : __('Completed') }}
{{-- Open requests --}}
@if($isStudent)
{{ __('Request a tutor') }}
@csrf
@error('title')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
{{ __('You only pay after you accept a bid.') }}
@endif
@if($isInstructor) @endif
@forelse($open as $item) @php($myStatus = $myBidIds[$item->id] ?? null)
{{ $item->title }}
{{ $item->subject ?: __('Any subject') }} {{ $item->budget ? money($item->budget) : __('Budget flexible') }} @if($item->deadline){{ $item->deadline->format('d M Y') }}@endif {{ trans_choice('{0} No bids yet|{1} 1 bid|[2,*] :count bids', $item->bids_count, ['count' => $item->bids_count]) }}
@if($myStatus) {{ __('You bid') }} · {{ status_label($myStatus) }} @else {{ __('Open') }} @endif
{{ $item->created_at->diffForHumans() }}

{{ Str::limit($item->description, 220) }}

@empty
{{ __('No open tutor requests right now.') }}
@endforelse {{ $open->links() }}
{{-- Student: my requests --}} @if($isStudent)
@forelse($mine as $item) @empty @endforelse
{{ __('Request') }}{{ __('Bids') }}{{ __('Tutor') }}{{ __('Status') }}{{ __('Action') }}
{{ $item->title }}
{{ $item->subject ?: __('Any subject') }} · {{ $item->created_at->format('d M Y') }}
{{ $item->bids_count }} {{ $item->acceptedBid?->instructor?->name ?? '—' }}@if($item->acceptedBid)
{{ money($item->acceptedBid->amount) }}
@endif
{{ $item->statusLabel() }} @if($item->status === 'awarded' && $item->order_id) {{ __('Pay now') }} @else {{ __('Open') }} @endif
{{ __('You have not posted a request yet.') }}
@endif {{-- Instructor: my bids --}} @if($isInstructor)
@forelse($bids as $bid) @empty @endforelse
{{ __('Request') }}{{ __('Student') }}{{ __('Your bid') }}{{ __('Bid status') }}{{ __('Job status') }}{{ __('Action') }}
{{ $bid->request->title }}
{{ $bid->created_at->diffForHumans() }}
{{ $bid->request->student->name ?? '—' }} {{ money($bid->amount) }}@if($bid->delivery_days)
{{ trans_choice(':n day|:n days', $bid->delivery_days, ['n' => $bid->delivery_days]) }}
@endif
{{ status_label($bid->status) }} {{ $bid->request->statusLabel() }} {{ __('Open') }} @if($bid->status === 'pending' && $bid->request->status === 'open')
@csrf
@endif
{{ __('You have not placed a bid yet.') }}
@endif
@endsection