Browse Source

update pagenation serch

master
Gunawan19621 11 months ago
parent
commit
8a72094a2d
  1. 32
      app/Http/Controllers/PetiController.php
  2. 2
      resources/views/dashboard/Master_Data/Customer/index.blade.php
  3. 1
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php
  4. 34
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php
  5. 1
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  6. 4
      resources/views/layouts/sidebar.blade.php
  7. 4
      resources/views/pages/layouts/sidebar_user.blade.php
  8. 3
      resources/views/pages/user/Master_Data/Customer/index.blade.php
  9. 27
      resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php
  10. 6
      resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php
  11. 1
      resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php
  12. 1
      resources/views/pages/user/Master_Data/Warehouse/index.blade.php
  13. 1
      resources/views/pages/user/dashboard/disposal/index.blade.php

32
app/Http/Controllers/PetiController.php

@ -34,25 +34,35 @@ class PetiController extends Controller
$search = $request->input('search') ?? '';
if ($search) {
$query->where(function ($q) use ($search) {
$q->where('fix_lot', 'like', "%$search%")
->orWhere('created_by', 'like', "%$search%")
$q->where('fix_lot', 'like', "%$search%") // mencari fix lot
// ->orWhere('created_by', 'like', "%$search%")
->orWhereHas('customer', function ($customerQuery) use ($search) {
$customerQuery->where('name', 'like', "%$search%")
->orWhere('code_customer', 'like', "%$search%")
->orWhere('lot_no', 'like', "%$search%");
$customerQuery->where('name', 'like', "%$search%") //mencari nama customer
->orWhere('code_customer', 'like', "%$search%") //mencari kode customer
->orWhere('lot_no', 'like', "%$search%"); //mencari lot no
})
->orWhereHas('warehouse', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%");
$warehouseQuery->where('name', 'like', "%$search%"); //mencari nama gudang
})
->orWhereHas('tipe_peti', function ($tipePetiQuery) use ($search) {
$tipePetiQuery->where('type', 'like', "%$search%")
->orWhere('size_peti', 'like', "%$search%");
$tipePetiQuery->where('type', 'like', "%$search%") //mencari type
->orWhere('size_peti', 'like', "%$search%"); //mencari ukuran peti
})
->orWhereHas('kondisipeti', function ($kondisiPetiQuery) use ($search) {
$kondisiPetiQuery->where('nama_kondisi', 'like', "%$search%");
$kondisiPetiQuery->where('nama_kondisi', 'like', "%$search%"); //mencari nama kondisi
})
->orWhere('packing_no', 'like', "%$search%")
->orWhere('status', 'like', "%$search%");
->orWhere(function ($statusQuery) use ($search) {
if (strtolower($search) === 'ada') {
$statusQuery->where('status_isi', 1);
} elseif (strtolower($search) === 'tidak ada') {
$statusQuery->where('status_isi', 0);
} else {
$statusQuery->where('status_isi', 'like', "%$search%");
}
}) //mencari status isi ADA atau TIDAK ADA
->orWhere('warna', 'like', "%$search%")
->orWhere('packing_no', 'like', "%$search%"); //mencari packing no
// ->orWhere('status', 'like', "%$search%");
});
}

2
resources/views/dashboard/Master_Data/Customer/index.blade.php

@ -18,8 +18,6 @@
href="#">Import Data Customer</a>
<a class="dropdown-item" href="{{ route('dashboard.ReportCustomer.export') }}"
target="_blank">Export Data Customer</a>
{{-- <div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a> --}}
</div>
</li>
</ul>

1
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php

@ -12,7 +12,6 @@
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<!-- cara data table buatan sendiri -->
<div class="card shadow mb-4">
<nav class="navbar navbar-expand navbar-light bg-light mb-4 py-3" style="border-bottom: 1px solid #ddd;">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peti</h5>

34
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php

