@extends('layouts.app') @section('content')
@include('partials.job-header', [ 'job' => $translatorJob, 'type' => 'translator-jobs' ])
@unlessrole('client')
{{ Form::open([ 'route' => ['translator-jobs.quotes.store', $translatorJob->id], 'class' => 'form' ]) }}

Send quote to @role('admin') client @else A to Z admin @endrole

{{ Form::label('cost', 'Translator cost:', [ 'class' => 'label form__label' ]) }}
{{ Form::number('cost', null, [ 'class' => 'input form__input form__input--cost mb-3', 'min' => 0, 'max' => 9999.99, 'step' => '0.01', 'required' => 'required' ]) }}
{{ Form::label('cost_description', 'Translator cost description:', [ 'class' => 'label form__label' ]) }} {{ Form::text('cost_description', null, [ 'class' => 'input form__input mb-3', 'required' => 'required' ]) }}
@if ($translatorJob->canBeQuotedByUser(auth()->user())) {{ Form::submit('Send Quote', [ 'class' => 'btn btn--secondary' ]) }} @endif {{ Form::close() }}
@endunlessrole

Quotes @role('client') recieved @else sent @endrole

@forelse ($quotes as $quote) @unlessrole('client') @else @endunlessrole @empty @endforelse
Amount Description Date Sent Status
£{{ $quote->cost }}
{{ $quote->cost_description }}
{{ $quote->created_at->format('d/m/Y') }} {{ $quote->status }} @if ($quote->status == 'quote sent') {{ Form::open([ 'route' => ['admin-quotes.update', $quote->id], 'method' => 'PUT', 'class' => 'd-inline-block', ]) }} {{ Form::close() }} {{ Form::open([ 'route' => ['admin-quotes.destroy', $quote->id], 'method' => 'DELETE', 'class' => 'd-inline-block', ]) }} {{ Form::close() }} @else {{ $quote->status }} @endif
@role('client') No quotes have been recieved for this job yet. @else You have not sent any quotes for this job yet. @endrole
@endsection