diff --git a/app/Exports/CustomerExport.php b/app/Exports/CustomerExport.php index ca68d43..b3cefda 100644 --- a/app/Exports/CustomerExport.php +++ b/app/Exports/CustomerExport.php @@ -13,6 +13,7 @@ class CustomerExport implements FromCollection, WithHeadings */ public function collection() { + $nomor = 1; // Ambil data dari model Peti $customers = Customer::select( 'id', @@ -26,7 +27,7 @@ class CustomerExport implements FromCollection, WithHeadings // Modifikasi data dan tambahkan nomor $data = $customers->map(function ($customer) use (&$nomor) { return [ - 'No' => $customer->id, + 'No' => $nomor++, 'Nama Customer' => $customer->name, 'Kode Customer' => $customer->code_customer, 'Lot No' => $customer->lot_no, diff --git a/app/Exports/KondisiPetiExport.php b/app/Exports/KondisiPetiExport.php index f90ddd0..b333742 100644 --- a/app/Exports/KondisiPetiExport.php +++ b/app/Exports/KondisiPetiExport.php @@ -13,6 +13,7 @@ class KondisiPetiExport implements FromCollection, WithHeadings */ public function collection() { + $nomor = 1; // Ambil data dari model Peti $kondisipetis = Kondisi_Peti::select( 'id', @@ -23,7 +24,7 @@ class KondisiPetiExport implements FromCollection, WithHeadings // Modifikasi data dan tambahkan nomor $data = $kondisipetis->map(function ($kondisipeti) use (&$nomor) { return [ - 'No' => $kondisipeti->id, + 'No' => $nomor++, 'Kondisi Peti' => $kondisipeti->nama_kondisi, 'Deskripsi' => $kondisipeti->deskripsi_kondisi, ]; diff --git a/app/Exports/TipePetiExport.php b/app/Exports/TipePetiExport.php index 82ed361..ff57fc0 100644 --- a/app/Exports/TipePetiExport.php +++ b/app/Exports/TipePetiExport.php @@ -13,6 +13,7 @@ class TipePetiExport implements FromCollection, WithHeadings */ public function collection() { + $nomor = 1; // Ambil data dari model Peti $tipepetis = Type_peti::select( 'id', @@ -24,7 +25,7 @@ class TipePetiExport implements FromCollection, WithHeadings // Modifikasi data dan tambahkan nomor $data = $tipepetis->map(function ($tipepeti) use (&$nomor) { return [ - 'No' => $tipepeti->id, + 'No' => $nomor++, 'Tipe' => $tipepeti->type, 'Ukuran Peti' => $tipepeti->size_peti, 'Deskripsi' => $tipepeti->description, diff --git a/app/Exports/WarehouseExport.php b/app/Exports/WarehouseExport.php index 5f3ca9a..77eaaaa 100644 --- a/app/Exports/WarehouseExport.php +++ b/app/Exports/WarehouseExport.php @@ -13,6 +13,7 @@ class WarehouseExport implements FromCollection, WithHeadings */ public function collection() { + $nomor = 1; // Ambil data dari model Peti $warehouses = m_warehouse::select( 'id', @@ -24,7 +25,7 @@ class WarehouseExport implements FromCollection, WithHeadings // Modifikasi data dan tambahkan nomor $data = $warehouses->map(function ($warehouse) use (&$nomor) { return [ - 'No' => $warehouse->id, + 'No' => $nomor++, 'Nama Gudang' => $warehouse->name, 'Deskripsi' => $warehouse->description, 'Alamat' => $warehouse->address, diff --git a/app/Http/Controllers/Report/ReportWarehouseController.php b/app/Http/Controllers/Report/ReportWarehouseController.php index c6b9b8b..db0e033 100644 --- a/app/Http/Controllers/Report/ReportWarehouseController.php +++ b/app/Http/Controllers/Report/ReportWarehouseController.php @@ -23,6 +23,6 @@ class ReportWarehouseController extends Controller public function export() { // dd('export'); - return Excel::download(new WarehouseExport, 'Report_Warehouse.xlsx'); + return Excel::download(new WarehouseExport, 'Report_Gudang.xlsx'); } } diff --git a/resources/views/layouts/navbar.blade.php b/resources/views/layouts/navbar.blade.php index 029bbe5..e730030 100644 --- a/resources/views/layouts/navbar.blade.php +++ b/resources/views/layouts/navbar.blade.php @@ -36,7 +36,7 @@ - @foreach ($notification as $data_notification) + @foreach ($notification->sortByDesc('created_at')->take(3) as $data_notification)
@@ -53,6 +53,8 @@
@endforeach + + Show All Notifikasi diff --git a/resources/views/layouts/navbar_list.blade.php b/resources/views/layouts/navbar_list.blade.php index a54b3eb..4cf1df8 100644 --- a/resources/views/layouts/navbar_list.blade.php +++ b/resources/views/layouts/navbar_list.blade.php @@ -1,21 +1,19 @@ @extends('layouts.main') @section('content') -
- @foreach ($notifikasi as $data_notifikasi) -
-
- -
- Kode Peti dengan dengan kode "{{ $data_notifikasi->peti->fix_lot }}" sudah waktunya dikembalikan - pada tanggal {{ \Carbon\Carbon::parse($data_notifikasi->est_pengembalian)->format('F j, Y') }} -
-
+ {{--
--}} + @foreach ($notifikasi as $data_notifikasi) + +
+ Kode Peti dengan dengan kode "{{ $data_notifikasi->peti->fix_lot }}" sudah waktunya dikembalikan + pada tanggal {{ \Carbon\Carbon::parse($data_notifikasi->est_pengembalian)->format('j F Y') }} +
+
+ @endforeach + {{--
--}} @endsection