@extends('layouts.layout-user')
@section('content')
<h2 style="display: inline-block; margin-right: 10px;">Tambah Data Pelaporan Apresiasi</h2>
<div class="row">
    <div class="w-full">
        <span class="card shadow text-decoration-none" style="display: flex;">
            <div class="card-body" style="display: flex; flex-direction: column;">
                <form class="form-horizontal" action="{{route('apresiasi.userUpdate', $apresiasi->id) }}" method="POST" enctype="multipart/form-data" style="display: flex; flex-wrap: wrap;">
                    @csrf
                    @method('PUT')
                    <div class="container">
                        <div class="row">
                            <div class="col-lg-6">
                                <div style="width: 100%;">
                                    <span>Judul Pelaporan</span>
                                    <div class="input-group input-group-merge" style="max-width: 400px; margin-bottom: 10px;">
                                        <input type="text" readonly class="form-control" name="judul" value="{{ $apresiasi->judul }}" aria-describedby="defaultFormControlHelp">
                                    </div>
                                    <span>Keterangan Pelaporan</span>
                                    <div class="input-group input-group-merge" style="max-width: 400px; margin-bottom: 10px;">
                                        <textarea class="form-control" readonly name="deskripsi" aria-describedby="defaultFormControlHelp">{{ $apresiasi->deskripsi }}</textarea>
                                    </div>
                                    <label for="tanggal">Tanggal</label>
                                    <div class="input-group input-group-merge" style="max-width: 400px; margin-bottom: 10px;">
                                        <input class="form-control" readonly type="date" name="tanggal"  value="{{ $apresiasi->tanggal }}">
                                    </div>
                                    <span>Lokasi</span>
                                    <div class="input-group input-group-merge" style="max-width: 400px; margin-bottom: 10px;">
                                        <input type="text" readonly class="form-control" name="lokasi"  value="{{ $apresiasi->lokasi }}" aria-describedby="defaultFormControlHelp">
                                    </div>
                                    <div style="width: 100%; text-align: left; margin-top: 5%; margin-bottom: 5%;">
                                        <a href="{{ route('apresiasi.adminIndex') }}" class="btn  btn-delete" style="display: inline-block; width: 100px; background-color: #ffffff; color: #4f60e0; border: 2px solid #4f60e0; border-radius: 4px; cursor: pointer; text-align: center;  margin-top:30px;">Back</a>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div style="width: 100%;">
                                    <div style="display: flex; justify-content: left; align-items: left; flex-direction: column; max-width: 300px;">
                                        <span>Foto saat ini:</span>
                                        <img src="{{ asset('foto/' . $apresiasi->foto) }}" alt="Foto Pelaporan" style="max-width: 100%; height: auto; object-fit: cover;">
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>

                </form>
            </div>
        </span>
    </div>

</div>


@endsection
