@ -1,77 +0,0 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Controllers; |
||||
|
||||
use App\Models\Peti; |
||||
use App\Models\Customer; |
||||
use Illuminate\Http\Request; |
||||
|
||||
class RecycleDataController extends Controller |
||||
{ |
||||
/** |
||||
* Display a listing of the resource. |
||||
*/ |
||||
public function index() |
||||
{ |
||||
$peti = Peti::onlyTrashed()->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(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.'); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,53 @@
|
||||
<?php |
||||
|
||||
namespace Database\Seeders; |
||||
|
||||
use App\Models\asset_status; |
||||
use Illuminate\Database\Seeder; |
||||
|
||||
class AssetStatusSeeder extends Seeder |
||||
{ |
||||
/** |
||||
* Run the database seeds. |
||||
*/ |
||||
public function run(): void |
||||
{ |
||||
//barang in |
||||
for ($i = 21; $i <= 30; $i++) { |
||||
asset_status::create([ |
||||
'peti_id' => $i, |
||||
'exit_at' => now(), |
||||
'est_pengembalian' => now(), |
||||
'exit_pic' => 'Seeder', |
||||
'customer_id' => $i, |
||||
'warehouse_id' => $i, |
||||
'enter_at' => now(), |
||||
'enter_pic' => 'Seeder', |
||||
'enter_warehouse' => $i, |
||||
'kondisi_peti_id' => $i, |
||||
'status' => 1, |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
'created_at' => now(), |
||||
'updated_at' => now(), |
||||
]); |
||||
} |
||||
|
||||
//barang out |
||||
for ($i = 31; $i <= 40; $i++) { |
||||
asset_status::create([ |
||||
'peti_id' => $i, |
||||
'exit_at' => now(), |
||||
'est_pengembalian' => now(), |
||||
'exit_pic' => 'Seeder', |
||||
'customer_id' => $i, |
||||
'warehouse_id' => $i, |
||||
'status' => 0, |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
'created_at' => now(), |
||||
'updated_at' => now(), |
||||
]); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,30 @@
|
||||
<?php |
||||
|
||||
namespace Database\Seeders; |
||||
|
||||
use App\Models\Disposal; |
||||
use Illuminate\Database\Seeder; |
||||
|
||||
class DisposalSeeder extends Seeder |
||||
{ |
||||
/** |
||||
* Run the database seeds. |
||||
*/ |
||||
public function run(): void |
||||
{ |
||||
for ($i = 1; $i <= 10; $i++) { |
||||
Disposal::create([ |
||||
'peti_id' => $i, // Assuming you have 1000 petis in the 'petis' table |
||||
'customer_id' => $i, // Assuming you have 1000 customers in the 'customers' table |
||||
'warehouse_id' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table |
||||
'date_disposal' => now(), |
||||
'description' => 'Description', |
||||
'status_disposal' => 'INAKTIF', |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
'created_at' => now(), |
||||
'updated_at' => now(), |
||||
]); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,48 @@
|
||||
<?php |
||||
|
||||
namespace Database\Seeders; |
||||
|
||||
use App\Models\Type_peti; |
||||
use Illuminate\Database\Seeder; |
||||
|
||||
class TipePetiSeeder extends Seeder |
||||
{ |
||||
/** |
||||
* Run the database seeds. |
||||
*/ |
||||
public function run(): void |
||||
{ |
||||
Type_peti::create([ |
||||
'type' => 'Kecil', |
||||
'size_peti' => '2 X 2 X 2', |
||||
'description' => 'Peti dengan ukuran kecil', |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
]); |
||||
Type_peti::create([ |
||||
'type' => 'Standar', |
||||
'size_peti' => '3 X 3 X 3', |
||||
'description' => 'Peti dengan ukuran standar', |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
]); |
||||
|
||||
for ($i = 3; $i <= 100; $i++) { |
||||
Type_peti::create([ |
||||
'type' => 'Type ' . $i, |
||||
'size_peti' => $this->generateSize(), |
||||
'description' => 'Description for Type ' . $i, |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
]); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Generate a random size for the peti. |
||||
*/ |
||||
private function generateSize(): string |
||||
{ |
||||
return rand(1, 10) . ' X ' . rand(1, 10) . ' X ' . rand(1, 10); |
||||
} |
||||
} |
@ -0,0 +1,29 @@
|
||||
<?php |
||||
|
||||
namespace Database\Seeders; |
||||
|
||||
use App\Models\Transfer; |
||||
use Illuminate\Database\Seeder; |
||||
|
||||
class TransferSeeder extends Seeder |
||||
{ |
||||
/** |
||||
* Run the database seeds. |
||||
*/ |
||||
public function run(): void |
||||
{ |
||||
for ($i = 11; $i <= 20; $i++) { |
||||
Transfer::create([ |
||||
'peti_id' => $i, // Assuming you have 1000 petis in the 'petis' table |
||||
'name_customer' => $i, // Assuming you have 1000 customers in the 'customers' table |
||||
'source_warehouse' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table |
||||
'destination_warehouse' => $i, // Assuming you have 4 warehouses in the 'm_warehouses' table |
||||
'date' => now(), |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
'created_at' => now(), |
||||
'updated_at' => now(), |
||||
]); |
||||
} |
||||
} |
||||
} |
@ -1,32 +0,0 @@
|
||||
<?php |
||||
|
||||
namespace Database\Seeders; |
||||
|
||||
use App\Models\Peti; |
||||
use Illuminate\Database\Seeder; |
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents; |
||||
use Illuminate\Support\Facades\DB; |
||||
|
||||
class Type_Peti extends Seeder |
||||
{ |
||||
/** |
||||
* Run the database seeds. |
||||
*/ |
||||
public function run(): void |
||||
{ |
||||
DB::table('type_petis')->insert([ |
||||
'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', |
||||
'description' => 'Peti dengan ukuran standar', |
||||
'created_by' => 'Seeder', |
||||
'updated_by' => 'Seeder', |
||||
]); |
||||
} |
||||
} |
Before Width: | Height: | Size: 512 KiB |
Before Width: | Height: | Size: 394 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 501 KiB |
Before Width: | Height: | Size: 1005 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.7 KiB |
@ -1,5 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
@include('layouts.components.alert-prompt') |
||||
<p>Halaman Show Disposal</p> |
||||
@endsection |
@ -1,196 +0,0 @@
|
||||
{{-- @extends('layouts.main') |
||||
@section('title', 'Warehouse') |
||||
@section('content') |
||||
@include('layouts.components.alert-prompt') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Recycle Data</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px;">No.</th> |
||||
<th>Kategori Data</th> |
||||
<th>Data</th> |
||||
<th>Tanggal di hapus</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$norecycle = 1; |
||||
@endphp |
||||
<!-- Data Peti --> |
||||
@foreach ($peti as $data_peti) |
||||
<tr> |
||||
<td class="text-center" style="width: 50px;">{{ $norecycle++ }}</td> |
||||
<td>Data Peti</td> |
||||
<td>{{ $data_peti->fix_lot }}</td> |
||||
<td>{{ optional($data_peti->deleted_at)->format('d-m-Y') ?? '-' }}</td> |
||||
<td class="text-center"> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.pulihkanData', ['id' => $data_peti->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('POST') |
||||
<button type="submit" class="btn btn-sm btn-success aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin memulihkan data ini?')">Pulihkan</button> |
||||
</form> |
||||
|
||||
<!-- Hapus Permanen Data --> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.hapusPermanenData', ['id' => $data_peti->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" class="btn btn-sm btn-danger aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus permanen data ini?')">Hapus |
||||
Permanen</button> |
||||
</form> |
||||
|
||||
</td> |
||||
</tr> |
||||
@endforeach |
||||
|
||||
<!-- Data Customer --> |
||||
@foreach ($customer as $data_items) |
||||
<tr> |
||||
<td class="text-center" style="width: 50px;">{{ $norecycle++ }}</td> |
||||
<td>Data Customer</td> |
||||
<td>{{ $data_items->name }}</td> |
||||
<td>{{ optional($data_items->deleted_at)->format('d-m-Y') ?? '-' }}</td> |
||||
<td class="text-center"> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.pulihkanData', ['id' => $data_items->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('POST') |
||||
<button type="submit" class="btn btn-sm btn-success aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin memulihkan data ini?')">Pulihkan</button> |
||||
</form> |
||||
|
||||
<!-- Hapus Permanen Data --> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.hapusPermanenData', ['id' => $data_items->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" class="btn btn-sm btn-danger aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus permanen data ini?')">Hapus |
||||
Permanen</button> |
||||
</form> |
||||
|
||||
</td> |
||||
</tr> |
||||
@endforeach |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection --}} |
||||
|
||||
|
||||
@extends('layouts.main') |
||||
@section('title', 'Warehouse') |
||||
@section('content') |
||||
@include('layouts.components.alert-prompt') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Recycle Data</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px;">No.</th> |
||||
<th>Kategori Data</th> |
||||
<th>Data</th> |
||||
<th>Tanggal di hapus</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$norecycle = 1; |
||||
@endphp |
||||
<!-- Data Peti --> |
||||
@foreach ($peti as $data_peti) |
||||
<tr> |
||||
<td class="text-center" style="width: 50px;">{{ $norecycle++ }}</td> |
||||
<td>Data Peti</td> |
||||
<td>{{ $data_peti->fix_lot }}</td> |
||||
<td>{{ optional($data_peti->deleted_at)->format('d-m-Y') ?? '-' }}</td> |
||||
<td class="text-center"> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.pulihkanData', ['model' => 'peti', 'id' => $data_peti->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('POST') |
||||
<button type="submit" class="btn btn-sm btn-success aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin memulihkan data ini?')">Pulihkan</button> |
||||
</form> |
||||
|
||||
<!-- Hapus Permanen Data --> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.hapusPermanenData', ['model' => 'peti', 'id' => $data_peti->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" class="btn btn-sm btn-danger aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus permanen data ini?')">Hapus |
||||
Permanen</button> |
||||
</form> |
||||
|
||||
</td> |
||||
</tr> |
||||
@endforeach |
||||
|
||||
<!-- Data Customer --> |
||||
@foreach ($customer as $data_items) |
||||
<tr> |
||||
<td class="text-center" style="width: 50px;">{{ $norecycle++ }}</td> |
||||
<td>Data Customer</td> |
||||
<td>{{ $data_items->name }}</td> |
||||
<td>{{ optional($data_items->deleted_at)->format('d-m-Y') ?? '-' }}</td> |
||||
<td class="text-center"> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.pulihkanData', ['model' => 'customer', 'id' => $data_items->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('POST') |
||||
<button type="submit" class="btn btn-sm btn-success aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin memulihkan data ini?')">Pulihkan</button> |
||||
</form> |
||||
|
||||
<!-- Hapus Permanen Data --> |
||||
<form |
||||
action="{{ route('dashboard.recycle_data.hapusPermanenData', ['model' => 'customer', 'id' => $data_items->id]) }}" |
||||
method="post"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" class="btn btn-sm btn-danger aksi-link" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus permanen data ini?')">Hapus |
||||
Permanen</button> |
||||
</form> |
||||
|
||||
</td> |
||||
</tr> |
||||
@endforeach |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,59 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<style> |
||||
.table th { |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.table td { |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
||||
<div class="card shadow mb-4"> |
||||
<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 Customer</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.ReportCustomer.export') }}" class="btn btn-info btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Export Exel</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama Customer</th> |
||||
<th>Kode Customer</th> |
||||
<th>Lot No</th> |
||||
<th>No. Telepon</th> |
||||
<th>Alamat</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$noreport = 1; |
||||
@endphp |
||||
@forelse ($customers as $data_customer) |
||||
<tr> |
||||
<td class="text-center">{{ $noreport++ }}</td> |
||||
<td>{{ $data_customer->name }}</td> |
||||
<td>{{ $data_customer->code_customer }}</td> |
||||
<td>{{ $data_customer->lot_no }}</td> |
||||
<td>{{ $data_customer->no_tlp }}</td> |
||||
<td>{{ $data_customer->address }}</td> |
||||
</tr> |
||||
@empty |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,53 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<style> |
||||
.table th { |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.table td { |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
||||
<div class="card shadow mb-4"> |
||||
<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 Kondisi Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.ReportKondisiPeti.export') }}" class="btn btn-info btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Export Exel</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px">No</th> |
||||
<th>Kondisi Peti</th> |
||||
<th>Deskripsi</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$noreport = 1; |
||||
@endphp |
||||
@forelse ($kondisiPeti as $data_kondisiPeti) |
||||
<tr> |
||||
<td class="text-center">{{ $noreport++ }}</td> |
||||
<td>{{ $data_kondisiPeti->nama_kondisi }}</td> |
||||
<td>{{ $data_kondisiPeti->deskripsi_kondisi }}</td> |
||||
</tr> |
||||
@empty |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,55 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<style> |
||||
.table th { |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.table td { |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
||||
<div class="card shadow mb-4"> |
||||
<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 Tipe Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.ReportTipePeti.export') }}" class="btn btn-info btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Export Exel</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px">No</th> |
||||
<th>Tipe Peti</th> |
||||
<th>Ukuran Peti</th> |
||||
<th>Deskripsi Peti</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$noreport = 1; |
||||
@endphp |
||||
@forelse ($tipepeti as $data_tipepeti) |
||||
<tr> |
||||
<td class="text-center">{{ $noreport++ }}</td> |
||||
<td>{{ $data_tipepeti->type }}</td> |
||||
<td>{{ $data_tipepeti->size_peti }}</td> |
||||
<td>{{ $data_tipepeti->description }}</td> |
||||
</tr> |
||||
@empty |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,55 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<style> |
||||
.table th { |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.table td { |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
||||
<div class="card shadow mb-4"> |
||||
<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 Warehouse</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.ReportWarehouse.export') }}" class="btn btn-info btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Export Exel</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama Gudang</th> |
||||
<th>Deskripsi</th> |
||||
<th>Alamat</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$noreport = 1; |
||||
@endphp |
||||
@forelse ($warehouse as $data_warehouse) |
||||
<tr> |
||||
<td class="text-center">{{ $noreport++ }}</td> |
||||
<td>{{ $data_warehouse->name }}</td> |
||||
<td>{{ $data_warehouse->description }}</td> |
||||
<td>{{ $data_warehouse->address }}</td> |
||||
</tr> |
||||
@empty |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,77 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('title', 'Update Data Pengembalian') |
||||
@section('content') |
||||
@include('layouts.components.alert-prompt') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Update Pengembalian</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<form action="{{ route('dashboard.pengembalian.update', [$peminjaman->id]) }}" method="POST" |
||||
enctype="multipart/form-data" id="editForm"> |
||||
@csrf |
||||
@method('PUT') |
||||
<div class="form-group"> |
||||
<label for="peti_id" class="col-form-label">Pilih Detail Peti:</label> |
||||
<div> |
||||
<input class="form-control" hidden name="peti_id" type="text" id="peti_id" |
||||
value="{{ $peminjaman->peti_id }}" readonly> |
||||
<input class="form-control" value="{{ $peminjaman->peti->fix_lot }}" readonly> |
||||
</div> |
||||
|
||||
<label for="exit_at" class="col-form-label">Tanggal Peminjaman:</label> |
||||
<input class="form-control" name="exit_at" type="date" id="exit_at" |
||||
value="{{ $peminjaman->exit_at }}" readonly> |
||||
|
||||
<label for="est_pengembalian" class="col-form-label">Estimasi Tanggal Pengembalian:</label> |
||||
<input class="form-control" name="est_pengembalian" type="date" id="est_pengembalian" |
||||
value="{{ $peminjaman->est_pengembalian }}" readonly> |
||||
|
||||
<label for="exit_warehouse" class="col-form-label">Asal Gudang :</label> |
||||
<div> |
||||
<input class="form-control" hidden name="exit_warehouse" type="text" id="exit_warehouse" |
||||
value="{{ $peminjaman->exit_warehouse }}" readonly> |
||||
<input class="form-control" value="{{ $peminjaman->warehouse->name }}" readonly> |
||||
</div> |
||||
|
||||
<label for="enter_at" class="col-form-label">Tanggal Pengembalian: <span |
||||
class="text-danger">*</span></label> |
||||
<input class="form-control" name="enter_at" type="date" id="enter_at" |
||||
value="{{ \Carbon\Carbon::parse($peminjaman->enter_at)->format('Y-m-d') }}" required> |
||||
|
||||
<label for="enter_warehouse" class="col-form-label">Tujuan Pengembalian Gudang: <span |
||||
class="text-danger">*</span></label> |
||||
<select class="form-control" name="enter_warehouse" type="text" id="enter_warehouse" required> |
||||
<option disabled selected>Pilih Tujuan Gudang</option> |
||||
@foreach ($warehouse as $data_warehouse) |
||||
<option value="{{ $data_warehouse->id }}" |
||||
@if ($data_warehouse->id == $peminjaman->enter_warehouse) selected |
||||
@else @endif> |
||||
{{ $data_warehouse->name }}</option> |
||||
@endforeach |
||||
</select> |
||||
|
||||
<label for="kondisi_peti" class="col-form-label">Kondisi Peti: <span |
||||
class="text-danger">*</span></label> |
||||
<input class="form-control" name="kondisi_peti" type="text" id="kondisi_peti" |
||||
value="{{ old('kondisi_peti', $peminjaman->kondisi_peti) }}" placeholder="Masukan kondisi peti" |
||||
pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');" required> |
||||
</div> |
||||
<div class="modal-footer d-flex justify-content-center"> |
||||
<a href="{{ route('dashboard.pengembalian.index') }}" class="btn btn-secondary">Kembali</a> |
||||
<button type="submit" class="btn btn-primary" id="submitButton">Simpan</button> |
||||
</div> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
|
||||
<script> |
||||
document.getElementById('editForm').addEventListener('submit', function() { |
||||
document.getElementById('submitButton').setAttribute('disabled', 'true'); |
||||
}); |
||||
</script> |
||||
@endsection |
@ -1,102 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
@include('layouts.components.alert-prompt') |
||||
<style> |
||||
.table th { |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.table td { |
||||
white-space: nowrap; |
||||
} |
||||
</style> |
||||
@if (auth()->user()->role_id == 1) |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Kode Peti</th> |
||||
<th>Customer</th> |
||||
<th>Tgl Peinjaman</th> |
||||
<th>Estimasi Pengembalian</th> |
||||
<th>PJ Peminjaman</th> |
||||
<th>Asal WH Peminjaman</th> |
||||
<th>Tgl Pengembalian</th> |
||||
<th>PJ Pengembalian</th> |
||||
<th>Tujuan WH Pengembalian</th> |
||||
<th>Kondisi Peti</th> |
||||
<th>Status</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$no_peminjaman = 1; |
||||
@endphp |
||||
@forelse ($peminjaman as $data) |
||||
<tr> |
||||
<td>{{ $no_peminjaman++ }}</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>{{ $data->exit_pic }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td> |
||||
@if ($data->enter_at) |
||||
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_pic) |
||||
{{ $data->enter_pic }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_warehouse) |
||||
{{ $data->warehouse->name }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->kondisi_peti) |
||||
{{ $data->kondisi_peti }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_warehouse === null) |
||||
Not Return |
||||
@else |
||||
Return |
||||
@endif |
||||
</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.pengembalian.edit', [$data->id]) }}" title="Edit"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@else |
||||
@include('pages.user.Pengembalian.index') |
||||
@endif |
||||
@endsection |