[Fix] Filter nampan
This commit is contained in:
parent
6246800b0c
commit
88207ea1fc
@ -381,11 +381,14 @@ class LaporanService
|
||||
}
|
||||
|
||||
if (isset($params['nampan_id'])) {
|
||||
// UBAH: Filter berdasarkan 'item_transaksis.id_nampan'
|
||||
if ($params['nampan_id'] == 0) {
|
||||
$query->whereNull('item_transaksis.id_nampan');
|
||||
$nampanId = (int) $params['nampan_id'];
|
||||
if ($nampanId === -1) {
|
||||
$query->where('item_transaksis.posisi_asal', 'Brankas');
|
||||
} else {
|
||||
$query->where('item_transaksis.id_nampan', $params['nampan_id']);
|
||||
$query->join('nampans', function ($join) use ($nampanId) {
|
||||
$join->on('item_transaksis.posisi_asal', '=', 'nampans.nama')
|
||||
->where('nampans.id', $nampanId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
public/logo.ico
Normal file
BIN
public/logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 215 KiB |
@ -322,7 +322,7 @@ const fetchNampan = async () => {
|
||||
const nampanData = response.data;
|
||||
opsiNampan.value = [
|
||||
{ label: 'Semua Nampan', value: 0 },
|
||||
{ label: 'Brankas', value: 0 },
|
||||
{ label: 'Brankas', value: -1 },
|
||||
...nampanData.map(nampan => ({
|
||||
label: nampan.nama,
|
||||
value: nampan.id,
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<meta name="twitter:description" content="@yield('description', 'Deskripsi default untuk aplikasi Abbauf.')">
|
||||
<meta name="twitter:image" content="@yield('og_image', asset('images/default-social-image.jpg'))">
|
||||
|
||||
<link rel="icon" href="{{ asset('favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="icon" href="{{ asset('logo.ico') }}" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png') }}">
|
||||
|
||||
<meta name="theme-color" content="#FFFFFF">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user