commit
a15631ab74
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
|
class PreventBackHistory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
$response = $next($request);
|
||||||
|
|
||||||
|
return $response->header('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate')
|
||||||
|
->header('Pragma', 'no-cache')
|
||||||
|
->header('Expires', 'Fri, 01 Jan 1990 00:00:00 GMT');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -36,8 +36,8 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama additional',
|
'nama' => 'Nama additional',
|
||||||
'harga' => 'harga additional',
|
'harga' => 'Harga additional',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama lengkap',
|
'nama' => 'Nama lengkap',
|
||||||
'username' => 'username',
|
'username' => 'Username',
|
||||||
'email' => 'alamat email',
|
'email' => 'Alamat email',
|
||||||
'no_wa' => 'nomor WA',
|
'no_wa' => 'Nomor WhatsApp',
|
||||||
'role' => 'peran admin',
|
'role' => 'Peran admin',
|
||||||
'alamat' => 'alamat lengkap',
|
'alamat' => 'Alamat',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,13 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama buket',
|
'nama' => 'Nama buket',
|
||||||
'ukuran' => 'ukuran buket',
|
'ukuran' => 'Ukuran buket',
|
||||||
'kategori' => 'kategori buket',
|
'kategori' => 'Kategori buket',
|
||||||
'harga' => 'harga',
|
'harga' => 'Harga buket',
|
||||||
'request_khusus' => 'request khusus',
|
'request_khusus' => 'Request khusus',
|
||||||
'deskripsi' => 'deskripsi produk',
|
'deskripsi' => 'Deskripsi buket',
|
||||||
'foto' => 'foto produk',
|
'foto' => 'Foto buket',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,11 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama paket',
|
'nama' => 'Nama paket',
|
||||||
'harga' => 'harga paket',
|
'harga' => 'Harga paket',
|
||||||
'durasi' => 'durasi paket',
|
'durasi' => 'Durasi paket',
|
||||||
'foto' => 'foto paket',
|
'foto' => 'Foto paket',
|
||||||
|
'deskripsi' => 'Deskripsi paket',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,11 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'Nama Lengkap',
|
'nama' => 'Nama lengkap',
|
||||||
'no_wa' => 'Nomor WA',
|
'no_wa' => 'Nomor WhatsApp',
|
||||||
|
'alamat' => 'Alamat',
|
||||||
|
'username' => 'Username',
|
||||||
|
'email' => 'Email',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,9 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama pemesan',
|
'nama' => 'Nama pemesan',
|
||||||
'no_wa' => 'nomor WhatsApp',
|
'no_wa' => 'Nomor WhatsApp',
|
||||||
'bukti_bayar' => 'bukti pembayaran',
|
'bukti_bayar' => 'Bukti pembayaran',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,12 @@ public function messages(): array
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama' => 'nama pemesan',
|
'nama' => 'Nama pemesan',
|
||||||
'no_wa' => 'nomor WhatsApp',
|
'no_wa' => 'Nomor WhatsApp',
|
||||||
'tgl_ambil' => 'tanggal pengambilan',
|
'tgl_ambil' => 'Tanggal pengambilan',
|
||||||
'waktu_ambil' => 'waktu pengambilan',
|
'waktu_ambil' => 'Waktu pengambilan',
|
||||||
'bukti_bayar' => 'bukti pembayaran',
|
'bukti_bayar' => 'Bukti pembayaran',
|
||||||
'ucapan' => 'kartu ucapan',
|
'ucapan' => 'Kartu ucapan',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,12 @@
|
||||||
commands: __DIR__ . '/../routes/console.php',
|
commands: __DIR__ . '/../routes/console.php',
|
||||||
health: '/up',
|
health: '/up',
|
||||||
)
|
)
|
||||||
->withMiddleware(function (Middleware $middleware): void {
|
->withMiddleware(function (Middleware $middleware) {
|
||||||
//
|
// Daftarkan alias di sini
|
||||||
|
$middleware->alias([
|
||||||
|
'prevent-back' => \App\Http\Middleware\PreventBackHistory::class,
|
||||||
|
]);
|
||||||
})
|
})
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
->withExceptions(function (Exceptions $exceptions) {
|
||||||
//
|
//
|
||||||
})->create();
|
})->create();
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class="form-control @error('durasi') is-invalid @enderror"
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-5">
|
<div class="col-12 col-md-5">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Upload Foto Buket</label>
|
<label class="form-label">Upload Foto Paket</label>
|
||||||
|
|
||||||
{{-- Area Upload Custom --}}
|
{{-- Area Upload Custom --}}
|
||||||
<div class="upload-area p-4 text-center d-flex flex-column align-items-center justify-content-center"
|
<div class="upload-area p-4 text-center d-flex flex-column align-items-center justify-content-center"
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ class="form-control @error('nama') is-invalid @enderror" style="font-size: 14px;
|
||||||
<option value="L" {{ old('ukuran') == 'L' ? 'selected' : '' }}>Large (L)
|
<option value="L" {{ old('ukuran') == 'L' ? 'selected' : '' }}>Large (L)
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
@error('ukuran')
|
||||||
|
<div class="invalid-feedback">{{ $message }}</div>
|
||||||
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Input Kategori --}}
|
{{-- Input Kategori --}}
|
||||||
|
|
@ -59,6 +62,9 @@ class="form-control @error('nama') is-invalid @enderror" style="font-size: 14px;
|
||||||
<option value="artificial"
|
<option value="artificial"
|
||||||
{{ old('kategori') == 'artificial' ? 'selected' : '' }}>Artificial</option>
|
{{ old('kategori') == 'artificial' ? 'selected' : '' }}>Artificial</option>
|
||||||
</select>
|
</select>
|
||||||
|
@error('kategori')
|
||||||
|
<div class="invalid-feedback">{{ $message }}</div>
|
||||||
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ class="form-control @error('nama') is-invalid @enderror" style="font-size: 14px;
|
||||||
Large (L)
|
Large (L)
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
@error('ukuran')
|
||||||
|
<div class="invalid-feedback">{{ $message }}</div>
|
||||||
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Kategori --}}
|
{{-- Kategori --}}
|
||||||
|
|
@ -64,6 +67,9 @@ class="form-control @error('nama') is-invalid @enderror" style="font-size: 14px;
|
||||||
{{ old('kategori', $b->kategori) == 'artificial' ? 'selected' : '' }}>
|
{{ old('kategori', $b->kategori) == 'artificial' ? 'selected' : '' }}>
|
||||||
Artificial</option>
|
Artificial</option>
|
||||||
</select>
|
</select>
|
||||||
|
@error('kategori')
|
||||||
|
<div class="invalid-feedback">{{ $message }}</div>
|
||||||
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,25 +83,23 @@ class="form-control formulirbuket-input @error('no_wa') is-invalid @enderror"
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label small">Tanggal Pengambilan</label>
|
<label class="form-label small">Tanggal Pengambilan</label>
|
||||||
<input type="date" name="tgl_ambil" placeholder="Pilih Tanggal"
|
<input type="date" id="tgl_ambil" name="tgl_ambil"
|
||||||
class="form-control formulirbuket-input @error('tgl_ambil') is-invalid @enderror"
|
class="form-control @error('tgl_ambil') is-invalid @enderror"
|
||||||
value="{{ old('tgl_ambil') }}">
|
min="{{ \Carbon\Carbon::now()->addDay()->format('Y-m-d') }}"
|
||||||
|
placeholder="Pilih Tanggal" value="{{ old('tgl_ambil') }}">
|
||||||
@error('tgl_ambil')
|
@error('tgl_ambil')
|
||||||
<div class="invalid-feedback d-block">{{ $message }}</div>
|
<div class="invalid-feedback d-block">{{ $message }}</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label small">Waktu Pengambilan</label>
|
<label class="form-label small">Waktu Pengambilan</label>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
|
||||||
<input type="text" id="jam_picker" name="waktu_ambil"
|
<input type="text" id="jam_picker" name="waktu_ambil"
|
||||||
class="form-control formulirbuket-input bg-white @error('waktu_ambil') is-invalid @enderror"
|
class="form-control bg-white @error('waktu_ambil') is-invalid @enderror"
|
||||||
placeholder="Pilih Jam" value="{{ old('waktu_ambil') }}" readonly>
|
placeholder="Pilih Jam" value="{{ old('waktu_ambil') }}" readonly
|
||||||
|
onkeydown="return false;">
|
||||||
<span class="input-group-text bg-white"><i class="bi bi-clock"></i></span>
|
<span class="input-group-text bg-white"><i class="bi bi-clock"></i></span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<small class="text-muted">Jam operasional: 09:00 - 21:00 WIB</small>
|
<small class="text-muted">Jam operasional: 09:00 - 21:00 WIB</small>
|
||||||
|
|
||||||
@error('waktu_ambil')
|
@error('waktu_ambil')
|
||||||
|
|
@ -259,7 +257,7 @@ class="btn formulirbuket-btn-cancel flex-fill">Batalkan</a>
|
||||||
time_24hr: true,
|
time_24hr: true,
|
||||||
minTime: "09:00",
|
minTime: "09:00",
|
||||||
maxTime: "21:00",
|
maxTime: "21:00",
|
||||||
disableMobile: "true"
|
disableMobile: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
Route::prefix('admin')->name('admin.')->middleware(['auth'])->group(function () {
|
Route::prefix('admin')->name('admin.')->middleware(['auth', 'prevent-back'])->group(function () {
|
||||||
|
|
||||||
Route::redirect('/', '/admin/beranda');
|
Route::redirect('/', '/admin/beranda');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue