Browse Source

update notification

master
Gunawan19621 11 months ago
parent
commit
cf1a7e30d3
  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. 32
      resources/views/layouts/navbar_list.blade.php

3
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,

3
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,
];

3
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,

3
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,

2
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');
}
}

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

@ -36,7 +36,7 @@
<h6 class="dropdown-header">
Notifikasi Siopas
</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"
href="{{ route('dashboard.pengembalian.edit', $data_notification->id) }}">
<div class="mr-3">
@ -53,6 +53,8 @@
</div>
</a>
@endforeach
<a class="dropdown-item text-center small text-gray-500"
href="{{ route('dashboard.navbarList.notification') }}">Show All Notifikasi</a>
</div>

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

@ -1,21 +1,19 @@
@extends('layouts.main')
@section('content')
<div class="row">
@foreach ($notifikasi as $data_notifikasi)
<div class="col-lg-6">
<div class="card shadow mb-4">
<div class="card-header py-3">
<a href="{{ route('dashboard.pengembalian.edit', $data_notifikasi->id) }}">
<h6 class="m-0 font-weight-bold text-primary">Kode Peti {{ $data_notifikasi->peti->fix_lot }}
</h6>
</a>
</div>
<div class="card-body">
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') }}
</div>
</div>
{{-- <div class="row"> --}}
@foreach ($notifikasi as $data_notifikasi)
<div class="card shadow mb-4">
<div class="card-header py-3">
<a href="{{ route('dashboard.pengembalian.edit', $data_notifikasi->id) }}">
<h6 class="m-0 font-weight-bold text-primary">Kode Peti {{ $data_notifikasi->peti->fix_lot }}
</h6>
</a>
</div>
@endforeach
</div>
<div class="card-body">
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') }}
</div>
</div>
@endforeach
{{-- </div> --}}
@endsection

Loading…
Cancel
Save