Merge remote-tracking branch 'composer/staging' into staging
This commit is contained in:
58
app/Exports/BasicDataSurveyorExport.php
Normal file
58
app/Exports/BasicDataSurveyorExport.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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 PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class BasicDataSurveyorExport implements WithColumnFormatting, WithHeadings, FromCollection, withMapping
|
||||
{
|
||||
|
||||
|
||||
protected $model;
|
||||
|
||||
|
||||
public function __construct($model)
|
||||
{
|
||||
$this->model = $model;
|
||||
}
|
||||
|
||||
public function collection()
|
||||
{
|
||||
return $this->model::all();
|
||||
}
|
||||
|
||||
public function map($row)
|
||||
: array
|
||||
{
|
||||
return [
|
||||
$row->id,
|
||||
$row->code,
|
||||
$row->name,
|
||||
$row->created_at
|
||||
];
|
||||
}
|
||||
|
||||
public function headings()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'ID',
|
||||
'Code',
|
||||
'Name',
|
||||
'Created At'
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'A' => NumberFormat::FORMAT_NUMBER,
|
||||
'D' => NumberFormat::FORMAT_DATE_DATETIME
|
||||
];
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -71,8 +71,10 @@ class FormSurveyorRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'luas_tanah' => 'required',
|
||||
'luas_tanah_sesuai' => 'nullable',
|
||||
'luas_tanah_tidak_sesuai' => 'nullable',
|
||||
'hadap_mata_angin' => 'required',
|
||||
'hadap_mata_angin_sesuai' => 'nullable',
|
||||
'hadap_mata_angin_tidak_sesuai' => 'nullable',
|
||||
'bentuk_tanah' => 'nullable|array',
|
||||
'bentuk_tanah_lainnya' => 'nullable',
|
||||
@@ -95,7 +97,9 @@ class FormSurveyorRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'action' => 'required',
|
||||
'luas_tanah_bangunan_sesuai' => 'nullable',
|
||||
'luas_tanah_bagunan' => 'required',
|
||||
'luas_tanah_bangunan_tidak_sesuai' => 'nullable',
|
||||
'jenis_bangunan' => 'required',
|
||||
'kondisi_bangunan' => 'nullable',
|
||||
'sifat_bangunan' => 'required|array',
|
||||
@@ -116,6 +120,7 @@ class FormSurveyorRequest extends FormRequest
|
||||
return [
|
||||
'action' => 'required',
|
||||
'luas_unit' => 'required',
|
||||
'luas_unit_sesuai' => 'nullable',
|
||||
'luas_unit_tidak_sesuai' => 'nullable',
|
||||
'jenis_unit' => 'required|array',
|
||||
'kondisi_unit' => 'required|array',
|
||||
@@ -511,10 +516,19 @@ class FormSurveyorRequest extends FormRequest
|
||||
'permohonan_id' => 'required',
|
||||
'type' => 'required',
|
||||
'debitur_perwakilan' => 'required|array',
|
||||
'jenis_asset_name' => 'nullable',
|
||||
'jenis_asset' => 'required',
|
||||
'jenis_asset_tidak_sesuai' => 'nullable',
|
||||
'alamat_sesuai' => 'required',
|
||||
'alamat_tidak_sesuai' => 'nullable',
|
||||
|
||||
'hub_cadeb' => 'required',
|
||||
'hub_cadeb_sesuai' => 'nullable',
|
||||
'hub_cadeb_tidak_sesuai' => 'nullable',
|
||||
'hub_cadeb_penghuni' => 'required',
|
||||
'hub_cadeb_penghuni_sesuai' => 'nullable',
|
||||
'hub_cadeb_penghuni_tidak_sesuai' => 'nullable',
|
||||
|
||||
'nama_jalan' => 'nullable',
|
||||
'desa_kelurahan' => 'nullable',
|
||||
'kecamatan' => 'nullable',
|
||||
|
||||
@@ -37,6 +37,7 @@ class SurveyorRequest extends FormRequest
|
||||
'posisi-unit' => 'posisi_unit',
|
||||
'bentuk-unit' => 'bentuk_unit',
|
||||
'fasilitas-objek' => 'fasilitas_objek',
|
||||
'perkerasan-jalan' => 'perkerasan_jalan',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user