Browse Source

add all import

master
Gunawan19621 1 year ago
parent
commit
0d3dabc4ef
  1. 17
      app/Exports/AssetExport.php
  2. 55
      app/Exports/CustomerExport.php
  3. 46
      app/Exports/KondisiPetiExport.php
  4. 4
      app/Exports/PetternLotPetiExport.php
  5. 49
      app/Exports/TipePetiExport.php
  6. 49
      app/Exports/WarehouseExport.php
  7. 3
      app/Http/Controllers/CustomerController.php
  8. 10
      app/Http/Controllers/KondisiPetiController.php
  9. 14
      app/Http/Controllers/PetiController.php
  10. 5
      app/Http/Controllers/Report/PetternLotPetiController.php
  11. 27
      app/Http/Controllers/Report/ReportCustomerController.php
  12. 28
      app/Http/Controllers/Report/ReportKondisiPetiController.php
  13. 28
      app/Http/Controllers/Report/ReportTipePetiController.php
  14. 28
      app/Http/Controllers/Report/ReportWarehouseController.php
  15. 5
      app/Http/Controllers/Report/StokOpNameController.php
  16. 12
      app/Http/Controllers/TypePetiController.php
  17. 12
      app/Http/Controllers/WarehouseController.php
  18. 5
      app/Imports/CustomerImport.php
  19. 30
      app/Imports/KondisiPetiImport.php
  20. 37
      app/Imports/PetiImport.php
  21. 32
      app/Imports/TipePetiImport.php
  22. 31
      app/Imports/WarehouseImport.php
  23. 1
      app/Models/Customer.php
  24. 1
      app/Models/Kondisi_Peti.php
  25. 1
      app/Models/Type_peti.php
  26. 1
      app/Models/m_warehouse.php
  27. 8
      database/seeders/DatabaseSeeder.php
  28. 0
      public/assets/file/Format_Import_Customer.csv
  29. 1
      public/assets/file/Format_Import_Kondisi_Peti.csv
  30. 1
      public/assets/file/Format_Import_Peti.csv
  31. 1
      public/assets/file/Format_Import_Tipe_Peti.csv
  32. 1
      public/assets/file/Format_Import_Warehouse.csv
  33. 2
      resources/views/dashboard/History/Pengembalian/index.blade.php
  34. 2
      resources/views/dashboard/History/Transfer/index.blade.php
  35. 4
      resources/views/dashboard/Master_Data/Customer/index.blade.php
  36. 45
      resources/views/dashboard/Master_Data/Manajemen_Peti/Kondisi_Peti/index.blade.php
  37. 63
      resources/views/dashboard/Master_Data/Manajemen_Peti/Peti/index.blade.php
  38. 42
      resources/views/dashboard/Master_Data/Manajemen_Peti/Type_peti/index.blade.php
  39. 59
      resources/views/dashboard/Master_Data/Report/Customer/index.blade.php
  40. 53
      resources/views/dashboard/Master_Data/Report/Kondisi_Peti/index.blade.php
  41. 2
      resources/views/dashboard/Master_Data/Report/Pattern_lot_peti/index.blade.php
  42. 3
      resources/views/dashboard/Master_Data/Report/Stok_opname/index.blade.php
  43. 55
      resources/views/dashboard/Master_Data/Report/Tipe_Peti/index.blade.php
  44. 55
      resources/views/dashboard/Master_Data/Report/Warehouse/index.blade.php
  45. 41
      resources/views/dashboard/Master_Data/Warehouse/index.blade.php
  46. 8
      resources/views/layouts/sidebar.blade.php
  47. 64
      routes/web.php

17
app/Exports/AssetExport.php

@ -1,17 +0,0 @@
<?php
namespace App\Exports;
use App\Models\m_asset;
use Maatwebsite\Excel\Concerns\FromCollection;
class AssetExport implements FromCollection
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
return m_asset::all();
}
}

55
app/Exports/CustomerExport.php

@ -0,0 +1,55 @@
<?php
namespace App\Exports;
use App\Models\Customer;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
class CustomerExport implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
// Ambil data dari model Peti
$customers = Customer::select(
'id',
'name',
'code_customer',
'lot_no',
'no_tlp',
'address'
)->get();
// Inisialisasi nomor awal
// $nomor = 1;
// Modifikasi data dan tambahkan nomor
$data = $customers->map(function ($customer) use (&$nomor) {
return [
'No' => $customer->id,
'Nama Customer' => $customer->name,
'Kode Customer' => $customer->code_customer,
'Lot No' => $customer->lot_no,
'No Telepon' => $customer->no_tlp,
'Alamat' => $customer->address,
];
});
return $data;
}
public function headings(): array
{
return [
'No',
'NAMA CUSTOMER',
'kODE CUSTOMER',
'LOT NO',
'NO TELEPONE',
'ALAMAT',
];
}
}

46
app/Exports/KondisiPetiExport.php

