diff --git a/app/Http/Controllers/PeminjamanController.php b/app/Http/Controllers/PeminjamanController.php index a6d3aa1..44b61d3 100644 --- a/app/Http/Controllers/PeminjamanController.php +++ b/app/Http/Controllers/PeminjamanController.php @@ -231,7 +231,15 @@ class PeminjamanController extends Controller ->where('fix_lot', 'LIKE', '%' . $request->get('q') . '%') ->where(function ($query) { $query->whereHas('assetStatuses', function ($subquery) { - $subquery->where('status', '!=', 0) + $subquery->where(function ($statusQuery) { + // Tampilkan data jika status tidak sama dengan 0 + $statusQuery->where('status', '!=', 0) + // Tampilkan data jika status sama dengan 0 dan deleted_at tidak null + ->orWhere(function ($deletedQuery) { + $deletedQuery->where('status', 0) + ->whereNotNull('deleted_at'); + }); + }) ->where('created_at', '=', function ($maxQuery) { $maxQuery->selectRaw('MAX(created_at)') ->from('asset_statuses') diff --git a/app/Http/Controllers/PengembalianController.php b/app/Http/Controllers/PengembalianController.php index 33639f1..db407a8 100644 --- a/app/Http/Controllers/PengembalianController.php +++ b/app/Http/Controllers/PengembalianController.php @@ -8,6 +8,7 @@ use App\Models\asset_status; use App\Models\Kondisi_Peti; use Illuminate\Http\Request; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Auth; use App\Http\Requests\ValidasiUpdatePengembalian; @@ -19,7 +20,11 @@ class PengembalianController extends Controller $perPage = $request->input('perPage', 5); $query = asset_status::with(['customer', 'warehouseId', 'warehouse', 'warehouseEnter', 'kondisi_peti']) ->where('status', '=', 1) - ->orderBy('created_at', 'desc'); + ->join(DB::raw('(SELECT peti_id, MAX(updated_at) as latest_update FROM asset_statuses GROUP BY peti_id) as latest_peti'), function ($join) { + $join->on('asset_statuses.peti_id', '=', 'latest_peti.peti_id') + ->on('asset_statuses.updated_at', '=', 'latest_peti.latest_update'); + }) + ->orderBy('asset_statuses.created_at', 'desc'); // Logika pencarian $search = $request->input('search') ?? ''; @@ -124,8 +129,6 @@ class PengembalianController extends Controller return view('dashboard.Pengembalian.index', $data); } - - /** * Show the form for creating a new resource. */ diff --git a/app/Http/Controllers/PetiController.php b/app/Http/Controllers/PetiController.php index fdde58d..ce45c4c 100644 --- a/app/Http/Controllers/PetiController.php +++ b/app/Http/Controllers/PetiController.php @@ -102,7 +102,6 @@ class PetiController extends Controller */ public function store(ValidasiCreatePeti $request) { - // dd($request->all()); try { $currenttype = Auth::user(); @@ -112,9 +111,7 @@ class PetiController extends Controller // Ambil nomor urutan otomatis untuk packing_no $latestPackingNo = Peti::max('packing_no'); $nextPackingNo = $latestPackingNo + 1; - // $validatedData['packing_no'] = $nextPackingNo; $validatedData['packing_no'] = '0' . $nextPackingNo; - // $validatedData['packing_no'] = str_pad($nextPackingNo, 3, '0', STR_PAD_LEFT); // cara untuk menambahkan total digitnya adalah 3 $code_customer = Customer::where('id', $validatedData['customer_id'])->first()->code_customer; $type = Type_peti::where('id', $validatedData['tipe_peti_id'])->first()->type; @@ -126,10 +123,15 @@ class PetiController extends Controller $fixLot = $code_customer . $type . $size_peti . $lot_no . $packing_no; $validatedData['fix_lot'] = $fixLot; + // Merubah warna menjadi kapital + $validatedData['warna'] = strtoupper($validatedData['warna']); + $validatedData['created_by'] = $currenttype->fullname; // Menggunakan nama pengguna sebagai created_by $validatedData['updated_by'] = $currenttype->fullname; // Menggunakan nama pengguna sebagai updated_by - // Buat entri peti baru + // Jika 't_warehouse_id' tidak diset, ambil nilainya dari 'warehouse_id' + $validatedData['t_warehouse_id'] = $validatedData['warehouse_id']; + // dd($validatedData); Peti::create($validatedData); } @@ -176,6 +178,7 @@ class PetiController extends Controller */ public function update(ValidasiUpdatePeti $request, $id) { + // dd($request->all()); try { $currentuser = Auth::user(); $typepeti = Peti::findOrFail($id); @@ -195,12 +198,14 @@ class PetiController extends Controller // Generate nilai 'fix_lot' sesuai format yang diinginkan $fixLot = $code_customer . $type . $size_peti . $lot_no . $packing_no; $validatedData['fix_lot'] = $fixLot; + $validatedData['updated_by'] = $currentuser->fullname; + $validatedData['t_warehouse_id'] = $validatedData['warehouse_id']; // Tambahkan perubahan yang diperlukan ke entitas Peti $typepeti->update($validatedData); - // Menambahkan nama pengguna yang melakukan pembaruan - $typepeti->update(['updated_by' => $currentuser->fullname]); + // // Menambahkan nama pengguna yang melakukan pembaruan + // $typepeti->update(['updated_by' => $currentuser->fullname]); return redirect()->route('dashboard.peti.index')->with('success', 'Data peti berhasil diperbaharui'); } catch (\Throwable $th) { diff --git a/app/Http/Requests/ValidasiCreatePeti.php b/app/Http/Requests/ValidasiCreatePeti.php index 80bf878..da2193d 100644 --- a/app/Http/Requests/ValidasiCreatePeti.php +++ b/app/Http/Requests/ValidasiCreatePeti.php @@ -26,11 +26,13 @@ class ValidasiCreatePeti extends FormRequest 'warna' => 'required|string|max:50', 'customer_id' => 'required|exists:customers,id', 'warehouse_id' => 'required|exists:m_warehouses,id', + 't_warehouse_id' => 'nullable', 'jumlah' => 'required|numeric|min:1', 'date_pembuatan' => 'required|date', 'kondisipeti_id' => 'nullable', 'packing_no' => 'nullable|integer', 'fix_lot' => 'nullable|string|max:100', + 'status_isi' => 'nullable|boolean', ]; } @@ -55,6 +57,7 @@ class ValidasiCreatePeti extends FormRequest 'packing_no.integer' => 'Packing No harus berupa angka!', 'fix_lot.string' => 'Fix Lot harus berupa string!', 'fix_lot.max' => 'Fix Lot maksimal 100 karakter!', + 'status_isi.boolean' => 'Status Isi harus berupa true atau false!', ]; } } diff --git a/app/Http/Requests/ValidasiUpdatePeti.php b/app/Http/Requests/ValidasiUpdatePeti.php index 4cba131..c8df3ed 100644 --- a/app/Http/Requests/ValidasiUpdatePeti.php +++ b/app/Http/Requests/ValidasiUpdatePeti.php @@ -26,10 +26,12 @@ class ValidasiUpdatePeti extends FormRequest 'warna' => 'required|string|max:50', 'customer_id' => 'required|exists:customers,id', 'warehouse_id' => 'required|exists:m_warehouses,id', + 't_warehouse_id' => 'nullable', 'date_pembuatan' => 'required|date', 'kondisipeti_id' => 'nullable', 'packing_no' => 'nullable|integer', 'fix_lot' => 'nullable|string|max:100', + 'status_isi' => 'nullable|boolean', ]; } @@ -53,6 +55,7 @@ class ValidasiUpdatePeti extends FormRequest 'packing_no.integer' => 'Packing No harus berupa angka', 'fix_lot.string' => 'Fix Lot harus berupa string', 'fix_lot.max' => 'Fix Lot maksimal 100 karakter', + 'status_isi.boolean' => 'Status Isi harus berupa true atau false!', ]; } } diff --git a/app/Imports/CustomerImport.php b/app/Imports/CustomerImport.php index 06f1ecc..b199738 100644 --- a/app/Imports/CustomerImport.php +++ b/app/Imports/CustomerImport.php @@ -23,8 +23,9 @@ class CustomerImport implements ToModel, WithHeadingRow public function model(array $row) { + // dd($row); // Tambahkan ini untuk debug, lihat apakah data yang diterima sesuai // Pemeriksaan apakah semua kolom yang dibutuhkan ada dalam format yang benar - $requiredColumns = ['name', 'code_customer', 'lot_no', 'no_tlp', 'address']; + $requiredColumns = ['nama_customer', 'kode_customer', 'lot_number', 'no_telepon', 'alamat']; foreach ($requiredColumns as $column) { if (!array_key_exists($column, $row) || empty($row[$column])) { @@ -37,7 +38,7 @@ class CustomerImport implements ToModel, WithHeadingRow $user = Auth::user(); // Cek apakah nama warehouse sudah ada dalam database - $existingCustomer = Customer::where('name', $row['name'])->first(); + $existingCustomer = Customer::where('name', $row['nama_customer'])->first(); if ($existingCustomer) { // Jika nama warehouse sudah ada, tambahkan pesan kesalahan ke dalam array $errors @@ -49,11 +50,11 @@ class CustomerImport implements ToModel, WithHeadingRow $this->rowCount++; return new Customer([ - 'name' => $row['name'], - 'code_customer' => $row['code_customer'], - 'lot_no' => $row['lot_no'], - 'no_tlp' => $row['no_tlp'], - 'address' => $row['address'], + 'name' => strtoupper($row['nama_customer']), + 'code_customer' => strtoupper($row['kode_customer']), + 'lot_no' => strtoupper($row['lot_number']), + 'no_tlp' => $row['no_telepon'], + 'address' => strtoupper($row['alamat']), 'created_by' => $user->fullname, ]); } diff --git a/app/Imports/KondisiPetiImport.php b/app/Imports/KondisiPetiImport.php index e287574..5155a4e 100644 --- a/app/Imports/KondisiPetiImport.php +++ b/app/Imports/KondisiPetiImport.php @@ -25,7 +25,7 @@ class KondisiPetiImport implements ToModel, WithHeadingRow public function model(array $row) { // Pemeriksaan apakah semua kolom yang dibutuhkan ada dalam format yang benar - $requiredColumns = ['nama_kondisi', 'deskripsi_kondisi']; + $requiredColumns = ['kondisi_peti', 'deskripsi_kondisi']; foreach ($requiredColumns as $column) { if (!array_key_exists($column, $row) || empty($row[$column])) { @@ -38,7 +38,7 @@ class KondisiPetiImport implements ToModel, WithHeadingRow $user = Auth::user(); // Cek apakah nama warehouse sudah ada dalam database - $existingKondisiPeti = Kondisi_Peti::where('nama_kondisi', $row['nama_kondisi'])->first(); + $existingKondisiPeti = Kondisi_Peti::where('nama_kondisi', $row['kondisi_peti'])->first(); if ($existingKondisiPeti) { // Jika nama warehouse sudah ada, tambahkan pesan kesalahan ke dalam array $errors @@ -50,8 +50,8 @@ class KondisiPetiImport implements ToModel, WithHeadingRow $this->rowCount++; return new Kondisi_Peti([ - 'nama_kondisi' => $row['nama_kondisi'], - 'deskripsi_kondisi' => $row['deskripsi_kondisi'], + 'nama_kondisi' => strtoupper($row['kondisi_peti']), + 'deskripsi_kondisi' => strtoupper($row['deskripsi_kondisi']), 'created_by' => $user->fullname, ]); } diff --git a/app/Imports/PetiImport.php b/app/Imports/PetiImport.php index 4555bc5..b30f1ec 100644 --- a/app/Imports/PetiImport.php +++ b/app/Imports/PetiImport.php @@ -15,6 +15,95 @@ use Maatwebsite\Excel\Events\AfterImport; use Maatwebsite\Excel\Concerns\ToCollection; use Maatwebsite\Excel\Concerns\WithHeadingRow; +// class PetiImport implements ToModel, WithHeadingRow +// { +// private $rowCount = 0; +// private $errors; + +// public function model(array $row) +// { +// // Pemeriksaan apakah semua kolom yang dibutuhkan ada dalam format yang benar +// $requiredColumns = ['tipe_peti_id', 'warna', 'customer_id', 'warehouse_id', 'kondisipeti_id', 'packing_no', 'fix_lot', 'status', 'status_isi_peti']; + +// foreach ($requiredColumns as $column) { +// if (!array_key_exists($column, $row) || empty($row[$column])) { +// $this->errors[] = 'Kolom ' . $column . ' pada baris ' . $this->rowCount . ' tidak boleh kosong.'; +// return null; // Abaikan data dengan kolom yang tidak sesuai +// } +// } + +// $user = Auth::user(); + +// $existingPeti = Peti::where('fix_lot', $row['fix_lot'])->first(); + +// if ($existingPeti) { +// $this->errors[] = new MessageBag(['Row ' . $this->rowCount => 'Data Peti sudah ada dalam database.']); +// return null; +// } + +// $tipePeti = Type_peti::firstOrCreate( +// ['type' => $row['tipe_peti_id']], +// ['size_peti' => 'Default Size', 'description' => 'Default Description'] +// ); + +// $customer = Customer::firstOrCreate( +// ['name' => $row['customer_id']], +// ['code_customer' => 'Default Code', 'lot_no' => 'Default Lot No', 'no_tlp' => 'Default No Tlp', 'address' => 'Default Address'] +// ); + +// $warehouse = m_warehouse::firstOrCreate( +// ['name' => $row['warehouse_id']], +// ['description' => 'Default Description', 'address' => 'Default Address'] +// ); + +// $kondisiPeti = Kondisi_Peti::firstOrCreate( +// ['nama_kondisi' => $row['kondisipeti_id']], +// ['deskripsi_kondisi' => 'Default Deskripsi'] +// ); + +// $this->rowCount++; + +// return new Peti([ +// 'created_by' => $user->fullname, +// 'updated_by' => $user->fullname, +// 'tipe_peti_id' => $tipePeti->id, +// 'warna' => $row['warna'], +// 'customer_id' => $customer->id, +// 'warehouse_id' => $warehouse->id, +// 't_warehouse_id' => $warehouse->id, +// 'date_pembuatan' => now(), +// 'kondisipeti_id' => $kondisiPeti->id, +// 'packing_no' => $row['packing_no'], +// 'fix_lot' => $row['fix_lot'], +// 'status' => $row['status'], +// 'status_isi' => $row['status_isi_peti'], +// ]); +// } + +// public function registerEvents(): array +// { +// return [ +// AfterImport::class => function (AfterImport $event) { +// $importedData = $event->getReader()->getDelegate()->getActiveSheet()->toArray(); +// $filteredData = array_filter($importedData, function ($row) { +// return $row[0] !== null; +// }); + +// $event->getReader()->getDelegate()->getActiveSheet()->fromArray($filteredData); +// }, +// ]; +// } + +// public function getErrors() +// { +// return $this->errors; +// } + +// public function getRowCount() +// { +// return $this->rowCount; +// } +// } class PetiImport implements ToModel, WithHeadingRow { private $rowCount = 0; @@ -22,8 +111,9 @@ class PetiImport implements ToModel, WithHeadingRow public function model(array $row) { + // dd($row); // Pemeriksaan apakah semua kolom yang dibutuhkan ada dalam format yang benar - $requiredColumns = ['tipe_peti_id', 'warna', 'customer_id', 'warehouse_id', 'kondisipeti_id', 'packing_no', 'fix_lot', 'status']; + $requiredColumns = ['tipe_peti', 'warna', 'nama_customer', 'nama_gudang', 'kondisi_peti', 'packing_no', 'fix_lot', 'status', 'status_isi_peti']; foreach ($requiredColumns as $column) { if (!array_key_exists($column, $row) || empty($row[$column])) { @@ -32,6 +122,18 @@ class PetiImport implements ToModel, WithHeadingRow } } + // Validasi untuk kolom 'status_isi_peti' + $validStatusIsiPeti = ['Ada', 'Tidak Ada']; + $statusIsiPeti = ucwords(strtolower(trim($row['status_isi_peti']))); // Ubah kapitalisasi + + if (!in_array($statusIsiPeti, $validStatusIsiPeti)) { + $this->errors[] = 'Nilai pada kolom status_isi_peti pada baris ' . $this->rowCount . ' tidak valid.'; + return null; + } + + // Set nilai status_isi berdasarkan 'Ada Isinya' atau 'Tidak Ada Isinya' + $statusIsi = ($statusIsiPeti === 'Ada') ? 1 : 0; + $user = Auth::user(); $existingPeti = Peti::where('fix_lot', $row['fix_lot'])->first(); @@ -42,22 +144,22 @@ class PetiImport implements ToModel, WithHeadingRow } $tipePeti = Type_peti::firstOrCreate( - ['type' => $row['tipe_peti_id']], + ['type' => $row['tipe_peti']], ['size_peti' => 'Default Size', 'description' => 'Default Description'] ); $customer = Customer::firstOrCreate( - ['name' => $row['customer_id']], + ['name' => $row['nama_customer']], ['code_customer' => 'Default Code', 'lot_no' => 'Default Lot No', 'no_tlp' => 'Default No Tlp', 'address' => 'Default Address'] ); $warehouse = m_warehouse::firstOrCreate( - ['name' => $row['warehouse_id']], + ['name' => $row['nama_gudang']], ['description' => 'Default Description', 'address' => 'Default Address'] ); $kondisiPeti = Kondisi_Peti::firstOrCreate( - ['nama_kondisi' => $row['kondisipeti_id']], + ['nama_kondisi' => $row['kondisi_peti']], ['deskripsi_kondisi' => 'Default Deskripsi'] ); @@ -65,15 +167,18 @@ class PetiImport implements ToModel, WithHeadingRow return new Peti([ 'created_by' => $user->fullname, + 'updated_by' => $user->fullname, 'tipe_peti_id' => $tipePeti->id, - 'warna' => $row['warna'], + 'warna' => strtoupper($row['warna']), 'customer_id' => $customer->id, 'warehouse_id' => $warehouse->id, + 't_warehouse_id' => $warehouse->id, 'date_pembuatan' => now(), 'kondisipeti_id' => $kondisiPeti->id, - 'packing_no' => $row['packing_no'], - 'fix_lot' => $row['fix_lot'], - 'status' => $row['status'], + 'packing_no' => strtoupper($row['packing_no']), + 'fix_lot' => strtoupper($row['fix_lot']), + 'status' => strtoupper($row['status']), + 'status_isi' => $statusIsi, ]); } diff --git a/app/Imports/TipePetiImport.php b/app/Imports/TipePetiImport.php index 26a9598..d6dc151 100644 --- a/app/Imports/TipePetiImport.php +++ b/app/Imports/TipePetiImport.php @@ -26,7 +26,7 @@ class TipePetiImport implements ToModel, WithHeadingRow public function model(array $row) { // Pemeriksaan apakah semua kolom yang dibutuhkan ada dalam format yang benar - $requiredColumns = ['type', 'size_peti', 'description']; + $requiredColumns = ['tipe_peti', 'ukuran_peti', 'deskripsi_tipe']; foreach ($requiredColumns as $column) { if (!array_key_exists($column, $row) || empty($row[$column])) { @@ -39,7 +39,7 @@ class TipePetiImport implements ToModel, WithHeadingRow $user = Auth::user(); // Cek apakah nama warehouse sudah ada dalam database - $existingTipePeti = Type_peti::where('type', $row['type'])->first(); + $existingTipePeti = Type_peti::where('type', $row['tipe_peti'])->first(); if ($existingTipePeti) { // Jika nama warehouse sudah ada, tambahkan pesan kesalahan ke dalam array $errors @@ -51,9 +51,9 @@ class TipePetiImport implements ToModel, WithHeadingRow $this->rowCount++; return new Type_peti([ - 'type' => $row['type'], - 'size_peti' => $row['size_peti'], - 'description' => $row['description'], + 'type' => strtoupper($row['tipe_peti']), + 'size_peti' => strtoupper($row['ukuran_peti']), + 'description' => strtoupper($row['deskripsi_tipe']), 'created_by' => $user->fullname, ]); } diff --git a/app/Imports/WarehouseImport.php b/app/Imports/WarehouseImport.php index d7b8d48..b3e84fa 100644 --- a/app/Imports/WarehouseImport.php +++ b/app/Imports/WarehouseImport.php @@ -24,7 +24,7 @@ class WarehouseImport implements ToModel, WithHeadingRow public function model(array $row) { - $requiredColumns = ['name', 'description', 'address']; + $requiredColumns = ['nama_gudang', 'deskripsi_gudang', 'alamat']; foreach ($requiredColumns as $column) { if (!array_key_exists($column, $row) || empty($row[$column])) { @@ -37,7 +37,7 @@ class WarehouseImport implements ToModel, WithHeadingRow $user = Auth::user(); // Cek apakah nama warehouse sudah ada dalam database - $existingWarehouse = m_warehouse::where('name', $row['name'])->first(); + $existingWarehouse = m_warehouse::where('name', $row['nama_gudang'])->first(); if ($existingWarehouse) { // Jika nama warehouse sudah ada, tambahkan pesan kesalahan ke dalam array $errors @@ -50,9 +50,9 @@ class WarehouseImport implements ToModel, WithHeadingRow // Buat model baru jika nama warehouse belum ada return new m_warehouse([ - 'name' => $row['name'], - 'description' => $row['description'], - 'address' => $row['address'], + 'name' => strtoupper($row['nama_gudang']), + 'description' => strtoupper($row['deskripsi_gudang']), + 'address' => strtoupper($row['alamat']), 'created_by' => $user->fullname, ]); } diff --git a/app/Models/Peti.php b/app/Models/Peti.php index 535a961..d83a789 100644 --- a/app/Models/Peti.php +++ b/app/Models/Peti.php @@ -16,18 +16,20 @@ class Peti extends Model protected $table = 'petis'; protected $fillable = [ - 'tipe_peti_id', - 'warna', - 'customer_id', - 'warehouse_id', + 'tipe_peti_id', // + 'warna', // + 'customer_id', // + 'warehouse_id', // + 't_warehouse_id', // + 'kondisipeti_id', // 'jumlah', - 'date_pembuatan', - 'kondisipeti_id', - 'packing_no', - 'fix_lot', - 'status', - 'created_by', - 'updated_by', + 'date_pembuatan', // + 'packing_no', // + 'fix_lot', // + 'status', // + 'status_isi', // + 'created_by', // + 'updated_by', // ]; public function customer() diff --git a/database/migrations/2023_11_06_085238_create_petis_table.php b/database/migrations/2023_11_06_085238_create_petis_table.php index 1598c2f..10b1861 100644 --- a/database/migrations/2023_11_06_085238_create_petis_table.php +++ b/database/migrations/2023_11_06_085238_create_petis_table.php @@ -13,16 +13,18 @@ return new class extends Migration { Schema::create('petis', function (Blueprint $table) { $table->id(); - $table->foreignId('tipe_peti_id')->nullable()->constrained('type_petis'); - $table->string('warna', 50); - $table->string('fix_lot', 100); - $table->integer('packing_no'); - $table->foreignId('customer_id')->nullable()->constrained('customers')->onDelete('cascade'); - $table->integer('jumlah')->nullable(); - $table->date('date_pembuatan', 100)->nullable(); - $table->foreignId('warehouse_id')->nullable()->constrained('m_warehouses'); - $table->foreignId('kondisipeti_id')->nullable()->constrained('kondisi_petis'); - $table->string('status', 50)->default('AKTIF'); + $table->foreignId('tipe_peti_id')->nullable()->constrained('type_petis'); // untuk inputan tipe peti + $table->string('warna', 50); // untuk inputan warna peti + $table->foreignId('customer_id')->nullable()->constrained('customers')->onDelete('cascade'); // untuk inputan customer + $table->foreignId('warehouse_id')->nullable()->constrained('m_warehouses'); // untuk inputan Gudang + $table->foreignId('t_warehouse_id')->nullable()->constrained('m_warehouses'); // untuk proses semua perubahan gudang peti + $table->foreignId('kondisipeti_id')->nullable()->constrained('kondisi_petis'); // untuk inputan kondisi peti + $table->integer('jumlah')->nullable(); // untuk inputan jumlah peti + $table->date('date_pembuatan', 100)->nullable(); // untuk inputan tanggal pembuatan + $table->integer('packing_no'); // untuk pembuatan packing no otomatis + $table->string('fix_lot', 100); // untuk proses pembuatan fixlot otomatis + $table->string('status', 50)->default('AKTIF'); // untuk pembuatan status peti otomatis menjadi aktif + $table->boolean('status_isi')->nullable(); // untuk pembuatan status isi peti 1 = isi, 0 = kosong $table->timestamps(); $table->softDeletes(); $table->string('created_by', 200)->nullable(); diff --git a/public/assets/file/Format_Import_Customer.csv b/public/assets/file/Format_Import_Customer.csv index 5b86f46..4a9eb22 100644 --- a/public/assets/file/Format_Import_Customer.csv +++ b/public/assets/file/Format_Import_Customer.csv @@ -1 +1 @@ -name,code_customer,lot_no,no_tlp,address +Nama Customer,Kode Customer,Lot Number,No Telepon,Alamat diff --git a/public/assets/file/Format_Import_Kondisi_Peti.csv b/public/assets/file/Format_Import_Kondisi_Peti.csv index 0212980..1c3f634 100644 --- a/public/assets/file/Format_Import_Kondisi_Peti.csv +++ b/public/assets/file/Format_Import_Kondisi_Peti.csv @@ -1 +1 @@ -nama_kondisi,deskripsi_kondisi +Kondisi Peti,Deskripsi Kondisi diff --git a/public/assets/file/Format_Import_Peti.csv b/public/assets/file/Format_Import_Peti.csv index 5f4ec5d..2927bf6 100644 --- a/public/assets/file/Format_Import_Peti.csv +++ b/public/assets/file/Format_Import_Peti.csv @@ -1 +1 @@ -tipe_peti_id,warna,customer_id,warehouse_id,jumlah,date_pembuatan,kondisipeti_id,packing_no,fix_lot,status +Tipe Peti,Warna,Nama Customer,Nama Gudang,Kondisi Peti,Packing_no,Fix_lot,Status,Status Isi Peti diff --git a/public/assets/file/Format_Import_Tipe_Peti.csv b/public/assets/file/Format_Import_Tipe_Peti.csv index 9641d92..cc6ba0f 100644 --- a/public/assets/file/Format_Import_Tipe_Peti.csv +++ b/public/assets/file/Format_Import_Tipe_Peti.csv @@ -1 +1 @@ -type,size_peti,description +TIpe Peti,Ukuran Peti,Deskripsi Tipe diff --git a/public/assets/file/Format_Import_Warehouse.csv b/public/assets/file/Format_Import_Warehouse.csv index bef77f3..7738b97 100644 --- a/public/assets/file/Format_Import_Warehouse.csv +++ b/public/assets/file/Format_Import_Warehouse.csv @@ -1 +1 @@ -name,description,address +Nama Gudang,Deskripsi Gudang,Alamat diff --git a/public/assets/img/istw_black&white.jpg b/public/assets/img/istw_black&white.jpg new file mode 100644 index 0000000..2ed8584 Binary files /dev/null and b/public/assets/img/istw_black&white.jpg differ diff --git a/public/assets/img/istw_grey.png b/public/assets/img/istw_grey.png new file mode 100644 index 0000000..687cb80 Binary files /dev/null and b/public/assets/img/istw_grey.png differ diff --git a/public/assets/img/logo istw.jpg b/public/assets/img/istw_red.jpg similarity index 100% rename from public/assets/img/logo istw.jpg rename to public/assets/img/istw_red.jpg diff --git a/public/assets/img/logo_istw.png b/public/assets/img/logo_istw.png deleted file mode 100644 index 1fd93e9..0000000 Binary files a/public/assets/img/logo_istw.png and /dev/null differ diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php index 0f953db..3bfc9d9 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/all_print.blade.php @@ -75,7 +75,7 @@ diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php index fd91fc5..20625c3 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/create.blade.php @@ -61,6 +61,13 @@ + + + - - - - + + + + @@ -98,16 +98,24 @@ - - - - + + + +
- PETI NUMBER No Fix LotUser CustomerGD Kode Customer Tipe Peti Ukuran Peti Lot NoKondisi Peti Packing NoStatusGDKondisi PetiIsi PetiWarna Peti Action
{{ $data_peti->fix_lot }}{{ $data_peti->created_by }} {{ $data_peti->customer->name }}{{ $data_peti->warehouse->name }} {{ $data_peti->customer->code_customer }} {{ $data_peti->tipe_peti->type }} {{ $data_peti->tipe_peti->size_peti }} {{ $data_peti->customer->lot_no }}{{ $data_peti->kondisipeti->nama_kondisi }} {{ $data_peti->packing_no }}{{ $data_peti->status }}{{ $data_peti->warehouse->name }}{{ $data_peti->kondisipeti->nama_kondisi }} + @if ($data_peti->status_isi == 1) + Ada + @elseif($data_peti->status_isi == 0) + Tidak Ada + @else + Tidak Ada + @endif + {{ $data_peti->warna }} diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php index 0c6e059..4a18ddd 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/label_pdf.blade.php @@ -39,7 +39,7 @@ diff --git a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php index 607dcba..1938e18 100644 --- a/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php +++ b/resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/show.blade.php @@ -25,13 +25,14 @@ - - - + + {{-- --}} + +
diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index c9afece..c1efa65 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -218,7 +218,7 @@ -
+
@@ -458,26 +458,6 @@ downloadReport('StokOpname/export'); }); - - {{-- --}} @endpush @elseif(auth()->user()->role_id == 2) @include('pages.user.dashboard.index') diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index 1216b01..9293828 100644 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -37,9 +37,9 @@ aria-labelledby="headingTransaksi" data-parent="#accordionSidebar">
Peminjaman + href="{{ route('dashboard.peminjaman.index') }}">Peti Out Pengembalian + href="{{ route('dashboard.pengembalian.index') }}">Peti In Transfer
diff --git a/resources/views/pages/layouts/sidebar_user.blade.php b/resources/views/pages/layouts/sidebar_user.blade.php index c8e9a9b..18486cd 100644 --- a/resources/views/pages/layouts/sidebar_user.blade.php +++ b/resources/views/pages/layouts/sidebar_user.blade.php @@ -35,9 +35,9 @@ aria-labelledby="headingTransaksi" data-parent="#accordionSidebar">
Peminjaman + href="{{ route('dashboard.peminjaman.index') }}">Peti Out Pengembalian + href="{{ route('dashboard.pengembalian.index') }}">Peti In Transfer
- Logo ISTW PETI NUMBER