@extends('layouts.admin')
@section('title','Editar evidência')
@section('content')
<h1>Editar evidência</h1>
<form method="POST" action="{{ route('admin.evidences.update', $evidence) }}" enctype="multipart/form-data">@csrf @method('PUT')
<select name="case_id">@foreach($cases as $case)<option value="{{ $case->id }}" @selected($evidence->case_id===$case->id)>{{ $case->title }}</option>@endforeach</select>
<select name="type"><option value="image" @selected($evidence->type==='image')>Imagem</option><option value="video" @selected($evidence->type==='video')>Vídeo</option><option value="audio" @selected($evidence->type==='audio')>Áudio</option><option value="document" @selected($evidence->type==='document')>Documento</option><option value="other" @selected($evidence->type==='other')>Outro</option></select>
<input type="text" name="title" value="{{ $evidence->title }}">
<textarea name="description">{{ $evidence->description }}</textarea>
<select name="visibility"><option value="internal" @selected($evidence->visibility==='internal')>Interna</option><option value="client_visible" @selected($evidence->visibility==='client_visible')>Cliente visível</option><option value="restricted" @selected($evidence->visibility==='restricted')>Restrita</option></select>
<input type="file" name="file">
<input type="datetime-local" name="captured_at" value="{{ $evidence->captured_at ? \Carbon\Carbon::parse($evidence->captured_at)->format('Y-m-d\TH:i') : '' }}">
<button class="btn" type="submit">Atualizar</button></form>
@endsection