@ -0,0 +1,46 @@
<?php
namespace App\Exports;
use App\Models\Kondisi_Peti;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
class KondisiPetiExport implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
// Ambil data dari model Peti
$kondisipetis = Kondisi_Peti::select(
'id',
'nama_kondisi',
'deskripsi_kondisi',
)->get();
// Inisialisasi nomor awal
// $nomor = 1;
// Modifikasi data dan tambahkan nomor
$data = $kondisipetis->map(function ($kondisipeti) use (&$nomor) {
return [
'No' => $kondisipeti->id,
'Nama Kondisi' => $kondisipeti->nama_kondisi,
'Deskripsi' => $kondisipeti->deskripsi_kondisi,
];
});
return $data;
}
public function headings(): array
{
return [
'No',
'NAMA KONDISI',
'DESKRIPSI',
];
}
}

4
app/Exports/PetternLotPetiExport.php

@ -28,6 +28,7 @@ class PetternLotPetiExport implements FromCollection, WithHeadings
$data = $petis->map(function ($peti) use (&$nomor) { $data = $petis->map(function ($peti) use (&$nomor) {
return [ return [
'No' => $nomor++, 'No' => $nomor++,
'FIX LOT' => $peti->fix_lot,
'Customer' => $peti->customer->name, 'Customer' => $peti->customer->name,
'Warehouse' => $peti->warehouse->name, 'Warehouse' => $peti->warehouse->name,
'CODE CUSTOMER' => $peti->customer->code_customer, 'CODE CUSTOMER' => $peti->customer->code_customer,
@ -35,7 +36,6 @@ class PetternLotPetiExport implements FromCollection, WithHeadings
'UKURAN PETI' => $peti->tipe_peti->size_peti, 'UKURAN PETI' => $peti->tipe_peti->size_peti,
'LOT NO' => $peti->customer->lot_no, 'LOT NO' => $peti->customer->lot_no,
'PACKING NO' => $peti->packing_no, 'PACKING NO' => $peti->packing_no,
'FIX LOT' => $peti->fix_lot,
'Status' => $peti->status, 'Status' => $peti->status,
]; ];
}); });
@ -47,6 +47,7 @@ class PetternLotPetiExport implements FromCollection, WithHeadings
{ {
return [ return [
'No', 'No',
'FIX LOT',
'Customer', 'Customer',
'WH', 'WH',
'CODE CUSTOMER', 'CODE CUSTOMER',
@ -54,7 +55,6 @@ class PetternLotPetiExport implements FromCollection, WithHeadings
'UKURAN PETI', 'UKURAN PETI',
'LOT NO', 'LOT NO',
'PACKING NO', 'PACKING NO',
'FIX LOT',
'STATUS' 'STATUS'
]; ];
} }

49
app/Exports/TipePetiExport.php

@ -0,0 +1,49 @@
<?php
namespace App\Exports;
use App\Models\Type_peti;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
class TipePetiExport implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
// Ambil data dari model Peti
$tipepetis = Type_peti::select(
'id',
'type',
'size_peti',
'description',
)->get();
// Inisialisasi nomor awal
// $nomor = 1;
// Modifikasi data dan tambahkan nomor
$data = $tipepetis->map(function ($tipepeti) use (&$nomor) {
return [
'No' => $tipepeti->id,
'Tipe' => $tipepeti->type,
'Ukuran Peti' => $tipepeti->size_peti,
'Deskripsi' => $tipepeti->description,
];
});
return $data;
}
public function headings(): array
{
return [
'No',
'TIPE',
'UKURAN PETI',
'DESKRIPSI',
];
}
}

49
app/Exports/WarehouseExport.php

@ -0,0 +1,49 @@
<?php
namespace App\Exports;
use App\Models\m_warehouse;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromCollection;
class WarehouseExport implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
public function collection()
{
// Ambil data dari model Peti
$warehouses = m_warehouse::select(
'id',
'name',
'description',
'address',
)->get();
// Inisialisasi nomor awal
// $nomor = 1;
// Modifikasi data dan tambahkan nomor
$data = $warehouses->map(function ($warehouse) use (&$nomor) {
return [
'No' => $warehouse->id,
'Nama Gudang' => $warehouse->name,
'Deskripsi' => $warehouse->description,
'Alamat' => $warehouse->address,
];
});
return $data;
}
public function headings(): array
{
return [
'No',
'NAMA GUDANG',
'DESKRIPSI',
'ALAMAT',
];
}
}

3
app/Http/Controllers/CustomerController.php

@ -113,10 +113,7 @@ class CustomerController extends Controller
public function importCustomer(Request $request) public function importCustomer(Request $request)
{ {
// dd('oke');
//melakukan import file
Excel::import(new CustomerImport, request()->file('file')); Excel::import(new CustomerImport, request()->file('file'));
return redirect()->route('dashboard.customer.index')->with('success', 'Data customer berhasil Di Import'); return redirect()->route('dashboard.customer.index')->with('success', 'Data customer berhasil Di Import');
} }
} }

10
app/Http/Controllers/KondisiPetiController.php

@ -2,11 +2,13 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Kondisi_Peti;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Requests\ValidasiCreateKondisiPeti; use App\Http\Requests\ValidasiCreateKondisiPeti;
use App\Http\Requests\ValidasiUpdateKondisiPeti; use App\Http\Requests\ValidasiUpdateKondisiPeti;
use App\Models\Kondisi_Peti; use App\Imports\KondisiPetiImport;
class KondisiPetiController extends Controller class KondisiPetiController extends Controller
{ {
@ -64,4 +66,10 @@ class KondisiPetiController extends Controller
return redirect()->back()->with('error', 'Data kondisi peti gagal dihapus'); return redirect()->back()->with('error', 'Data kondisi peti gagal dihapus');
} }
} }
public function importKondisiPeti(Request $request)
{
Excel::import(new KondisiPetiImport, request()->file('file'));
return redirect()->route('dashboard.kondisipeti.index')->with('success', 'Data kondisi peti berhasil di import');
}
} }

