@extends('layouts.app')

@section('title')
  Dashboard
@endsection

@section('admin-content')
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>Edit Expense Up Country</h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="{{ route('dashboard.index') }}">Dashboard</a></li>
                        </li>
                    </ol>
                </div>
            </div>
        </div>
    </section>
    <section class="content">
        <div class="container-fluid">
            <div class="card card-primary card-outline">
                <div class="card-body">
					<form method="POST" action="{{ route('forms.up-country.update', $form->id) }}" enctype="multipart/form-data">
                        @csrf
                        @method('PUT')
                        @include('backend.layouts.partials.messages')
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label class="form-label">Pilih Rayon</label>
                                    <select class="form-control form-control-md" name="rayon_id" required>
                                        <option value="">Pilih Rayon</option>
                                        @foreach ($rayons as $rayon)
                                            <option value="{{ $rayon->id }}" {{ $form->rayon_id == $rayon->id ? 'selected' : '' }}>{{ $rayon->name }}</option>
                                        @endforeach
                                    </select>
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Tanggal</label>
                                    <input type="date" class="form-control" name="tanggal" required value="{{ $form->tanggal }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Tujuan</label>
                                    <input type="text" class="form-control" name="tujuan" required value="{{ $form->tujuan }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Jarak</label>
                                    <input type="number" class="form-control" name="jarak" required value="{{ $form->jarak }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Allowance</label>
                                    <input type="number" class="form-control" name="allowance" id="allowance" required value="{{ $form->allowance }}">
                                </div>
                                 <div class="mb-3">
                                    <label class="form-label">Transport Dalam Kota</label>
                                    <input type="number" class="form-control" name="transport_dalkot" id="transport_dalkot" required value="{{ $form->transport_dalkot }}">
                                </div>
                            </div>

                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label class="form-label">Transport Antar Kota</label>
                                    <input type="number" class="form-control" name="transport_ankot" id="transport_ankot" required value="{{ $form->transport_ankot }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Hotel</label>
                                    <input type="number" class="form-control" name="hotel" id="hotel" required value="{{ $form->hotel }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti 1</label>
                                    <input type="file" class="form-control" name="bukti1" value="{{ old('bukti1') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti 2</label>
                                    <input type="file" class="form-control" name="bukti2" value="{{ old('bukti2') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti 3</label>
                                    <input type="file" class="form-control" name="bukti3" value="{{ old('bukti3') }}">
                                </div>
                            </div>

                            <button type="submit" class="btn btn-primary ml-2">Save</button>
                        </div>
					</form>
                </div>
            </div>
        </div>
    </section>
@endsection
