unknown 1 year ago
parent
commit
6e87589807
  1. 3
      app/Exports/CustomerExport.php
  2. 3
      app/Exports/KondisiPetiExport.php
  3. 3
      app/Exports/TipePetiExport.php
  4. 3
      app/Exports/WarehouseExport.php
  5. 2
      app/Http/Controllers/Report/ReportWarehouseController.php
  6. 4
      resources/views/layouts/navbar.blade.php
  7. 8
      resources/views/layouts/navbar_list.blade.php

3
app/Exports/CustomerExport.php

@ -13,6 +13,7 @@ class CustomerExport implements FromCollection, WithHeadings
*/ */
public function collection() public function collection()
{ {
$nomor = 1;
// Ambil data dari model Peti // Ambil data dari model Peti
$customers = Customer::select( $customers = Customer::select(
'id', 'id',
@ -26,7 +27,7 @@ class CustomerExport implements FromCollection, WithHeadings
// Modifikasi data dan tambahkan nomor // Modifikasi data dan tambahkan nomor
$data = $customers->map(function ($customer) use (&$nomor) { $data = $customers->map(function ($customer) use (&$nomor) {
return [ return [
'No' => $customer->id, 'No' => $nomor++,
'Nama Customer' => $customer->name, 'Nama Customer' => $customer->name,
'Kode Customer' => $customer->code_customer, 'Kode Customer' => $customer->code_customer,
'Lot No' => $customer->lot_no, 'Lot No' => $customer->lot_no,

3
app/Exports/KondisiPetiExport.php

@ -13,6 +13,7 @@ class KondisiPetiExport implements FromCollection, WithHeadings
*/ */
public function collection() public function collection()
{ {
$nomor = 1;
// Ambil data dari model Peti // Ambil data dari model Peti
$kondisipetis = Kondisi_Peti::select( $kondisipetis = Kondisi_Peti::select(
'id', 'id',
@ -23,7 +24,7 @@ class KondisiPetiExport implements FromCollection, WithHeadings
// Modifikasi data dan tambahkan nomor // Modifikasi data dan tambahkan nomor
$data = $kondisipetis->map(function ($kondisipeti) use (&$nomor) { $data = $kondisipetis->map(function ($kondisipeti) use (&$nomor) {
return [ return [
'No' => $kondisipeti->id, 'No' => $nomor++,
'Kondisi Peti' => $kondisipeti->nama_kondisi, 'Kondisi Peti' => $kondisipeti->nama_kondisi,
'Deskripsi' => $kondisipeti->deskripsi_kondisi, 'Deskripsi' => $kondisipeti->deskripsi_kondisi,
]; ];

3
app/Exports/TipePetiExport.php

@ -13,6 +13,7 @@ class TipePetiExport implements FromCollection, WithHeadings
*/ */
public function collection() public function collection()
{ {
$nomor = 1;
// Ambil data dari model Peti // Ambil data dari model Peti
$tipepetis = Type_peti::select( $tipepetis = Type_peti::select(
'id', 'id',
@ -24,7 +25,7 @@ class TipePetiExport implements FromCollection, WithHeadings
// Modifikasi data dan tambahkan nomor // Modifikasi data dan tambahkan nomor
$data = $tipepetis->map(function ($tipepeti) use (&$nomor) { $data = $tipepetis->map(function ($tipepeti) use (&$nomor) {
return [ return [
'No' => $tipepeti->id, 'No' => $nomor++,
'Tipe' => $tipepeti->type, 'Tipe' => $tipepeti->type,
'Ukuran Peti' => $tipepeti->size_peti, 'Ukuran Peti' => $tipepeti->size_peti,
'Deskripsi' => $tipepeti->description, 'Deskripsi' => $tipepeti->description,

3
app/Exports/WarehouseExport.php

@ -13,6 +13,7 @@ class WarehouseExport implements FromCollection, WithHeadings
*/ */
public function collection() public function collection()
{ {
$nomor = 1;
// Ambil data dari model Peti // Ambil data dari model Peti
$warehouses = m_warehouse::select( $warehouses = m_warehouse::select(
'id', 'id',
@ -24,7 +25,7 @@ class WarehouseExport implements FromCollection, WithHeadings
// Modifikasi data dan tambahkan nomor // Modifikasi data dan tambahkan nomor
$data = $warehouses->map(function ($warehouse) use (&$nomor) { $data = $warehouses->map(function ($warehouse) use (&$nomor) {
return [ return [
'No' => $warehouse->id, 'No' => $nomor++,
'Nama Gudang' => $warehouse->name, 'Nama Gudang' => $warehouse->name,
'Deskripsi' => $warehouse->description, 'Deskripsi' => $warehouse->description,
'Alamat' => $warehouse->address, 'Alamat' => $warehouse->address,

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

@ -23,6 +23,6 @@ class ReportWarehouseController extends Controller
public function export() public function export()
{ {
// dd('export'); // dd('export');
return Excel::download(new WarehouseExport, 'Report_Warehouse.xlsx'); return Excel::download(new WarehouseExport, 'Report_Gudang.xlsx');
} }
} }

4
resources/views/layouts/navbar.blade.php

@ -36,7 +36,7 @@
<h6 class="dropdown-header"> <h6 class="dropdown-header">
Notifikasi Siopas Notifikasi Siopas
</h6> </h6>
@foreach ($notification as $data_notification) @foreach ($notification->sortByDesc('created_at')->take(3) as $data_notification)
<a class="dropdown-item d-flex align-items-center" <a class="dropdown-item d-flex align-items-center"
href="{{ route('dashboard.pengembalian.edit', $data_notification->id) }}"> href="{{ route('dashboard.pengembalian.edit', $data_notification->id) }}">
<div class="mr-3"> <div class="mr-3">
@ -53,6 +53,8 @@
</div> </div>
</a> </a>
@endforeach @endforeach
<a class="dropdown-item text-center small text-gray-500" <a class="dropdown-item text-center small text-gray-500"
href="{{ route('dashboard.navbarList.notification') }}">Show All Notifikasi</a> href="{{ route('dashboard.navbarList.notification') }}">Show All Notifikasi</a>
</div> </div>

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

@ -1,8 +1,7 @@
@extends('layouts.main') @extends('layouts.main')
@section('content') @section('content')
<div class="row"> {{-- <div class="row"> --}}
@foreach ($notifikasi as $data_notifikasi) @foreach ($notifikasi as $data_notifikasi)
<div class="col-lg-6">
<div class="card shadow mb-4"> <div class="card shadow mb-4">
<div class="card-header py-3"> <div class="card-header py-3">
<a href="{{ route('dashboard.pengembalian.edit', $data_notifikasi->id) }}"> <a href="{{ route('dashboard.pengembalian.edit', $data_notifikasi->id) }}">
@ -12,10 +11,9 @@
</div> </div>
<div class="card-body"> <div class="card-body">
Kode Peti dengan dengan kode "{{ $data_notifikasi->peti->fix_lot }}" sudah waktunya dikembalikan 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') }} pada tanggal {{ \Carbon\Carbon::parse($data_notifikasi->est_pengembalian)->format('j F Y') }}
</div>
</div> </div>
</div> </div>
@endforeach @endforeach
</div> {{-- </div> --}}
@endsection @endsection

Loading…
Cancel
Save