14
app/Http/Controllers/PetiController.php

@ -2,18 +2,20 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\ValidasiCreatePeti;
use App\Http\Requests\ValidasiUpdatePeti;
use Dompdf\Dompdf; use Dompdf\Dompdf;
use Dompdf\Options; use Dompdf\Options;
use App\Models\Peti; use App\Models\Peti;
use App\Models\Customer; use App\Models\Customer;
use App\Models\Type_peti; use App\Models\Type_peti;
use App\Models\Kondisi_Peti;
use Mockery\Matcher\Type; use Mockery\Matcher\Type;
use App\Imports\PetiImport;
use App\Models\m_warehouse; use App\Models\m_warehouse;
use App\Models\Kondisi_Peti;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Requests\ValidasiCreatePeti;
use App\Http\Requests\ValidasiUpdatePeti;
use SimpleSoftwareIO\QrCode\Facades\QrCode; use SimpleSoftwareIO\QrCode\Facades\QrCode;
class PetiController extends Controller class PetiController extends Controller
@ -268,4 +270,10 @@ class PetiController extends Controller
] ]
); );
} }
public function importPeti(Request $request)
{
Excel::import(new PetiImport, request()->file('file'));
return redirect()->route('dashboard.peti.index')->with('success', 'Data peti berhasil di import');
}
} }

5
app/Http/Controllers/PetternLotPetiController.php → app/Http/Controllers/Report/PetternLotPetiController.php

@ -1,12 +1,13 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Report;
use App\Models\Peti; use App\Models\Peti;
use App\Models\asset_status;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Facades\Excel;
use App\Exports\PetternLotPetiExport; use App\Exports\PetternLotPetiExport;
use App\Models\asset_status;
class PetternLotPetiController extends Controller class PetternLotPetiController extends Controller
{ {

27
app/Http/Controllers/Report/ReportCustomerController.php

@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Report;
use App\Models\Customer;
use Illuminate\Http\Request;
use App\Exports\CustomerExport;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
class ReportCustomerController extends Controller
{
public function index()
{
$data = [
'customers' => Customer::get(),
'active' => 'menu-ReportCustomer'
];
return view('dashboard.Master_Data.Report.Customer.index', $data);
}
public function export()
{
// dd('export');
return Excel::download(new CustomerExport, 'Report_Customer.xlsx');
}
}

28
app/Http/Controllers/Report/ReportKondisiPetiController.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Report;
use App\Exports\KondisiPetiExport;
use App\Models\Kondisi_Peti;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
class ReportKondisiPetiController extends Controller
{
public function index()
{
// dd('Index');
$data = [
'kondisiPeti' => Kondisi_Peti::get(),
'active' => 'menu-ReportKondisiPeti'
];
return view('dashboard.Master_Data.Report.Kondisi_Peti.index', $data);
}
public function export()
{
// dd('export');
return Excel::download(new KondisiPetiExport, 'Report_Kondisi_Peti.xlsx');
}
}

28
app/Http/Controllers/Report/ReportTipePetiController.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Report;
use App\Exports\TipePetiExport;
use App\Models\Type_peti;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
class ReportTipePetiController extends Controller
{
public function index()
{
// dd('Index');
$data = [
'tipepeti' => Type_peti::get(),
'active' => 'menu-ReportTypePeti'
];
return view('dashboard.Master_Data.Report.Tipe_Peti.index', $data);
}
public function export()
{
// dd('export');
return Excel::download(new TipePetiExport, 'Report_Tipe_Peti.xlsx');
}
}

28
app/Http/Controllers/Report/ReportWarehouseController.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Report;
use App\Exports\WarehouseExport;
use App\Models\m_warehouse;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel;
class ReportWarehouseController extends Controller
{
public function index()
{
// dd('Index');
$data = [
'warehouse' => m_warehouse::get(),
'active' => 'menu-ReportWarehouse'
];
return view('dashboard.Master_Data.Report.Warehouse.index', $data);
}
public function export()
{
// dd('export');
return Excel::download(new WarehouseExport, 'Report_Warehouse.xlsx');
}
}

5
app/Http/Controllers/StokOpNameController.php → app/Http/Controllers/Report/StokOpNameController.php

@ -1,12 +1,13 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers\Report;
use App\Exports\StokOpNameExport;
use App\Models\Peti; use App\Models\Peti;
use App\Models\asset_status; use App\Models\asset_status;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Exports\StokOpNameExport;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;
use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Facades\Excel;
class StokOpNameController extends Controller class StokOpNameController extends Controller

12
app/Http/Controllers/TypePetiController.php

@ -2,11 +2,13 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\ValidasiCreateType_Peti;
use App\Http\Requests\ValidasiUpdateType_Peti;
use App\Models\Type_peti; use App\Models\Type_peti;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Requests\ValidasiCreateType_Peti;
use App\Http\Requests\ValidasiUpdateType_Peti;
use App\Imports\TipePetiImport;
class TypePetiController extends Controller class TypePetiController extends Controller
{ {
@ -108,4 +110,10 @@ class TypePetiController extends Controller
return redirect()->back()->with('error', 'Data tipe peti gagal dihapus'); return redirect()->back()->with('error', 'Data tipe peti gagal dihapus');
} }
} }
public function importTipePeti(Request $request)
{
Excel::import(new TipePetiImport, request()->file('file'));
return redirect()->route('dashboard.typepeti.index')->with('success', 'Data tipe peti berhasil di import');
}
} }

