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

<div class="card">
    <div class="card-header">
        {{ trans('global.show') }} {{ trans('cruds.amcContract.title') }}
    </div>

    <div class="card-body">
        <div class="form-group">
            <div class="form-group">
                <a class="btn btn-default" href="{{ route('admin.amc-contracts.index') }}">
                    {{ trans('global.back_to_list') }}
                </a>
            </div>
            <table class="table table-bordered table-striped">
                <tbody>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.id') }}
                        </th>
                        <td>
                            {{ $amcContract->id }}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.client') }}
                        </th>
                        <td>
                            {{ $amcContract->client->company_name ?? '' }}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.asset') }}
                        </th>
                        <td>
                            @foreach($amcContract->assets as $key => $asset)
                                <span class="label label-info">{{ $asset->commissioning }}</span>
                                <br>
                                {{ trans('cruds.asset.fields.air_compressor_serial_no') }}:
                                <b><span class="label label-info">{{ $asset->air_compressor_serial_no }}</span></b>
                                <br>
                                {{ trans('cruds.asset.fields.airdryer_serial_no') }}:
                                <b><span class="label label-info">{{ $asset->airdryer_serial_no }}</span></b>
                                <br>
                                {{ trans('cruds.asset.fields.filter_serial_no') }}:
                                <b><span class="label label-info">{{ $asset->filter_serial_no }}</span></b>
                                <br>
                                {{ trans('cruds.asset.fields.eco_drain_serial_no') }}:
                                <b><span class="label label-info">{{ $asset->eco_drain_serial_no }}</span></b>
                                <br>
                                {{ trans('cruds.asset.fields.air_receiver_serial_no') }}:
                                <b><span class="label label-info">{{ $asset->air_receiver_serial_no }}</span></b>
                                <br>
                            @endforeach
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.amc_start_date') }}
                        </th>
                        <td>
                            {{ $amcContract->amc_start_date }}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.amc_expiry_date') }}
                        </th>
                        <td>
                            {{ $amcContract->amc_expiry_date }}
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.amc_document') }}
                        </th>
                        <td>
                            @if($amcContract->amc_document)
                                <a href="{{ $amcContract->amc_document->getUrl() }}" target="_blank">
                                    {{ trans('global.view_file') }}
                                </a>
                            @endif
                        </td>
                    </tr>
                    <tr>
                        <th>
                            {{ trans('cruds.amcContract.fields.assigned_team') }}
                        </th>
                        <td>
                            {{ $amcContract->assigned_team->name ?? '' }}
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="form-group">
                <a class="btn btn-default" href="{{ route('admin.amc-contracts.index') }}">
                    {{ trans('global.back_to_list') }}
                </a>
            </div>
        </div>
    </div>
</div>



@endsection
