@extends('layouts.app') @section('content')

Offer Details

@auth @if($offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value && (isset($offer->price) || !is_null($offer->price)))
@csrf
@endif @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value && $offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value && (isset($offer->price) || !is_null($offer->price)))
@csrf
@endif @endauth
@if($offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value) @elseif($offer->status === \App\Enum\OfferStatus::COMPLETED->value) @elseif($offer->status === \App\Enum\OfferStatus::DECLINED->value) @elseif($offer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value) @endif
Property Value
From Organizer {{ $offer->event->organizer->user->name }}
To Artist {{ $offer->artist->user->name }}
For Event {{ $offer->event->title }}
Current Offer Status

In Progress

Completed

Declined

Waiting for payment

Current Offer Price (USD) @if($offer->price != null) @currency($offer->price) @else Not yet defined @endif
Created At {{ $offer->created_at->isoFormat('dddd, DD-MMM-Y H:mm') }}
Last Updated/Modified At @if($offer->updated_at != null) {{ $offer->updated_at->isoFormat('dddd, DD-MMM-Y H:mm') }} @else Never @endif
Completed At @if($offer->completed_at != null) {{ $offer->completed_at->isoFormat('dddd, DD-MMM-Y H:mm') }} @else Not yet completed @endif
Payment Type {{ $offer->payment_type }}
@auth @if(Auth::user()->type === \App\Enum\UserType::ORGANIZER->value) @if(!is_null($offer->price))

Proposed price

@currency($offer->price)

@if($offer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value)

Payment

@csrf
@endif @if($offer->status === \App\Enum\OfferStatus::COMPLETED->value) @php $invoice = Auth::user()->findInvoice($offer->transactions->get(0)->invoice_id); @endphp

Invoice

@endif
@endif @endif @if(Auth::user()->type !== \App\Enum\UserType::ORGANIZER->value && $offer->status === \App\Enum\OfferStatus::IN_PROGRESS->value)

Propose new price

@csrf
USD $

@endif @endauth

Offer discussion

@csrf
@if(count($offer->comments) > 0) @foreach($offer->comments as $comment) @endforeach
Comment Posted By Role Created At
{{ $comment->content }} {{ $comment->author->name }} as {{ ucfirst(strtolower($comment->author->type)) }} {{ $comment->created_at->isoFormat('dddd, DD-MMM-Y H:mm') }}
@endif
@auth @if (Auth::user()->type === \App\Enum\UserType::ORGANIZER->value && $offer->status === \App\Enum\OfferStatus::WAITING_FOR_PAYMENT->value) @endif @endauth @endsection