12
app/Http/Controllers/WarehouseController.php

@ -2,11 +2,13 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\ValidasiCreateWarehouse;
use App\Http\Requests\ValidasiUpdateWarehouse;
use App\Models\m_warehouse; use App\Models\m_warehouse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Facades\Excel;
use App\Http\Requests\ValidasiCreateWarehouse;
use App\Http\Requests\ValidasiUpdateWarehouse;
use App\Imports\WarehouseImport;
class WarehouseController extends Controller class WarehouseController extends Controller
{ {
@ -99,4 +101,10 @@ class WarehouseController extends Controller
return redirect()->back()->with('error', 'Data Gudang gagal dihapus'); return redirect()->back()->with('error', 'Data Gudang gagal dihapus');
} }
} }
public function importWarehouse(Request $request)
{
Excel::import(new WarehouseImport, request()->file('file'));
return redirect()->route('dashboard.warehouse.index')->with('success', 'Data Warehouse berhasil diimport');
}
} }

5
app/Imports/CustomerImport.php

@ -3,6 +3,7 @@
namespace App\Imports; namespace App\Imports;
use App\Models\Customer; use App\Models\Customer;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use Maatwebsite\Excel\Concerns\ToModel; use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow; use Maatwebsite\Excel\Concerns\WithHeadingRow;
@ -16,12 +17,16 @@ class CustomerImport implements ToModel, WithHeadingRow
*/ */
public function model(array $row) public function model(array $row)
{ {
// Mendapatkan informasi pengguna yang sedang login
$user = Auth::user();
return new Customer([ return new Customer([
'name' => $row['name'], 'name' => $row['name'],
'code_customer' => $row['code_customer'], 'code_customer' => $row['code_customer'],
'lot_no' => $row['lot_no'], 'lot_no' => $row['lot_no'],
'no_tlp' => $row['no_tlp'], 'no_tlp' => $row['no_tlp'],
'address' => $row['address'], 'address' => $row['address'],
'created_by' => $user->fullname,
]); ]);
} }
} }

30
app/Imports/KondisiPetiImport.php

@ -0,0 +1,30 @@
<?php
namespace App\Imports;
use App\Models\Kondisi_Peti;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class KondisiPetiImport implements ToModel, WithHeadingRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
// Mendapatkan informasi pengguna yang sedang login
$user = Auth::user();
return new Kondisi_Peti([
'nama_kondisi' => $row['nama_kondisi'],
'deskripsi_kondisi' => $row['deskripsi_kondisi'],
'created_by' => $user->fullname,
]);
}
}

37
app/Imports/PetiImport.php

@ -0,0 +1,37 @@
<?php
namespace App\Imports;
use App\Models\Peti;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class PetiImport implements ToModel, WithHeadingRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
// Mendapatkan informasi pengguna yang sedang login
$user = Auth::user();
return new Peti([
'created_by' => $user->fullname,
'tipe_peti_id' => $row['tipe_peti_id'],
'warna' => $row['warna'],
'customer_id' => $row['customer_id'],
'warehouse_id' => $row['warehouse_id'],
'date_pembuatan' => now(),
'kondisipeti_id' => $row['kondisipeti_id'],
'packing_no' => $row['packing_no'],
'fix_lot' => $row['fix_lot'],
'status' => $row['status'],
]);
}
}

32
app/Imports/TipePetiImport.php

@ -0,0 +1,32 @@
<?php
namespace App\Imports;
use App\Models\Type_peti;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Concerns\ToModel;
use App\Models\Type_peti as ModelsType_peti;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class TipePetiImport implements ToModel, WithHeadingRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
// Mendapatkan informasi pengguna yang sedang login
$user = Auth::user();
return new Type_peti([
'type' => $row['type'],
'size_peti' => $row['size_peti'],
'description' => $row['description'],
'created_by' => $user->fullname,
]);
}
}

31
app/Imports/WarehouseImport.php

@ -0,0 +1,31 @@
<?php
namespace App\Imports;
use App\Models\m_warehouse;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class WarehouseImport implements ToModel, WithHeadingRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
// Mendapatkan informasi pengguna yang sedang login
$user = Auth::user();
return new m_warehouse([
'name' => $row['name'],
'description' => $row['description'],
'address' => $row['address'],
'created_by' => $user->fullname,
]);
}
}

1
app/Models/Customer.php

