2024-12-18 12:56:16 +07:00
|
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
|
|
|
|
@section('title')
|
|
|
|
|
|
Dashboard
|
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
|
|
|
@section('admin-content')
|
2024-12-20 11:07:07 +07:00
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/autonumeric@4.6.0/dist/autoNumeric.min.js"></script>
|
|
|
|
|
|
|
2024-12-18 12:56:16 +07:00
|
|
|
|
<section class="content-header">
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
<div class="row mb-2">
|
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
|
<h1>Tambahkan Expense Entertainment & Presentation</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>
|
2025-01-18 15:01:28 +07:00
|
|
|
|
<style>
|
|
|
|
|
|
#loading-spinner-overlay {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
|
|
|
|
|
|
z-index: 9999; /* High z-index to cover everything */
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.spinner-wrapper {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
<section class="content">
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
<div class="card card-primary card-outline">
|
|
|
|
|
|
<div class="card-body">
|
2025-01-17 16:39:37 +07:00
|
|
|
|
<form id="expense-form" method="POST" action="{{ route('forms.entertainment.store') }}" enctype="multipart/form-data">
|
2024-12-18 12:56:16 +07:00
|
|
|
|
@csrf
|
|
|
|
|
|
@include('backend.layouts.partials.messages')
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="col-lg-6">
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Tanggal <span class="font-italic font-weight-normal">(required)</span></label>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
<input type="date" class="form-control" name="tanggal" required value="{{ old('tanggal') }}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Jenis <span class="font-italic font-weight-normal">(required)</span></label>
|
2025-10-12 18:29:07 +07:00
|
|
|
|
<select class="form-control form-control-md" name="jenis" required >
|
|
|
|
|
|
<option value="">Pilih Jenis</option>
|
|
|
|
|
|
<option value="entertainment" {{ old('jenis') == 'entertainment' ? 'selected' : '' }} >Entertainment</option>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
<option value="presentation" {{ old('jenis') == 'presentation' ? 'selected' : '' }}>Presentation</option>
|
|
|
|
|
|
<option value="sponsorship" {{ old('jenis') == 'sponsorship' ? 'selected' : '' }}>Sponsorship</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Nama Penerima <span class="font-italic font-weight-normal">(required)</span></label>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
<input type="text" class="form-control" name="name" required value="{{ old('name') }}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">NPWP / NIK <span class="font-italic font-weight-normal">(required)</span></label>
|
|
|
|
|
|
<input type="text" class="form-control" name="nik_or_npwp" id="nik_or_npwp" required value="{{ old('nik_or_npwp') }}">
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-6">
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Alamat <span class="font-italic font-weight-normal">(required)</span></label>
|
|
|
|
|
|
<input type="text" class="form-control" name="alamat" id="alamat" required value="{{ old('alamat') }}">
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Total <span class="font-italic font-weight-normal">(required)</span></label>
|
2024-12-20 11:07:07 +07:00
|
|
|
|
<input type="string" class="form-control" name="total" id="total" required value="{{ old('total') }}">
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Bukti Total <span class="font-italic font-weight-normal">(required)</span></label>
|
|
|
|
|
|
<input type="file" class="form-control" name="bukti_total" value="{{ old('bukti_total') }}" required>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="mb-3">
|
2025-01-06 16:00:51 +07:00
|
|
|
|
<label class="form-label">Keterangan <span class="font-italic font-weight-normal">(required)</span></label>
|
|
|
|
|
|
<textarea class="form-control" name="keterangan" required>{{ old('keterangan') }}</textarea>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary ml-2">Submit</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
2025-01-17 16:39:37 +07:00
|
|
|
|
|
|
|
|
|
|
<div id="loading-spinner-overlay" class="d-none">
|
|
|
|
|
|
<div class="spinner-wrapper">
|
|
|
|
|
|
<div class="spinner-border text-primary" role="status">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p>Submitting, please wait...</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
2024-12-20 11:07:07 +07:00
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
new AutoNumeric('#total', {
|
|
|
|
|
|
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
|
|
|
|
|
|
});
|
2025-01-17 16:39:37 +07:00
|
|
|
|
|
|
|
|
|
|
document.getElementById('expense-form').addEventListener('submit', function (e) {
|
|
|
|
|
|
const spinnerOverlay = document.getElementById('loading-spinner-overlay');
|
|
|
|
|
|
spinnerOverlay.classList.remove('d-none'); // Show overlay
|
|
|
|
|
|
spinnerOverlay.classList.add('d-flex'); // Use flexbox for centering
|
|
|
|
|
|
});
|
2024-12-20 11:07:07 +07:00
|
|
|
|
</script>
|
2024-12-18 12:56:16 +07:00
|
|
|
|
@endsection
|