@extends('layouts.app')

@section('title')
  Dashboard
@endsection

@section('admin-content')
    <script src="https://cdn.jsdelivr.net/npm/autonumeric@4.6.0/dist/autoNumeric.min.js"></script>

    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>Tambahkan Expense Meeting & Seminar Baru</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.meeting.store') }}" enctype="multipart/form-data">
                        @csrf
                        @include('backend.layouts.partials.messages')
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label class="form-label">Allowance <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="text" class="form-control" name="allowance" id="allowance" value="{{ old('allowance') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti Allowance <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="file" class="form-control" name="bukti_allowance" value="{{ old('bukti_allowance') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Transport Antar Kota <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="text" class="form-control" name="transport_ankot" id="transport_ankot" value="{{ old('transport_ankot') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti Transport Antar Kota <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="file" class="form-control" name="bukti_transport_ankot" value="{{ old('bukti_transport_ankot') }}">
                                </div>
                            </div>

                            <div class="col-lg-6">
                               <div class="mb-3">
                                    <label class="form-label">Hotel <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="text" class="form-control" name="hotel" id="hotel" value="{{ old('hotel') }}">
                                </div>
                                <div class="mb-3">
                                    <label class="form-label">Bukti Hotel <span class="font-italic font-weight-normal">(optional)</span></label>
                                    <input type="file" class="form-control" name="bukti_hotel" value="{{ old('bukti_hotel') }}">
                                </div>
                            </div>

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

    <script>
        new AutoNumeric('#allowance', {
            digitGroupSeparator: '.', // Pemisah ribuan
            decimalCharacter: ',',    // Karakter desimal (tidak digunakan karena tanpa desimal)
            currencySymbol: 'Rp.',    // Simbol mata uang
            decimalPlaces: 0,         // Tidak ada angka desimal
            unformatOnSubmit: true    // Nilai asli tanpa format saat dikirimkan
        });

        new AutoNumeric('#transport_ankot', {
            digitGroupSeparator: '.', // Pemisah ribuan
            decimalCharacter: ',',    // Karakter desimal (tidak digunakan karena tanpa desimal)
            currencySymbol: 'Rp.',    // Simbol mata uang
            decimalPlaces: 0,         // Tidak ada angka desimal
            unformatOnSubmit: true    // Nilai asli tanpa format saat dikirimkan
        });

        new AutoNumeric('#hotel', {
            digitGroupSeparator: '.', // Pemisah ribuan
            decimalCharacter: ',',    // Karakter desimal (tidak digunakan karena tanpa desimal)
            currencySymbol: 'Rp.',    // Simbol mata uang
            decimalPlaces: 0,         // Tidak ada angka desimal
            unformatOnSubmit: true    // Nilai asli tanpa format saat dikirimkan
        });
    </script>
@endsection