@ -13,6 +13,7 @@ class Customer extends Model
protected $table = 'customers'; protected $table = 'customers';
protected $fillable = [ protected $fillable = [
'id',
'name', 'name',
'code_customer', 'code_customer',
'lot_no', 'lot_no',

1
app/Models/Kondisi_Peti.php

@ -13,6 +13,7 @@ class Kondisi_Peti extends Model
protected $table = 'kondisi_petis'; protected $table = 'kondisi_petis';
protected $fillable = [ protected $fillable = [
'id',
'nama_kondisi', 'nama_kondisi',
'deskripsi_kondisi', 'deskripsi_kondisi',
'created_by', 'created_by',

1
app/Models/Type_peti.php

@ -13,6 +13,7 @@ class Type_peti extends Model
protected $table = 'type_petis'; protected $table = 'type_petis';
protected $fillable = [ protected $fillable = [
'id',
'type', 'type',
'size_peti', 'size_peti',
'description', 'description',

1
app/Models/m_warehouse.php

@ -13,6 +13,7 @@ class m_warehouse extends Model
protected $table = 'm_warehouses'; protected $table = 'm_warehouses';
protected $fillable = [ protected $fillable = [
'id',
'name', 'name',
'description', 'description',
'address', 'address',

8
database/seeders/DatabaseSeeder.php

@ -24,10 +24,10 @@ class DatabaseSeeder extends Seeder
RoleSeeder::class, RoleSeeder::class,
WarehouseSeeder::class, WarehouseSeeder::class,
UserSeeder::class, UserSeeder::class,
Type_Peti::class, // Type_Peti::class,
Customer::class, // Customer::class,
Kondisi_PetiSeeder::class, // Kondisi_PetiSeeder::class,
PetiSeeder::class, // PetiSeeder::class,
]); ]);
} }
} }

0
public/assets/file/Format Import Customer.csv → public/assets/file/Format_Import_Customer.csv

1 name code_customer lot_no no_tlp address

1
public/assets/file/Format_Import_Kondisi_Peti.csv

@ -0,0 +1 @@
nama_kondisi,deskripsi_kondisi
1 nama_kondisi deskripsi_kondisi

1
public/assets/file/Format_Import_Peti.csv

@ -0,0 +1 @@
tipe_peti_id,warna,customer_id,warehouse_id,jumlah,date_pembuatan,kondisipeti_id,packing_no,fix_lot,status
1 tipe_peti_id warna customer_id warehouse_id jumlah date_pembuatan kondisipeti_id packing_no fix_lot status

1
public/assets/file/Format_Import_Tipe_Peti.csv

@ -0,0 +1 @@
type,size_peti,description
1 type size_peti description

1
public/assets/file/Format_Import_Warehouse.csv

@ -0,0 +1 @@
name,description,address
1 name description address

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

@ -13,7 +13,7 @@
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Pengembalian</h5> <h5 class="m-0 font-weight-bold text-primary mt-2">Histori Pengembalian</h5>
</div> </div>
</div> </div>
</div> </div>

2
resources/views/dashboard/History/Transfer/index.blade.php

@ -13,7 +13,7 @@
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Transfer</h5> <h5 class="m-0 font-weight-bold text-primary mt-2">Histori Transfer</h5>
</div> </div>
</div> </div>
</div> </div>

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

@ -73,7 +73,7 @@
@include('pages.user.Master_Data.Customer.index') @include('pages.user.Master_Data.Customer.index')
@endif @endif
<!-- Tambah Data Modal--> <!-- Import Data Modal-->
<div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" <div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true"> aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
@ -97,7 +97,7 @@
</div> </div>
<!-- Tombol untuk mengunduh file --> <!-- Tombol untuk mengunduh file -->
<div class="form-group"> <div class="form-group">
<a href="{{ asset('assets/file/Format Import Customer.csv') }}" class="btn btn-primary" <a href="{{ asset('assets/file/Format_Import_Customer.csv') }}" class="btn btn-primary"
download>Unduh Format Customer</a> download>Unduh Format Customer</a>
</div> </div>
</div> </div>

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

@ -13,6 +13,10 @@
data-target="#tambahDataModal"> data-target="#tambahDataModal">
<span class="text">Tambah Kondisi Peti</span> <span class="text">Tambah Kondisi Peti</span>
</a> </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> </div>
</div> </div>
@ -63,6 +67,43 @@
@include('pages.user.master_data.manajemen_peti.kondisi_peti.index') @include('pages.user.master_data.manajemen_peti.kondisi_peti.index')
@endif @endif
<!-- Import Data Modal-->
<div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data Kondisi Peti</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('dashboard.kondisipeti.import') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">File Import Kondisi Peti:</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
diimpor.</small>
</div>
<!-- Tombol untuk mengunduh file -->
<div class="form-group">
<a href="{{ asset('assets/file/Format_Import_Kondisi_Peti.csv') }}" class="btn btn-primary"
download>Unduh Format Kondisi Peti</a>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Tambah Data Modal--> <!-- Tambah Data Modal-->
<div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" <div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
@ -84,8 +125,8 @@
<label for="nama_kondisi" class="col-form-label">Kondisi Peti : <span <label for="nama_kondisi" class="col-form-label">Kondisi Peti : <span
class="text-danger">*</span></label> class="text-danger">*</span></label>
<input class="form-control" name="nama_kondisi" type="text" id="nama_kondisi" <input class="form-control" name="nama_kondisi" type="text" id="nama_kondisi"
value="{{ old('nama_kondisi') }}" placeholder="Masukan Kondisi Peti" pattern="[^0-9]+" value="{{ old('nama_kondisi') }}" placeholder="Masukan Kondisi Peti"
oninput="this.value=this.value.replace(/[0-9]/g,'');" pattern="[^0-9]+" oninput="this.value=this.value.replace(/[0-9]/g,'');"
title="Hanya karakter selain huruf yang diperbolehkan" required> title="Hanya karakter selain huruf yang diperbolehkan" required>
<label for="deskripsi_kondisi" class="col-form-label">Deskripsi: <span <label for="deskripsi_kondisi" class="col-form-label">Deskripsi: <span

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

