Browse Source

update tampilan

master
Gunawan19621 11 months ago
parent
commit
c2f7abec02
  1. 156
      app/Http/Controllers/HistoryController.php
  2. 20
      app/Http/Controllers/PeminjamanController.php
  3. 5
      app/Models/User.php
  4. 4
      resources/views/dashboard/History/Peminjaman/index.blade.php
  5. 89
      resources/views/dashboard/History/Pengembalian/index.blade.php
  6. 35
      resources/views/dashboard/Master_Data/Customer/index.blade.php
  7. 39
      resources/views/dashboard/Master_Data/Manajemen_Peti/Kondisi_Peti/index.blade.php
  8. 41
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php
  9. 2
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php
  10. 33
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php
  11. 4
      resources/views/dashboard/Master_Data/Report/Pattern_lot_peti/index.blade.php
  12. 15
      resources/views/dashboard/Master_Data/User/index.blade.php
  13. 40
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  14. 27
      resources/views/layouts/sidebar.blade.php

156
app/Http/Controllers/HistoryController.php

@ -11,18 +11,7 @@ use Illuminate\Support\Facades\Log;
class HistoryController extends Controller
{
// public function historyPeminjaman()
// {
// $data = [
// 'peminjaman' => asset_status::withTrashed()->orderBy('created_at', 'desc')->get(),
// 'warehouse' => m_warehouse::get(),
// 'active' => 'history-peminjaman',
// ];
// return view('dashboard.History.Peminjaman.index', $data);
// }
// Halaman index history peminjaman
public function historyPeminjaman(Request $request)
{
$perPage = $request->input('perPage', 5);
@ -33,6 +22,19 @@ class HistoryController extends Controller
//logika pencarian
$search = $request->input('search') ?? '';
if ($search) {
$searchArray = explode(' - ', $search);
if (count($searchArray) === 2) {
// Case: DPM - B100X63
list($codeCustomer, $typePeti) = $searchArray;
$query->whereHas('peti.customer', function ($customerQuery) use ($codeCustomer) {
$customerQuery->where('code_customer', 'like', "%$codeCustomer%");
})->whereHas('peti.tipe_peti', function ($tipePetiQuery) use ($typePeti) {
$tipePetiQuery->where('type', 'like', "%$typePeti%");
});
} else {
// Case: Other scenarios
$query->where(function ($q) use ($search) {
$q->where('mobile_id', 'like', "%$search%")
->orWhereHas('peti', function ($warehouseQuery) use ($search) {
@ -41,23 +43,12 @@ class HistoryController extends Controller
->orWhereHas('customer', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%");
})
// ->orWhereHas('peti.customer', function ($customerQuery) use ($search) {
// $customerQuery->where('code_customer', 'like', "%$search%");
// })
// ->orWhereHas('peti.tipe_peti', function ($tipePetiQuery) use ($search) {
// $tipePetiQuery->where('type', 'like', "%$search%");
// })
// ->orWhere(function ($combinedQuery) use ($search) {
// // Pisahkan code customer dan tipe peti dari pencarian
// list($codeCustomer, $typePeti) = explode(' - ', $search);
// // Cek kesamaan code customer dan tipe peti
// $combinedQuery->whereHas('peti.customer', function ($customerQuery) use ($codeCustomer) {
// $customerQuery->where('code_customer', 'like', "%$codeCustomer%");
// })->whereHas('peti.tipe_peti', function ($tipePetiQuery) use ($typePeti) {
// $tipePetiQuery->where('type', 'like', "%$typePeti%");
// });
// })
->orWhereHas('peti.customer', function ($customerQuery) use ($search) {
$customerQuery->where('code_customer', 'like', "%$search%");
})
->orWhereHas('peti.tipe_peti', function ($tipePetiQuery) use ($search) {
$tipePetiQuery->where('type', 'like', "%$search%");
})
->orWhere(function ($dateQuery) use ($search) {
try {
// Format tanggal yang diharapkan dari input pengguna
@ -87,6 +78,7 @@ class HistoryController extends Controller
});
});
}
}
if ($perPage == 'Semua') {
$chunkSize = 100;
@ -114,15 +106,117 @@ class HistoryController extends Controller
return view('dashboard.History.Peminjaman.index', $data);
}
public function historyPengembalian()
// Halaman index history pengembalian
public function historyPengembalian(Request $request)
{
$perPage = $request->input('perPage', 5);
$query = asset_status::with(['customer', 'warehouseId', 'warehouse', 'warehouseEnter', 'kondisi_peti'])
->where('status', '=', 1)
->orderBy('created_at', 'desc');
// Logika pencarian
$search = $request->input('search') ?? '';
if ($search) {
$query->where(function ($q) use ($search) {
$q->where('mobile_id', 'like', "%$search%")
->orWhereHas('peti', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('fix_lot', 'like', "%$search%");
}) // sudah cari fix lot
->orWhereHas('customer', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%");
}) // sudah cari nama customer
->orWhere(function ($dateQuery) use ($search) {
try {
// Format tanggal yang diharapkan dari input pengguna
$formattedDate = \Carbon\Carbon::createFromFormat('d-m-Y', $search)->format('Y-m-d');
// Cek kesamaan tanggal
$dateQuery->whereDate('exit_at', $formattedDate);
} catch (\Exception $e) {
Log::error('Error parsing date: ' . $e->getMessage());
}
})
->orWhere(function ($dateQuery) use ($search) {
try {
// Format tanggal yang diharapkan dari input pengguna
$formattedDate = \Carbon\Carbon::createFromFormat('d-m-Y', $search)->format('Y-m-d');
// Cek kesamaan tanggal
$dateQuery->whereDate('est_pengembalian', $formattedDate);
} catch (\Exception $e) {
Log::error('Error parsing date: ' . $e->getMessage());
}
}) // sudah cari est pengembalian (tanggal pengembalian)
->orWhere('exit_pic', 'like', "%$search%") // sudah cari exit pic (nama peminjam)
->orWhereHas('warehouse', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%")
->orWhere('address', 'like', "%$search%");
}) // sudah cari warehouse (lokasi peminjaman)
->orWhere(function ($dateQuery) use ($search) {
try {
// Format tanggal yang diharapkan dari input pengguna
$formattedDate = \Carbon\Carbon::createFromFormat('d-m-Y', $search)->format('Y-m-d');
// Cek kesamaan tanggal
$dateQuery->whereDate('enter_at', $formattedDate);
} catch (\Exception $e) {
Log::error('Error parsing date: ' . $e->getMessage());
}
}) // sudah cari enter at (tanggal pengembalian)
->orWhere('enter_pic', 'like', "%$search%") // sudah cari enter pic (nama pengembali)
->orWhereHas('warehouseEnter', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%");
}) // sudah cari warehouse enter (lokasi pengembalian)
->orWhereHas('kondisi_peti', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('nama_kondisi', 'like', "%$search%");
}) // sudah cari kondisi peti
->orWhere(function ($statusQuery) use ($search) {
if (strtolower($search) === 'return') {
$statusQuery->where('status', 1);
} else {
$statusQuery->where('status', 'like', "%$search%");
}
}); // sudah cari status
});
}
// Periksa apakah perPage adalah 'Semua'
if ($perPage == 'Semua') {
$chunkSize = 100;
$stores = new Collection();
$currentPage = 1;
$query->chunk($chunkSize, function ($storesChunk) use ($stores, &$currentPage) {
foreach ($storesChunk as $store) {
$store->setAttribute('i', ($currentPage - 1) * $storesChunk->perPage() + $store->getQueueableId());
$stores->push($store);
$currentPage++;
}
});
} else {
// Hitung halaman berdasarkan parameter halaman yang diberikan atau default ke halaman pertama
$page = $request->input('page') ?? 1;
// Paginasi dengan parameter halaman
$stores = $query->paginate($perPage, ['*'], 'page', $page);
// Hitung nomor urutan untuk setiap item di halaman
$stores->each(function ($store) use ($page, $perPage) {
$store->setAttribute('i', ($page - 1) * $perPage + $store->getQueueableId());
});
}
$data = [
'peminjaman' => asset_status::withTrashed()->orderBy('created_at', 'desc')->get(),
'peminjaman' => $stores,
'warehouse' => m_warehouse::get(),
'i' => ($stores->currentPage() - 1) * $stores->perPage() + 1,
'search' => $search,
'active' => 'history-pengembalian',
];
return view('dashboard.History.Pengembalian.index', $data);
}
// Halaman index history transfer
public function historyTransfer()
{
$data = [

20
app/Http/Controllers/PeminjamanController.php

@ -32,6 +32,19 @@ class PeminjamanController extends Controller
//logika pencarian
$search = $request->input('search') ?? '';
if ($search) {
$searchArray = explode(' - ', $search);
if (count($searchArray) === 2) {
// Case: DPM - B100X63
list($codeCustomer, $typePeti) = $searchArray;
$query->whereHas('peti.customer', function ($customerQuery) use ($codeCustomer) {
$customerQuery->where('code_customer', 'like', "%$codeCustomer%");
})->whereHas('peti.tipe_peti', function ($tipePetiQuery) use ($typePeti) {
$tipePetiQuery->where('type', 'like', "%$typePeti%");
});
} else {
// Case: Other scenarios
$query->where(function ($q) use ($search) {
$q->where('mobile_id', 'like', "%$search%")
->orWhereHas('peti', function ($warehouseQuery) use ($search) {
@ -40,6 +53,12 @@ class PeminjamanController extends Controller
->orWhereHas('customer', function ($warehouseQuery) use ($search) {
$warehouseQuery->where('name', 'like', "%$search%");
})
->orWhereHas('peti.customer', function ($customerQuery) use ($search) {
$customerQuery->where('code_customer', 'like', "%$search%");
})
->orWhereHas('peti.tipe_peti', function ($tipePetiQuery) use ($search) {
$tipePetiQuery->where('type', 'like', "%$search%");
})
->orWhere(function ($dateQuery) use ($search) {
try {
// Format tanggal yang diharapkan dari input pengguna
@ -69,6 +88,7 @@ class PeminjamanController extends Controller
});
});
}
}
if ($perPage == 'Semua') {
$chunkSize = 100;

5
app/Models/User.php

@ -44,6 +44,11 @@ class User extends Authenticatable implements JWTSubject
return $this->belongsTo(m_warehouse::class, 'warehouse_id')->withTrashed();
}
public function role()
{
return $this->belongsTo(m_role::class, 'role_id')->withTrashed();
}
/**
* The attributes that should be hidden for serialization.
*

4
resources/views/dashboard/History/Peminjaman/index.blade.php

@ -64,7 +64,7 @@
<th>Kode</th>
<th>Tgl Peminjaman</th>
<th>PJ Peminjaman</th>
<th>WH Peminjam</th>
<th>GD Peminjam</th>
</tr>
</thead>
<tbody>
@ -75,7 +75,7 @@
<td>{{ $data_peminjaman->peti->customer->name }}</td>
<td>{{ $data_peminjaman->peti->customer->code_customer }} -
{{ $data_peminjaman->peti->tipe_peti->type }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d-m-Y') }}</td>
<td>{{ $data_peminjaman->exit_pic }}</td>
<td>{{ $data_peminjaman->warehouse->name }}</td>
</tr>

89
resources/views/dashboard/History/Pengembalian/index.blade.php

@ -18,8 +18,38 @@
</div>
</div>
<div class="card-body">
<div class="row mb-3">
<div class="col-6">
<!-- Fitur page -->
<form method="GET" action="{{ route('dashboard.history.historyPengembalian') }}">
<label for="perPage">Tampilkan:</label>
<select id="perPage" name="perPage" class="form-select" onchange="this.form.submit()">
<option value="5" {{ request('perPage', 5) == '5' ? 'selected' : '' }}>5</option>
<option value="10" {{ request('perPage', 5) == '10' ? 'selected' : '' }}>10</option>
<option value="25" {{ request('perPage', 5) == '25' ? 'selected' : '' }}>25</option>
<option value="50" {{ request('perPage', 5) == '50' ? 'selected' : '' }}>50</option>
<option value="100" {{ request('perPage', 5) == '100' ? 'selected' : '' }}>100</option>
<option value="500" {{ request('perPage', 5) == '500' ? 'selected' : '' }}>500</option>
<option value="{{ $peminjaman->total() }}"
{{ request('perPage', 5) == $peminjaman->total() ? 'selected' : '' }}>Semua</option>
</select>
<input type="hidden" name="search" value="{{ $search }}">
<input type="hidden" name="page" value="{{ request('page', 1) }}">
</form>
</div>
<div class="col-6 d-flex justify-content-end mb-3">
<!-- Fitur search -->
<form method="GET" action="{{ route('dashboard.history.historyPengembalian') }}" class="form-inline">
<input type="text" name="search" class="form-control mr-2" placeholder="Cari..."
value="{{ $search }}">
<input type="hidden" name="page" value="1">
<input type="hidden" name="perPage" value="{{ request('perPage', 5) }}">
<button type="submit" class="btn btn-primary">Cari</button>
</form>
</div>
</div>
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
<table class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th>No</th>
@ -28,26 +58,22 @@
<th>Tgl Peinjaman</th>
<th>Estimasi Pengembalian</th>
<th>PJ Peminjaman</th>
<th>Asal WH Peminjaman</th>
<th>Asal GD Peminjaman</th>
<th>Tgl Pengembalian</th>
<th>PJ Pengembalian</th>
<th>Tujuan WH Pengembalian</th>
<th>Tujuan GD Pengembalian</th>
<th>Kondisi Peti</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@php
$no_peminjaman = 1;
@endphp
@forelse ($peminjaman as $data)
@if ($data->enter_warehouse !== null)
<tr>
<td>{{ $no_peminjaman++ }}</td>
<td>{{ $i++ }}</td>
<td>{{ $data->peti->fix_lot }}</td>
<td>{{ $data->peti->customer->name }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d-m-Y') }}</td>
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d-m-Y') }}</td>
<td>{{ $data->exit_pic }}</td>
<td>
@if ($data->exit_warehouse)
@ -85,19 +111,54 @@
@endif
</td>
<td>
@if ($data->enter_warehouse === null)
Not Return
@else
@if ($data->status == 1)
Return
@elseif($data->status == 0)
Not Return
@endif
</td>
</tr>
@endif
@empty
<tr>
<td colspan="12" class="text-center">Data Kosong</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="row mt-3">
<div class="col-4">
<!-- Tampilkan jumlah data yang ditampilkan -->
@if (!$peminjaman->isEmpty())
<p class="d-inline-block">Showing {{ $peminjaman->firstItem() }} to
{{ $peminjaman->lastItem() }} of
{{ $peminjaman->total() }} entries</p>
@endif
</div>
<div class="col-8 d-flex justify-content-end">
@if ($peminjaman->total() > $peminjaman->perPage())
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center">
<li class="page-item {{ $peminjaman->onFirstPage() ? 'disabled' : '' }}">
<a class="page-link"
href="{{ $peminjaman->appends(['perPage' => Request::get('perPage')])->url(1) }}"
aria-label="First">
<span aria-hidden="true">First</span>
</a>
</li>
{{ $peminjaman->appends(['perPage' => Request::get('perPage')])->links() }}
<li class="page-item {{ $peminjaman->hasMorePages() ? '' : 'disabled' }}">
<a class="page-link"
href="{{ $peminjaman->appends(['perPage' => Request::get('perPage')])->url($peminjaman->lastPage()) }}"
aria-label="Last">
<span aria-hidden="true">Last</span>
</a>
</li>
</ul>
</nav>
@endif
</div>
</div>
</div>
</div>
@endsection

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

@ -3,22 +3,27 @@
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<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 Customer</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.customer.create') }}" class="btn btn-success btn-icon-split">
<span class="text">+ Tambah data</span>
</a>
<a href="#" class="btn btn-info btn-icon-split" data-toggle="modal"
data-target="#importDataModal">
<span class="text">Import Customer</span>
</a>
</div>
</div>
</div>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<button type="button" class="btn btn-info dropdown-toggle mb-1" id="navbarDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('dashboard.customer.create') }}">Tambah Data
Customer</a>
<a class="dropdown-item" data-toggle="modal" data-target="#importDataModal"
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>
</nav>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">

39
resources/views/dashboard/Master_Data/Manajemen_Peti/Kondisi_Peti/index.blade.php

@ -3,23 +3,26 @@
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<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 Kondisi Peti</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">Tambah Kondisi Peti</span>
</a>
<a href="#" class="btn btn-info btn-icon-split" data-toggle="modal"
data-target="#importDataModal">
<span class="text">Import Kondisi Peti</span>
</a>
</div>
</div>
</div>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<button type="button" class="btn btn-info dropdown-toggle mb-1" id="navbarDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<a class="dropdown-item" data-toggle="modal" data-target="#tambahDataModal"
href="#">Tambah Kondisi Peti</a>
<a class="dropdown-item" data-toggle="modal" data-target="#importDataModal"
href="#">Import Kondisi Peti</a>
<a class="dropdown-item" href="{{ route('dashboard.ReportKondisiPeti.export') }}"
target="_blank">Export Kondisi
Peti</a>
</div>
</li>
</ul>
</nav>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
@ -117,8 +120,8 @@
</button>
</div>
<div class="modal-body">
<form action="{{ route('dashboard.kondisipeti.store') }}" method="POST" enctype="multipart/form-data"
id="inputanForm">
<form action="{{ route('dashboard.kondisipeti.store') }}" method="POST"
enctype="multipart/form-data" id="inputanForm">
@csrf
<div class="form-group">
<div class="form-group">

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

@ -14,35 +14,33 @@
@if (auth()->user()->role_id == 1)
<!-- cara data table buatan sendiri -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-7">
<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>
</div>
<div class="col-5 d-flex justify-content-end">
<!-- Example single danger button -->
<div class="btn-group">
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<button type="button" class="btn btn-info dropdown-toggle mb-1" id="navbarDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ route('dashboard.peti.create') }}">Tambah Peti</a>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('dashboard.peti.create') }}">Tambah Data
Peti</a>
<form action="{{ route('dashboard.all-pdf.cetakpdf') }}" method="GET" id="pdfForm"
target="_blank">
@csrf
<input type="hidden" name="peti_ids" id="peti_ids" value="">
<button type="submit" class="dropdown-item">Cetak Label Peti</button>
</form>
<a class="dropdown-item" href="#" data-toggle="modal"
data-target="#importDataModal">Import Data Peti</a>
<a class="dropdown-item" data-toggle="modal" data-target="#importDataModal"
href="#">Import Data Peti</a>
<a class="dropdown-item" href="'dashboard.Pettern_Lot_Peti.export') }}" target="_blank">Export
Data Peti</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" id="hapusPetiBtn">Hapus Peti</a>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
</nav>
<div class="card-body">
<div class="row mb-3">
<div class="col-6">
@ -56,7 +54,8 @@
<option value="50" {{ request('perPage', 5) == '50' ? 'selected' : '' }}>50</option>
<option value="100" {{ request('perPage', 5) == '100' ? 'selected' : '' }}>100</option>
<option value="500" {{ request('perPage', 5) == '500' ? 'selected' : '' }}>500</option>
<option value="1000" {{ request('perPage', 5) == '1000' ? 'selected' : '' }}>1000</option>
<option value="1000" {{ request('perPage', 5) == '1000' ? 'selected' : '' }}>1000
</option>
<option value="2500" {{ request('perPage', 5) == '2500' ? 'selected' : '' }}>2500
</option>
<option value="5000" {{ request('perPage', 5) == '5000' ? 'selected' : '' }}>5000
@ -88,7 +87,7 @@
<th>Fix Lot</th>
<th>User</th>
<th>Customer</th>
<th>WH</th>
<th>GD</th>
<th>Kode Customer</th>
<th>Tipe Peti</th>
<th>Ukuran Peti</th>
@ -123,8 +122,8 @@
<a href="{{ route('dashboard.peti.edit', [$data_peti->id]) }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i>
</a>
<form action="{{ route('dashboard.peti.destroy', $data_peti->id) }}" method="POST"
style="display: inline;">
<form action="{{ route('dashboard.peti.destroy', $data_peti->id) }}"
method="POST" style="display: inline;">
@csrf
@method('DELETE')
<button type="submit"

2
resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php

@ -19,7 +19,7 @@
<label for="customer_id" class="col-form-label">Customer:</label>
<input class="form-control" value="{{ $peti->customer->name }}" readonly>
<label for="warehouse_id" class="col-form-label">Warehouse:</label>
<label for="warehouse_id" class="col-form-label">Gudang:</label>
<input class="form-control" value="{{ $peti->warehouse->name }}" readonly>
<label for="kondisipeti_id" class="col-form-label">Kondisi Peti:</label>

33
resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php

@ -3,22 +3,25 @@
@include('layouts.components.alert-prompt')
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<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 Tipe Peti</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Tipe Peti</span>
</a>
<a href="#" class="btn btn-info btn-icon-split" data-toggle="modal"
data-target="#importDataModal">
<span class="text">Import Tipe Peti</span>
</a>
</div>
</div>
</div>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<button type="button" class="btn btn-info dropdown-toggle mb-1" id="navbarDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('dashboard.typepeti.create') }}">Tambah Tipe Peti</a>
<a class="dropdown-item" data-toggle="modal" data-target="#importDataModal"
href="#">Import Tipe Peti</a>
<a class="dropdown-item" href="{{ route('dashboard.ReportTipePeti.export') }}"
target="_blank">Export Tipe
Peti</a>
</div>
</li>
</ul>
</nav>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">

4
resources/views/dashboard/Master_Data/Report/Pattern_lot_peti/index.blade.php

@ -14,7 +14,7 @@
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Report Pettern Lot Peti</h5>
<h5 class="m-0 font-weight-bold text-primary mt-2">Report Peti</h5>
</div>
<div class="col-6 text-right">
<a href="{{ route('dashboard.Pettern_Lot_Peti.export') }}" class="btn btn-info btn-icon-split ml-auto"
@ -67,7 +67,7 @@
<th>No</th>
<th>FIX LOT</th>
<th>Customer</th>
<th>WH</th>
<th>GD</th>
<th>CODE CUSTOMER</th>
<th>TYPE PETI</th>
<th>UKURAN PETI</th>

15
resources/views/dashboard/Master_Data/User/index.blade.php

@ -25,21 +25,11 @@
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th>Gudang</th>
<th>Status</th>
<th class="text-center">Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>No</th>
<th>Nama</th>
<th>Email</th>
<th>No. HP</th>
<th>Alamat</th>
<th>Ditugaskan</th>
<th class="text-center">Action</th>
</tr>
</tfoot>
<tbody>
@php
$noUser = 1;
@ -52,6 +42,7 @@
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td>
<td>{{ isset($data->address) ? $data->address : '-' }}</td>
<td>{{ $data->warehouse->name }}</td>
<td>{{ $data->role->name }}</td>
<td class="text-center">
<a href="{{ route('dashboard.user.show', [$data->id]) }}">
<i class="fa fa-eye mr-2" style="font-size: 20px"></i>

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

@ -6,23 +6,25 @@
@if (auth()->user()->role_id == 1)
<div class="card shadow mb-4">
<div class="card-header py-3">
<div class="row">
<div class="col-6">
<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 Gudang</h5>
</div>
<div class="col-6 text-right">
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal"
data-target="#tambahDataModal">
<span class="text">Tambah Data Gudang</span>
</a>
<a href="#" class="btn btn-info btn-icon-split" data-toggle="modal"
data-target="#importDataModal">
<span class="text">Import Warehouse</span>
</a>
</div>
</div>
</div>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<button type="button" class="btn btn-info dropdown-toggle mb-1" id="navbarDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
<div class="dropdown-menu dropdown-menu-right animated--grow-in" aria-labelledby="navbarDropdown">
<a class="dropdown-item" data-toggle="modal" data-target="#tambahDataModal"
href="#">Tambah Data Gudang</a>
<a class="dropdown-item" data-toggle="modal" data-target="#importDataModal"
href="#">Import Data Gudang</a>
<a class="dropdown-item" href="{{ route('dashboard.ReportWarehouse.export') }}"
target="_blank">Export Data Gudang</a>
</div>
</li>
</ul>
</nav>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0">
@ -79,7 +81,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data Warehouse</h5>
<h5 class="modal-title" id="exampleModalLabel">Import Data Gudang</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@ -89,7 +91,7 @@
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">File Import Warehouse:</label>
<label for="name" class="col-form-label">File Import Gudang:</label>
<input type="file" name="file" class="form-control" accept=".xlsx, .xls, .csv"
required>
<small class="text-muted">Pilih file Excel (.xlsx, .xls) atau CSV (.csv) untuk
@ -98,7 +100,7 @@
<!-- Tombol untuk mengunduh file -->
<div class="form-group">
<a href="{{ asset('assets/file/Format_Import_Warehouse.csv') }}" class="btn btn-primary"
download>Unduh Format Warehouse</a>
download>Unduh Format Gudang</a>
</div>
</div>
<div class="modal-footer">

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

@ -58,7 +58,7 @@
<li
class="nav-item {{ $active == 'history-peminjaman' || $active == 'history-pengembalian' || $active == 'history-transfer' ? 'active' : '' }}">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsehistory"
aria-controls="collapsehistory">
aria-expanded="true" aria-controls="collapsehistory">
<i class="fas fa-history"></i>
<span>History</span>
</a>
@ -138,34 +138,33 @@
<li class="nav-item {{ $active == 'menu-warehouse' ? 'active' : '' }}">
<a class="nav-link" href="{{ route('dashboard.warehouse.index') }}">
<i class="fas fa-fw fa-warehouse"></i>
<span>Warehouse</span>
<span>Gudang</span>
</a>
</li>
<li
class="nav-item {{ $active == 'menu-Pettern_Lot_Peti' || $active == 'menu-Stok_Opname' || $active == 'menu-ReportCustomer' || $active == 'menu-ReportWarehouse' || $active == 'menu-ReportKondisiPeti' || $active == 'menu-ReportTypePeti' ? 'active' : '' }}">
class="nav-item {{ $active == 'menu-Pettern_Lot_Peti' || $active == 'menu-Stok_Opname' ? 'active' : '' }}">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsereport"
aria-expanded="true" aria-controls="collapsereport">
<i class="fas fa-fw fa-file-alt"></i>
<span>Report</span>
</a>
<div id="collapsereport"
class="collapse {{ $active == 'menu-Pettern_Lot_Peti' || $active == 'menu-Stok_Opname' || $active == 'menu-ReportCustomer' || $active == 'menu-ReportWarehouse' || $active == 'menu-ReportKondisiPeti' || $active == 'menu-ReportTypePeti' ? 'show' : '' }}"
class="collapse {{ $active == 'menu-Pettern_Lot_Peti' || $active == 'menu-Stok_Opname' ? 'show' : '' }}"
aria-labelledby="headingreport" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item {{ $active == 'menu-Pettern_Lot_Peti' ? 'active' : '' }}"
href="{{ route('dashboard.Pettern_Lot_Peti.index') }}">PATTERN LOT
PETI</a>
href="{{ route('dashboard.Pettern_Lot_Peti.index') }}">Report Peti</a>
<a class="collapse-item {{ $active == 'menu-Stok_Opname' ? 'active' : '' }}"
href="{{ route('dashboard.StokOpname.index') }}">Stok Opname</a>
<a class="collapse-item {{ $active == 'menu-ReportCustomer' ? 'active' : '' }}"
href="{{ route('dashboard.ReportCustomer.index') }}">Customer</a>
<a class="collapse-item {{ $active == 'menu-ReportWarehouse' ? 'active' : '' }}"
href="{{ route('dashboard.ReportWarehouse.index') }}">Warehouse</a>
<a class="collapse-item {{ $active == 'menu-ReportKondisiPeti' ? 'active' : '' }}"
href="{{ route('dashboard.ReportKondisiPeti.index') }}">Kondisi Peti</a>
<a class="collapse-item {{ $active == 'menu-ReportTypePeti' ? 'active' : '' }}"
href="{{ route('dashboard.ReportTipePeti.index') }}">Tipe Peti</a>
{{-- <a class="collapse-item {{ $active == 'menu-ReportCustomer' ? 'active' : '' }}"
href="{{ route('dashboard.ReportCustomer.index') }}">Customer</a> --}}
{{-- <a class="collapse-item {{ $active == 'menu-ReportWarehouse' ? 'active' : '' }}"
href="{{ route('dashboard.ReportWarehouse.index') }}">Warehouse</a> --}}
{{-- <a class="collapse-item {{ $active == 'menu-ReportKondisiPeti' ? 'active' : '' }}"
href="{{ route('dashboard.ReportKondisiPeti.index') }}">Kondisi Peti</a> --}}
{{-- <a class="collapse-item {{ $active == 'menu-ReportTypePeti' ? 'active' : '' }}"
href="{{ route('dashboard.ReportTipePeti.index') }}">Tipe Peti</a> --}}
</div>
</div>
</li>

Loading…
Cancel
Save