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

Рекламация

@if(hasRole('admin') && !is_null($reclamation->brigadier_id) && !is_null($reclamation->start_work_date)) @endif @if(hasRole('admin,manager')) Пакет документов рекламации @endif @if(hasRole('admin')) Удалить
@csrf @method('DELETE')
@endif
@csrf @include('partials.input', ['name' => 'order_name', 'title' => 'Площадка', 'disabled' => true, 'value' => $reclamation->order->common_name ?? '']) @include('partials.select', ['name' => 'status_id', 'title' => 'Статус', 'options' => $statuses, 'value' => $reclamation->status_id ?? old('status_id'), 'disabled' => !hasRole('admin,manager')]) @include('partials.select', ['name' => 'user_id', 'title' => 'Менеджер', 'options' => $users, 'value' => $reclamation->user_id ?? old('user_id') ?? auth()->user()->id, 'disabled' => !hasRole('admin,manager')]) @include('partials.input', ['name' => 'create_date', 'title' => 'Дата создания', 'type' => 'date', 'required' => true, 'value' => $reclamation->create_date ?? date('Y-m-d'), 'disabled' => !hasRole('admin,manager')]) @include('partials.input', ['name' => 'finish_date', 'title' => 'Дата завершения', 'type' => 'date', 'required' => true, 'value' => $reclamation->finish_date ?? date('Y-m-d', strtotime('+30 days')), 'disabled' => !hasRole('admin,manager')]) @include('partials.select', ['name' => 'brigadier_id', 'title' => 'Бригадир', 'options' => $brigadiers, 'value' => $reclamation->brigadier_id ?? old('brigadier_id'), 'disabled' => !hasRole('admin,manager'), 'first_empty' => true]) @include('partials.input', ['name' => 'start_work_date', 'title' => 'Дата начала работ', 'type' => 'date', 'value' => $reclamation->start_work_date, 'disabled' => !hasRole('admin,manager')]) @include('partials.input', ['name' => 'work_days', 'title' => 'Срок работ, дней', 'type' => 'number', 'min' => 1, 'value' => $reclamation->work_days, 'disabled' => !hasRole('admin,manager')]) @include('partials.select', ['name' => 'reason', 'title' => 'Причина', 'size' => 6, 'value' => $reclamation->reason ?? '', 'options' => ['Вандализм', 'Гарантия', 'Сервисное обслуживание'], 'key_as_val' => true, 'disabled' => !hasRole('admin,manager')]) @include('partials.textarea', ['name' => 'guarantee', 'title' => 'Гарантии', 'size' => 6, 'value' => $reclamation->guarantee ?? '', 'disabled' => !hasRole('admin,manager')]) @include('partials.textarea', ['name' => 'whats_done', 'title' => 'Что сделано', 'size' => 6, 'value' => $reclamation->whats_done ?? '', 'disabled' => !hasRole('admin,manager')]) @include('partials.textarea', ['name' => 'comment', 'title' => 'Комментарий', 'size' => 6, 'value' => $reclamation->comment ?? '', 'disabled' => !hasRole('admin,manager')]) @include('partials.submit', ['name' => 'Сохранить', 'offset' => 5, 'disabled' => !hasRole('admin,manager'), 'backurl' => route('reclamations.index', session('gp_reclamations'))])
@foreach($reclamation->skus as $p) @endforeach
Картинка МАФ Тип Номер заказа МАФ RFID Заводской номер Дата производства
@if($p->product->image) @endif @if(hasRole('admin,manager')) {!! $p->product->article !!}
каталог @endif
{!! $p->product->nomenclature_number !!} @if($p->maf_order_id && hasRole('admin,manager')) {{ $p->maf_order->order_number }} @endif {{ $p->rfid }} {{ $p->factory_number }} {{ $p->manufacture_date }}
Детали замен ({{ $reclamation->details->count() }})
@csrf
@foreach($reclamation->details as $detail)
@endforeach
Для удаления детали поставьте в количество 0 Добавить строку
@if($errors->any()) @dump($errors->all()) @endif

Документы @if(hasRole('admin,manager'))
@csrf
@endif
@foreach($reclamation->documents as $document)
{{ $document->original_name }} @if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach

Акты @if(hasRole('admin,manager'))
@csrf
@endif
@foreach($reclamation->acts as $act)
{{ $act->original_name }} @if(hasRole('admin'))
@csrf @method('DELETE')
@endif
@endforeach

Фотографии проблемы ({{ $reclamation->photos_before->count() }}) @if($reclamation->photos_before->count()) Скачать все @endif
@csrf
@foreach($reclamation->photos_before as $photo)
@if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach

Фотографии после устранения ({{ $reclamation->photos_after->count() }}) @if($reclamation->photos_after->count()) Скачать все @endif
@csrf
@foreach($reclamation->photos_after as $photo)
@if(hasRole('admin')) @endif
@csrf @method('DELETE')
@endforeach
@endsection @push('scripts') @endpush