@extends('pembelanjaan/konten-site-pembelanjaan')
@section('konten-form-nota-pembelanjaan')
<h6 class="text-dark text-center">Nota Belanja</h6>
<!-- component -->
@include('flash-message')
<script>
setTimeout(function() { 
  var flashMessage = document.querySelector('.alert'); 
   if (flashMessage) { flashMessage.style.transition = 'opacity 1s ease'; flashMessage.style.opacity = 0; setTimeout(function() { flashMessage.remove(); }, 1000); 
   } }, 1500); </script>
<div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 flex flex-col my-2">
<form action="{{ route('simpan-form-menu') }}" method="post" enctype="multipart/form-data">
    @csrf
  <div class="-mx-3 md:flex mb-6">
    <div class="md:w-1/2 px-3">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-last-name">
        Item
      </label>
      <input name="for_nama_makanan" id="for_nama_makanan" value="{{ old('for_nama_makanan') }}" class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-grey-lighter rounded py-2 px-4" id="grid-last-name" type="text" placeholder="Input nama item belanja">
      @if ($errors->has('for_nama_makanan'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_nama_makanan')}}</div>
    @endif
    </div>
  </div>
  <div class="-mx-3 md:flex mb-2">
    <div class="md:w-1/2 px-3 mb-6 md:mb-0">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-city">
        Harga
      </label>
      <input name="for_harga" id="for_harga" value="{{ old('for_harga') }}" class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-grey-lighter rounded py-2 px-4" id="grid-city" type="number" placeholder="Harga makanan / minuman">
      @if ($errors->has('for_harga'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_harga')}}</div>
      @endif
    </div>
    <div class="md:w-1/2 px-3 mb-6 md:mb-0">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-city">
        Tanggal Belanja
      </label>
      <input name="for_tgl_belanja" id="for_tgl_belanja" value="{{ old('for_tgl_belanja') }}" class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-grey-lighter rounded py-2 px-4" id="grid-city" type="date" placeholder="Harga makanan / minuman">
      @if ($errors->has('for_tgl_belanja'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_tgl_belanja')}}</div>
      @endif
    </div>
    <div class="md:w-1/2 px-3 mb-6 md:mb-0">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-city">
        Jenis Menu
      </label>
      <select class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-red rounded py-2 px-4" name="for_jenis_menu" id="for_jenis_menu">
        <option value="" selected>Pilih Jenis Menu</option>
        <option value="Menu Paket" {{ old('for_jenis_menu') == 'Menu Paket' ? 'selected' : '' }}>Menu Paket</option>
        <option value="Menu Satuan" {{ old('for_jenis_menu') == 'Menu Satuan' ? 'selected' : '' }}>Menu Satuan</option>
        <option value="Menu Paket Ngumpul" {{ old('for_jenis_menu') == 'Menu Paket Ngumpul' ? 'selected' : '' }}>Menu Paket Ngumpul</option>
    </select>
      @if ($errors->has('for_jenis_menu'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_jenis_menu')}}</div>
      @endif
    </div>
    <div class="md:w-1/2 px-3 mb-6 md:mb-0">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-city">
        Jenis Paket
      </label>
      <select class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-red rounded py-2 px-4" name="for_jenis_paket" id="for_jenis_paket">
        <option value="" selected>Pilih Jenis Paket</option>
        <option value="Paket 1" {{ old('for_jenis_paket') == 'Paket 1' ? 'selected' : '' }}>Paket 1</option>
        <option value="Paket 2" {{ old('for_jenis_paket') == 'Paket 2' ? 'selected' : '' }}>Paket 2</option>
        <option value="Paket 3" {{ old('for_jenis_paket') == 'Paket 3' ? 'selected' : '' }}>Paket 3</option>
    </select>
      @if ($errors->has('for_harga'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_harga')}}</div>
      @endif
    </div>
    <div class="md:w-1/2 px-3 mb-6 md:mb-0">
      <label class="block uppercase tracking-wide text-grey-darker text-xs font-bold mb-2" for="grid-city">
        Images
      </label>
      <input name="for_img" id="for_img" value="{{ old('for_img') }}" class="appearance-none block w-full bg-grey-lighter text-grey-darker border border-grey-lighter rounded py-2 px-4" id="grid-city" type="file" placeholder="Harga makanan / minuman">
      @if ($errors->has('for_img'))
      <div style="background-color: red;" class="badge text-bg-danger">{{$errors->first('for_img')}}</div>
      @endif
    </div>
  </div>
  <button class="btn btn-success m-2 w-20">Simpan</button>
</form>
</div>
@endsection
