From ead7f322bf6917f28ffee094986fc2a9e1dc671b Mon Sep 17 00:00:00 2001 From: Gunawan19621 Date: Thu, 30 Nov 2023 17:00:56 +0700 Subject: [PATCH] update revisi peminjaman, pengembalian, transfer dan disposal --- app/Exports/PetternLotPetiExport.php | 5 +- app/Exports/StokOpNameExport.php | 1 + app/Http/Controllers/DisposalController.php | 18 +- app/Http/Controllers/PeminjamanController.php | 9 +- .../Controllers/PengembalianController.php | 21 +- .../Controllers/RecycleDataController.php | 142 +++++++++++++ app/Http/Controllers/StokOpNameController.php | 16 +- app/Http/Controllers/TransferController.php | 7 +- .../Disposal/ValidasiUpdateDisposal.php | 8 +- app/Imports/CustomerImport.php | 1 - app/Models/Peti.php | 1 + .../2023_11_06_085238_create_petis_table.php | 2 +- ..._06_122033_create_asset_statuses_table.php | 3 +- ...23_11_08_132316_create_transfers_table.php | 2 +- ...23_11_17_075418_create_disposals_table.php | 2 +- database/seeders/Type_Peti.php | 10 +- public/assets/file/Format Import Customer.csv | 2 +- .../views/dashboard/Disposal/create.blade.php | 4 +- .../views/dashboard/Disposal/edit.blade.php | 11 +- .../views/dashboard/Disposal/index.blade.php | 4 +- .../Master_Data/Recycle_Data/index.blade.php | 196 ++++++++++++++++++ .../Report/Pattern_lot_peti/index.blade.php | 14 +- .../Report/Stok_opname/index.blade.php | 16 ++ .../dashboard/Master_Data/User/show.blade.php | 6 +- .../views/dashboard/Peminjaman/edit.blade.php | 2 +- .../dashboard/Pengembalian/edit.blade.php | 4 +- .../dashboard/Pengembalian/index.blade.php | 68 +++++- resources/views/layouts/main.blade.php | 1 + resources/views/layouts/sidebar.blade.php | 6 + routes/web.php | 22 +- 30 files changed, 528 insertions(+), 76 deletions(-) create mode 100644 app/Http/Controllers/RecycleDataController.php create mode 100644 resources/views/dashboard/Master_Data/Recycle_Data/index.blade.php diff --git a/app/Exports/PetternLotPetiExport.php b/app/Exports/PetternLotPetiExport.php index c42a468..7b20eba 100644 --- a/app/Exports/PetternLotPetiExport.php +++ b/app/Exports/PetternLotPetiExport.php @@ -18,6 +18,7 @@ class PetternLotPetiExport implements FromCollection, WithHeadings 'tipe_peti_id', 'packing_no', 'fix_lot', + 'status' )->get(); // Inisialisasi nomor awal @@ -27,7 +28,6 @@ class PetternLotPetiExport implements FromCollection, WithHeadings $data = $petis->map(function ($peti) use (&$nomor) { return [ 'No' => $nomor++, - 'User' => 'ISTW', 'Customer' => $peti->customer->name, 'Warehouse' => $peti->warehouse->name, 'CODE CUSTOMER' => $peti->customer->code_customer, @@ -36,6 +36,7 @@ class PetternLotPetiExport implements FromCollection, WithHeadings 'LOT NO' => $peti->customer->lot_no, 'PACKING NO' => $peti->packing_no, 'FIX LOT' => $peti->fix_lot, + 'Status' => $peti->status, ]; }); @@ -46,7 +47,6 @@ class PetternLotPetiExport implements FromCollection, WithHeadings { return [ 'No', - 'User', 'Customer', 'WH', 'CODE CUSTOMER', @@ -55,6 +55,7 @@ class PetternLotPetiExport implements FromCollection, WithHeadings 'LOT NO', 'PACKING NO', 'FIX LOT', + 'STATUS' ]; } } diff --git a/app/Exports/StokOpNameExport.php b/app/Exports/StokOpNameExport.php index 51201d4..36e94ee 100644 --- a/app/Exports/StokOpNameExport.php +++ b/app/Exports/StokOpNameExport.php @@ -29,6 +29,7 @@ class StokOpNameExport implements FromCollection, WithHeadings foreach ($this->stokOpnames as $data_StokOpname) { $yesterdayStokOpname = $this->yesterdayStokOpnames + // ->where('status', 'AKTIF') ->where('customer_id', $data_StokOpname->customer_id) ->where('tipe_peti_id', $data_StokOpname->tipe_peti_id) ->first(); diff --git a/app/Http/Controllers/DisposalController.php b/app/Http/Controllers/DisposalController.php index 8317552..0d7e07b 100644 --- a/app/Http/Controllers/DisposalController.php +++ b/app/Http/Controllers/DisposalController.php @@ -34,7 +34,12 @@ class DisposalController extends Controller { $petiWithStatusNotZeroOrEmptyAndActive = Peti::where(function ($query) { $query->whereHas('assetStatuses', function ($subquery) { - $subquery->where('status', '!=', 0); + $subquery->where('status', '!=', 0) + ->where('created_at', '=', function ($maxQuery) { + $maxQuery->selectRaw('MAX(created_at)') + ->from('asset_statuses') + ->whereColumn('peti_id', 'petis.id'); + }); })->orWhereDoesntHave('assetStatuses'); })->where('status', 'aktif')->get(); @@ -52,8 +57,6 @@ class DisposalController extends Controller */ public function store(ValidasiCreateDisposal $request) { - // dd($request->all()); - // dd($request); try { // Mendapatkan informasi pengguna yang sedang login $currentUser = Auth::user(); @@ -65,7 +68,7 @@ class DisposalController extends Controller $validatedData['mobile_id'] = Uuid::v4(); // Menambahkan ID Mobile $validatedData['created_by'] = $currentUser->fullname; $validatedData['updated_by'] = $currentUser->fullname; - + $validatedData['status_disposal'] = 'INAKTIF'; // Membuat entitas Disposal $disposal = Disposal::create($validatedData); @@ -97,7 +100,7 @@ class DisposalController extends Controller */ public function edit($id) { - $jenis_disposal = ['Pemusnaan', 'Perbaikan']; + // $jenis_disposal = ['Pemusnaan', 'Perbaikan']; $data = [ 'disposal' => Disposal::findOrFail($id), 'peti' => Peti::get(), @@ -105,7 +108,7 @@ class DisposalController extends Controller 'warehouse' => m_warehouse::get(), 'active' => 'menu-disposal', ]; - return view('dashboard.Disposal.edit', compact('jenis_disposal'), $data); + return view('dashboard.Disposal.edit', $data); } /** @@ -113,6 +116,7 @@ class DisposalController extends Controller */ public function update(ValidasiUpdateDisposal $request, $id) { + // dd($request->all()); // dd("oke"); try { // Mendapatkan informasi pengguna yang sedang login @@ -130,7 +134,7 @@ class DisposalController extends Controller if (!$disposal) { return redirect()->route('dashboard.disposal.index')->with('error', 'Data Disposal Peti tidak ditemukan'); } - + // dd($validatedData); // Memperbarui data transfer $disposal->update($validatedData); diff --git a/app/Http/Controllers/PeminjamanController.php b/app/Http/Controllers/PeminjamanController.php index 3ef1879..0b94a24 100644 --- a/app/Http/Controllers/PeminjamanController.php +++ b/app/Http/Controllers/PeminjamanController.php @@ -36,9 +36,14 @@ class PeminjamanController extends Controller { $petiWithStatusNotZeroOrEmptyAndActive = Peti::where(function ($query) { $query->whereHas('assetStatuses', function ($subquery) { - $subquery->where('status', '!=', 0); + $subquery->where('status', '!=', 0) + ->where('created_at', '=', function ($maxQuery) { + $maxQuery->selectRaw('MAX(created_at)') + ->from('asset_statuses') + ->whereColumn('peti_id', 'petis.id'); + }); })->orWhereDoesntHave('assetStatuses'); - })->where('status', 'aktif')->get(); + })->where('status', 'AKTIF')->get(); $data = [ // 'peti' => Peti::all(), diff --git a/app/Http/Controllers/PengembalianController.php b/app/Http/Controllers/PengembalianController.php index 3ea8aaf..affdae7 100644 --- a/app/Http/Controllers/PengembalianController.php +++ b/app/Http/Controllers/PengembalianController.php @@ -12,18 +12,29 @@ use Illuminate\Support\Facades\Auth; class PengembalianController extends Controller { + // public function index() + // { + // $pengembalian = asset_status::orderBy('created_at', 'desc')->get(); + + // $latestpengembalian = $pengembalian->groupBy('peti_id')->map(function ($group) { + // return $group->first(); + // }); + + // $data = [ + // 'peminjaman' => $latestpengembalian, + // 'active' => 'menu-pengembalian', + // ]; + // return view('dashboard.Pengembalian.index', $data); + // } public function index() { $pengembalian = asset_status::orderBy('created_at', 'desc')->get(); - $latestpengembalian = $pengembalian->groupBy('peti_id')->map(function ($group) { - return $group->first(); - }); - $data = [ - 'peminjaman' => $latestpengembalian, + 'peminjaman' => $pengembalian, 'active' => 'menu-pengembalian', ]; + return view('dashboard.Pengembalian.index', $data); } diff --git a/app/Http/Controllers/RecycleDataController.php b/app/Http/Controllers/RecycleDataController.php new file mode 100644 index 0000000..d8255de --- /dev/null +++ b/app/Http/Controllers/RecycleDataController.php @@ -0,0 +1,142 @@ +get(); + $customer = Customer::onlyTrashed()->get(); + + $data = [ + 'peti' => Peti::onlyTrashed()->get(), + 'customer' => Customer::onlyTrashed()->get(), + 'active' => 'menu-Recycle_Data', + ]; + + return view('dashboard.Master_Data.Recycle_Data.index', $data); + } + + // public function pulihkanData($id) + // { + // // dd('oke'); + // $peti = Customer::withTrashed()->find($id); + + // if ($peti) { + // $peti->restore(); + // return redirect()->back()->with('success', 'Data berhasil dipulihkan.'); + // } else { + // return redirect()->back()->with('error', 'Data tidak ditemukan.'); + // } + // } + + // public function hapusPermanenData($id) + // { + // // dd('oke'); + // $peti = Peti::withTrashed()->find($id); + + // if ($peti) { + // $peti->forceDelete(); + // return redirect()->back()->with('success', 'Data berhasil dihapus permanen.'); + // } else { + // return redirect()->back()->with('error', 'Data tidak ditemukan.'); + // } + // } + + // public function pulihkanData(Request $request) + // { + // $peti = Peti::withTrashed() + // ->where('id', '=', $request->id) + // ->first(); + + // $customer = Customer::withTrashed() + // ->where('id', '=', $request->id) + // ->first(); + + // if ($peti) { + // $peti->restore(); + // return redirect()->back()->with('success', 'Data Peti berhasil dipulihkan.'); + // } elseif ($customer) { + // $customer->restore(); + // return redirect()->back()->with('success', 'Data Customer berhasil dipulihkan.'); + // } else { + // return redirect()->back()->with('error', 'Data tidak ditemukan.'); + // } + // } + + + // public function hapusPermanenData($id) + // { + // $peti = Peti::withTrashed()->find($id); + // $customer = Customer::withTrashed()->find($id); + + // if ($peti) { + // $peti->forceDelete(); + // return redirect()->back()->with('success', 'Data Peti berhasil dihapus permanen.'); + // } elseif ($customer) { + // $customer->forceDelete(); + // return redirect()->back()->with('success', 'Data Customer berhasil dihapus permanen.'); + // } else { + // return redirect()->back()->with('error', 'Data tidak ditemukan.'); + // } + // } + + + public function pulihkanData(Request $request, $model, $id) + { + $data = null; + + switch ($model) { + case 'peti': + $data = Peti::withTrashed()->find($id); + break; + case 'customer': + $data = Customer::withTrashed()->find($id); + break; + // Add more cases for other models if needed + + default: + return redirect()->back()->with('error', 'Model tidak valid.'); + } + + if ($data) { + $data->restore(); + return redirect()->back()->with('success', "Data $model berhasil dipulihkan."); + } else { + return redirect()->back()->with('error', 'Data tidak ditemukan.'); + } + } + + public function hapusPermanenData($model, $id) + { + $data = null; + + switch ($model) { + case 'peti': + $data = Peti::withTrashed()->find($id); + break; + case 'customer': + $data = Customer::withTrashed()->find($id); + break; + // Add more cases for other models if needed + + default: + return redirect()->back()->with('error', 'Model tidak valid.'); + } + + if ($data) { + $data->forceDelete(); + return redirect()->back()->with('success', "Data $model berhasil dihapus permanen."); + } else { + return redirect()->back()->with('error', 'Data tidak ditemukan.'); + } + } +} diff --git a/app/Http/Controllers/StokOpNameController.php b/app/Http/Controllers/StokOpNameController.php index f1e0999..deea5b8 100644 --- a/app/Http/Controllers/StokOpNameController.php +++ b/app/Http/Controllers/StokOpNameController.php @@ -14,27 +14,31 @@ class StokOpNameController extends Controller public function index() { // Total Peti Berdasarkan Gudang - $gudangStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti', 'warehouse') + $gudangStokOpnames = Peti::with('customer', 'tipe_peti', 'warehouse') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', 'warehouse_id', DB::raw('COUNT(*) as total_petis')) ->groupBy('customer_id', 'tipe_peti_id', 'warehouse_id') ->get(); // Total Peti Berdasarkan Tanggal Sekarang - $todayStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + $todayStokOpnames = Peti::with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->whereDate('created_at', today()) ->groupBy('customer_id', 'tipe_peti_id') ->get(); // Total Peti Berdasarkan Tanggal Sebelum Tanggal Sekarang - $yesterdayStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + $yesterdayStokOpnames = Peti::with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->whereDate('created_at', '<', today()) // Mendapatkan data sebelum tanggal hari ini ->groupBy('customer_id', 'tipe_peti_id') ->get(); // Total Peti - $stokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + $stokOpnames = Peti::with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->groupBy('customer_id', 'tipe_peti_id') ->get(); @@ -53,12 +57,14 @@ class StokOpNameController extends Controller { //total peti $stokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->groupBy('customer_id', 'tipe_peti_id') ->get(); // Total Peti Berdasarkan Tanggal Sekarang $todayStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->whereDate('created_at', today()) ->groupBy('customer_id', 'tipe_peti_id') @@ -66,6 +72,7 @@ class StokOpNameController extends Controller // Total Peti Berdasarkan Tanggal Sebelum Tanggal Sekarang $yesterdayStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', DB::raw('COUNT(*) as total_petis')) ->whereDate('created_at', '<', today()) // Mendapatkan data sebelum tanggal hari ini ->groupBy('customer_id', 'tipe_peti_id') @@ -73,6 +80,7 @@ class StokOpNameController extends Controller // Total Peti Berdasarkan Gudang $gudangStokOpnames = Peti::withTrashed()->with('customer', 'tipe_peti', 'warehouse') + ->where('status', 'AKTIF') // Menambahkan kondisi untuk status Aktif ->select('customer_id', 'tipe_peti_id', 'warehouse_id', DB::raw('COUNT(*) as total_petis')) ->groupBy('customer_id', 'tipe_peti_id', 'warehouse_id') ->get(); diff --git a/app/Http/Controllers/TransferController.php b/app/Http/Controllers/TransferController.php index f5a89b6..462f4ff 100644 --- a/app/Http/Controllers/TransferController.php +++ b/app/Http/Controllers/TransferController.php @@ -37,7 +37,12 @@ class TransferController extends Controller { $petiWithStatusNotZeroOrEmptyAndActive = Peti::where(function ($query) { $query->whereHas('assetStatuses', function ($subquery) { - $subquery->where('status', '!=', 0); + $subquery->where('status', '!=', 0) + ->where('created_at', '=', function ($maxQuery) { + $maxQuery->selectRaw('MAX(created_at)') + ->from('asset_statuses') + ->whereColumn('peti_id', 'petis.id'); + }); })->orWhereDoesntHave('assetStatuses'); })->where('status', 'aktif')->get(); diff --git a/app/Http/Requests/Disposal/ValidasiUpdateDisposal.php b/app/Http/Requests/Disposal/ValidasiUpdateDisposal.php index 511b52c..648ba0b 100644 --- a/app/Http/Requests/Disposal/ValidasiUpdateDisposal.php +++ b/app/Http/Requests/Disposal/ValidasiUpdateDisposal.php @@ -22,20 +22,20 @@ class ValidasiUpdateDisposal extends FormRequest public function rules(): array { return [ - 'peti_id' => 'required|integer', + // 'peti_id' => 'required|integer', 'customer_id' => 'required|integer', 'warehouse_id' => 'required|integer', 'date_disposal' => 'nullable|date', 'description' => 'nullable|string', - 'status_disposal' => 'nullable', + // 'status_disposal' => 'nullable', ]; } public function messages(): array { return [ - 'peti_id.required' => 'Peti harus dipilih.', - 'peti_id.integer' => 'Peti harus berupa angka.', + // 'peti_id.required' => 'Peti harus dipilih.', + // 'peti_id.integer' => 'Peti harus berupa angka.', 'customer_id.required' => 'Customer harus dipilih.', 'customer_id.integer' => 'Customer harus berupa angka.', 'warehouse_id.required' => 'Gudang harus dipilih.', diff --git a/app/Imports/CustomerImport.php b/app/Imports/CustomerImport.php index 3184249..58e549a 100644 --- a/app/Imports/CustomerImport.php +++ b/app/Imports/CustomerImport.php @@ -21,7 +21,6 @@ class CustomerImport implements ToModel, WithHeadingRow 'code_customer' => $row['code_customer'], 'lot_no' => $row['lot_no'], 'no_tlp' => $row['no_tlp'], - 'email' => $row['email'], 'address' => $row['address'], ]); } diff --git a/app/Models/Peti.php b/app/Models/Peti.php index 545ca4e..535a961 100644 --- a/app/Models/Peti.php +++ b/app/Models/Peti.php @@ -25,6 +25,7 @@ class Peti extends Model 'kondisipeti_id', 'packing_no', 'fix_lot', + 'status', 'created_by', 'updated_by', ]; 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 6466944..1598c2f 100644 --- a/database/migrations/2023_11_06_085238_create_petis_table.php +++ b/database/migrations/2023_11_06_085238_create_petis_table.php @@ -17,7 +17,7 @@ return new class extends Migration $table->string('warna', 50); $table->string('fix_lot', 100); $table->integer('packing_no'); - $table->foreignId('customer_id')->nullable()->constrained('customers'); + $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'); diff --git a/database/migrations/2023_11_06_122033_create_asset_statuses_table.php b/database/migrations/2023_11_06_122033_create_asset_statuses_table.php index ceb9559..7f68673 100644 --- a/database/migrations/2023_11_06_122033_create_asset_statuses_table.php +++ b/database/migrations/2023_11_06_122033_create_asset_statuses_table.php @@ -14,7 +14,8 @@ return new class extends Migration Schema::create('asset_statuses', function (Blueprint $table) { $table->id(); $table->uuid('mobile_id')->nullable(); - $table->foreignId('peti_id')->nullable()->constrained('petis'); + // $table->foreignId('peti_id')->nullable()->constrained('petis'); + $table->foreignId('peti_id')->nullable()->constrained('petis')->onDelete('cascade'); $table->date('exit_at')->nullable(); $table->date('est_pengembalian')->nullable(); $table->string('exit_pic', 200)->nullable(); diff --git a/database/migrations/2023_11_08_132316_create_transfers_table.php b/database/migrations/2023_11_08_132316_create_transfers_table.php index ec0f37a..ca55e5b 100644 --- a/database/migrations/2023_11_08_132316_create_transfers_table.php +++ b/database/migrations/2023_11_08_132316_create_transfers_table.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::create('transfers', function (Blueprint $table) { $table->id(); $table->uuid('mobile_id')->nullable(); - $table->foreignId('peti_id')->nullable()->constrained('petis'); + $table->foreignId('peti_id')->nullable()->constrained('petis')->onDelete('cascade'); $table->foreignId('name_customer')->nullable()->constrained('customers'); $table->foreignId('source_warehouse')->nullable()->constrained('m_warehouses'); $table->foreignId('destination_warehouse')->nullable()->constrained('m_warehouses'); diff --git a/database/migrations/2023_11_17_075418_create_disposals_table.php b/database/migrations/2023_11_17_075418_create_disposals_table.php index 7687e8f..7122a4e 100644 --- a/database/migrations/2023_11_17_075418_create_disposals_table.php +++ b/database/migrations/2023_11_17_075418_create_disposals_table.php @@ -14,7 +14,7 @@ return new class extends Migration Schema::create('disposals', function (Blueprint $table) { $table->id('id'); $table->uuid('mobile_id')->nullable(); - $table->foreignId('peti_id')->constrained('petis'); + $table->foreignId('peti_id')->constrained('petis')->onDelete('cascade'); $table->foreignId('customer_id')->constrained('customers'); $table->foreignId('warehouse_id')->constrained('m_warehouses'); $table->date('date_disposal'); diff --git a/database/seeders/Type_Peti.php b/database/seeders/Type_Peti.php index 428ecd5..233271a 100644 --- a/database/seeders/Type_Peti.php +++ b/database/seeders/Type_Peti.php @@ -15,16 +15,16 @@ class Type_Peti extends Seeder public function run(): void { DB::table('type_petis')->insert([ - 'type' => 'Baik', - 'size_peti' => '2 X 2 X 2 X 2', - 'description' => 'Detail Barang Bagus', + 'type' => 'Kecil', + 'size_peti' => '2 X 2 X 2', + 'description' => 'Peti dengan ukuran kecil', 'created_by' => 'Seeder', 'updated_by' => 'Seeder', ]); DB::table('type_petis')->insert([ 'type' => 'Standar', - 'size_peti' => '3 X 3 X 3 X 3', - 'description' => 'Detail Barang Standar', + 'size_peti' => '3 X 3 X 3', + 'description' => 'Peti dengan ukuran standar', 'created_by' => 'Seeder', 'updated_by' => 'Seeder', ]); diff --git a/public/assets/file/Format Import Customer.csv b/public/assets/file/Format Import Customer.csv index b4845a8..5b86f46 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,email,address +name,code_customer,lot_no,no_tlp,address diff --git a/resources/views/dashboard/Disposal/create.blade.php b/resources/views/dashboard/Disposal/create.blade.php index f3c63a9..8c7254a 100644 --- a/resources/views/dashboard/Disposal/create.blade.php +++ b/resources/views/dashboard/Disposal/create.blade.php @@ -47,13 +47,13 @@ @endforeach - + --}} diff --git a/resources/views/dashboard/Disposal/edit.blade.php b/resources/views/dashboard/Disposal/edit.blade.php index 7b8fd0f..78b390f 100644 --- a/resources/views/dashboard/Disposal/edit.blade.php +++ b/resources/views/dashboard/Disposal/edit.blade.php @@ -18,7 +18,7 @@
- @foreach ($peti as $data_peti)
diff --git a/resources/views/layouts/main.blade.php b/resources/views/layouts/main.blade.php index ac488a2..71343f3 100644 --- a/resources/views/layouts/main.blade.php +++ b/resources/views/layouts/main.blade.php @@ -7,6 +7,7 @@ + SIOPAS - Dashboard @include('layouts.link') diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index 47b2035..d49176d 100644 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -153,6 +153,12 @@ + {{-- --}} @else @include('pages.layouts.sidebar_user') @endif diff --git a/routes/web.php b/routes/web.php index d79c075..31a81bf 100644 --- a/routes/web.php +++ b/routes/web.php @@ -13,10 +13,11 @@ use App\Http\Controllers\TransferController; use App\Http\Controllers\TypePetiController; use App\Http\Controllers\WarehouseController; use App\Http\Controllers\PeminjamanController; +use App\Http\Controllers\StokOpNameController; use App\Http\Controllers\KondisiPetiController; +use App\Http\Controllers\RecycleDataController; use App\Http\Controllers\PengembalianController; use App\Http\Controllers\PetternLotPetiController; -use App\Http\Controllers\StokOpNameController; use App\Http\Controllers\TransaksiKeluarMasukController; /* @@ -88,7 +89,6 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func Route::get('transfer', 'index')->name('transfer.index'); Route::get('transfer/create', 'create')->name('transfer.create'); Route::post('transfer/store', 'store')->name('transfer.store'); - // Route::get('transfer/{id}', 'show')->name('transfer.show'); Route::get('transfer/{id}/edit', 'edit')->name('transfer.edit'); Route::put('transfer/{id}', 'update')->name('transfer.update'); Route::delete('transfer/delete/{id}', 'destroy')->name('transfer.destroy'); @@ -99,7 +99,6 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func Route::get('disposal', 'index')->name('disposal.index'); Route::get('disposal/create', 'create')->name('disposal.create'); Route::post('disposal/store', 'store')->name('disposal.store'); - // Route::get('disposal/{id}', 'show')->name('disposal.show'); Route::get('disposal/{id}/edit', 'edit')->name('disposal.edit'); Route::put('disposal/{id}', 'update')->name('disposal.update'); Route::delete('disposal/delete/{id}', 'destroy')->name('disposal.destroy'); @@ -110,12 +109,6 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func Route::get('history/peminjaman', 'historyPeminjaman')->name('history.historyPeminjaman'); Route::get('history/pengembalian', 'historyPengembalian')->name('history.historyPengembalian'); Route::get('history/transfer', 'historyTransfer')->name('history.historyTransfer'); - // Route::get('history/create', 'create')->name('history.create'); - // Route::post('history/store', 'store')->name('history.store'); - // Route::get('history/{id}', 'show')->name('history.show'); - // Route::get('history/{id}/edit', 'edit')->name('history.edit'); - // Route::put('history/{id}', 'update')->name('history.update'); - // Route::delete('history/delete/{id}', 'destroy')->name('history.destroy'); }); @@ -147,17 +140,13 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func Route::get('customer/{id}/edit', 'edit')->name('customer.edit'); Route::put('customer/{id}', 'update')->name('customer.update'); Route::delete('customer/delete/{id}', 'destroy')->name('customer.destroy'); - // Route::post('customer/import', 'importCustomer')->name('customer.importCustomer'); Route::post('customers/import', 'importCustomer')->name('customer.import'); }); //Halaman Kondisi Peti Route::controller(KondisiPetiController::class)->group(function () { Route::get('kondisipeti', 'index')->name('kondisipeti.index'); - // Route::get('kondisipeti/create', 'create')->name('kondisipeti.create'); Route::post('kondisipeti/store', 'store')->name('kondisipeti.store'); - // Route::get('kondisipeti/{id}', 'show')->name('kondisipeti.show'); - // Route::get('kondisipeti/{id}/edit', 'edit')->name('kondisipeti.edit'); Route::put('kondisipeti/{id}', 'update')->name('kondisipeti.update'); Route::delete('kondisipeti/delete/{id}', 'destroy')->name('kondisipeti.destroy'); }); @@ -196,6 +185,13 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func Route::delete('warehouse/delete/{id}', 'destroy')->name('warehouse.destroy'); }); + //Halaman Recycle Data + // Route::controller(RecycleDataController::class)->group(function () { + // Route::get('recycle_data', 'index')->name('recycle_data.index'); + // Route::post('/recycle-data/pulihkan/{model}/{id}', 'pulihkanData')->name('recycle_data.pulihkanData'); + // Route::delete('/recycle-data/hapus-permanen/{model}/{id}', 'hapusPermanenData')->name('recycle_data.hapusPermanenData'); + // }); + //halaman Report Peti Route::controller(PetternLotPetiController::class)->group(function () { Route::get('Pettern_Lot_Peti/export', 'export')->name('Pettern_Lot_Peti.export');