@ -15,20 +15,25 @@
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<div class="row"> <div class="row">
<div class="col-9"> <div class="col-7">
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peti</h5> <h5 class="m-0 font-weight-bold text-primary mt-2">Data Peti</h5>
</div> </div>
<div class="col-3 text-right d-flex"> <div class="col-5 d-flex">
<a href="{{ route('dashboard.peti.create') }}" class="btn btn-success btn-icon-split ml-2"> <a href="{{ route('dashboard.peti.create') }}" class="btn btn-success btn-icon-split ml-4">
<span class="text">Tambah Peti</span> <span class="text">Tambah Peti</span>
</a> </a>
<div class="mr-2">
<form action="{{ route('dashboard.all-pdf.cetakpdf') }}" method="GET" id="pdfForm" class="ml-2" <form action="{{ route('dashboard.all-pdf.cetakpdf') }}" method="GET" id="pdfForm"
target="_blank"> class="ml-2" target="_blank">
@csrf @csrf
<input type="hidden" name="peti_ids" id="peti_ids" value=""> <input type="hidden" name="peti_ids" id="peti_ids" value="">
<button type="submit" class="btn btn-primary">Cetak PDF</button> <button type="submit" class="btn btn-primary">Cetak PDF</button>
</form> </form>
</div>
<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> </div>
</div> </div>
@ -103,6 +108,44 @@
@include('pages.user.Master_Data.Manajemen_Peti.Peti.index') @include('pages.user.Master_Data.Manajemen_Peti.Peti.index')
@endif @endif
<!-- Import Data Modal-->
<div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data Peti</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('dashboard.peti.import') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">File Import Peti:</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
diimpor.</small>
</div>
<!-- Tombol untuk mengunduh file -->
<div class="form-group">
<a href="{{ asset('assets/file/Format_Import_Peti.csv') }}" class="btn btn-primary"
download>Unduh Format Peti</a>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {

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

@ -12,6 +12,10 @@
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split"> <a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split">
<span class="text">Tambah Tipe Peti</span> <span class="text">Tambah Tipe Peti</span>
</a> </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> </div>
</div> </div>
@ -66,4 +70,42 @@
@elseif (auth()->user()->role_id == 2) @elseif (auth()->user()->role_id == 2)
@include('pages.user.master_data.manajemen_peti.tipe_peti.index') @include('pages.user.master_data.manajemen_peti.tipe_peti.index')
@endif @endif
<!-- Import Data Modal-->
<div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data Tipe Peti</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('dashboard.typepeti.import') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">File Import Tipe Peti:</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
diimpor.</small>
</div>
<!-- Tombol untuk mengunduh file -->
<div class="form-group">
<a href="{{ asset('assets/file/Format_Import_Tipe_Peti.csv') }}" class="btn btn-primary"
download>Unduh Format Tipe Peti</a>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection @endsection

59
resources/views/dashboard/Master_Data/Report/Customer/index.blade.php

@ -0,0 +1,59 @@
@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

53
resources/views/dashboard/Master_Data/Report/Kondisi_Peti/index.blade.php

@ -0,0 +1,53 @@
@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

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

@ -19,7 +19,7 @@
<div class="col-6 text-right"> <div class="col-6 text-right">
<a href="{{ route('dashboard.Pettern_Lot_Peti.export') }}" class="btn btn-info btn-icon-split ml-auto" <a href="{{ route('dashboard.Pettern_Lot_Peti.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank"> target="_blank">
<span class="text">Cetak Exel</span> <span class="text">Export Exel</span>
</a> </a>
</div> </div>
</div> </div>

3
resources/views/dashboard/Master_Data/Report/Stok_opname/index.blade.php

@ -16,10 +16,9 @@
<h5 class="m-0 font-weight-bold text-primary mt-2">Report Stok Opname</h5> <h5 class="m-0 font-weight-bold text-primary mt-2">Report Stok Opname</h5>
</div> </div>
<div class="col-6 text-right"> <div class="col-6 text-right">
</a>
<a href="{{ route('dashboard.StokOpname.export') }}" class="btn btn-info btn-icon-split ml-auto" <a href="{{ route('dashboard.StokOpname.export') }}" class="btn btn-info btn-icon-split ml-auto"
target="_blank"> target="_blank">
<span class="text">Cetak Exel</span> <span class="text">Export Exel</span>
</a> </a>
</div> </div>
</div> </div>

55
resources/views/dashboard/Master_Data/Report/Tipe_Peti/index.blade.php

@ -0,0 +1,55 @@
@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

55
resources/views/dashboard/Master_Data/Report/Warehouse/index.blade.php

@ -0,0 +1,55 @@
@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

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

@ -15,6 +15,9 @@
data-target="#tambahDataModal"> data-target="#tambahDataModal">
<span class="text">Tambah Data Gudang</span> <span class="text">Tambah Data Gudang</span>
</a> </a>
<a href="#" class="btn btn-info btn-icon-split" data-toggle="modal"
data-target="#importDataModal">
<span class="text">Import Warehouse</span>
</a> </a>
</div> </div>
</div> </div>
@ -69,6 +72,44 @@
@include('pages.user.master_data.warehouse.index') @include('pages.user.master_data.warehouse.index')
@endif @endif
<!-- Import Data Modal-->
<div class="modal fade" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data Warehouse</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('dashboard.warehouse.import') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="form-group">
<div class="form-group">
<label for="name" class="col-form-label">File Import Warehouse:</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
diimpor.</small>
</div>
<!-- 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>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal Tambah--> <!-- Modal Tambah-->
<div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" <div class="modal fade" id="tambahDataModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true"> aria-hidden="true">

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

@ -150,6 +150,14 @@
PETI</a> PETI</a>
<a class="collapse-item {{ $active == 'menu-Stok_Opname' ? 'active' : '' }}" <a class="collapse-item {{ $active == 'menu-Stok_Opname' ? 'active' : '' }}"
href="{{ route('dashboard.StokOpname.index') }}">Stok Opname</a> 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>
</div> </div>
</div> </div>
</li> </li>

64
routes/web.php

@ -5,7 +5,6 @@ use App\Http\Controllers\PetiController;
use App\Http\Controllers\RoleController; use App\Http\Controllers\RoleController;
use App\Http\Controllers\M_userController; use App\Http\Controllers\M_userController;
use App\Http\Controllers\HistoryController; use App\Http\Controllers\HistoryController;
use App\Http\Controllers\M_assetController;
use App\Http\Controllers\ProfileController; use App\Http\Controllers\ProfileController;
use App\Http\Controllers\CustomerController; use App\Http\Controllers\CustomerController;
use App\Http\Controllers\DisposalController; use App\Http\Controllers\DisposalController;
@ -13,11 +12,15 @@ use App\Http\Controllers\TransferController;
use App\Http\Controllers\TypePetiController; use App\Http\Controllers\TypePetiController;
use App\Http\Controllers\WarehouseController; use App\Http\Controllers\WarehouseController;
use App\Http\Controllers\PeminjamanController; use App\Http\Controllers\PeminjamanController;
use App\Http\Controllers\StokOpNameController; use App\Http\Controllers\Report\StokOpNameController;
use App\Http\Controllers\KondisiPetiController; use App\Http\Controllers\KondisiPetiController;
use App\Http\Controllers\RecycleDataController; use App\Http\Controllers\RecycleDataController;
use App\Http\Controllers\PengembalianController; use App\Http\Controllers\PengembalianController;
use App\Http\Controllers\PetternLotPetiController; use App\Http\Controllers\Report\PetternLotPetiController;
use App\Http\Controllers\Report\ReportCustomerController;
use App\Http\Controllers\Report\ReportKondisiPetiController;
use App\Http\Controllers\Report\ReportTipePetiController;
use App\Http\Controllers\Report\ReportWarehouseController;
use App\Http\Controllers\TransaksiKeluarMasukController; use App\Http\Controllers\TransaksiKeluarMasukController;
/* /*
@ -42,7 +45,6 @@ Route::middleware('auth')->group(function () {
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::put('/profile/{id}', [ProfileController::class, 'updateprofile'])->name('profile.updateprofile'); Route::put('/profile/{id}', [ProfileController::class, 'updateprofile'])->name('profile.updateprofile');
// Route::post('/profile-update', [ProfileController::class, 'updatePhoto'])->name('profile-update');
Route::get('/setting', [ProfileController::class, 'setting'])->name('profile.setting'); Route::get('/setting', [ProfileController::class, 'setting'])->name('profile.setting');
}); });
@ -75,15 +77,16 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::delete('pengembalian/delete/{id}', 'destroy')->name('pengembalian.destroy'); Route::delete('pengembalian/delete/{id}', 'destroy')->name('pengembalian.destroy');
}); });
Route::controller(TransaksiKeluarMasukController::class)->group(function () { // tidak di pakai
Route::get('transaksikeluamasuk', 'index')->name('transaksikeluamasuk.index'); // Route::controller(TransaksiKeluarMasukController::class)->group(function () {
Route::get('transaksikeluamasuk/create', 'create')->name('transaksikeluamasuk.create'); // Route::get('transaksikeluamasuk', 'index')->name('transaksikeluamasuk.index');
Route::post('transaksikeluamasuk/store', 'store')->name('transaksikeluamasuk.store'); // Route::get('transaksikeluamasuk/create', 'create')->name('transaksikeluamasuk.create');
Route::get('transaksikeluamasuk/{id}', 'show')->name('transaksikeluamasuk.show'); // Route::post('transaksikeluamasuk/store', 'store')->name('transaksikeluamasuk.store');
Route::get('transaksikeluamasuk/{id}/edit', 'edit')->name('transaksikeluamasuk.edit'); // Route::get('transaksikeluamasuk/{id}', 'show')->name('transaksikeluamasuk.show');
Route::put('transaksikeluamasuk/{id}', 'update')->name('transaksikeluamasuk.update'); // Route::get('transaksikeluamasuk/{id}/edit', 'edit')->name('transaksikeluamasuk.edit');
Route::delete('transaksikeluamasuk/delete/{id}', 'destroy')->name('transaksikeluamasuk.destroy'); // Route::put('transaksikeluamasuk/{id}', 'update')->name('transaksikeluamasuk.update');
}); // Route::delete('transaksikeluamasuk/delete/{id}', 'destroy')->name('transaksikeluamasuk.destroy');
// });
//Halaman Transfer //Halaman Transfer
Route::controller(TransferController::class)->group(function () { Route::controller(TransferController::class)->group(function () {
@ -150,6 +153,7 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::post('kondisipeti/store', 'store')->name('kondisipeti.store'); Route::post('kondisipeti/store', 'store')->name('kondisipeti.store');
Route::put('kondisipeti/{id}', 'update')->name('kondisipeti.update'); Route::put('kondisipeti/{id}', 'update')->name('kondisipeti.update');
Route::delete('kondisipeti/delete/{id}', 'destroy')->name('kondisipeti.destroy'); Route::delete('kondisipeti/delete/{id}', 'destroy')->name('kondisipeti.destroy');
Route::post('kondisipeti/import', 'importKondisiPeti')->name('kondisipeti.import');
}); });
@ -162,6 +166,7 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::get('typepeti/{id}/edit', 'edit')->name('typepeti.edit'); Route::get('typepeti/{id}/edit', 'edit')->name('typepeti.edit');
Route::put('typepeti/{id}', 'update')->name('typepeti.update'); Route::put('typepeti/{id}', 'update')->name('typepeti.update');
Route::delete('typepeti/delete/{id}', 'destroy')->name('typepeti.destroy'); Route::delete('typepeti/delete/{id}', 'destroy')->name('typepeti.destroy');
Route::post('typepeti/import', 'importTipePeti')->name('typepeti.import');
}); });
//Halaman Peti //Halaman Peti
@ -175,6 +180,7 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::delete('peti/delete/{id}', 'destroy')->name('peti.destroy'); Route::delete('peti/delete/{id}', 'destroy')->name('peti.destroy');
Route::get('peticetak_pdf/{id}', 'cetakPdf')->name('peticetakpdf.cetakpdf'); Route::get('peticetak_pdf/{id}', 'cetakPdf')->name('peticetakpdf.cetakpdf');
Route::get('all-cetak/peti', 'AllPdf')->name('all-pdf.cetakpdf'); Route::get('all-cetak/peti', 'AllPdf')->name('all-pdf.cetakpdf');
Route::post('peti/import', 'importPeti')->name('peti.import');
}); });
@ -184,15 +190,9 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::post('warehouse/store', 'store')->name('warehouse.store'); Route::post('warehouse/store', 'store')->name('warehouse.store');
Route::put('warehouse/{id}', 'update')->name('warehouse.update'); Route::put('warehouse/{id}', 'update')->name('warehouse.update');
Route::delete('warehouse/delete/{id}', 'destroy')->name('warehouse.destroy'); Route::delete('warehouse/delete/{id}', 'destroy')->name('warehouse.destroy');
Route::post('warehouse/import', 'importWarehouse')->name('warehouse.import');
}); });
//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 //halaman Report Peti
Route::controller(PetternLotPetiController::class)->group(function () { Route::controller(PetternLotPetiController::class)->group(function () {
Route::get('Pettern_Lot_Peti/export', 'export')->name('Pettern_Lot_Peti.export'); Route::get('Pettern_Lot_Peti/export', 'export')->name('Pettern_Lot_Peti.export');
@ -205,6 +205,30 @@ Route::prefix('dashboard')->name('dashboard.')->middleware(['auth'])->group(func
Route::get('StokOpname/export', 'export')->name('StokOpname.export'); Route::get('StokOpname/export', 'export')->name('StokOpname.export');
Route::get('StokOpname', 'index')->name('StokOpname.index'); Route::get('StokOpname', 'index')->name('StokOpname.index');
}); });
//halaman Report Customer
Route::controller(ReportCustomerController::class)->group(function () {
Route::get('ReportCustomer/export', 'export')->name('ReportCustomer.export');
Route::get('ReportCustomer', 'index')->name('ReportCustomer.index');
});
//halaman Report Customer
Route::controller(ReportWarehouseController::class)->group(function () {
Route::get('ReportWarehouse/export', 'export')->name('ReportWarehouse.export');
Route::get('ReportWarehouse', 'index')->name('ReportWarehouse.index');
});
//halaman Report Tipe Peti
Route::controller(ReportTipePetiController::class)->group(function () {
Route::get('ReportTipePeti/export', 'export')->name('ReportTipePeti.export');
Route::get('ReportTipePeti', 'index')->name('ReportTipePeti.index');
});
//halaman Report Kondisi Peti
Route::controller(ReportKondisiPetiController::class)->group(function () {
Route::get('ReportKondisiPeti/export', 'export')->name('ReportKondisiPeti.export');
Route::get('ReportKondisiPeti', 'index')->name('ReportKondisiPeti.index');
});
}); });

Loading…
Cancel
Save