@ -8,10 +8,6 @@
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
}
table {
width: 100%;
border-collapse: collapse;
@ -25,22 +21,44 @@
th,
td {
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
/* Lanskap */
@page {
size: 15cm 8cm;
/* Perubahan lebar dan tinggi sesuai lanskap */
margin: 0;
}
body {
margin: 0.5cm;
}
/* Atur ukuran gambar logo */
.logo {
width: 100px;
height: 100px;
}
/* Atur ukuran gambar QR Code */
.qrcode {
width: 150px;
height: 150px;
}
</style>
</head>
<body>
<table style="width:100%" class="table table-bordered">
<table style="width:100%; margin-top: 10px;" class="table table-bordered">
<tr>
<td rowspan="2">
<img src="data:image/jpeg;base64,<?= base64_encode(file_get_contents('assets/img/istw_black&white.jpg')) ?>"
alt="Logo ISTW" width="100" height="100">
alt="Logo ISTW" class="logo">
</td>
<td>PETI NUMBER</td>
<td>BARCODE</td>
@ -50,7 +68,7 @@
{{ $peti->fix_lot }}
</td>
<td rowspan="4">
<img src="data:image/svg+xml;base64,{{ $qrcode }}" alt="QR Code" />
<img src="data:image/svg+xml;base64,{{ $qrcode }}" alt="QR Code" class="qrcode">
</td>
</tr>
<tr>

1
resources/views/dashboard/Master_Data/Warehouse/index.blade.php

@ -68,7 +68,6 @@
</tbody>
</table>
</div>
</div>
</div>
@elseif(auth()->user()->role_id == 2)

4
resources/views/layouts/sidebar.blade.php

@ -67,9 +67,9 @@
aria-labelledby="headingHistory" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'history-peminjaman' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPeminjaman') }}">Peminjaman</a>
href="{{ route('dashboard.history.historyPeminjaman') }}">Peti Out</a>
<a class="collapse-item {{ $active == 'history-pengembalian' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPengembalian') }}">Pengembalian</a>
href="{{ route('dashboard.history.historyPengembalian') }}">Peti In</a>
<a class="collapse-item {{ $active == 'history-transfer' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyTransfer') }}">Transfer</a>
</div>

4
resources/views/pages/layouts/sidebar_user.blade.php

@ -65,9 +65,9 @@
aria-labelledby="headingHistory" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'history-peminjaman' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPeminjaman') }}">Peminjaman</a>
href="{{ route('dashboard.history.historyPeminjaman') }}">Peti Out</a>
<a class="collapse-item {{ $active == 'history-pengembalian' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyPengembalian') }}">Pengembalian</a>
href="{{ route('dashboard.history.historyPengembalian') }}">Peti In</a>
<a class="collapse-item {{ $active == 'history-transfer' ? 'active' : '' }}"
href="{{ route('dashboard.history.historyTransfer') }}">Transfer</a>
</div>

3
resources/views/pages/user/Master_Data/Customer/index.blade.php

@ -12,7 +12,7 @@
<thead>
<tr>
<th class="text-center">No</th>
<th>Nama</th>
<th>Nama Customer</th>
<th>Kode Customer</th>
<th>No. Telepon</th>
<th>Alamat</th>
@ -31,7 +31,6 @@
<td>{{ $data_customer->address }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>

27
resources/views/pages/user/Master_Data/Manajemen_Peti/Peti/index.blade.php

@ -37,34 +37,45 @@
<thead>
<tr>
<th class="text-center" style="width: 10px">No</th>
<th><input type="checkbox" class="checkbox " id="selectAll"></th>
<th>Fix Lot</th>
<th>User</th>
<th>Customer</th>
<th>GD</th>
<th>Kode Customer</th>
<th>Tipe Peti</th>
<th>Ukuran Peti</th>
<th>Lot No</th>
<th>Kondisi Peti</th>
<th>Packing No</th>
<th>Status</th>
<th>GD</th>
<th>Kondisi Peti</th>
<th>Isi Peti</th>
<th>Warna Peti</th>
</tr>
</thead>
<tbody>
@forelse ($peti as $data_peti)
<tr>
<td>{{ $i++ }}</td>
<td><input type="checkbox" class="checkbox" value="{{ $data_peti->id }}">
</td>
<td>{{ $data_peti->fix_lot }}</td>
<td>{{ $data_peti->created_by }}</td>
<td>{{ $data_peti->customer->name }}</td>
<td>{{ $data_peti->warehouse->name }}</td>
<td>{{ $data_peti->customer->code_customer }}</td>
<td>{{ $data_peti->tipe_peti->type }}</td>
<td>{{ $data_peti->tipe_peti->size_peti }}</td>
<td>{{ $data_peti->customer->lot_no }}</td>
<td>{{ $data_peti->kondisipeti->nama_kondisi }}</td>
<td class="text-right">{{ $data_peti->packing_no }}</td>
<td>{{ $data_peti->status }}</td>
<td>{{ $data_peti->warehouse->name }}</td>
<td>{{ $data_peti->kondisipeti->nama_kondisi }}</td>
<td>
@if ($data_peti->status_isi == 1)
ADA
@elseif($data_peti->status_isi == 0)
TIDAK ADA
@else
TIDAK ADA
@endif
</td>
<td>{{ $data_peti->warna }}</td>
</tr>
@empty
<tr>

6
resources/views/pages/user/Master_Data/Manajemen_Peti/kondisi_peti/index.blade.php

@ -20,15 +20,13 @@
@php
$nokondisi = 1;
@endphp
@forelse ($kondisiPeti as $data_kondisiPeti)
@foreach ($kondisiPeti as $data_kondisiPeti)
<tr>
<td class="text-center">{{ $nokondisi++ }}</td>
<td>{{ $data_kondisiPeti->nama_kondisi }}</td>
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
@endforeach
</tbody>
</table>
</div>

1
resources/views/pages/user/Master_Data/Manajemen_Peti/tipe_peti/index.blade.php

@ -29,7 +29,6 @@
<td>{{ $data_typepeti->description }}</td>
</tr>
@empty
<p>Data Kosong</p>
@endforelse
</tbody>
</table>

1
resources/views/pages/user/Master_Data/Warehouse/index.blade.php

@ -17,7 +17,6 @@
<th>Nama Gudang</th>
<th>Deskripsi</th>
<th>Alamat</th>
{{-- <th class="text-center">Action</th> --}}
</tr>
</thead>
<tbody>

1
resources/views/pages/user/dashboard/disposal/index.blade.php

@ -34,6 +34,7 @@
@endforelse
</tbody>
</table>
</div>
</div>
</div>

Loading…
Cancel
Save