Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -2,271 +2,279 @@
|
|||||||
|
|
||||||
namespace Modules\Lpj\Exports;
|
namespace Modules\Lpj\Exports;
|
||||||
|
|
||||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
// use Maatwebsite\Excel\Concerns\FromCollection;
|
||||||
// use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
// use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
// use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
// use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
use Maatwebsite\Excel\Concerns\WithStyles;
|
// use Maatwebsite\Excel\Concerns\WithStyles;
|
||||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
// use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
// use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
use Maatwebsite\Excel\Events\AfterSheet;
|
// use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
class KertasKerjaExport implements FromCollection, WithHeadings, WithStyles, WithColumnWidths, WithEvents
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
|
class KertasKerjaExport implements FromView
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// class KertasKerjaExport implements FromCollection, WithHeadings, WithStyles, WithColumnWidths, WithEvents
|
||||||
|
// {
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
protected $headerInfo;
|
public function __construct($data)
|
||||||
|
|
||||||
public function __construct($data, $headerInfo)
|
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
$this->headerInfo = $headerInfo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function collection()
|
public function view(): View
|
||||||
{
|
{
|
||||||
$rows = [];
|
return view('lpj::component.kertas-kerja', [
|
||||||
|
'data' => $this->data,
|
||||||
$nomor = 1;
|
]);
|
||||||
$fields = [
|
|
||||||
'jenis_aset' => 'Jenis Aset',
|
|
||||||
'luas_tanah' => 'Luas Tanah (M²)',
|
|
||||||
'luas_bangunan' => 'Luas Bangunan (M²)',
|
|
||||||
'harga' => 'Harga Transaksi/Penawaran',
|
|
||||||
'tanggal_penawaran' => 'Tanggal Penawaran/Transaksi',
|
|
||||||
'diskon' => 'Diskon %',
|
|
||||||
'esitmasi_harga' => 'Esitmasi Harga Transaksi (Rp)',
|
|
||||||
'no_telepon' => 'Telepon Contact Person',
|
|
||||||
'nama_nara_sumbr' => 'Nama Nara Sumber',
|
|
||||||
'status_nara_sumbr' => 'Status Nara Sumber',
|
|
||||||
'waktu_transaksi' => 'Waktu Transaksi/Penawaran',
|
|
||||||
'alamat' => 'Alamat Titik Gps',
|
|
||||||
|
|
||||||
'jalan' => 'Jalan',
|
|
||||||
'desa' => 'Desa/Kelurahan',
|
|
||||||
'kecamatan' => 'Kecamatan',
|
|
||||||
'kabupaten' => 'Kabupaten',
|
|
||||||
'provinsi' => 'Provinsi',
|
|
||||||
|
|
||||||
'jarak_pembanding' => 'Jarak Pembanding dengan Objek',
|
|
||||||
'elevasi' => 'Estimasi Ranking Tanah',
|
|
||||||
'peruntukan' => 'Estiamsi Rangkin Bangunan'
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach ($fields as $key => $label) {
|
|
||||||
$rows[] = [
|
|
||||||
$nomor++,
|
|
||||||
$label,
|
|
||||||
$this->data['objek'][$key] ?? '',
|
|
||||||
$this->data['pembanding1'][$key] ?? '',
|
|
||||||
$this->data['pembanding2'][$key] ?? '',
|
|
||||||
$this->data['pembanding3'][$key] ?? ''
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// B. Perhitungan Penyesuaian
|
// public function collection()
|
||||||
$rows[] = [''];
|
// {
|
||||||
$rows[] = [''];
|
// $rows = [];
|
||||||
$rows[] = ['B. Estimasi Nilai Tanah Pembanding dengan Teknik Penyisaan Tanah untuk mendapatkan per meter persegi estimasi Nilai Tanah Pembanding'];
|
|
||||||
$rows[] = ['No.','Uraian', 'Objek Penilaian', 'Data Pembanding 1', 'Data Pembanding 2', 'Data Pembanding 3'];
|
|
||||||
$nostimasi = 1;
|
|
||||||
$filedEstimasi = [
|
|
||||||
'estimasi' => 'Estimasi Biaya Pengganti Baru Bangunan (Rp)',
|
|
||||||
'estimasi_spl' => 'Estimasi Biaya Pengganti Baru SPL (Rp)',
|
|
||||||
'penyusutan' => 'Penyusutan Fisik Banguna',
|
|
||||||
|
|
||||||
'a' => 'a. rincian ttipe bangunan (MAPPI)',
|
// $nomor = 1;
|
||||||
'b' => 'b. umur ekonomis (MAPPI)',
|
// $fields = [
|
||||||
'c' => 'c. estimasi Tahun tahun visual dengan mempertimbangkan renovasi',
|
// 'jenis_aset' => 'Jenis Aset',
|
||||||
'd' => 'd. Sehingga sisa umur efektif',
|
// 'luas_tanah' => 'Luas Tanah (M²)',
|
||||||
'e' => 'e. kondisi bagunan',
|
// 'luas_bangunan' => 'Luas Bangunan (M²)',
|
||||||
'f' => 'f.sehinggan penyusutan fisik',
|
// 'harga' => 'Harga Transaksi/Penawaran',
|
||||||
'penyusutan_fungsi' => 'Penyusutan fungsi Bangunan (%)',
|
// 'tanggal_penawaran' => 'Tanggal Penawaran/Transaksi',
|
||||||
'penyusutan_ekonomi' => 'Penyusutan Ekonomi Bangunan (%)',
|
// 'diskon' => 'Diskon %',
|
||||||
'total_penyusutan' => 'Total Penyusutan (%)',
|
// 'esitmasi_harga' => 'Esitmasi Harga Transaksi (Rp)',
|
||||||
'estimasi_nilai' => 'Estimasi Nilai Bangunan dan SPL (Rp)',
|
// 'no_telepon' => 'Telepon Contact Person',
|
||||||
'estimasi_tanah' => 'Estimasi Nilai Tanah Pembanding (Rp)',
|
// 'nama_nara_sumbr' => 'Nama Nara Sumber',
|
||||||
'estimasi_nilai' => 'Estimasi Nilai Tanah Pembanding (Rp)',
|
// 'status_nara_sumbr' => 'Status Nara Sumber',
|
||||||
];
|
// 'waktu_transaksi' => 'Waktu Transaksi/Penawaran',
|
||||||
|
// 'alamat' => 'Alamat Titik Gps',
|
||||||
|
|
||||||
foreach ($filedEstimasi as $key => $label) {
|
// 'jalan' => 'Jalan',
|
||||||
$rows[] = [
|
// 'desa' => 'Desa/Kelurahan',
|
||||||
$nostimasi++,
|
// 'kecamatan' => 'Kecamatan',
|
||||||
$label,
|
// 'kabupaten' => 'Kabupaten',
|
||||||
$this->data['estimasi'][$key] ?? '',
|
// 'provinsi' => 'Provinsi',
|
||||||
$this->data['estimasi1'][$key] ?? '',
|
|
||||||
$this->data['estimasi2'][$key] ?? '',
|
|
||||||
$this->data['estimasi3'][$key] ?? ''
|
|
||||||
|
|
||||||
];
|
// 'jarak_pembanding' => 'Jarak Pembanding dengan Objek',
|
||||||
}
|
// 'elevasi' => 'Estimasi Ranking Tanah',
|
||||||
|
// 'peruntukan' => 'Estiamsi Rangkin Bangunan'
|
||||||
|
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// foreach ($fields as $key => $label) {
|
||||||
|
// $rows[] = [
|
||||||
|
// $nomor++,
|
||||||
|
// $label,
|
||||||
|
// $this->data['objek'][$key] ?? '',
|
||||||
|
// $this->data['pembanding1'][$key] ?? '',
|
||||||
|
// $this->data['pembanding2'][$key] ?? '',
|
||||||
|
// $this->data['pembanding3'][$key] ?? ''
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // B. Perhitungan Penyesuaian
|
||||||
|
// $rows[] = [''];
|
||||||
|
// $rows[] = [''];
|
||||||
|
// $rows[] = ['B. Estimasi Nilai Tanah Pembanding dengan Teknik Penyisaan Tanah untuk mendapatkan per meter persegi estimasi Nilai Tanah Pembanding'];
|
||||||
|
// $rows[] = ['No.','Uraian', 'Objek Penilaian', 'Data Pembanding 1', 'Data Pembanding 2', 'Data Pembanding 3'];
|
||||||
|
// $nostimasi = 1;
|
||||||
|
// $filedEstimasi = [
|
||||||
|
// 'estimasi' => 'Estimasi Biaya Pengganti Baru Bangunan (Rp)',
|
||||||
|
// 'estimasi_spl' => 'Estimasi Biaya Pengganti Baru SPL (Rp)',
|
||||||
|
// 'penyusutan' => 'Penyusutan Fisik Banguna',
|
||||||
|
|
||||||
|
// 'a' => 'a. rincian ttipe bangunan (MAPPI)',
|
||||||
|
// 'b' => 'b. umur ekonomis (MAPPI)',
|
||||||
|
// 'c' => 'c. estimasi Tahun tahun visual dengan mempertimbangkan renovasi',
|
||||||
|
// 'd' => 'd. Sehingga sisa umur efektif',
|
||||||
|
// 'e' => 'e. kondisi bagunan',
|
||||||
|
// 'f' => 'f.sehinggan penyusutan fisik',
|
||||||
|
// 'penyusutan_fungsi' => 'Penyusutan fungsi Bangunan (%)',
|
||||||
|
// 'penyusutan_ekonomi' => 'Penyusutan Ekonomi Bangunan (%)',
|
||||||
|
// 'total_penyusutan' => 'Total Penyusutan (%)',
|
||||||
|
// 'estimasi_nilai' => 'Estimasi Nilai Bangunan dan SPL (Rp)',
|
||||||
|
// 'estimasi_tanah' => 'Estimasi Nilai Tanah Pembanding (Rp)',
|
||||||
|
// 'estimasi_nilai' => 'Estimasi Nilai Tanah Pembanding (Rp)',
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// foreach ($filedEstimasi as $key => $label) {
|
||||||
|
// $rows[] = [
|
||||||
|
// $nostimasi++,
|
||||||
|
// $label,
|
||||||
|
// $this->data['estimasi'][$key] ?? '',
|
||||||
|
// $this->data['estimasi1'][$key] ?? '',
|
||||||
|
// $this->data['estimasi2'][$key] ?? '',
|
||||||
|
// $this->data['estimasi3'][$key] ?? ''
|
||||||
|
|
||||||
|
// ];
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
$row[] = [''];
|
// $row[] = [''];
|
||||||
$row[] = [''];
|
// $row[] = [''];
|
||||||
$rows[] = ['INDIKASI NILAI TANAHATAS OBJEK PENILAIAN'];
|
// $rows[] = ['INDIKASI NILAI TANAHATAS OBJEK PENILAIAN'];
|
||||||
|
|
||||||
$indikasi=[
|
// $indikasi=[
|
||||||
'luas_tanah' => 'Luas Tanah ',
|
// 'luas_tanah' => 'Luas Tanah ',
|
||||||
'indikasi_per' => 'INDIKASI TANAH PER M2 (RP/M2)',
|
// 'indikasi_per' => 'INDIKASI TANAH PER M2 (RP/M2)',
|
||||||
'indikasi_total' => 'INDIKASI TANAH TOTAL(RP)',
|
// 'indikasi_total' => 'INDIKASI TANAH TOTAL(RP)',
|
||||||
'varian' => 'VARIANT(%)',
|
// 'varian' => 'VARIANT(%)',
|
||||||
];
|
// ];
|
||||||
|
|
||||||
foreach ($indikasi as $key => $label) {
|
// foreach ($indikasi as $key => $label) {
|
||||||
$rows[] = [
|
// $rows[] = [
|
||||||
$label,
|
// $label,
|
||||||
$this->data['indikasi'][$key] ?? '',
|
// $this->data['indikasi'][$key] ?? '',
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// C. Peta Lokasi
|
// // C. Peta Lokasi
|
||||||
$rows[] = [''];
|
// $rows[] = [''];
|
||||||
$rows[] = [''];
|
// $rows[] = [''];
|
||||||
$rows[] = ['C. Peta Lokasi'];
|
// $rows[] = ['C. Peta Lokasi'];
|
||||||
$rows[] = [$this->data['foto_objek']['foto_objek_peta'] ?? ''];
|
// $rows[] = [$this->data['foto_objek']['foto_objek_peta'] ?? ''];
|
||||||
|
|
||||||
// D. Foto Objek dan Data Pembanding
|
// // D. Foto Objek dan Data Pembanding
|
||||||
$rows[] = [''];
|
// $rows[] = [''];
|
||||||
$rows[] = ['D. Foto Objek dan Data Pembanding'];
|
// $rows[] = ['D. Foto Objek dan Data Pembanding'];
|
||||||
$rows[] = [
|
// $rows[] = [
|
||||||
$this->data['foto_objek1']['foto_objek'] ?? '',
|
// $this->data['foto_objek1']['foto_objek'] ?? '',
|
||||||
$this->data['foto_objek2']['foto_objek'] ?? '',
|
// $this->data['foto_objek2']['foto_objek'] ?? '',
|
||||||
'', '', ''
|
// '', '', ''
|
||||||
];
|
// ];
|
||||||
|
|
||||||
// E. Foto Objek
|
// // E. Foto Objek
|
||||||
$rows[] = [''];
|
// $rows[] = [''];
|
||||||
$rows[] = ['E. Foto Objek'];
|
// $rows[] = ['E. Foto Objek'];
|
||||||
$rows[] = [
|
// $rows[] = [
|
||||||
$this->data['foto']['foto_objek'] ?? '',
|
// $this->data['foto']['foto_objek'] ?? '',
|
||||||
$this->data['foto']['foto_objek'] ?? '',
|
// $this->data['foto']['foto_objek'] ?? '',
|
||||||
'', '', ''
|
// '', '', ''
|
||||||
];
|
// ];
|
||||||
|
|
||||||
return collect($rows);
|
// return collect($rows);
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function headings(): array
|
// public function headings(): array
|
||||||
{
|
// {
|
||||||
return [
|
// return [
|
||||||
['KERTAS KERJA PENILAIAN'],
|
// ['KERTAS KERJA PENILAIAN'],
|
||||||
['Pendekatan Pasar'],
|
// ['Pendekatan Pasar'],
|
||||||
['Metode Perbandingan Data Pasar'],
|
// ['Metode Perbandingan Data Pasar'],
|
||||||
['Tanggal Penilaian: ' . ($this->headerInfo['tanggal_penilaian'] ?? '')],
|
// ['Tanggal Penilaian: ' . ($this->headerInfo['tanggal_penilaian'] ?? '')],
|
||||||
['Nama Pemilik Aset: ' . ($this->headerInfo['nama_pemilik'] ?? '')],
|
// ['Nama Pemilik Aset: ' . ($this->headerInfo['nama_pemilik'] ?? '')],
|
||||||
['Nama Pemberi Tugas: ' . ($this->headerInfo['nama_pemberi_tugas'] ?? '')],
|
// ['Nama Pemberi Tugas: ' . ($this->headerInfo['nama_pemberi_tugas'] ?? '')],
|
||||||
['Lokasi: ' . ($this->headerInfo['lokasi_lengkap'] ?? '')],
|
// ['Lokasi: ' . ($this->headerInfo['lokasi_lengkap'] ?? '')],
|
||||||
['Nama Debitur: ' . ($this->headerInfo['nama_debitur'] ?? '')],
|
// ['Nama Debitur: ' . ($this->headerInfo['nama_debitur'] ?? '')],
|
||||||
[''],
|
// [''],
|
||||||
['A. INFORMASI UMUM'],
|
// ['A. INFORMASI UMUM'],
|
||||||
['No.','Uraian', 'Objek Penilaian', 'Data Pembanding 1', 'Data Pembanding 2', 'Data Pembanding 3']
|
// ['No.','Uraian', 'Objek Penilaian', 'Data Pembanding 1', 'Data Pembanding 2', 'Data Pembanding 3']
|
||||||
|
|
||||||
|
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
public function registerEvents(): array
|
// public function registerEvents(): array
|
||||||
{
|
// {
|
||||||
return [
|
// return [
|
||||||
AfterSheet::class => function (AfterSheet $event) {
|
// AfterSheet::class => function (AfterSheet $event) {
|
||||||
// Styling untuk header utama
|
// // Styling untuk header utama
|
||||||
|
|
||||||
|
|
||||||
// Styling untuk setiap section header
|
// // Styling untuk setiap section header
|
||||||
$sectionRows = [10, 34, 56, 46, 52]; // Sesuaikan dengan posisi setiap section
|
// $sectionRows = [10, 34, 56, 46, 52]; // Sesuaikan dengan posisi setiap section
|
||||||
foreach ($sectionRows as $row) {
|
// foreach ($sectionRows as $row) {
|
||||||
$event->sheet->getStyle("A{$row}:F{$row}")->getFill()
|
// $event->sheet->getStyle("A{$row}:F{$row}")->getFill()
|
||||||
->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)
|
// ->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)
|
||||||
->getStartColor()->setRGB('E2EFDA');
|
// ->getStartColor()->setRGB('E2EFDA');
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Merge cells untuk headers
|
// // Merge cells untuk headers
|
||||||
$event->sheet->mergeCells('A1:E1');
|
// $event->sheet->mergeCells('A1:E1');
|
||||||
$event->sheet->mergeCells('A2:E2');
|
// $event->sheet->mergeCells('A2:E2');
|
||||||
$event->sheet->mergeCells('A4:E4');
|
// $event->sheet->mergeCells('A4:E4');
|
||||||
$event->sheet->mergeCells('A5:E5');
|
// $event->sheet->mergeCells('A5:E5');
|
||||||
$event->sheet->mergeCells('A6:E6');
|
// $event->sheet->mergeCells('A6:E6');
|
||||||
$event->sheet->mergeCells('A7:E7');
|
// $event->sheet->mergeCells('A7:E7');
|
||||||
$event->sheet->mergeCells('A8:E8');
|
// $event->sheet->mergeCells('A8:E8');
|
||||||
|
|
||||||
// Alignment
|
// // Alignment
|
||||||
$event->sheet->getStyle('A1:E8')->getAlignment()
|
// $event->sheet->getStyle('A1:E8')->getAlignment()
|
||||||
->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);
|
// ->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_LEFT);
|
||||||
}
|
// }
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
public function columnWidths(): array
|
// public function columnWidths(): array
|
||||||
{
|
// {
|
||||||
return [
|
// return [
|
||||||
'A' => 5,
|
// 'A' => 5,
|
||||||
'B' => 30,
|
// 'B' => 30,
|
||||||
'C' => 30,
|
// 'C' => 30,
|
||||||
'D' => 30,
|
// 'D' => 30,
|
||||||
'E' => 30,
|
// 'E' => 30,
|
||||||
'F' => 30,
|
// 'F' => 30,
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function styles(Worksheet $sheet)
|
// public function styles(Worksheet $sheet)
|
||||||
{
|
// {
|
||||||
return [
|
// return [
|
||||||
// Style for the main header
|
// // Style for the main header
|
||||||
|
|
||||||
// Style for section headers
|
// // Style for section headers
|
||||||
10 => ['font' => ['bold' => true]], // A. Informasi Umum
|
// 10 => ['font' => ['bold' => true]], // A. Informasi Umum
|
||||||
34 => ['font' => ['bold' => true]], // B. Estimasi Nilai Tanah
|
// 34 => ['font' => ['bold' => true]], // B. Estimasi Nilai Tanah
|
||||||
35 => ['font' => ['bold' => true]], // C. Peta Lokasi
|
// 35 => ['font' => ['bold' => true]], // C. Peta Lokasi
|
||||||
57 => ['font' => ['bold' => true]], // D. Foto Objek dan Pembanding
|
// 57 => ['font' => ['bold' => true]], // D. Foto Objek dan Pembanding
|
||||||
60 => ['font' => ['bold' => true]], // E. Foto Objek
|
// 60 => ['font' => ['bold' => true]], // E. Foto Objek
|
||||||
|
|
||||||
// Default styling for columns
|
// // Default styling for columns
|
||||||
'A:J' => [
|
// 'A:J' => [
|
||||||
'alignment' => ['horizontal' => 'left', 'vertical' => 'center'],
|
// 'alignment' => ['horizontal' => 'left', 'vertical' => 'center'],
|
||||||
'wrapText' => true,
|
// 'wrapText' => true,
|
||||||
],
|
// ],
|
||||||
|
|
||||||
// Style for other sections (like photo and map sections)
|
// // Style for other sections (like photo and map sections)
|
||||||
|
|
||||||
// Style for the other headers
|
// // Style for the other headers
|
||||||
'A11:F11' => [
|
// 'A11:F11' => [
|
||||||
'font' => ['bold' => true],
|
// 'font' => ['bold' => true],
|
||||||
'fill' => ['fillType' => 'solid', 'color' => ['rgb' => 'E2EFDA']],
|
// 'fill' => ['fillType' => 'solid', 'color' => ['rgb' => 'E2EFDA']],
|
||||||
'borders' => [
|
// 'borders' => [
|
||||||
'allBorders' => [
|
// 'allBorders' => [
|
||||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
// 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
],
|
// ],
|
||||||
'A12:F31' => [
|
// 'A12:F31' => [
|
||||||
'borders' => [
|
// 'borders' => [
|
||||||
'allBorders' => [
|
// 'allBorders' => [
|
||||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
// 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
],
|
// ],
|
||||||
|
|
||||||
|
|
||||||
'A35:F35' => [
|
// 'A35:F35' => [
|
||||||
'font' => ['bold' => true],
|
// 'font' => ['bold' => true],
|
||||||
'fill' => ['fillType' => 'solid', 'color' => ['rgb' => 'E2EFDA']],
|
// 'fill' => ['fillType' => 'solid', 'color' => ['rgb' => 'E2EFDA']],
|
||||||
'borders' => [
|
// 'borders' => [
|
||||||
'allBorders' => [
|
// 'allBorders' => [
|
||||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
// 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
],
|
// ],
|
||||||
'A35:F49' => [
|
// 'A35:F49' => [
|
||||||
'borders' => [
|
// 'borders' => [
|
||||||
'allBorders' => [
|
// 'allBorders' => [
|
||||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
// 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN
|
||||||
]
|
// ]
|
||||||
]
|
// ]
|
||||||
],
|
// ],
|
||||||
|
|
||||||
// end header
|
// // end header
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ class KJPPController extends Controller
|
|||||||
$filteredRecords = $query->count();
|
$filteredRecords = $query->count();
|
||||||
|
|
||||||
// Get the data for the current page
|
// Get the data for the current page
|
||||||
$data = $query->get();
|
$data = $query->with('city')->get();
|
||||||
|
|
||||||
// Calculate the page count
|
// Calculate the page count
|
||||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use App\Http\Controllers\Controller;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Modules\Lpj\Exports\KertasKerjaExport;
|
use Modules\Lpj\Exports\KertasKerjaExport;
|
||||||
use App\Http\Controllers\SurveyorController;
|
use Modules\Lpj\Http\Controllers\SurveyorController;
|
||||||
|
|
||||||
class PenilaiController extends Controller
|
class PenilaiController extends Controller
|
||||||
{
|
{
|
||||||
@@ -62,20 +62,41 @@ class PenilaiController extends Controller
|
|||||||
$basicData = $data->getCommonData();
|
$basicData = $data->getCommonData();
|
||||||
|
|
||||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||||
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'basicData'));
|
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||||
|
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||||
|
$forminspeksi = null;
|
||||||
|
if ($inspeksi) {
|
||||||
|
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||||
|
}
|
||||||
|
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'basicData', 'forminspeksi', 'inspeksi'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function standard($id)
|
public function standard($id)
|
||||||
{
|
{
|
||||||
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||||
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan'));
|
|
||||||
|
$jaminanId = $permohonan->debiture->documents->first()->jenis_jaminan_id;
|
||||||
|
|
||||||
|
$inspeksi = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||||
|
$forminspeksi = null;
|
||||||
|
if ($inspeksi) {
|
||||||
|
$forminspeksi = json_decode($inspeksi->data_form, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resume(){
|
$data = new SurveyorController();
|
||||||
return view('lpj::resume.index');
|
$basicData = $data->getCommonData();
|
||||||
|
|
||||||
|
return view('lpj::penilai.components.lpj-sederhana-standard', compact('permohonan', 'forminspeksi', 'basicData', 'inspeksi'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function memo(){
|
public function resume($id)
|
||||||
|
{
|
||||||
|
$permohonan = Permohonan::with(['debiture.documents.jenisjaminan', 'region.teams.teamsUsers.user', 'penilaian'])->find($id);
|
||||||
|
return view('lpj::penilai.components.resume', compact('permohonan'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function memo()
|
||||||
|
{
|
||||||
return view('lpj::resume.index');
|
return view('lpj::resume.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,19 +213,24 @@ class PenilaiController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function kertas_kerja($id, $jeniJaminan)
|
public function kertas_kerja($id, $jaminanId)
|
||||||
{
|
{
|
||||||
$data = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
$data = Inspeksi::where('permohonan_id', $id)->where('jenis_jaminan_id', $jaminanId)->first();
|
||||||
|
|
||||||
$headerInfo = [
|
// $data = null;
|
||||||
'tanggal_penilaian' => '',
|
// $headerInfo = [
|
||||||
'nama_pemilik' => '',
|
// 'tanggal_penilaian' => '',
|
||||||
'nama_pemberi_tugas' => '',
|
// 'nama_pemilik' => '',
|
||||||
'lokasi_lengkap' => '',
|
// 'nama_pemberi_tugas' => '',
|
||||||
'nama_debitur' => ''
|
// 'lokasi_lengkap' => '',
|
||||||
];
|
// 'nama_debitur' => ''
|
||||||
|
// ];
|
||||||
|
|
||||||
return Excel::download(new KertasKerjaExport($data, $headerInfo), 'kertas-kerja.xlsx');
|
// $datas = json_decode($data->data_pembanding);
|
||||||
|
// return response()->json(['data' =>$datas ]);
|
||||||
|
|
||||||
|
// return view('lpj::component.kertas-kerja', compact('data'));
|
||||||
|
return Excel::download(new KertasKerjaExport($data), 'kertas-kerja.xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ class SurveyorController extends Controller
|
|||||||
return response()->json([
|
return response()->json([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'message' => 'Data berhasil disimpan',
|
'message' => 'Data berhasil disimpan',
|
||||||
'data' => $processedData
|
|
||||||
], 200);
|
], 200);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -178,30 +177,38 @@ class SurveyorController extends Controller
|
|||||||
|
|
||||||
private function getActionSpecificRules($data, $action, $request): array
|
private function getActionSpecificRules($data, $action, $request): array
|
||||||
{
|
{
|
||||||
$pisah = explode(',', $action);
|
$allowedActions = [
|
||||||
|
'apartemen-kantor' => 'getUnitData',
|
||||||
$allRules = [
|
'tanah' => 'getTanahData',
|
||||||
'tanah' => $this->getTanahData($data, $request),
|
'bangunan' => 'getBangunanData',
|
||||||
'bangunan' => $this->getBangunanData($data, $request),
|
'kapal' => 'getKapalData',
|
||||||
'kapal' => $this->getKapalData($data, $request),
|
'kendaraan' => 'getKendaraanData',
|
||||||
'kendaraan' => $this->getKendaraanData($data, $request),
|
'mesin' => 'getMesinData',
|
||||||
'mesin' => $this->getMesinData($data, $request),
|
'pesawat' => 'getPesawatData',
|
||||||
'pesawat' => $this->getPesawatData($data, $request),
|
'alat-berat' => 'getAlatBeratData',
|
||||||
'alat-berat' => $this->getAlatBeratData($data, $request),
|
'lingkungan' => 'getLingkunganData',
|
||||||
'apartemen-kantor' => $this->getUnitData($data, $request),
|
'fakta' => 'getFactData'
|
||||||
'lingkungan' => $this->getLingkunganData($data, $request),
|
|
||||||
'fakta' => $this->getFactData($data, $request),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$rules = [];
|
$rules = [];
|
||||||
$hasAssetDescriptionRules = false;
|
$hasAssetDescriptionRules = false;
|
||||||
|
|
||||||
foreach ($pisah as $act) {
|
$pisah = array_filter(
|
||||||
if (isset($allRules[$act])) {
|
explode(',', $action),
|
||||||
$rules = array_merge($rules, $allRules[$act]);
|
function($act) use ($allowedActions) {
|
||||||
if ($act == 'tanah' || $act == 'bangunan' || $act == 'apartemen-kantor') {
|
return isset($allowedActions[trim($act)]);
|
||||||
$hasAssetDescriptionRules = true;
|
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($pisah as $act) {
|
||||||
|
$act = trim($act);
|
||||||
|
$method = $allowedActions[$act];
|
||||||
|
|
||||||
|
$actionRules = $this->$method($data, $request);
|
||||||
|
$rules = array_merge($rules, $actionRules);
|
||||||
|
|
||||||
|
if (in_array($act, ['apartemen-kantor', 'tanah', 'bangunan'])) {
|
||||||
|
$hasAssetDescriptionRules = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,28 +224,39 @@ class SurveyorController extends Controller
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$maxSize = getMaxFileSize('Foto');
|
$maxSize = getMaxFileSize('Foto');
|
||||||
$validatedData = $request->validate([
|
$validationRules = [
|
||||||
'foto_denah' => 'required|file|mimes:jpeg,jpg,png,pdf,svg|max:'. $maxSize,
|
|
||||||
'luas' => 'required|numeric',
|
'luas' => 'required|numeric',
|
||||||
'permohonan_id' => 'required',
|
'permohonan_id' => 'required',
|
||||||
'jenis_jaminan_id' => 'required'
|
'jenis_jaminan_id' => 'required'
|
||||||
]);
|
];
|
||||||
|
|
||||||
$validatedData['foto_denah'] = $this->uploadFile($request->file('foto_denah'), 'foto_denah');
|
if ($request->hasFile('foto_denah')) {
|
||||||
|
$maxSize = getMaxFileSize('Foto');
|
||||||
|
$validationRules['foto_denah'] = 'file|mimes:jpeg,jpg,png,pdf,svg|max:'. $maxSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
$validatedData = $request->validate($validationRules);
|
||||||
|
|
||||||
$formatJsonDenah = [
|
$formatJsonDenah = [
|
||||||
'foto_denah' => $validatedData['foto_denah'],
|
|
||||||
'luas' => $validatedData['luas'],
|
'luas' => $validatedData['luas'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($request->hasFile('foto_denah')) {
|
||||||
|
$formatJsonDenah['foto_denah'] = $this->uploadFile($request->file('foto_denah'), 'foto_denah');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
$inspeksi = Inspeksi::where('permohonan_id', $request->input('permohonan_id'))
|
||||||
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
->where('jenis_jaminan_id', $request->input('jenis_jaminan_id'))
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($inspeksi) {
|
if ($inspeksi) {
|
||||||
|
$existingDenah = json_decode($inspeksi->denah_form, true) ?? [];
|
||||||
|
|
||||||
|
$updatedDenah = array_merge($existingDenah, $formatJsonDenah);
|
||||||
|
|
||||||
$inspeksi->update([
|
$inspeksi->update([
|
||||||
'denah_form' => json_encode($formatJsonDenah)
|
'denah_form' => json_encode($updatedDenah)
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
Inspeksi::create([
|
Inspeksi::create([
|
||||||
@@ -573,7 +591,7 @@ class SurveyorController extends Controller
|
|||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($inspeksi) {
|
if ($inspeksi) {
|
||||||
$existingData = $inspeksi->data_pembanding ?? [];
|
$existingData = json_decode($inspeksi->data_pembanding, true) ?? [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,8 +600,8 @@ class SurveyorController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
$existingFoto = null;
|
$existingFoto = null;
|
||||||
if ($existingData && isset($existingData[$i]['foto_objek'])) {
|
if ($existingData && isset($existingData['data_pembanding'][$i]['foto_objek'])) {
|
||||||
$existingFoto = $existingData[$i]['foto_objek'];
|
$existingFoto = $existingData['data_pembanding'][$i]['foto_objek'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Penanganan foto pembanding
|
// Penanganan foto pembanding
|
||||||
@@ -855,6 +873,7 @@ class SurveyorController extends Controller
|
|||||||
'data_pembanding' => $this->formatDataPembanding($request)
|
'data_pembanding' => $this->formatDataPembanding($request)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$inspeksi = $this->saveInspeksi($formattedData);
|
$inspeksi = $this->saveInspeksi($formattedData);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
@@ -1023,7 +1042,6 @@ class SurveyorController extends Controller
|
|||||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||||
throw new \Exception('Error decoding comparison data: ' . json_last_error_msg());
|
throw new \Exception('Error decoding comparison data: ' . json_last_error_msg());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$fotoForm = json_decode($inspeksi->foto_form, true);
|
$fotoForm = json_decode($inspeksi->foto_form, true);
|
||||||
|
|
||||||
@@ -1037,8 +1055,6 @@ class SurveyorController extends Controller
|
|||||||
$districts = District::where('city_code', $this->getCodeAlamat('city_code', $inspectionData))->get();
|
$districts = District::where('city_code', $this->getCodeAlamat('city_code', $inspectionData))->get();
|
||||||
$villages = Village::where('district_code', $this->getCodeAlamat('district_code', $inspectionData))->get();
|
$villages = Village::where('district_code', $this->getCodeAlamat('district_code', $inspectionData))->get();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::surveyor.components.data-pembanding', compact(
|
return view('lpj::surveyor.components.data-pembanding', compact(
|
||||||
'permohonan',
|
'permohonan',
|
||||||
'id',
|
'id',
|
||||||
@@ -1050,7 +1066,8 @@ class SurveyorController extends Controller
|
|||||||
'cities',
|
'cities',
|
||||||
'districts',
|
'districts',
|
||||||
'villages',
|
'villages',
|
||||||
'provinces'
|
'provinces',
|
||||||
|
'inspeksi'
|
||||||
));
|
));
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -1544,7 +1561,7 @@ class SurveyorController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private function getCommonData()
|
public function getCommonData()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'branches' => Branch::all(),
|
'branches' => Branch::all(),
|
||||||
@@ -1660,7 +1677,7 @@ class SurveyorController extends Controller
|
|||||||
true
|
true
|
||||||
),
|
),
|
||||||
'hadap_mata_angin' => [
|
'hadap_mata_angin' => [
|
||||||
$data['hadap_mata_angin'] => ($data['hadap_mata_angin'] == 'sesuai') ? $data['hadap_mata_angin_sesuai'] : $data['hadap_mata_angin_tidak_sesuai']
|
$data['hadap_mata_angin'] => $data['hadap_mata_angin'] == 'sesuai' ? $data['hadap_mata_angin_sesuai'] : $data['hadap_mata_angin_tidak_sesuai'] ?? null
|
||||||
],
|
],
|
||||||
'bentuk_tanah' => $this->getFieldData(
|
'bentuk_tanah' => $this->getFieldData(
|
||||||
$data,
|
$data,
|
||||||
@@ -1791,11 +1808,9 @@ class SurveyorController extends Controller
|
|||||||
'jarak_tps' => $data['jarak_tps'] ?? null,
|
'jarak_tps' => $data['jarak_tps'] ?? null,
|
||||||
'nama_tps' => $data['nama_tps'] ?? null,
|
'nama_tps' => $data['nama_tps'] ?? null,
|
||||||
'merupakan_daerah' => $data['merupakan_daerah'] ?? null,
|
'merupakan_daerah' => $data['merupakan_daerah'] ?? null,
|
||||||
'fasilitas_dekat_object' => $this->getFieldData(
|
'fasilitas_dekat_object' => $this->mapArrayWithInputs(
|
||||||
$data,
|
$data['fasilitas_dekat_object'] ?? [],
|
||||||
'fasilitas_dekat_object',
|
$data['fasilitas_dekat_object_input'] ?? []
|
||||||
false,
|
|
||||||
'lainnya'
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
'hadap_mata_angin' => 'required',
|
'hadap_mata_angin' => 'required',
|
||||||
'hadap_mata_angin_sesuai' => 'nullable',
|
'hadap_mata_angin_sesuai' => 'nullable',
|
||||||
'hadap_mata_angin_tidak_sesuai' => 'nullable',
|
'hadap_mata_angin_tidak_sesuai' => 'nullable',
|
||||||
'bentuk_tanah' => 'nullable|array',
|
'bentuk_tanah' => 'required|array',
|
||||||
'bentuk_tanah_lainnya' => 'nullable',
|
'bentuk_tanah_lainnya' => 'nullable',
|
||||||
'kontur_tanah' => 'required|array',
|
'kontur_tanah' => 'required|array',
|
||||||
'ketinggian_jalan' => 'required|array',
|
'ketinggian_jalan' => 'required|array',
|
||||||
@@ -102,8 +102,8 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
'luas_tanah_bangunan_sesuai' => 'nullable',
|
'luas_tanah_bangunan_sesuai' => 'nullable',
|
||||||
'luas_tanah_bagunan' => 'required',
|
'luas_tanah_bagunan' => 'required',
|
||||||
'luas_tanah_bangunan_tidak_sesuai' => 'nullable',
|
'luas_tanah_bangunan_tidak_sesuai' => 'nullable',
|
||||||
'jenis_bangunan' => 'required',
|
'jenis_bangunan' => 'required|array',
|
||||||
'kondisi_bangunan' => 'nullable',
|
'kondisi_bangunan' => 'required|array',
|
||||||
'sifat_bangunan' => 'required|array',
|
'sifat_bangunan' => 'required|array',
|
||||||
'sifat_bangunan_input' => 'nullable|array',
|
'sifat_bangunan_input' => 'nullable|array',
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ class FormSurveyorRequest extends FormRequest
|
|||||||
'nama_tpu' => 'nullable',
|
'nama_tpu' => 'nullable',
|
||||||
'merupakan_daerah' => 'nullable',
|
'merupakan_daerah' => 'nullable',
|
||||||
'fasilitas_dekat_object' => 'nullable|array',
|
'fasilitas_dekat_object' => 'nullable|array',
|
||||||
'fasilitas_dekat_object_lainnya' => 'nullable',
|
'fasilitas_dekat_object_input' => 'nullable|array',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Modules\Lpj\Models;
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
use Modules\Location\Models\Province;
|
use Modules\Location\Models\City;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
@@ -25,4 +25,12 @@ class KJPP extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasMany(PenawaranDetailTender::class, 'kjpp_rekanan_id', 'id');
|
return $this->hasMany(PenawaranDetailTender::class, 'kjpp_rekanan_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function city()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(City::class, 'city_code', 'code');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,16 +66,16 @@ class KJPPSeeder extends Seeder
|
|||||||
$jenisUsaha = $this->checkJenisUsaha($row[18]);
|
$jenisUsaha = $this->checkJenisUsaha($row[18]);
|
||||||
$jenisAsset = $this->checkJenisAsset($row[19]);
|
$jenisAsset = $this->checkJenisAsset($row[19]);
|
||||||
|
|
||||||
$detail_email_kantor = $this->checkDanJadikanJson($row[8]);
|
$detail_email_kantor = $this->checkDanJadikanJson($row[9]);
|
||||||
$nama_pic_reviewer = $this->checkDanJadikanJson($row[11]);
|
$nama_pic_reviewer = $this->checkDanJadikanJson($row[12]);
|
||||||
$nomor_hp_pic_reviewer = $this->checkDanJadikanJson($row[12]);
|
$nomor_hp_pic_reviewer = $this->checkDanJadikanJson($row[13]);
|
||||||
$detail_nama_pic_admin = $this->checkDanJadikanJson($row[13]);
|
$detail_nama_pic_admin = $this->checkDanJadikanJson($row[14]);
|
||||||
|
|
||||||
$nomor_hp_pic_admin = $this->checkDanJadikanJson($row[14]);
|
$nomor_hp_pic_admin = $this->checkDanJadikanJson($row[15]);
|
||||||
$nama_pic_marketing = $this->checkDanJadikanJson($row[15]);
|
$nama_pic_marketing = $this->checkDanJadikanJson($row[16]);
|
||||||
|
|
||||||
|
|
||||||
$nomor_hp_pic_marketing = $this->checkDanJadikanJson($row[16]);
|
$nomor_hp_pic_marketing = $this->checkDanJadikanJson($row[17]);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -91,23 +91,23 @@ class KJPPSeeder extends Seeder
|
|||||||
'address' => $row[7],
|
'address' => $row[7],
|
||||||
'postal_code' => $locationData['postal_code'],
|
'postal_code' => $locationData['postal_code'],
|
||||||
'nomor_telepon_kantor' => $row[8],
|
'nomor_telepon_kantor' => $row[8],
|
||||||
'email_kantor' => $detail_email_kantor,
|
'email_kantor' => $detail_email_kantor[0],
|
||||||
'detail_email_kantor' => $detail_email_kantor,
|
'detail_email_kantor' => json_encode($detail_email_kantor),
|
||||||
'nama_pimpinan' => $row[9],
|
'nama_pimpinan' => $row[10],
|
||||||
'nomor_hp_pimpinan' => $row[10],
|
'nomor_hp_pimpinan' => $row[11],
|
||||||
'nama_pic_reviewer' => $nama_pic_reviewer,
|
'nama_pic_reviewer' => $nama_pic_reviewer[0],
|
||||||
'detail_nama_pic_reviewer' => $nama_pic_reviewer,
|
'detail_nama_pic_reviewer' => json_encode($nama_pic_reviewer),
|
||||||
'nomor_hp_pic_reviewer' => $nomor_hp_pic_reviewer,
|
'nomor_hp_pic_reviewer' => $nomor_hp_pic_reviewer[0],
|
||||||
'detail_nomor_hp_pic_reviewer' => $nomor_hp_pic_reviewer,
|
'detail_nomor_hp_pic_reviewer' => json_encode($nomor_hp_pic_reviewer),
|
||||||
|
|
||||||
'nama_pic_admin' => $detail_nama_pic_admin,
|
'nama_pic_admin' => $detail_nama_pic_admin[0],
|
||||||
'detail_nama_pic_admin' => $detail_nama_pic_admin,
|
'detail_nama_pic_admin' => json_encode($detail_nama_pic_admin),
|
||||||
'nomor_hp_pic_admin' => $nomor_hp_pic_admin,
|
'nomor_hp_pic_admin' => $nomor_hp_pic_admin[0],
|
||||||
'detail_nomor_hp_pic_admin' => $nomor_hp_pic_admin,
|
'detail_nomor_hp_pic_admin' => json_encode($nomor_hp_pic_admin),
|
||||||
'nama_pic_marketing' => $nama_pic_marketing,
|
'nama_pic_marketing' => $nama_pic_marketing[0],
|
||||||
'detail_nama_pic_marketing' => $nama_pic_marketing,
|
'detail_nama_pic_marketing' => json_encode($nama_pic_marketing),
|
||||||
'nomor_hp_pic_marketing' => $nomor_hp_pic_marketing[0],
|
'nomor_hp_pic_marketing' => $nomor_hp_pic_marketing[0],
|
||||||
'detail_nomor_hp_pic_marketing' => $nomor_hp_pic_marketing,
|
'detail_nomor_hp_pic_marketing' => json_encode($nomor_hp_pic_marketing),
|
||||||
'ijin_usaha_id' => json_encode($jenisUsaha),
|
'ijin_usaha_id' => json_encode($jenisUsaha),
|
||||||
'jenis_aset_id' => json_encode($jenisAsset),
|
'jenis_aset_id' => json_encode($jenisAsset),
|
||||||
'attachment' => null,
|
'attachment' => null,
|
||||||
@@ -198,7 +198,9 @@ public function checkKota($data)
|
|||||||
public function checkJenisAsset($data)
|
public function checkJenisAsset($data)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!$data) return [];
|
if (!$data) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
// Bersihkan dan ubah ke lowercase
|
// Bersihkan dan ubah ke lowercase
|
||||||
$cleanData = trim(strtolower($data));
|
$cleanData = trim(strtolower($data));
|
||||||
@@ -254,7 +256,9 @@ public function checkJenisAsset($data)
|
|||||||
public function checkJenisUsaha($data)
|
public function checkJenisUsaha($data)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!$data) return [];
|
if (!$data) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
// Bersihkan dan ubah ke lowercase
|
// Bersihkan dan ubah ke lowercase
|
||||||
$cleanData = trim(strtolower($data));
|
$cleanData = trim(strtolower($data));
|
||||||
@@ -294,25 +298,26 @@ public function checkJenisUsaha($data)
|
|||||||
|
|
||||||
|
|
||||||
// Fungsi untuk memisahkan dan mengonversi data menjadi array JSON
|
// Fungsi untuk memisahkan dan mengonversi data menjadi array JSON
|
||||||
function checkDanJadikanJson($input) {
|
public function checkDanJadikanJson($input)
|
||||||
|
{
|
||||||
$input = trim($input);
|
$input = trim($input);
|
||||||
|
|
||||||
// memisahkan berdasarkan "/", ";", "dan", atau baris baru ("\n")
|
// Memisahkan berdasarkan "/", ";", "dan", atau baris baru ("\n")
|
||||||
$separatedData = preg_split('/\s*\/\s*|\s*;\s*|\s*dan\s*|\s*\n\s*/i', $input);
|
$separatedData = preg_split('/\s*\/\s*|\s*;\s*|\s*dan\s*|\s*\n\s*/i', $input);
|
||||||
|
|
||||||
|
// Membersihkan data
|
||||||
|
$cleanedData = array_map('trim', $separatedData);
|
||||||
|
|
||||||
$cleanedData = array_map(function($item) {
|
// Menghapus elemen kosong
|
||||||
return trim($item);
|
|
||||||
}, $separatedData);
|
|
||||||
|
|
||||||
$cleanedData = array_filter($cleanedData, function ($item) {
|
$cleanedData = array_filter($cleanedData, function ($item) {
|
||||||
return !empty($item);
|
return !empty($item);
|
||||||
});
|
});
|
||||||
|
|
||||||
return json_encode(array_values($cleanedData));
|
// Kembalikan array yang sudah diurutkan ulang (indeks dimulai dari 0)
|
||||||
|
return array_values($cleanedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
550
resources/views/component/kertas-kerja.blade.php
Normal file
550
resources/views/component/kertas-kerja.blade.php
Normal file
@@ -0,0 +1,550 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Penilaian Aset</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-table,
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-table td {
|
||||||
|
padding: 5px 8px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-table .title {
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #f1f3f5;
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-table .value {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th,
|
||||||
|
.data-table td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 5px 8px;
|
||||||
|
text-align: left;
|
||||||
|
word-wrap: break-word;
|
||||||
|
max-width: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th {
|
||||||
|
background-color: #f1f3f5;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:nth-child(even) {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
body {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="header-table">
|
||||||
|
<tr>
|
||||||
|
<td class="title">Pendekatan Pasar</td>
|
||||||
|
<td class="value">Metode Perbandingan Data Pasar</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Tanggal Penilaian</td>
|
||||||
|
<td class="value">{{ $tanggal_penilaian ?? '-' }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Nama Pemilik Aset</td>
|
||||||
|
<td class="value">-</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Nama Pemberi Tugas</td>
|
||||||
|
<td class="value">-</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Lokasi</td>
|
||||||
|
<td class="value">{{ $lokasi ?? '-' }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="title">Nama Debitur</td>
|
||||||
|
<td class="value">-</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>A Informasi Umum
|
||||||
|
</h4>
|
||||||
|
<table class="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="5">No.</th>
|
||||||
|
<th width="20">Uraian</th>
|
||||||
|
<th width="15">Objek Penilaian</th>
|
||||||
|
<th width="20">Data Pembanding 1</th>
|
||||||
|
<th width="20">Data Pembanding 2</th>
|
||||||
|
<th width="20">Data Pembanding 3</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$dataform = json_decode($data->data_form, true) ?? [];
|
||||||
|
$dataPembanding = json_decode($data->data_pembanding, true) ?? [];
|
||||||
|
|
||||||
|
// print_r($dataform);
|
||||||
|
// echo $dataform;
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@php
|
||||||
|
function getNestedValue($data, $keyPath, $default = '-')
|
||||||
|
{
|
||||||
|
// Pecah path kunci menjadi array
|
||||||
|
$keys = explode('.', $keyPath);
|
||||||
|
|
||||||
|
// Mulai dari data awal
|
||||||
|
$value = $data;
|
||||||
|
|
||||||
|
// Telusuri setiap kunci
|
||||||
|
foreach ($keys as $key) {
|
||||||
|
// Cek apakah kunci ada di level saat ini
|
||||||
|
if (is_array($value) && array_key_exists($key, $value)) {
|
||||||
|
$value = $value[$key];
|
||||||
|
} else {
|
||||||
|
// Jika kunci tidak ditemukan, kembalikan default
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kembalikan nilai akhir atau default jika kosong
|
||||||
|
return $value ?? $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = [
|
||||||
|
[
|
||||||
|
'label' => 'Jenis Aset',
|
||||||
|
'key' => 'asset.jenis_aset',
|
||||||
|
'default' => 'Rumah Tinggal',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Luas Tanah (M²)',
|
||||||
|
'key' => 'tanah.luas_tanah',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Luas Bangunan (M²)',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Penawaran Transaksi',
|
||||||
|
'key' => '-',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Tanggal Penawaran',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Discon',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Estimasi Harga',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Telepon Contact person',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Nama Nara Sumber',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Status Nara Sumber',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Waktu Penawaran',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Alamat',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Jalan',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Desa/Kelurahan',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Kecamatan',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Kota/Kabupaten',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Provinsi',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'label' => 'Jarak Pembanding dengan Objek',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Esitmasi Rangking Tanah',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Estimasi Ranking bangunan',
|
||||||
|
'key' => 'bangunan.luas_tanah_bangunan',
|
||||||
|
'default' => '-',
|
||||||
|
'variants' => [
|
||||||
|
'sesuai' => 'Sesuai',
|
||||||
|
'tidak sesuai' => 'Tidak Sesuai',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($rows as $index => $item)
|
||||||
|
<tr>
|
||||||
|
<td class="text-center">{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $item['label'] }}</td>
|
||||||
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
// Coba berbagai varian kunci
|
||||||
|
$objekValue = '-';
|
||||||
|
foreach (['sesuai', 'tidak sesuai'] as $variant) {
|
||||||
|
$fullKey = $item['key'] . '.' . $variant;
|
||||||
|
$objekValue = getNestedValue($dataform, $fullKey, $item['default']);
|
||||||
|
|
||||||
|
// Jika nilai ditemukan, hentikan pencarian
|
||||||
|
if ($objekValue !== $item['default']) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
{{ $objekValue }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@for ($i = 0; $i < 3; $i++)
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
$pembandingValue = '-';
|
||||||
|
|
||||||
|
// Pastikan data pembanding tersedia
|
||||||
|
if (isset($dataPembanding['data_pembanding'][$i])) {
|
||||||
|
$pembandingItem = $dataPembanding['data_pembanding'][$i];
|
||||||
|
|
||||||
|
// Mapping key berdasarkan label
|
||||||
|
switch ($item['label']) {
|
||||||
|
case 'Jenis Aset':
|
||||||
|
$pembandingValue = $pembandingItem['jenis_aset'] ?? '-';
|
||||||
|
break;
|
||||||
|
case 'Luas Tanah (M²)':
|
||||||
|
$pembandingValue = $pembandingItem['luas_tanah'] ?? '-';
|
||||||
|
break;
|
||||||
|
case 'Luas Bangunan (M²)':
|
||||||
|
$pembandingValue = $pembandingItem['luas_bangunan'] ?? '-';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$pembandingValue = '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
{{ $pembandingValue }}
|
||||||
|
</td>
|
||||||
|
@endfor
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4> B. Estimasi Nilai Tanah Pembanding dengan Teknik Penyisaan Tanah untuk mendapatkan per meter persegi estimasi
|
||||||
|
Nilai Tanah Pembanding</h4>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<table class="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="5">No.</th>
|
||||||
|
<th width="20">Uraian</th>
|
||||||
|
<th width="15">Objek Penilaian</th>
|
||||||
|
<th width="20">Data Pembanding 1</th>
|
||||||
|
<th width="20">Data Pembanding 2</th>
|
||||||
|
<th width="20">Data Pembanding 3</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$estimasi = [
|
||||||
|
[
|
||||||
|
'label' => 'Biaya Teknis Bangunan',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Estimasi Biaya Pengganti Baru Bangunan',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Estimasi Biaya Pengganti SPL (Rp)',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => 'Penyusutan Fisik Banguan',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($estimasi as $index => $item)
|
||||||
|
<tr>
|
||||||
|
<td class="text-center">{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $item['label'] }}</td>
|
||||||
|
<td>-</td>
|
||||||
|
@for ($i = 0; $i < 3; $i++)
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
$pembandingValue = '-';
|
||||||
|
|
||||||
|
// Pastikan data pembanding tersedia
|
||||||
|
if (isset($dataPembanding['data_pembanding'][$i])) {
|
||||||
|
$pembandingItem = $dataPembanding['data_pembanding'][$i];
|
||||||
|
|
||||||
|
// Mapping key berdasarkan label
|
||||||
|
switch ($item['label']) {
|
||||||
|
case 'Jenis Aset':
|
||||||
|
$pembandingValue = $pembandingItem['jenis_aset'] ?? '-';
|
||||||
|
break;
|
||||||
|
case 'Luas Tanah (M²)':
|
||||||
|
$pembandingValue = $pembandingItem['luas_tanah'] ?? '-';
|
||||||
|
break;
|
||||||
|
case 'Luas Bangunan (M²)':
|
||||||
|
$pembandingValue = $pembandingItem['luas_bangunan'] ?? '-';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$pembandingValue = '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
{{ $pembandingValue }}
|
||||||
|
</td>
|
||||||
|
@endfor
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4>Peta Objek dan Pembanding
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat'];
|
||||||
|
|
||||||
|
// echo $dataForm;
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@for ($i = 0; $i < count($fotoTypes); $i++)
|
||||||
|
<img src="{{ isset($dataform[$fotoTypes[$i]]) ? asset('storage/' . $dataform[$fotoTypes[$i]]) : '#' }}"
|
||||||
|
alt="{{ $fotoTypes[$i] }}" style="max-width: 40rem;">
|
||||||
|
@endfor
|
||||||
|
|
||||||
|
<h4>FOTO OBJEK DAN DATA PEMBANDING</h4>
|
||||||
|
|
||||||
|
@foreach ($dataPembanding['data_pembanding'] as $item)
|
||||||
|
<img src="{{ isset($item['foto_objek']) ? asset('storage/' . $item['foto_objek']) : '#' }}"
|
||||||
|
alt="Foto Objek" style="max-width: 20rem;">
|
||||||
|
<p style="text-center">Data Pembanding {{ $loop->iteration }}</p>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
|
@php
|
||||||
|
$dataFoto = json_decode($data->foto_form, true);
|
||||||
|
@endphp
|
||||||
|
<h4>FOTO OBJEK</h4>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$images = [];
|
||||||
|
|
||||||
|
// Rute Menuju Lokasi
|
||||||
|
foreach ($dataFoto['rute_menuju_lokasi'] ?? [] as $rute) {
|
||||||
|
$images[] = $rute['foto_rute'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Objek Jaminan
|
||||||
|
foreach ($dataFoto['object_jaminan'] ?? [] as $objek) {
|
||||||
|
$images[] = $objek['foto_objek'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lingkungan
|
||||||
|
foreach ($dataFoto['lingkungan'] ?? [] as $lingkungan) {
|
||||||
|
$images[] = $lingkungan['foto_lingkungan'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lantai Unit
|
||||||
|
foreach ($dataFoto['foto_lantai_unit'] ?? [] as $lantai) {
|
||||||
|
$images[] = $lantai['foto_lantai_unit'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tambahan foto lainnya
|
||||||
|
$images[] = $dataFoto['foto_basement'] ?? null;
|
||||||
|
$images[] = $dataFoto['foto_gerbang'] ?? null;
|
||||||
|
$images[] = $dataFoto['pendamping'] ?? null;
|
||||||
|
|
||||||
|
// Filter null values
|
||||||
|
$images = array_filter($images);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
@foreach ($images as $image)
|
||||||
|
<img src="{{ asset('storage/' . $image) }}" alt="Foto Survey"
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
height: 250px;
|
||||||
|
object-fit: cover;
|
||||||
|
margin: 10px;
|
||||||
|
"
|
||||||
|
onerror="this.src='{{ asset('default-image.png') }}'">
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const data = @json($dataFoto);
|
||||||
|
console.log(data);
|
||||||
|
</script>
|
||||||
@@ -48,6 +48,14 @@
|
|||||||
<span class="sort"> <span class="sort-label"> Jenis Kantor </span>
|
<span class="sort"> <span class="sort-label"> Jenis Kantor </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="min-w-[50px]" data-datatable-column="jenis_kantor">
|
||||||
|
<span class="sort"> <span class="sort-label"> Kota/Kabupaten </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[50px]" data-datatable-column="jenis_kantor">
|
||||||
|
<span class="sort"> <span class="sort-label"> Alamat </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -131,6 +139,15 @@
|
|||||||
jenis_kantor: {
|
jenis_kantor: {
|
||||||
title: 'Jenis Kantor',
|
title: 'Jenis Kantor',
|
||||||
},
|
},
|
||||||
|
city: {
|
||||||
|
title: 'Kota/Kabupaten',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.city.name;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
address: {
|
||||||
|
title: 'Alamat KJPP',
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: 'Action',
|
title: 'Action',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<div class="card-body grid gap-5">
|
||||||
|
|
||||||
|
@php
|
||||||
|
$informasiPembanding = isset($inspeksi->data_pembanding) ? json_decode($inspeksi->data_pembanding, true) : [];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($informasiPembanding['data_pembanding'] as $key => $item)
|
||||||
|
<div class="border border-gray-200">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-5 p-5">
|
||||||
|
<div class="form-label lg:form-label max-w-56 grid gap-2.5">
|
||||||
|
<label class=" ">Pembanding {{ $key + 1 }}
|
||||||
|
</label>
|
||||||
|
<img src="{{ isset($item['foto_objek']) ? asset('storage/' . old('foto_objek', $item['foto_objek'])) : '#' }}"
|
||||||
|
alt="Gambar foto_objek" style="width: 20rem;" class="mx-auto object-cover">
|
||||||
|
</div>
|
||||||
|
<div class="grid gap-2.5 w-full">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Jenis Properti</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['jenis_aset'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Harga Penawara</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['harga_diskon'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Penjualan (HP)</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['harga'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Ditawarkan sejak</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['harga'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">LT</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['luas_tanah'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">LB</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['luas_bangunan'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Titik Koordinat</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<span>{{ $item['kordinat_lat'] }} , {{ $item['kordinat_lng'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
@@ -132,8 +132,7 @@
|
|||||||
Informasi dan pembanding
|
Informasi dan pembanding
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
@include('lpj::penilai.components.informasi-pembanding')
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
254
resources/views/penilai/components/resume.blade.php
Normal file
254
resources/views/penilai/components/resume.blade.php
Normal file
@@ -0,0 +1,254 @@
|
|||||||
|
@extends('layouts.main')
|
||||||
|
|
||||||
|
@section('breadcrumbs')
|
||||||
|
{{-- {{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||||
|
--}}
|
||||||
|
Resume
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
@include('lpj::assetsku.includenya')
|
||||||
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title uppercase">
|
||||||
|
Data Jaminan
|
||||||
|
</h3>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{{ route('penilai.show', ['id' => $permohonan->id]) }}" class="btn btn-xs btn-info">
|
||||||
|
<i class="ki-filled ki-exit-left"></i> Back
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body grid gap-5 grid-cols-2">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Nama Debitur</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
@if (isset($permohonan->debiture))
|
||||||
|
<p class="text-2sm text-gray-700">{{ $permohonan->debiture->name }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Alamat Object</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
|
<span class="text-2sm text-gray-700">
|
||||||
|
{{ formatAlamat($dokumen->pemilik) }}
|
||||||
|
</span>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Nomor Registrasi</label>
|
||||||
|
<div class="flex flex-wrap items-base line w-full">
|
||||||
|
<p class="text-2sm text-gray-700">{{ $permohonan->nomor_registrasi }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Cab/Direktorat</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
@if (isset($permohonan->branch))
|
||||||
|
<p class="text-2sm text-gray-700">{{ $permohonan->branch->name }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Nomor Laporan</label>
|
||||||
|
<div class="flex flex-wrap items-base line w-full">
|
||||||
|
<p class="text-2sm text-gray-700">{{ $permohonan->nomor_registrasi }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">AO</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
@if (isset($permohonan->user))
|
||||||
|
<p class="text-2sm text-gray-700">{{ $permohonan->user->name }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title uppercase">
|
||||||
|
faktor
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body grid gap-5">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Faktor Positif</label>
|
||||||
|
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
|
@if (!empty($forminspeksi['fakta']['fakta_positif']))
|
||||||
|
@foreach ($forminspeksi['fakta']['fakta_positif'] as $index => $positif)
|
||||||
|
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||||
|
onclick="addClonableItem('fakta-positif-container', 'fakta_positif')">
|
||||||
|
<i class="ki-outline ki-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Faktor Negatif</label>
|
||||||
|
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
|
@if (!empty($forminspeksi['fakta']['fakta_negatif']))
|
||||||
|
@foreach ($forminspeksi['fakta']['fakta_negatif'] as $index => $negatif)
|
||||||
|
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old("fakta_negatif.$index", $negatif) }}</textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
|
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $forminspeksi['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
||||||
|
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</button>
|
||||||
|
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||||
|
onclick="addClonableItem('fakta-negatif-container', 'fakta_negatif')">
|
||||||
|
<i class="ki-outline ki-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card min-w-full">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title uppercase">
|
||||||
|
KESIMPULAN NILAI PASAR WAJAR
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body grid gap-5">
|
||||||
|
|
||||||
|
<div class="gird gap-5">
|
||||||
|
<label class="form-label max-w-56">1. SESUAI FISIK</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full mt-5">
|
||||||
|
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">Sertipikat</th>
|
||||||
|
<th class="text-center">Luas Tanah</th>
|
||||||
|
<th class="text-center">Luas Bangunan</th>
|
||||||
|
<th class="text-center">Nilai Pasar Wajar</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
<td class="text-center"> <input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format"></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="gird gap-5">
|
||||||
|
<label class="form-label max-w-56">2. SESUAI IMB</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
|
||||||
|
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm mt-5">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="text-center">Sertipikat</th>
|
||||||
|
<th class="text-center">Luas Tanah</th>
|
||||||
|
<th class="text-center">Luas Bangunan</th>
|
||||||
|
<th class="text-center">Nilai Pasar Wajar</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div >
|
||||||
|
<button type="button" class="btn btn-primary btn-sm mt-5">
|
||||||
|
<i class="ki-outline ki-plus"></i>
|
||||||
|
Kesimpulan Nilai
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="kesimpulan"></div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||||
|
|
||||||
|
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||||
|
</label>
|
||||||
|
<div class="input-group w-full flex gap-2">
|
||||||
|
<textarea name="keterangan" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old('keterangan', $forminspeksi['fakta']['keterangan'] ?? '') }}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-success">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
@include('lpj::surveyor.js.utils')
|
||||||
@@ -290,14 +290,31 @@
|
|||||||
|
|
||||||
<div class="flex justify-center items-center gap-2">
|
<div class="flex justify-center items-center gap-2">
|
||||||
<input type="file" name="" id="" class="file-input">
|
<input type="file" name="" id="" class="file-input">
|
||||||
<button class="btn btn-outline btn-success">Upload</button>
|
<button type="button" class="btn btn-outline btn-success"
|
||||||
|
onclick="uploadKertasKerja()">Upload</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group flex items-baseline flex-wrap">
|
<div class="form-group flex items-baseline flex-wrap">
|
||||||
|
@php
|
||||||
|
$jenisJaminanId = null;
|
||||||
|
@endphp
|
||||||
|
@foreach ($permohonan->debiture->documents as $document)
|
||||||
|
@if ($document->jenisjaminan)
|
||||||
|
@php
|
||||||
|
$jenisJaminanId = $document->jenisjaminan->id;
|
||||||
|
@endphp
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@if ($jenisJaminanId)
|
||||||
<a class="btn btn-outline btn-primary w-full"
|
<a class="btn btn-outline btn-primary w-full"
|
||||||
href="{{ route('penilai.export.kertas-kerja', $permohonan->id) }}">Export Kertas Kerja</a>
|
href="{{ route('penilai.export.kertas-kerja', ['id' => $permohonan->id, 'jaminanId' => $jenisJaminanId]) }}">
|
||||||
|
Export Kertas Kerja
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<p class="text-red-500">Tidak ada dokumen yang memiliki jenis jaminan.</p>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
||||||
@@ -324,4 +341,26 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function uploadKertasKerja() {
|
||||||
|
showLoadingSwal('Mengirim data ke server...');
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Berhasil!',
|
||||||
|
text: response.message,
|
||||||
|
icon: 'success',
|
||||||
|
timer: 2000,
|
||||||
|
timerProgressBar: true,
|
||||||
|
didOpen: () => {
|
||||||
|
Swal.showLoading()
|
||||||
|
},
|
||||||
|
willClose: () => {
|
||||||
|
hideLoadingSwal();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@include('lpj::surveyor.js.utils')
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
@include('lpj::surveyor.components.header')
|
|
||||||
|
|
||||||
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title uppercase">
|
<h3 class="card-title uppercase">
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
@@ -67,14 +67,18 @@
|
|||||||
<!-- Jenis Bangunan -->
|
<!-- Jenis Bangunan -->
|
||||||
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Jenis Bangunan</label>
|
<label class="form-label max-w-56">Jenis Bangunan</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="flex flex-col items-start gap-4">
|
<div class="flex flex-col items-start gap-4">
|
||||||
@if (isset($basicData['jenisBangunan']))
|
@if (isset($basicData['jenisBangunan']))
|
||||||
@foreach ($basicData['jenisBangunan'] as $item)
|
@foreach ($basicData['jenisBangunan'] as $item)
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
<input class="checkbox" name="jenis_bangunan[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ old('jenis_bangunan') == $item->name || isset($forminspeksi['bangunan']['jenis_bangunan']) == $item->name ? 'checked' : '' }}
|
{{ (is_array(old('jenis_bangunan')) && in_array($item->name, old('jenis_bangunan'))) ||
|
||||||
|
(isset($forminspeksi['bangunan']['jenis_bangunan']) &&
|
||||||
|
(is_array($forminspeksi['bangunan']['jenis_bangunan']) &&
|
||||||
|
in_array($item->name, $forminspeksi['bangunan']['jenis_bangunan'])))
|
||||||
|
? 'checked' : '' }}
|
||||||
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])" />
|
onclick="toggleCheckboxVisibility('jenis_bangunan', 'jenis_bangunan_lainnya', ['lainnya'])" />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@@ -86,16 +90,15 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<em id="error-jenis_bangunan" class="alert text-danger text-sm"></em>
|
<em id="error-jenis_bangunan" class="alert text-danger text-sm"></em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Kondisi Bangunan -->
|
<!-- Kondisi Bangunan -->
|
||||||
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Kondisi Bangunan</label>
|
<label class="form-label max-w-56">Kondisi Bangunan</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="flex flex-col items-start gap-4">
|
<div class="flex flex-col items-start gap-4">
|
||||||
@if (isset($basicData['kondisiBangunan']))
|
@if (isset($basicData['kondisiBangunan']))
|
||||||
@foreach ($basicData['kondisiBangunan'] as $item)
|
@foreach ($basicData['kondisiBangunan'] as $item)
|
||||||
@@ -128,7 +131,7 @@
|
|||||||
<!-- Sifat Bangunan -->
|
<!-- Sifat Bangunan -->
|
||||||
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-stretch flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Sifat Bangunan</label>
|
<label class="form-label max-w-56">Sifat Bangunan</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="flex flex-col items-start gap-4">
|
<div class="flex flex-col items-start gap-4">
|
||||||
@if (isset($basicData['sifatBangunan']))
|
@if (isset($basicData['sifatBangunan']))
|
||||||
@foreach ($basicData['sifatBangunan'] as $item)
|
@foreach ($basicData['sifatBangunan'] as $item)
|
||||||
@@ -249,13 +252,14 @@
|
|||||||
<i class="ki-filled ki-plus"></i>
|
<i class="ki-filled ki-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Sarana pelengkap -->
|
<!-- Sarana pelengkap -->
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Sarana pelengkap</label>
|
<label class="form-label max-w-56">Sarana pelengkap</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="flex flex-col items-start gap-4">
|
<div class="flex flex-col items-start gap-4">
|
||||||
@if (isset($basicData['saranaPelengkap']))
|
@if (isset($basicData['saranaPelengkap']))
|
||||||
@foreach ($basicData['saranaPelengkap'] as $item)
|
@foreach ($basicData['saranaPelengkap'] as $item)
|
||||||
|
|||||||
@@ -110,15 +110,29 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$apartemenKantorData = explode(',', $inspeksi->name);
|
||||||
|
$isApartemenKantor = array_intersect($apartemenKantorData, [
|
||||||
|
'tanah',
|
||||||
|
'bangunan',
|
||||||
|
]);
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if ($isApartemenKantor)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2">Luas Tanah (m²)</td>
|
<td class="px-4 py-2">Luas Tanah (m²)</td>
|
||||||
@php
|
@php
|
||||||
$cekLuas = $inspectionData['tanah']['luas_tanah'] == 'sesuai' ? 'sesuai' :'tidak sesuai';
|
$cekLuas =
|
||||||
|
isset($inspectionData['tanah']['luas_tanah']) == 'sesuai'
|
||||||
|
? 'sesuai'
|
||||||
|
: 'tidak sesuai';
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
<input type="text" name="luas_tanah" class="input number-format"
|
<input type="text" name="luas_tanah" class="input number-format"
|
||||||
value="{{ $inspectionData['tanah']['luas_tanah']['sesuai'] ?? $inspectionData['tanah']['luas_tanah']['tidak sesuai'] ?? '' }}">
|
value="{{ $inspectionData['tanah']['luas_tanah']['sesuai'] ?? ($inspectionData['tanah']['luas_tanah']['tidak sesuai'] ?? '') }}">
|
||||||
</td>
|
</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
|
|
||||||
@@ -130,14 +144,29 @@
|
|||||||
<td class="px-4 py-2">Luas Bangunan (m²)</td>
|
<td class="px-4 py-2">Luas Bangunan (m²)</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
|
|
||||||
<input type="text" name="luas_tanah_bagunan" class="input number-format"
|
<input type="text" name="luas_tanah_bagunan"
|
||||||
value="{{ $inspectionData['bangunan']['luas_tanah_bagunan']['sesuai'] ?? $inspectionData['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '' }}">
|
class="input number-format"
|
||||||
|
value="{{ $inspectionData['bangunan']['luas_tanah_bagunan']['sesuai'] ?? ($inspectionData['bangunan']['luas_tanah_bagunan']['tidak sesuai'] ?? '') }}">
|
||||||
</td>
|
</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
<input type="text" name="luas_bangunan_pembanding[]"
|
<input type="text" name="luas_bangunan_pembanding[]"
|
||||||
class="input number-format">
|
class="input number-format">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td class="px-4 py-2">Luas Unit (m²)</td>
|
||||||
|
<td class="px-4 py-2">
|
||||||
|
<input type="text" name="luas_unit" class="input number-format"
|
||||||
|
value="{{ $inspectionData['unit']['luas_unit']['sesuai'] ?? ($inspectionData['unit']['luas_unit']['tidak sesuai'] ?? '') }}">
|
||||||
|
</td>
|
||||||
|
<td class="px-4 py-2">
|
||||||
|
<input type="text" name="luas_unit_pembanding[]"
|
||||||
|
class="input number-format">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
<!-- Informasi Harga -->
|
<!-- Informasi Harga -->
|
||||||
<tr class="bg-gray-100">
|
<tr class="bg-gray-100">
|
||||||
@@ -374,15 +403,28 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="px-4 py-2">Diskon</td>
|
<td class="px-4 py-2">Diskon</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
<input type="text" name="diskon" class="input currency-format"
|
<div class="input">
|
||||||
|
<input type="text" name="diskon" class=" currency-format"
|
||||||
value="{{ $inspectionData['asset']['diskon'] ?? '' }}">
|
value="{{ $inspectionData['asset']['diskon'] ?? '' }}">
|
||||||
|
<span class="btn btn-icon">
|
||||||
|
<i class="ki-outline ki-percentage"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class=" px-4 py-2">
|
<td class=" px-4 py-2">
|
||||||
|
<div class="input">
|
||||||
<input type="text" name="diskon_pembanding[]"
|
<input type="text" name="diskon_pembanding[]"
|
||||||
class="input currency-format">
|
class="currency-format">
|
||||||
|
<span class="btn btn-icon">
|
||||||
|
<i class="ki-outline ki-percentage"></i>
|
||||||
|
</i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr style="display: none;">
|
||||||
<td class="px-4 py-2">Total</td>
|
<td class="px-4 py-2">Total</td>
|
||||||
<td class="px-4 py-2">
|
<td class="px-4 py-2">
|
||||||
<input type="text" name="total" class="input currency-format"
|
<input type="text" name="total" class="input currency-format"
|
||||||
@@ -434,27 +476,56 @@
|
|||||||
|
|
||||||
|
|
||||||
// Fungsi calculate prices yang diperbaiki
|
// Fungsi calculate prices yang diperbaiki
|
||||||
function calculatePrices(index) {
|
function calculatePrices(type = 'main', index = null) {
|
||||||
const hargaInput = document.getElementsByName('harga_pembanding[]')[index];
|
let hargaInput, diskonInput, totalInput, hargaDiskonInput;
|
||||||
const diskonInput = document.getElementsByName('diskon_pembanding[]')[index];
|
|
||||||
const totalInput = document.getElementsByName('total_pembanding[]')[index];
|
// Tentukan input berdasarkan tipe (main atau pembanding)
|
||||||
const hargaDiskonInput = document.getElementsByName('harga_diskon_pembanding[]')[index];
|
if (type === 'main') {
|
||||||
|
hargaInput = document.querySelector('input[name="harga"]');
|
||||||
|
diskonInput = document.querySelector('input[name="diskon"]');
|
||||||
|
totalInput = document.querySelector('input[name="total"]');
|
||||||
|
hargaDiskonInput = document.querySelector('input[name="harga_diskon"]');
|
||||||
|
} else {
|
||||||
|
// Untuk pembanding, gunakan array input dengan index
|
||||||
|
const hargaInputs = document.getElementsByName('harga_pembanding[]');
|
||||||
|
const diskonInputs = document.getElementsByName('diskon_pembanding[]');
|
||||||
|
const totalInputs = document.getElementsByName('total_pembanding[]');
|
||||||
|
const hargaDiskonInputs = document.getElementsByName('harga_diskon_pembanding[]');
|
||||||
|
|
||||||
|
// Pastikan index valid
|
||||||
|
if (index !== null && index < hargaInputs.length) {
|
||||||
|
hargaInput = hargaInputs[index];
|
||||||
|
diskonInput = diskonInputs[index];
|
||||||
|
totalInput = totalInputs[index];
|
||||||
|
hargaDiskonInput = hargaDiskonInputs[index];
|
||||||
|
} else {
|
||||||
|
return; // Keluar jika index tidak valid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validasi input
|
||||||
|
if (!hargaInput || !diskonInput || !totalInput || !hargaDiskonInput) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (hargaInput && diskonInput && totalInput && hargaDiskonInput) {
|
|
||||||
// Ambil nilai numerik dari input
|
// Ambil nilai numerik dari input
|
||||||
const harga = parseFloat(hargaInput.value.replace(/[^\d]/g, '') || '0');
|
const harga = parseFloat(hargaInput.value.replace(/[^\d]/g, '') || '0');
|
||||||
const diskon = parseFloat(diskonInput.value.replace(/[^\d]/g, '') || '0');
|
let diskon = parseFloat(diskonInput.value.replace(/[^\d]/g, '') || '0');
|
||||||
|
|
||||||
|
// Batasi diskon maksimal 100%
|
||||||
|
diskon = Math.min(diskon, 100);
|
||||||
|
diskonInput.value = formatCurrency(diskon.toString());
|
||||||
|
|
||||||
// Hitung total dan harga setelah diskon
|
// Hitung total dan harga setelah diskon
|
||||||
const total = harga;
|
const total = harga;
|
||||||
const hargaSetelahDiskon = harga - (harga * (diskon / 100));
|
const hargaSetelahDiskon = harga - (harga * (diskon / 100));
|
||||||
|
|
||||||
// Update nilai dengan format currency
|
// Update nilai dengan format currency
|
||||||
if (totalInput) totalInput.value = formatCurrency(total.toString());
|
totalInput.value = formatCurrency(total.toString());
|
||||||
if (hargaDiskonInput) hargaDiskonInput.value = formatCurrency(hargaSetelahDiskon.toString());
|
hargaDiskonInput.value = formatCurrency(hargaSetelahDiskon.toString());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update fungsi fillPembandingData
|
// Update fungsi fillPembandingData
|
||||||
function fillPembandingData(data, index) {
|
function fillPembandingData(data, index) {
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
@@ -543,12 +614,28 @@
|
|||||||
|
|
||||||
// Update event listener untuk input harga dan diskon
|
// Update event listener untuk input harga dan diskon
|
||||||
function initializePriceCalculation() {
|
function initializePriceCalculation() {
|
||||||
document.querySelectorAll('[name="harga_pembanding[]"], [name="diskon_pembanding[]"]').forEach((input) => {
|
// Event listener untuk input utama
|
||||||
input.addEventListener('input', function() {
|
const mainHargaInput = document.querySelector('input[name="harga"]');
|
||||||
const inputs = document.getElementsByName(this.name);
|
const mainDiskonInput = document.querySelector('input[name="diskon"]');
|
||||||
const index = Array.from(inputs).indexOf(this);
|
|
||||||
calculatePrices(index);
|
if (mainHargaInput) {
|
||||||
|
mainHargaInput.addEventListener('input', () => calculatePrices('main'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mainDiskonInput) {
|
||||||
|
mainDiskonInput.addEventListener('input', () => calculatePrices('main'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Event listener untuk input pembanding
|
||||||
|
const pembandingHargaInputs = document.getElementsByName('harga_pembanding[]');
|
||||||
|
const pembandingDiskonInputs = document.getElementsByName('diskon_pembanding[]');
|
||||||
|
|
||||||
|
pembandingHargaInputs.forEach((input, index) => {
|
||||||
|
input.addEventListener('input', () => calculatePrices('pembanding', index));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pembandingDiskonInputs.forEach((input, index) => {
|
||||||
|
input.addEventListener('input', () => calculatePrices('pembanding', index));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -657,18 +744,30 @@
|
|||||||
if (input.classList.contains('currency-format')) {
|
if (input.classList.contains('currency-format')) {
|
||||||
input.addEventListener('input', function() {
|
input.addEventListener('input', function() {
|
||||||
formatCurrency(this);
|
formatCurrency(this);
|
||||||
|
|
||||||
|
// Special handling for price-related inputs
|
||||||
|
if (input.name.includes('harga_pembanding') ||
|
||||||
|
input.name.includes('diskon_pembanding')) {
|
||||||
|
const inputs = document.getElementsByName(input.name);
|
||||||
|
const index = Array.from(inputs).indexOf(this);
|
||||||
|
calculatePrices(index);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (input.classList.contains('number-format')) {
|
|
||||||
|
// Specific handling for discount to limit to 100%
|
||||||
|
if (input.name.includes('diskon_pembanding')) {
|
||||||
input.addEventListener('input', function() {
|
input.addEventListener('input', function() {
|
||||||
formatNumber(this);
|
let value = parseFloat(this.value.replace(/[^\d]/g, '') || '0');
|
||||||
|
value = Math.min(value, 100);
|
||||||
|
this.value = formatCurrency(value.toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
row.appendChild(newCell);
|
row.appendChild(newCell);
|
||||||
});
|
});
|
||||||
|
initializePriceCalculation();
|
||||||
updateRemoveButtonVisibility();
|
updateRemoveButtonVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -913,8 +1012,6 @@
|
|||||||
window.location.href =
|
window.location.href =
|
||||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -925,6 +1022,7 @@
|
|||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
hideLoadingSwal();
|
hideLoadingSwal();
|
||||||
|
|||||||
@@ -165,7 +165,6 @@
|
|||||||
|
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input type="file"
|
<input type="file"
|
||||||
value="{{ old('foto_denah', isset($formDenah['foto_denah']) ? $formDenah['foto_denah'] : '') }}"
|
|
||||||
name="foto_denah" class="file-input file-input-bordered w-full"
|
name="foto_denah" class="file-input file-input-bordered w-full"
|
||||||
accept=".jpg,.jpeg,.png,.pdf" onchange="previewFile(this)">
|
accept=".jpg,.jpeg,.png,.pdf" onchange="previewFile(this)">
|
||||||
</div>
|
</div>
|
||||||
@@ -186,7 +185,7 @@
|
|||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
<span class="form-label">Masukkan total luas tanah</span>
|
<span class="form-label">Masukkan total luas tanah</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="luas" class="input w-full "
|
<input type="text" name="luas" class="input w-full number-format"
|
||||||
value="{{ old('luas', isset($formDenah['luas']) ? $formDenah['luas'] : '') }}">
|
value="{{ old('luas', isset($formDenah['luas']) ? $formDenah['luas'] : '') }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -216,7 +215,15 @@
|
|||||||
|
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
|
@include('lpj::surveyor.js.utils')
|
||||||
<script>
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
document.querySelectorAll('.number-format').forEach(input => {
|
||||||
|
input.addEventListener('input', function() {
|
||||||
|
formatNumber(this);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
function previewFile(input) {
|
function previewFile(input) {
|
||||||
const previewContainer = document.getElementById('preview-container');
|
const previewContainer = document.getElementById('preview-container');
|
||||||
const imagePreview = document.getElementById('foto_denah-preview');
|
const imagePreview = document.getElementById('foto_denah-preview');
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
@foreach ($forminspeksi['fakta']['fakta_positif'] as $index => $positif)
|
@foreach ($forminspeksi['fakta']['fakta_positif'] as $index => $positif)
|
||||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old("fakta_positif.$index", $positif) }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button">
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -178,19 +178,20 @@
|
|||||||
<div class="flex-wrap items-stretch">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
||||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
<input onclick="updateAlamatFields('sesuai')" type="radio" class="radio"
|
<input onclick="createAlamat('sesuai')" type="radio" class="radio"
|
||||||
name="alamat_sesuai" value="sesuai"
|
name="alamat_sesuai" value="sesuai"
|
||||||
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['sesuai'])) ? 'checked' : '' }}>
|
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['sesuai'])) ? 'checked' : '' }}>
|
||||||
<span class="ml-2">Ya</span>
|
<span class="ml-2">Ya</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
<input onclick="updateAlamatFields('tidak sesuai')" type="radio" class="radio"
|
<input onclick="createAlamat('tidak sesuai')" type="radio" class="radio"
|
||||||
name="alamat_sesuai" value="tidak sesuai"
|
name="alamat_sesuai" value="tidak sesuai"
|
||||||
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['tidak sesuai'])) ? 'checked' : '' }}>
|
{{ old('jenis_asset', isset($forminspeksi['asset']['alamat']['tidak sesuai'])) ? 'checked' : '' }}>
|
||||||
<span class="ml-2">Tidak</span>
|
<span class="ml-2">Tidak</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<em id="error-alamat" class="alert text-danger text-sm"></em>
|
<em id="error-alamat_sesuai" class="alert text-danger text-sm"></em>
|
||||||
|
<em id="error-alamat_sesuai" class="alert text-danger text-sm"></em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
@@ -199,105 +200,8 @@
|
|||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div id="alamat_form" class="grid gap-2 mt-5"
|
<div id="alamat_form" class="grid gap-2 mt-5" style="display: none;">
|
||||||
style="{{ isset($address) ? '' : 'display: none;' }}">
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="address" class="form-label max-w-56">Jl.</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input type="text" id="address" name="address" class="input w-full"
|
|
||||||
placeholder="Masukkan Jl."
|
|
||||||
value="{{ isset($forminspeksi['asset']['alamat']['tidak sesuai']['address'])
|
|
||||||
? $forminspeksi['asset']['alamat']['tidak sesuai']['address']
|
|
||||||
: (isset($forminspeksi['asset']['alamat']['sesuai']['address'])
|
|
||||||
? $forminspeksi['asset']['alamat']['sesuai']['address']
|
|
||||||
: old('address')) }}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="province_code" class="form-label max-w-56">Provinsi</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<select id="province_code" name="province_code" class="input w-full">
|
|
||||||
<option value="">Select Province</option>
|
|
||||||
@foreach ($provinces as $province)
|
|
||||||
<option value="{{ $province->code }}"
|
|
||||||
@if (
|
|
||||||
(isset($cekAlamat['province_code']) && $cekAlamat['province_code'] == $province->code) ||
|
|
||||||
(!isset($cekAlamat['province_code']) &&
|
|
||||||
isset($debitur->province_code) &&
|
|
||||||
$debitur->province_code == $province->code)) selected @endif>
|
|
||||||
{{ $province->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="city_code" class="form-label max-w-56">Kota/Kabupaten</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<select id="city_code" name="city_code" class="select w-full">
|
|
||||||
<option value="">Pilih Kota/Kabupaten</option>
|
|
||||||
@if (isset($cities))
|
|
||||||
@foreach ($cities as $city)
|
|
||||||
<option value="{{ $city->code }}"
|
|
||||||
@if (
|
|
||||||
(isset($cekAlamat['city_code']) && $cekAlamat['city_code'] == $city->code) ||
|
|
||||||
(!isset($cekAlamat['city_code']) && isset($debitur->city_code) && $debitur->city_code == $city->code)) selected @endif>
|
|
||||||
{{ $city->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="district_code" class="form-label max-w-56">Kecamatan</label>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<select id="district_code" name="district_code" class="select w-full">
|
|
||||||
<option value="">Pilih Kecamatan</option>
|
|
||||||
@if (isset($districts))
|
|
||||||
@foreach ($districts as $district)
|
|
||||||
<option value="{{ $district->code }}"
|
|
||||||
@if (
|
|
||||||
(isset($cekAlamat['district_code']) && $cekAlamat['district_code'] == $district->code) ||
|
|
||||||
(!isset($cekAlamat['district_code']) &&
|
|
||||||
isset($debitur->district_code) &&
|
|
||||||
$debitur->district_code == $district->code)) selected @endif>
|
|
||||||
{{ $district->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
@endif
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
|
||||||
<label for="village_code" class="form-label max-w-56">Kelurahan</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<select id="village_code" name="village_code" class="select w-full">
|
|
||||||
<option value="">Pilih Kelurahan</option>
|
|
||||||
@if (isset($villages))
|
|
||||||
@foreach ($villages as $village)
|
|
||||||
<option value="{{ $village->code }}"
|
|
||||||
@if (
|
|
||||||
(isset($cekAlamat['village_code']) && $cekAlamat['village_code'] == $village->code) ||
|
|
||||||
(!isset($cekAlamat['village_code']) &&
|
|
||||||
isset($debitur->village_code) &&
|
|
||||||
$debitur->village_code == $village->code)) selected @endif>
|
|
||||||
{{ $village->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
@endif
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -314,7 +218,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Kordinat</label>
|
<label class="form-label max-w-56">“Koordinat</label>
|
||||||
<div id="perwakilan" class="flex items-baseline w-full gap-5">
|
<div id="perwakilan" class="flex items-baseline w-full gap-5">
|
||||||
<div class="grid grid-cols-2 gap-4 items-center w-full">
|
<div class="grid grid-cols-2 gap-4 items-center w-full">
|
||||||
<input class="input" type="text" placeholder="Masukan Koordinat Latitude" type="text"
|
<input class="input" type="text" placeholder="Masukan Koordinat Latitude" type="text"
|
||||||
@@ -327,7 +231,7 @@
|
|||||||
<a target="_blank" href="https://www.google.com/maps" type="button"
|
<a target="_blank" href="https://www.google.com/maps" type="button"
|
||||||
class="btn btn-md btn-outline btn-primary">
|
class="btn btn-md btn-outline btn-primary">
|
||||||
<i class="ki-filled ki-map"></i>Ambil
|
<i class="ki-filled ki-map"></i>Ambil
|
||||||
Kordinat</a>
|
Koordinat </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -437,9 +341,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
|
@php
|
||||||
<input type="hidden" name="hub_cadeb_sesuai"
|
$hubCadebPemilik = $dokumen->pemilik->hubungan_pemilik->name ?? 'N/A';
|
||||||
value="{{ $dokumen->pemilik->hubungan_pemilik->name }}" id="">
|
@endphp
|
||||||
|
{{ $hubCadebPemilik }}
|
||||||
|
|
||||||
|
<input type="hidden" name="hub_cadeb_sesuai" value="{{ $hubCadebPemilik }}"
|
||||||
|
id="">
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -472,10 +380,12 @@
|
|||||||
<option value="">Select Hubungan Cadeb</option>
|
<option value="">Select Hubungan Cadeb</option>
|
||||||
@if (isset($basicData['hubCadeb']))
|
@if (isset($basicData['hubCadeb']))
|
||||||
@foreach ($basicData['hubCadeb'] as $item)
|
@foreach ($basicData['hubCadeb'] as $item)
|
||||||
|
@if ($item->name != $hubCadebPemilik)
|
||||||
<option value="{{ $item->name }}"
|
<option value="{{ $item->name }}"
|
||||||
{{ old('hub_cadeb_tidak_sesuai', $selectedData) == $item->name ? 'selected' : '' }}>
|
{{ old('hub_cadeb_tidak_sesuai', $selectedData) == $item->name ? 'selected' : '' }}>
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</option>
|
</option>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@@ -497,10 +407,12 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<div class="flex flex-wrap items-baseline w-full text-sm">
|
<div class="flex flex-wrap items-baseline w-full text-sm">
|
||||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||||
{{ $dokumen->penghuni->hubungan_penghuni->name ?? 'N/A' }}
|
@php
|
||||||
|
$hubCadebPenghuni = $dokumen->penghuni->hubungan_penghuni->name ?? 'N/A';
|
||||||
|
@endphp
|
||||||
|
{{ $hubCadebPenghuni }}
|
||||||
<input type="hidden" name="hub_cadeb_penghuni_sesuai"
|
<input type="hidden" name="hub_cadeb_penghuni_sesuai"
|
||||||
value="{{ isset($dokumen->penghuni->hubungan_penghuni->name) ?? '' }}"
|
value="{{ isset($hubCadebPenghuni) ?? '' }}" id="">
|
||||||
id="">
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -535,15 +447,17 @@
|
|||||||
<option value="">Select Hubungan Cadeb</option>
|
<option value="">Select Hubungan Cadeb</option>
|
||||||
@if (isset($basicData['hubPenghuni']))
|
@if (isset($basicData['hubPenghuni']))
|
||||||
@foreach ($basicData['hubPenghuni'] as $item)
|
@foreach ($basicData['hubPenghuni'] as $item)
|
||||||
|
@if ($item->name != $hubCadebPenghuni)
|
||||||
<option value="{{ $item->name }}"
|
<option value="{{ $item->name }}"
|
||||||
{{ old('hub_penghuni_tidak_sesuai', $selectedData) == $item->name ? 'selected' : '' }}>
|
{{ old('hub_penghuni_tidak_sesuai', $selectedData) == $item->name ? 'selected' : '' }}>
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</option>
|
</option>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<em id="error-hub_cadeb" class="alert text-danger text-sm"></em>
|
<em id="error-hub_cadeb_penghuni" class="alert text-danger text-sm"></em>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -552,3 +466,265 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Cek radio button saat halaman dimuat
|
||||||
|
const sesuaiRadio = document.querySelector('input[name="alamat_sesuai"][value="sesuai"]');
|
||||||
|
const tidakSesuaiRadio = document.querySelector('input[name="alamat_sesuai"][value="tidak sesuai"]');
|
||||||
|
|
||||||
|
// Jika "Ya" sudah tercentang saat load halaman
|
||||||
|
if (sesuaiRadio.checked) {
|
||||||
|
createAlamat('sesuai');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jika "Tidak" sudah tercentang saat load halaman
|
||||||
|
if (tidakSesuaiRadio.checked) {
|
||||||
|
createAlamat('tidak sesuai');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function createAlamat(data) {
|
||||||
|
const createElementAlamat = document.getElementById('alamat_form');
|
||||||
|
createElementAlamat.style.display = 'block';
|
||||||
|
|
||||||
|
if (data == 'sesuai') {
|
||||||
|
createElementAlamat.innerHTML = `
|
||||||
|
<div class="grid gap-2.5 w-full">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="address" class="form-label max-w-56">Jl.</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="address" name="address" class="input w-full "
|
||||||
|
value="{{ isset($permohonan->debiture->address) ? $permohonan->debiture->address : old('address') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="province_code"
|
||||||
|
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->code : '' }}">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="province" class="form-label max-w-56">Provinsi</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="province" class="input w-full cursor-not-allowed" readonly
|
||||||
|
value="{{ isset($permohonan->debiture->province) ? $permohonan->debiture->province->name : '' }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="city_code"
|
||||||
|
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->code : '' }}">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="city" class="form-label max-w-56">Kabupaten/Kota</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="city" class="input w-full cursor-not-allowed" readonly
|
||||||
|
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->name : '' }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="district_code"
|
||||||
|
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->code : '' }}">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="district" class="form-label max-w-56">Kecamatan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="district" class="input w-full cursor-not-allowed" readonly
|
||||||
|
value="{{ isset($permohonan->debiture->district) ? $permohonan->debiture->district->name : '' }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="village_code"
|
||||||
|
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->code : '' }}">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="village" class="form-label max-w-56">Desa/Kelurahan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="village" class="input w-full cursor-not-allowed" readonly
|
||||||
|
value="{{ isset($permohonan->debiture->village) ? $permohonan->debiture->village->name : '' }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data === 'tidak sesuai') {
|
||||||
|
createElementAlamat.innerHTML = `
|
||||||
|
<div class="grid gap-2.5 w-full">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="address" class="form-label max-w-56">Jl.</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="address" name="address" class="input w-full"
|
||||||
|
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="province_code" class="form-label max-w-56">Provinsi</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select id="province_code" name="province_code" class="input w-full" onchange="getCity(this.value)">
|
||||||
|
<option value="">Select Province</option>
|
||||||
|
@foreach ($provinces as $province)
|
||||||
|
<option value="{{ $province->code }}"
|
||||||
|
@if (
|
||||||
|
(isset($cekAlamat['province_code']) && $cekAlamat['province_code'] == $province->code) ||
|
||||||
|
(!isset($cekAlamat['province_code']) &&
|
||||||
|
isset($debitur->province_code) &&
|
||||||
|
$debitur->province_code == $province->code)) selected @endif>
|
||||||
|
{{ $province->name }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="city_code" class="form-label max-w-56">Kota/Kabupaten</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select id="city_code" name="city_code" class="select w-full" onchange="getDistrict(this.value)">
|
||||||
|
<option value="">Pilih Kota/Kabupaten</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="district_code" class="form-label max-w-56">Kecamatan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select id="district_code" name="district_code" class="select w-full" onchange="getVillage(this.value)">
|
||||||
|
<option value="">Pilih Kecamatan</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="village_code" class="form-label max-w-56">Kelurahan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select id="village_code" name="village_code" class="select w-full">
|
||||||
|
<option value="">Pilih Kelurahan</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
loadSavedLocationData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
loadSavedLocationData();
|
||||||
|
});
|
||||||
|
// Fungsi untuk memuat data lokasi yang tersimpan
|
||||||
|
async function loadSavedLocationData() {
|
||||||
|
const provinceCode = '{{ $cekAlamat['province_code'] ?? '' }}';
|
||||||
|
const cityCode = '{{ $cekAlamat['city_code'] ?? '' }}';
|
||||||
|
const districtCode = '{{ $cekAlamat['district_code'] ?? '' }}';
|
||||||
|
const villageCode = '{{ $cekAlamat['village_code'] ?? '' }}';
|
||||||
|
|
||||||
|
// Set province
|
||||||
|
const provinceSelect = document.getElementById('province_code');
|
||||||
|
if (provinceCode && provinceSelect) {
|
||||||
|
provinceSelect.value = provinceCode;
|
||||||
|
await getCity(provinceCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set city
|
||||||
|
const citySelect = document.getElementById('city_code');
|
||||||
|
if (cityCode && citySelect) {
|
||||||
|
citySelect.value = cityCode;
|
||||||
|
await getDistrict(cityCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set district
|
||||||
|
const districtSelect = document.getElementById('district_code');
|
||||||
|
if (districtCode && districtSelect) {
|
||||||
|
districtSelect.value = districtCode;
|
||||||
|
await getVillage(districtCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set village
|
||||||
|
const villageSelect = document.getElementById('village_code');
|
||||||
|
if (villageCode && villageSelect) {
|
||||||
|
villageSelect.value = villageCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modifikasi fungsi existing
|
||||||
|
async function getCity(provinceId) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`/locations/cities/province/${provinceId}`);
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
const cityDropdown = document.getElementById('city_code');
|
||||||
|
if (cityDropdown) {
|
||||||
|
cityDropdown.innerHTML = '<option value="">Pilih Kota/Kabupaten</option>';
|
||||||
|
data.forEach(city => {
|
||||||
|
const option = document.createElement('option');
|
||||||
|
option.value = city.code;
|
||||||
|
option.textContent = city.name;
|
||||||
|
@if (isset($debitur->city_code))
|
||||||
|
if (city.code === '{{ $debitur->city_code }}') {
|
||||||
|
option.selected = true;
|
||||||
|
}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
cityDropdown.appendChild(option);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset dropdown kecamatan dan desa
|
||||||
|
document.getElementById('district_code').innerHTML = '<option value="">Pilih Kecamatan</option>';
|
||||||
|
document.getElementById('village_code').innerHTML = '<option value="">Pilih Kelurahan</option>';
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching cities:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lakukan hal serupa untuk getDistrict dan getVillage
|
||||||
|
async function getDistrict(cityId) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`/locations/districts/city/${cityId}`);
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
const districtDropdown = document.getElementById('district_code');
|
||||||
|
if (districtDropdown) {
|
||||||
|
districtDropdown.innerHTML = '<option value="">Pilih Kecamatan</option>';
|
||||||
|
data.forEach(district => {
|
||||||
|
const option = document.createElement('option');
|
||||||
|
option.value = district.code;
|
||||||
|
option.textContent = district.name;
|
||||||
|
|
||||||
|
// Cek apakah ini adalah kecamatan yang sebelumnya dipilih
|
||||||
|
@if (isset($debitur->district_code))
|
||||||
|
if (district.code === '{{ $debitur->district_code }}') {
|
||||||
|
option.selected = true;
|
||||||
|
}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
districtDropdown.appendChild(option);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset dropdown desa
|
||||||
|
document.getElementById('village_code').innerHTML = '<option value="">Pilih Kelurahan</option>';
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching districts:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getVillage(districtId) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`/locations/villages/district/${districtId}`);
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
const villageDropdown = document.getElementById('village_code');
|
||||||
|
if (villageDropdown) {
|
||||||
|
villageDropdown.innerHTML = '<option value="">Pilih Desa/Kelurahan</option>';
|
||||||
|
data.forEach(village => {
|
||||||
|
const option = document.createElement('option');
|
||||||
|
option.value = village.code;
|
||||||
|
option.textContent = village.name;
|
||||||
|
|
||||||
|
// Cek apakah ini adalah desa yang sebelumnya dipilih
|
||||||
|
@if (isset($debitur->village_code))
|
||||||
|
if (village.code === '{{ $debitur->village_code }}') {
|
||||||
|
option.selected = true;
|
||||||
|
}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
villageDropdown.appendChild(option);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching villages:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -23,19 +23,28 @@
|
|||||||
'label' => 'KDB',
|
'label' => 'KDB',
|
||||||
'name' => 'kdb',
|
'name' => 'kdb',
|
||||||
'index' => 1,
|
'index' => 1,
|
||||||
'value' => old('kdb', isset($forminspeksi['fakta']['kdb']) ? $forminspeksi['fakta']['kdb'] : ''),
|
'value' => old(
|
||||||
|
'kdb',
|
||||||
|
isset($forminspeksi['fakta']['kdb']) ? $forminspeksi['fakta']['kdb'] : '',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'KDH',
|
'label' => 'KDH',
|
||||||
'name' => 'kdh',
|
'name' => 'kdh',
|
||||||
'index' => 2,
|
'index' => 2,
|
||||||
'value' => old('kdh', isset($forminspeksi['fakta']['kdh']) ? $forminspeksi['fakta']['kdh'] : ''),
|
'value' => old(
|
||||||
|
'kdh',
|
||||||
|
isset($forminspeksi['fakta']['kdh']) ? $forminspeksi['fakta']['kdh'] : '',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'GSB',
|
'label' => 'GSB',
|
||||||
'name' => 'gsb',
|
'name' => 'gsb',
|
||||||
'index' => 3,
|
'index' => 3,
|
||||||
'value' => old('gsb', isset($forminspeksi['fakta']['gsb']) ? $forminspeksi['fakta']['gsb'] : ''),
|
'value' => old(
|
||||||
|
'gsb',
|
||||||
|
isset($forminspeksi['fakta']['gsb']) ? $forminspeksi['fakta']['gsb'] : '',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Max Lantai',
|
'label' => 'Max Lantai',
|
||||||
@@ -50,13 +59,19 @@
|
|||||||
'label' => 'KLB',
|
'label' => 'KLB',
|
||||||
'name' => 'klb',
|
'name' => 'klb',
|
||||||
'index' => 5,
|
'index' => 5,
|
||||||
'value' => old('klb', isset($forminspeksi['fakta']['klb']) ? $forminspeksi['fakta']['klb'] : ''),
|
'value' => old(
|
||||||
|
'klb',
|
||||||
|
isset($forminspeksi['fakta']['klb']) ? $forminspeksi['fakta']['klb'] : '',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'GSS',
|
'label' => 'GSS',
|
||||||
'name' => 'gss',
|
'name' => 'gss',
|
||||||
'index' => 6,
|
'index' => 6,
|
||||||
'value' => old('gss', isset($forminspeksi['fakta']['gss']) ? $forminspeksi['fakta']['gss'] : ''),
|
'value' => old(
|
||||||
|
'gss',
|
||||||
|
isset($forminspeksi['fakta']['gss']) ? $forminspeksi['fakta']['gss'] : '',
|
||||||
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'label' => 'Pelebaran Jalan',
|
'label' => 'Pelebaran Jalan',
|
||||||
@@ -64,7 +79,9 @@
|
|||||||
'index' => 7,
|
'index' => 7,
|
||||||
'value' => old(
|
'value' => old(
|
||||||
'pelebaran_jalan',
|
'pelebaran_jalan',
|
||||||
isset($forminspeksi['fakta']['pelebaran_jalan']) ? $forminspeksi['fakta']['pelebaran_jalan'] : '',
|
isset($forminspeksi['fakta']['pelebaran_jalan'])
|
||||||
|
? $forminspeksi['fakta']['pelebaran_jalan']
|
||||||
|
: '',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -73,7 +90,9 @@
|
|||||||
'index' => 8,
|
'index' => 8,
|
||||||
'value' => old(
|
'value' => old(
|
||||||
'nama_petugas',
|
'nama_petugas',
|
||||||
isset($forminspeksi['fakta']['nama_petugas']) ? $forminspeksi['fakta']['nama_petugas'] : '',
|
isset($forminspeksi['fakta']['nama_petugas'])
|
||||||
|
? $forminspeksi['fakta']['nama_petugas']
|
||||||
|
: '',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
@@ -105,10 +124,13 @@
|
|||||||
<input id="inputGistaru" type="file" name="foto_gistaru"
|
<input id="inputGistaru" type="file" name="foto_gistaru"
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*"
|
||||||
onchange="previewImage(this, 'gistaru-preview')">
|
onchange="previewImage(this, 'gistaru-preview')">
|
||||||
|
|
||||||
<img id="gistaru-preview"
|
<img id="gistaru-preview"
|
||||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_gistaru']) ? $forminspeksi['foto_gistaru'] : '')) }}"
|
src="{{ asset('storage/' . (isset($forminspeksi['foto_gistaru']) ? $forminspeksi['foto_gistaru'] : '')) }}"
|
||||||
alt="Foto Gistaru" class="mt-2 max-w-full h-auto"
|
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||||
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }}">
|
style="{{ isset($forminspeksi['foto_gistaru']) ? '' : 'display: none;' }}" />
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
<a href="https://gistaru.atrbpn.go.id/rtronline" type="button" class="btn btn-light"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
@@ -123,17 +145,18 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
<input class="name_rute" type="hidden" name="name_rute" value="rute">
|
||||||
<div class="w-full">
|
<div class="w-full grid gap-2">
|
||||||
|
|
||||||
|
|
||||||
<input id="inputBhumi" type="file" name="foto_bhumi"
|
<input id="inputBhumi" type="file" name="foto_bhumi"
|
||||||
class="file-input file-input-bordered w-full " accept="image/*"
|
class="file-input file-input-bordered w-full " accept="image/*"
|
||||||
onchange="previewImage(this, 'bhumi-preview')">
|
onchange="previewImage(this, 'bhumi-preview')">
|
||||||
<img id="bhumi-preview"
|
<img id="bhumi-preview"
|
||||||
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
|
src="{{ asset('storage/' . (isset($forminspeksi['foto_bhumi']) ? $forminspeksi['foto_bhumi'] : '')) }}"
|
||||||
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
alt="Foto Bhumi" class="mt-2 max-w-full h-auto"
|
||||||
style="{{ isset($forminspeksi['foto_bhumi']) ? '' : 'display: none;' }}">
|
style="{{ isset($forminspeksi['foto_bhumi']) ? '' : 'display: none;' }}" />
|
||||||
</div>
|
</div>
|
||||||
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light"
|
<a href="https://bhumi.atrbpn.go.id/peta" type="button" class="btn btn-light" target="_blank">
|
||||||
target="_blank">
|
|
||||||
<i class="ki-filled ki-map"></i> Bhumi
|
<i class="ki-filled ki-map"></i> Bhumi
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -172,11 +195,9 @@
|
|||||||
<div class="w-full grid gap-5">
|
<div class="w-full grid gap-5">
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<input id="foto_tempat" type="file" name="foto_tempat"
|
<input id="foto_tempat" type="file" name="foto_tempat"
|
||||||
|
|
||||||
class="file-input file-input-bordered w-full" accept="image/*"
|
class="file-input file-input-bordered w-full" accept="image/*"
|
||||||
onchange="previewImage(this, 'foto_tempat-preview')">
|
onchange="previewImage(this, 'foto_tempat-preview')">
|
||||||
<button type="button" id="btnCamera" class="btn btn-light"
|
<button type="button" id="btnCamera" class="btn btn-light" data-modal-toggle="#cameraModal">
|
||||||
data-modal-toggle="#cameraModal">
|
|
||||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,7 +212,7 @@
|
|||||||
<!-- Notes Section -->
|
<!-- Notes Section -->
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5" style="margin-top: 20px">
|
||||||
|
|
||||||
<label class="form-label max-w-56">Catatan yang Perlu Diperhatikan
|
<label class="form-label lg:form-label max-w-56 ">Catatan yang Perlu Diperhatikan
|
||||||
</label>
|
</label>
|
||||||
<div class="input-group w-full flex gap-2">
|
<div class="input-group w-full flex gap-2">
|
||||||
<textarea name="keterangan" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old('keterangan', $forminspeksi['fakta']['keterangan'] ?? '') }}</textarea>
|
<textarea name="keterangan" class="textarea mt-2" placeholder="Masukkan catatan penting" rows="3">{{ old('keterangan', $forminspeksi['fakta']['keterangan'] ?? '') }}</textarea>
|
||||||
@@ -205,4 +226,3 @@
|
|||||||
@push('scripts')
|
@push('scripts')
|
||||||
@include('lpj::surveyor.js.camera-editor')
|
@include('lpj::surveyor.js.camera-editor')
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
|||||||
@@ -17,21 +17,27 @@
|
|||||||
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||||
@endphp
|
@endphp
|
||||||
@if (isset($formKategori) && $formKategori)
|
@if (isset($formKategori) && $formKategori)
|
||||||
<input type="hidden" name="action"
|
@php
|
||||||
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
$kategoriArray = is_array($formKategori) ? $formKategori : [$formKategori];
|
||||||
<input type="hidden" name="type"
|
$kategoriUnik = array_unique($kategoriArray);
|
||||||
value="{{ is_array($formKategori) ? implode(',', $formKategori) : $formKategori }}">
|
@endphp
|
||||||
@if (is_array($formKategori))
|
<input type="hidden" name="action" value="{{ implode(',', $kategoriUnik) }}">
|
||||||
@foreach ($formKategori as $kategori)
|
<input type="hidden" name="type" value="{{ implode(',', $kategoriUnik) }}">
|
||||||
|
@if (array_intersect($kategoriUnik, ['tanah', 'bangunan', 'apartemen-kantor']))
|
||||||
|
@include('lpj::surveyor.components.header')
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@foreach ($kategoriUnik as $kategori)
|
||||||
|
{{-- Tampilkan komponen sesuai kategori --}}
|
||||||
@include('lpj::surveyor.components.' . str_replace('-', '-', $kategori), [
|
@include('lpj::surveyor.components.' . str_replace('-', '-', $kategori), [
|
||||||
'dokumen' => $dokumen,
|
'dokumen' => $dokumen,
|
||||||
])
|
])
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
||||||
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
|
<button type="button" class="btn btn-success" id="saveButton" onclick="submitData()">
|
||||||
<span id="saveButtonText">Save</span>
|
<span id="saveButtonText">Save</span>
|
||||||
@@ -194,8 +200,8 @@
|
|||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if (response.isConfirmed) {
|
if (response.isConfirmed) {
|
||||||
// window.location.href =
|
window.location.href =
|
||||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -215,64 +221,17 @@
|
|||||||
if (errors) {
|
if (errors) {
|
||||||
$.each(errors, function(key, value) {
|
$.each(errors, function(key, value) {
|
||||||
$(`#error-${key}`).text(value[0]);
|
$(`#error-${key}`).text(value[0]);
|
||||||
|
toastrErrorBuild(value[0]);
|
||||||
});
|
});
|
||||||
|
// toastrErrorBuild(error);
|
||||||
}
|
}
|
||||||
hideLoadingSwal();
|
hideLoadingSwal();
|
||||||
console.error('Terjadi error:', error); // Menampilkan pesan error di konsol
|
|
||||||
console.log('Status:', status);
|
|
||||||
console.log('Response:', xhr.responseText);
|
|
||||||
console.log(errors);
|
console.log(errors);
|
||||||
toastrErrorBuild(error);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function previewImage(input, previewId) {
|
|
||||||
if (input.files && input.files[0]) {
|
|
||||||
var reader = new FileReader();
|
|
||||||
reader.onload = function(e) {
|
|
||||||
$('#' + previewId).attr('src', e.target.result).show();
|
|
||||||
}
|
|
||||||
reader.readAsDataURL(input.files[0]);
|
|
||||||
} else {
|
|
||||||
$('#' + previewId).hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function addClonableItem(containerId, itemClass) {
|
|
||||||
const container = document.getElementById(containerId);
|
|
||||||
if (!container) {
|
|
||||||
console.error(`Container with ID "${containerId}" not found.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const template = container.querySelector(`.${itemClass}`);
|
|
||||||
if (!template) {
|
|
||||||
console.error(`Template with class "${itemClass}" not found in container "${containerId}".`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clone the template element
|
|
||||||
const newElement = template.cloneNode(true);
|
|
||||||
|
|
||||||
// Reset input fields
|
|
||||||
const inputs = newElement.querySelectorAll('input');
|
|
||||||
inputs.forEach(input => {
|
|
||||||
input.value = '';
|
|
||||||
});
|
|
||||||
|
|
||||||
// Make the delete button visible and bind the click event
|
|
||||||
const deleteButton = newElement.querySelector('.remove-btn');
|
|
||||||
if (deleteButton) {
|
|
||||||
deleteButton.style.display = 'inline-block';
|
|
||||||
deleteButton.addEventListener('click', () => {
|
|
||||||
newElement.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Append the cloned element to the container
|
|
||||||
container.appendChild(newElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure existing remove buttons are functional
|
// Ensure existing remove buttons are functional
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|||||||
@@ -35,7 +35,10 @@
|
|||||||
<div class="w-full mt-4">
|
<div class="w-full mt-4">
|
||||||
<label class="block text-sm font-medium text-gray-700">Lebar Perkerasan Jalan Depan objek</label>
|
<label class="block text-sm font-medium text-gray-700">Lebar Perkerasan Jalan Depan objek</label>
|
||||||
@php
|
@php
|
||||||
$lebarPerkerasanJalan = old('lebar_perkerasan_jalan', $forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '');
|
$lebarPerkerasanJalan = old(
|
||||||
|
'lebar_perkerasan_jalan',
|
||||||
|
$forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '',
|
||||||
|
);
|
||||||
@endphp
|
@endphp
|
||||||
<input type="text" name="lebar_perkerasan_jalan" class="input mt-2" placeholder="Meter"
|
<input type="text" name="lebar_perkerasan_jalan" class="input mt-2" placeholder="Meter"
|
||||||
value="{{ $lebarPerkerasanJalan }}">
|
value="{{ $lebarPerkerasanJalan }}">
|
||||||
@@ -50,12 +53,16 @@
|
|||||||
@if (isset($basicData['perkerasanJalan']))
|
@if (isset($basicData['perkerasanJalan']))
|
||||||
@foreach ($basicData['perkerasanJalan'] as $item)
|
@foreach ($basicData['perkerasanJalan'] as $item)
|
||||||
@php
|
@php
|
||||||
$isChecked = in_array($item->name, isset($forminspeksi['lingkungan']['perkerasan_jalan']['perkerasan_jalan']) ? $forminspeksi['lingkungan']['perkerasan_jalan']['perkerasan_jalan'] : []);
|
$isChecked = in_array(
|
||||||
|
$item->name,
|
||||||
|
isset($forminspeksi['lingkungan']['perkerasan_jalan']['perkerasan_jalan'])
|
||||||
|
? $forminspeksi['lingkungan']['perkerasan_jalan']['perkerasan_jalan']
|
||||||
|
: [],
|
||||||
|
);
|
||||||
@endphp
|
@endphp
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
<input class="checkbox" name="perkerasan_jalan[]" type="checkbox"
|
<input class="checkbox" name="perkerasan_jalan[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}" {{ $isChecked ? 'checked' : '' }}
|
||||||
{{ $isChecked ? 'checked' : '' }}
|
|
||||||
onclick="toggleCheckboxVisibility('perkerasan_jalan', 'perkerasan_jalan_lainnya', ['lainnya'])" />
|
onclick="toggleCheckboxVisibility('perkerasan_jalan', 'perkerasan_jalan_lainnya', ['lainnya'])" />
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
@@ -63,15 +70,18 @@
|
|||||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||||
@php
|
@php
|
||||||
|
|
||||||
$lainnyaValue = old('perkerasan_jalan_lainnya', isset($forminspeksi['lingkungan']['perkerasan_jalan']['lainnya']) ? $forminspeksi['lingkungan']['perkerasan_jalan']['lainnya'] : '');
|
$lainnyaValue = old(
|
||||||
|
'perkerasan_jalan_lainnya',
|
||||||
|
isset($forminspeksi['lingkungan']['perkerasan_jalan']['lainnya'])
|
||||||
|
? $forminspeksi['lingkungan']['perkerasan_jalan']['lainnya']
|
||||||
|
: '',
|
||||||
|
);
|
||||||
@endphp
|
@endphp
|
||||||
<input id="perkerasan_jalan_lainnya" type="text"
|
<input id="perkerasan_jalan_lainnya" type="text"
|
||||||
style="{{ isset($forminspeksi['lingkungan']['perkerasan_jalan']['lainnya']) && $forminspeksi['lingkungan']['perkerasan_jalan']['lainnya'] ? '' : 'display: none' }}"
|
style="{{ isset($forminspeksi['lingkungan']['perkerasan_jalan']['lainnya']) && $forminspeksi['lingkungan']['perkerasan_jalan']['lainnya'] ? '' : 'display: none' }}"
|
||||||
name="perkerasan_jalan_lainnya" class="input w-full mt-2"
|
name="perkerasan_jalan_lainnya" class="input w-full mt-2"
|
||||||
value="{{ $lainnyaValue }}"
|
value="{{ $lainnyaValue }}" placeholder="Masukkan lainnya..." />
|
||||||
placeholder="Masukkan lainnya..." />
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -103,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Golongan Hidup Sekitar -->
|
<!-- Golongan Hidup Sekitar -->
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Golongan Masy Sekitar</label>
|
<label class="form-label max-w-56">Golongan Masyarakat Sekitar</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<div class="flex flex-col items-start gap-4">
|
<div class="flex flex-col items-start gap-4">
|
||||||
@if (isset($basicData['golMasySekitar']))
|
@if (isset($basicData['golMasySekitar']))
|
||||||
@@ -160,15 +170,18 @@
|
|||||||
</label>
|
</label>
|
||||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
||||||
@php
|
@php
|
||||||
$lainnyaValue = old('terletak_diarea_lainnya', isset($forminspeksi['lingkungan']['terletak_diarea']['lainnya']) ? $forminspeksi['lingkungan']['terletak_diarea']['lainnya'] : '');
|
$lainnyaValue = old(
|
||||||
|
'terletak_diarea_lainnya',
|
||||||
|
isset($forminspeksi['lingkungan']['terletak_diarea']['lainnya'])
|
||||||
|
? $forminspeksi['lingkungan']['terletak_diarea']['lainnya']
|
||||||
|
: '',
|
||||||
|
);
|
||||||
@endphp
|
@endphp
|
||||||
<input id="terletak_diarea_lainnya" type="text"
|
<input id="terletak_diarea_lainnya" type="text"
|
||||||
style="{{ isset($forminspeksi['lingkungan']['terletak_diarea']['lainnya']) && $forminspeksi['lingkungan']['terletak_diarea']['lainnya'] ? '' : 'display: none' }}"
|
style="{{ isset($forminspeksi['lingkungan']['terletak_diarea']['lainnya']) && $forminspeksi['lingkungan']['terletak_diarea']['lainnya'] ? '' : 'display: none' }}"
|
||||||
name="terletak_diarea_lainnya" class="input w-full mt-2"
|
name="terletak_diarea_lainnya" class="input w-full mt-2"
|
||||||
value="{{ $lainnyaValue }}"
|
value="{{ $lainnyaValue }}" placeholder="Masukkan lainnya..." />
|
||||||
placeholder="Masukkan lainnya..." />
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -356,48 +369,37 @@
|
|||||||
@if (isset($basicData['fasilitasObjek']))
|
@if (isset($basicData['fasilitasObjek']))
|
||||||
@foreach ($basicData['fasilitasObjek'] as $item)
|
@foreach ($basicData['fasilitasObjek'] as $item)
|
||||||
@php
|
@php
|
||||||
|
$isChecked = false;
|
||||||
|
$inputValue = '';
|
||||||
|
|
||||||
$selectedFasilitas = is_array(
|
// Cek old input terlebih dahulu
|
||||||
old(
|
if (old('fasilitas_dekat_object') && in_array($item->name, old('fasilitas_dekat_object'))) {
|
||||||
'fasilitas_dekat_object',
|
$isChecked = true;
|
||||||
$forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? [],
|
$oldInputIndex = array_search($item->name, old('fasilitas_dekat_object'));
|
||||||
),
|
$inputValue = old('fasilitas_dekat_object_input')[$oldInputIndex] ?? '';
|
||||||
)
|
}
|
||||||
? old(
|
elseif (isset($forminspeksi['lingkungan']['fasilitas_dekat_object'])) {
|
||||||
'fasilitas_dekat_object',
|
foreach ($forminspeksi['lingkungan']['fasilitas_dekat_object'] as $key => $value) {
|
||||||
$forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? [],
|
if ($key === $item->name) {
|
||||||
)
|
$isChecked = true;
|
||||||
: explode(
|
$inputValue = $value;
|
||||||
',',
|
break;
|
||||||
old(
|
}
|
||||||
'fasilitas_dekat_object',
|
}
|
||||||
$forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? '',
|
}
|
||||||
),
|
|
||||||
);
|
|
||||||
@endphp
|
@endphp
|
||||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56 gap-2.5" style="width: 500px">
|
||||||
<input class="checkbox" name="fasilitas_dekat_object[]" type="checkbox"
|
<input class="checkbox" name="fasilitas_dekat_object[]" type="checkbox"
|
||||||
value="{{ $item->name }}"
|
value="{{ $item->name }}"
|
||||||
{{ in_array(
|
{{ $isChecked ? 'checked' : '' }} />
|
||||||
$item->name,
|
|
||||||
is_array(old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? ''))
|
|
||||||
? old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? [])
|
|
||||||
: explode(',', old('fasilitas_dekat_object', $forminspeksi['lingkungan']['fasilitas_dekat_object']['fasilitas_dekat_object'] ?? '')),
|
|
||||||
)
|
|
||||||
? 'checked'
|
|
||||||
: '' }}
|
|
||||||
onclick="toggleCheckboxVisibility('fasilitas_dekat_object', 'fasilitas_dekat_object_lainnya', ['Lainnya'])"
|
|
||||||
/>
|
|
||||||
|
|
||||||
{{ $item->name }}
|
{{ $item->name }}
|
||||||
</label>
|
</label>
|
||||||
|
<input type="text" name="fasilitas_dekat_object_input[]" class="input w-full"
|
||||||
@if (strcasecmp($item->name, 'Lainnya') == 0)
|
placeholder="Masukkan fasilitas {{ $item->name }}..."
|
||||||
<input id="fasilitas_dekat_object_lainnya" type="text" style="{{ in_array('Lainnya', $selectedFasilitas) ? '' : 'display: none' }}"
|
value="{{ $inputValue }}">
|
||||||
name="fasilitas_dekat_object_lainnya" class="input w-full mt-2"
|
</div>
|
||||||
value="{{ old('fasilitas_dekat_object_lainnya', $forminspeksi['lingkungan']['fasilitas_dekat_object']['lainnya'] ?? '') }}"
|
|
||||||
placeholder="Masukkan lainnya..." />
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -405,6 +407,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@include('lpj::surveyor.components.header')
|
|
||||||
|
|
||||||
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
<div class="card w-full bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
<div class="flex-wrap items-stretch">
|
<div class="flex-wrap items-stretch">
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
<div class="grid grid-cols-3 md:grid-cols-3 gap-4 mt-2">
|
||||||
<label class="form-label flex items-center gap-3 text-nowrap">
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
<input type="radio" class="radio" name="luas_tanah" value="sesuai"
|
<input type="radio" class="radio" name="luas_tanah" value="sesuai"
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<em id="error-luas_tanah" class="alert text-danger text-sm"></em>
|
<em id="error-luas_tanah" class="alert text-danger text-sm"></em>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -52,4 +52,119 @@
|
|||||||
|
|
||||||
return formattedValue;
|
return formattedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function previewImage(input, previewId) {
|
||||||
|
if (input.files && input.files[0]) {
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function(e) {
|
||||||
|
$('#' + previewId).attr('src', e.target.result).show();
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(input.files[0]);
|
||||||
|
} else {
|
||||||
|
$('#' + previewId).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addClonableItem(containerId, itemClass) {
|
||||||
|
const container = document.getElementById(containerId);
|
||||||
|
if (!container) {
|
||||||
|
console.error(`Container with ID "${containerId}" not found.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const template = container.querySelector(`.${itemClass}`);
|
||||||
|
if (!template) {
|
||||||
|
console.error(`Template with class "${itemClass}" not found in container "${containerId}".`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone the template element
|
||||||
|
const newElement = template.cloneNode(true);
|
||||||
|
|
||||||
|
// Reset all input fields comprehensively
|
||||||
|
const inputs = newElement.querySelectorAll('input, select, textarea');
|
||||||
|
inputs.forEach(input => {
|
||||||
|
// Reset based on input type
|
||||||
|
switch (input.type) {
|
||||||
|
case 'text':
|
||||||
|
case 'number':
|
||||||
|
case 'email':
|
||||||
|
case 'tel':
|
||||||
|
case 'password':
|
||||||
|
case 'search':
|
||||||
|
case 'url':
|
||||||
|
case 'textarea':
|
||||||
|
input.value = '';
|
||||||
|
break;
|
||||||
|
case 'checkbox':
|
||||||
|
case 'radio':
|
||||||
|
input.checked = false;
|
||||||
|
break;
|
||||||
|
case 'select-one':
|
||||||
|
case 'select-multiple':
|
||||||
|
input.selectedIndex = 0;
|
||||||
|
break;
|
||||||
|
case 'file':
|
||||||
|
input.value = '';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove any error classes or validation states
|
||||||
|
input.classList.remove('is-invalid', 'error');
|
||||||
|
|
||||||
|
// Reset any custom attributes if needed
|
||||||
|
input.removeAttribute('data-previous-value');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset select elements to their default state
|
||||||
|
const selects = newElement.querySelectorAll('select');
|
||||||
|
selects.forEach(select => {
|
||||||
|
select.selectedIndex = 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Make the delete button visible and bind the click event
|
||||||
|
const deleteButton = newElement.querySelector('.remove-btn');
|
||||||
|
if (deleteButton) {
|
||||||
|
deleteButton.style.display = 'inline-block';
|
||||||
|
deleteButton.addEventListener('click', () => {
|
||||||
|
newElement.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset any custom data attributes
|
||||||
|
newElement.querySelectorAll('[data-clone-reset]').forEach(element => {
|
||||||
|
const resetValue = element.getAttribute('data-clone-reset');
|
||||||
|
if (resetValue) {
|
||||||
|
if (element.tagName === 'INPUT' || element.tagName === 'SELECT' || element.tagName ===
|
||||||
|
'TEXTAREA') {
|
||||||
|
element.value = resetValue;
|
||||||
|
} else {
|
||||||
|
element.textContent = resetValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Optional: Regenerate unique IDs if needed
|
||||||
|
const elementsWithId = newElement.querySelectorAll('[id]');
|
||||||
|
elementsWithId.forEach(element => {
|
||||||
|
const originalId = element.id;
|
||||||
|
const newId = `${originalId}_${Date.now()}`;
|
||||||
|
element.id = newId;
|
||||||
|
|
||||||
|
// Update any labels or references
|
||||||
|
const labels = newElement.querySelectorAll(`label[for="${originalId}"]`);
|
||||||
|
labels.forEach(label => {
|
||||||
|
label.setAttribute('for', newId);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Append the cloned element to the container
|
||||||
|
container.appendChild(newElement);
|
||||||
|
|
||||||
|
// Optional: Trigger any custom events or reinitialize plugins
|
||||||
|
const event = new Event('cloneAdded', {
|
||||||
|
bubbles: true
|
||||||
|
});
|
||||||
|
newElement.dispatchEvent(event);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -540,13 +540,11 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables');
|
Route::get('datatables', [PenilaiController::class, 'dataForDatatables'])->name('dataForTables');
|
||||||
|
|
||||||
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran');
|
Route::get('lampiran/{id}', [PenilaiController::class, 'lampiran'])->name('lampiran');
|
||||||
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
|
Route::get('export/kertas-kerja/{id}/{jaminanId}', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
|
||||||
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
|
|
||||||
Route::get('export/kertas-kerja', [PenilaiController::class, 'kertas_kerja'])->name('export.kertas-kerja');
|
|
||||||
|
|
||||||
Route::get('sederhana/{id}', [PenilaiController::class, 'sederhana'])->name('sederhana');
|
Route::get('sederhana/{id}', [PenilaiController::class, 'sederhana'])->name('sederhana');
|
||||||
Route::get('standard/{id}', [PenilaiController::class, 'standard'])->name('standard');
|
Route::get('standard/{id}', [PenilaiController::class, 'standard'])->name('standard');
|
||||||
Route::get('resume/{id}', [PenilaiController::class, 'standard'])->name('resume');
|
Route::get('resume/{id}', [PenilaiController::class, 'resume'])->name('resume');
|
||||||
Route::get('memo/{id}', [PenilaiController::class, 'standard'])->name('memo');
|
Route::get('memo/{id}', [PenilaiController::class, 'standard'])->name('memo');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user