@php use App\Models\Order; @endphp @extends('layouts.app') @section('content')

Площадка {{ $order->object_address }}
{{ $order->orderStatus->name }}

@if(hasRole('admin,manager')) Редактировать Экспорт МАФ
@csrf
@endif @if(hasRole('admin') && ($order->order_status_id == Order::STATUS_NEW)) Удалить
@csrf @method('DELETE')
@endif @if(in_array($order->order_status_id, [Order::STATUS_READY_TO_MOUNT, Order::STATUS_IN_MOUNT]) && $order->isAllMafConnected() && hasRole('admin,manager')) Документы для монтажа @if(hasRole('admin')) @endif @endif @if($order->canCreateHandover() && hasRole('admin,manager')) Документы для сдачи @endif Назад

Общая информация об объекте

ID площадки: {{ $order->id }}
@include('partials.input', ['name' => 'name', 'title' => 'Название', 'value' => $order->name ?? old('name'), 'required' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'object_address', 'title' => 'Адрес объекта', 'value' => $order->object_address ?? old('object_address'), 'required' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.select', ['name' => 'object_type_id', 'title' => 'Тип объекта', 'options' => $objectTypes, 'value' => $order->object_type_id ?? old('object_type_id'), 'required' => true, 'first_empty' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.select', ['name' => 'order_status_id', 'title' => 'Статус', 'options' => $orderStatuses, 'value' => $order->order_status_id ?? old('order_status_id'), 'required' => true, 'classes' => ['update-once']]) @include('partials.textarea', ['name' => 'comment', 'title' => 'Комментарий', 'value' => $order->comment ?? old('comment'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'installation_date', 'title' => 'Дата выхода на монтаж', 'type' => 'date', 'value' => $order->installation_date ?? old('installation_date'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'install_days', 'title' => 'Дней на монтаж', 'type' => 'number', 'min' => 1, 'value' => $order->install_days ?? old('install_days'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'ready_date', 'title' => 'Дата готовности площадки', 'type' => 'date', 'value' => $order->ready_date ?? old('ready_date'), 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.select', ['name' => 'brigadier_id', 'title' => 'Бригадир', 'options' => $brigadiers, 'value' => $order->brigadier_id ?? old('brigadier_id'), 'first_empty' => true, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.select', ['name' => 'user_id', 'title' => 'Менеджер', 'options' => $users, 'value' => $order->user_id ?? old('user_id') ?? auth()->user()->id, 'disabled' => !hasRole('admin'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'tg_group_name', 'title' => 'Название группы в ТГ', 'value' => $order->tg_group_name ?? old('tg_group_name'), 'classes' => ['update-once']]) @include('partials.input', ['name' => 'tg_group_link', 'title' => 'https://t.me/', 'value' => $order->tg_group_link ?? old('tg_group_link'), 'classes' => ['update-once'], 'button' => (!empty($order->tg_group_link)) ? 'tg' : null, 'buttonText' => ''])
Рекламации @foreach($order->reclamations as $reclamation)
Рекламация № {{ $reclamation->id }} от {{ $reclamation->create_date }}
@endforeach
@if(hasRole('admin,manager'))
Документы
@csrf
@foreach($order->documents as $document)
{{ $document->original_name }} @if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach

Ведомости
@csrf
@foreach($order->statements as $statement)
{{ $statement->original_name }} @if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach
@endif
Фотографии ({{ $order->photos->count() }}) @if($order->photos->count()) Скачать все @endif
@csrf
@foreach($order->photos as $photo)
@if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach

МАФы заказа

@if(isset($order) && $order->products_sku)
@php $needs = $order->getNeeds(); @endphp @foreach($order->products_sku as $p) @endforeach
Картинка МАФ Тип Статус Номер заказа МАФ RFID Заводской номер Дата производства Склад Паспорт
@if($p->product->image) @endif @if(hasRole('admin')) {!! $p->product->article !!}
каталог @endif
{!! $p->product->nomenclature_number !!} {{ $p->status }} @if($p->maf_order_id && hasRole('admin')) {{ $p->maf_order->order_number }} @endif {{ $p->rfid }} {{ $p->factory_number }} {{ $p->manufacture_date }} @if($p->maf_order?->order_number) @else @if($needs[$p->product_id]['sku']-- > 0) @else @endif @endif @if($p->passport) @else @endif
@if(hasRole('admin')) Привязать все МАФы
Отвязать все МАФы

@csrf
ТН @endif
@endif
@if($errors->any()) @dump($errors) @endif @endsection @push('scripts') @endpush