Feature #17 : Module Permohonan
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->branch->name .
|
||||
$row->branch->name,
|
||||
$row->cif,
|
||||
$row->nomor_rekening,
|
||||
$row->name,
|
||||
|
||||
67
app/Exports/PermohonanExport.php
Normal file
67
app/Exports/PermohonanExport.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Modules\Lpj\Models\Debiture;
|
||||
use Modules\Lpj\Models\Permohonan;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class PermohonanExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
|
||||
{
|
||||
public function collection()
|
||||
{
|
||||
return Permohonan::get();
|
||||
}
|
||||
|
||||
public function map($row)
|
||||
: array
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->nomor_registrasi,
|
||||
$row->tanggal_permohonan,
|
||||
$row->user->name,
|
||||
$row->branch->name,
|
||||
$row->tujuanPenilaian->name,
|
||||
$row->debiture->name,
|
||||
$row->status,
|
||||
$row->authorized_at,
|
||||
$row->authorized_status,
|
||||
$row->authorized_by,
|
||||
$row->created_at
|
||||
];
|
||||
}
|
||||
|
||||
public function headings()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'ID',
|
||||
'Nomor Registrasi',
|
||||
'Tanggal Permohonan',
|
||||
'User Pemohon',
|
||||
'Branch Pemohon',
|
||||
'Tujuan Penilaian',
|
||||
'Debitur',
|
||||
'Status',
|
||||
'Tanggal Pengesahan',
|
||||
'Status Pengesahan',
|
||||
'Pengesah',
|
||||
'Tanggal Dibuat'
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'C' => NumberFormat::FORMAT_DATE_DATETIME,
|
||||
'L' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user