88 lines
4.5 KiB
PHP
88 lines
4.5 KiB
PHP
@extends('portal::layouts.customer')
|
|
|
|
@section('title', $inquiry->title)
|
|
|
|
@section('content')
|
|
<section class="portal-page-header">
|
|
<h1>{{ $inquiry->title }}</h1>
|
|
<p><a href="{{ route('supplier.asset_exchange.inquiries.index') }}" class="btn btn-default btn-sm">@lang('assetexchange::lang.back')</a></p>
|
|
</section>
|
|
<section class="content">
|
|
<div class="row">
|
|
<div class="col-md-7">
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">@lang('assetexchange::lang.inquiry_lines')</h3>
|
|
</div>
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('assetexchange::lang.title')</th>
|
|
<th>@lang('assetexchange::lang.description')</th>
|
|
<th>@lang('assetexchange::lang.condition_grade')</th>
|
|
<th>@lang('assetexchange::lang.quoted_price')</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($inquiry->lines as $line)
|
|
<tr>
|
|
<td>{{ $line->part_name ?: '—' }}</td>
|
|
<td>{{ $line->description ?: '—' }}</td>
|
|
<td>{{ $line->target_condition ?: '—' }}</td>
|
|
<td>{{ $line->reference_price ? $aexUtil->formatMoney($line->reference_price) : '—' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-5">
|
|
@php($recipient = $inquiry->recipients->first())
|
|
<div class="box box-success">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">@lang('assetexchange::lang.portal_submit_quote')</h3>
|
|
</div>
|
|
<div class="box-body">
|
|
@if($recipient && $recipient->viewed_at)
|
|
<p class="text-muted">
|
|
<i class="fa fa-eye"></i>
|
|
@lang('assetexchange::lang.viewed_at'): {{ $aexUtil->formatDateTime($recipient->viewed_at) }}
|
|
</p>
|
|
@endif
|
|
@if($recipient && $recipient->quoted_price)
|
|
<div class="alert alert-success">
|
|
@lang('assetexchange::lang.quote_already_submitted')
|
|
<hr>
|
|
<p><strong>@lang('assetexchange::lang.quoted_price'):</strong> {{ $aexUtil->formatMoney($recipient->quoted_price) }} {{ $recipient->currency }}</p>
|
|
<p><strong>@lang('assetexchange::lang.notes'):</strong> {{ $recipient->quote_notes ?: '—' }}</p>
|
|
</div>
|
|
@else
|
|
<form method="POST" action="{{ route('supplier.asset_exchange.inquiries.quote', $recipient?->id) }}">
|
|
@csrf
|
|
<div class="form-group">
|
|
<label>@lang('assetexchange::lang.quoted_price')</label>
|
|
<input type="number" name="quoted_price" class="form-control" min="0" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>@lang('assetexchange::lang.currency')</label>
|
|
<input type="text" name="currency" class="form-control" value="IRR">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>@lang('assetexchange::lang.notes')</label>
|
|
<textarea name="quote_notes" rows="4" class="form-control" placeholder="@lang('assetexchange::lang.portal_quote_notes_hint')"></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-success">
|
|
<i class="fa fa-check"></i> @lang('assetexchange::lang.portal_send_quote')
|
|
</button>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|