@extends('layouts.dashboard') @section('title', __('Tutor request')) @section('page_title', __('Tutor request')) @section('content') @php($r = $tutorRequest)
{{ __('All tutor requests') }}

{{ $r->title }}

{{ $r->statusLabel() }}
{{ $r->subject ?: __('Any subject') }} {{ $r->budget ? money($r->budget) : __('Budget flexible') }} @if($r->deadline){{ $r->deadline->format('d M Y') }}@endif {{ $r->created_at->format('d M Y H:i') }}
{!! nl2br(e($r->description)) !!}
{{ trans_choice('{0} No bids|{1} 1 bid|[2,*] :count bids', $r->bids->count(), ['count' => $r->bids->count()]) }}
@foreach($r->bids->sortByDesc(fn ($b) => $b->status === 'accepted') as $bid)
{{ $bid->instructor->name }} {{ $bid->instructor->email }} {{ status_label($bid->status) }}{{ money($bid->amount) }}
@if($bid->delivery_days){{ trans_choice(':n day|:n days', $bid->delivery_days, ['n' => $bid->delivery_days]) }} · @endif{{ $bid->created_at->format('d M Y H:i') }}

{!! nl2br(e($bid->proposal)) !!}

@endforeach
{{ __('Student') }}
{{ $r->student->name }}
{{ $r->student->email }}
{{ __('Timeline') }}
{{ __('Posted') }}{{ $r->created_at->format('d M Y') }}
{{ __('Awarded') }}{{ $r->awarded_at?->format('d M Y') ?? '—' }}
{{ __('Paid') }}{{ $r->paid_at?->format('d M Y') ?? '—' }}
{{ __('Completed') }}{{ $r->completed_at?->format('d M Y') ?? '—' }}
@if($r->rating)
{{ __('Rating') }}{{ str_repeat('★', $r->rating) }}
@endif @if($r->feedback)
“{{ $r->feedback }}”
@endif
@if($r->order)
{{ __('Order') }}
{{ __('Number') }}{{ $r->order->order_no }}
{{ __('Total') }}{{ money($r->order->total) }}
{{ __('Payment') }}{{ status_label($r->order->payment_status) }}
@php($line = $r->order->items->first()) @if($line)
{{ __('Tutor share') }}{{ money($line->instructor_commission) }}
{{ __('Platform share') }}{{ money($line->admin_commission) }}
@endif
@endif @if(! in_array($r->status, ['completed', 'cancelled', 'in_progress'], true))
@csrf
@endif @unless($r->order && $r->order->payment_status === 'paid')
@csrf @method('DELETE')
@endunless
@endsection