@extends('layouts.app') @section('title', $case->title) @section('content') @include('assetexchange::layouts.nav')

{{ $case->title }}

{{ $case->case_code }} — {{ $case->listing?->title }}

@can('aex.research.manage') @if($case->status !== 'closed') {!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ResearchCaseController::class, 'closeCase'], [$case->id]), 'method' => 'post', 'style' => 'display:inline']) !!} @csrf {!! Form::close() !!} @endif @endcan
@foreach($case->tasks->groupBy('category') as $category => $tasks)

{{ $categories[$category] ?? $category }}

@foreach($tasks as $task)
{{ $task->title }} {{ $aexUtil->statusLabel($task->status) }}
@if($task->description)

{{ $task->description }}

@endif @if($task->instructions)

{{ $task->instructions }}

@endif @if($task->findings)
@lang('assetexchange::lang.findings'): {{ $task->findings }}
@endif @can('aex.research.manage') @if($task->status !== 'completed')
{!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ResearchCaseController::class, 'assignTask'], [$task->id]), 'method' => 'post']) !!}
{!! Form::select('assignee_user_id', $users, $task->assignee_user_id, ['class' => 'form-control select2', 'style' => 'width:100%']) !!}
{!! Form::close() !!}

{!! Form::open(['url' => action([\Modules\AssetExchange\Http\Controllers\ResearchCaseController::class, 'completeTask'], [$task->id]), 'method' => 'post']) !!}
{!! Form::textarea('findings', null, ['class' => 'form-control', 'rows' => 2, 'placeholder' => __('assetexchange::lang.findings_placeholder')]) !!}
{!! Form::text('market_links', null, ['class' => 'form-control', 'placeholder' => __('assetexchange::lang.market_links_placeholder')]) !!}
{!! Form::text('quoted_prices', null, ['class' => 'form-control', 'placeholder' => __('assetexchange::lang.quoted_prices_placeholder')]) !!}
{!! Form::close() !!} @endif @endcan
@endforeach
@endforeach

@lang('assetexchange::lang.listing_summary')

{{ $case->listing?->manufacturer }} {{ $case->listing?->model }}

{{ $case->listing?->serial_number }}

@if($case->listing?->media->isNotEmpty()) @endif
@endsection @section('javascript') @endsection