Merge remote-tracking branch 'composer/feature/senior-officer' into staging
# Conflicts: # resources/views/penilaian/otorisator/show.blade.php
This commit is contained in:
@@ -13,6 +13,7 @@ use Maatwebsite\Excel\Facades\Excel;
|
||||
use Modules\Lpj\Exports\KertasKerjaExport;
|
||||
use Modules\Lpj\Http\Controllers\SurveyorController;
|
||||
use Modules\Location\Models\Province;
|
||||
|
||||
class PenilaiController extends Controller
|
||||
{
|
||||
public $user;
|
||||
@@ -607,7 +608,7 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$pdf =Pdf::loadView('lpj::penilai.components.print-out', compact(
|
||||
$pdf = PDF::loadView('lpj::penilai.components.print-out', compact(
|
||||
'permohonan',
|
||||
'forminspeksi',
|
||||
'lpjData',
|
||||
@@ -615,12 +616,21 @@ class PenilaiController extends Controller
|
||||
'basicData',
|
||||
'inspeksi',
|
||||
'lpj'
|
||||
));
|
||||
));
|
||||
|
||||
$pdf->setPaper('A4', 'portrait');
|
||||
|
||||
return $pdf->download('laporan.pdf');
|
||||
|
||||
// return view('lpj::penilai.components.print-out', compact(
|
||||
// 'permohonan',
|
||||
// 'forminspeksi',
|
||||
// 'lpjData',
|
||||
// 'formFoto',
|
||||
// 'basicData',
|
||||
// 'inspeksi',
|
||||
// 'lpj'
|
||||
// ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -181,8 +181,7 @@
|
||||
actions: {
|
||||
title: 'Action',
|
||||
render: (item, data) => {
|
||||
|
||||
if (data.status === 'done') {
|
||||
if (data.status === 'done' || data.status === 'proses-laporan') {
|
||||
return `
|
||||
<div class="flex flex-nowrap justify-center gap-1.5">
|
||||
<a class="btn btn-sm btn-outline btn-info" href="penilai/${data.id}/show">
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-5">
|
||||
<a class="btn btn-success" href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}">
|
||||
<a class="btn btn-success" href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $dokumen->id }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $dokumen->jenis_jaminan_id }}" >
|
||||
PRINT OUT
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
$dataHeader = strtolower($header ?? '');
|
||||
@endphp
|
||||
|
||||
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.'. $dataHeader . '.index'])
|
||||
@include('lpj::component.detail-jaminan', ['backLink' => 'otorisator.' . $dataHeader . '.index'])
|
||||
|
||||
|
||||
|
||||
@if($permohonan->approval_so)
|
||||
<div class="card pb-2.5">
|
||||
@@ -46,6 +48,27 @@
|
||||
@endif
|
||||
<div>
|
||||
<div>
|
||||
<div class="flex gap-2.5">
|
||||
@php
|
||||
$inspeksiId = null;
|
||||
$documentId = null;
|
||||
$jenisJaminanId = null;
|
||||
foreach ($permohonan->debiture->documents as $item) {
|
||||
foreach ($item->inspeksi as $key => $value) {
|
||||
$inspeksiId = $item->id;
|
||||
}
|
||||
$documentId = $item->id;
|
||||
$jenisJaminanId = $item->jenis_jaminan_id;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if ($dataHeader == 'pelaporan')
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('penilai.print-out') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}">
|
||||
Lihat Laporan
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->hasAnyRole(['administrator','senior-officer']) && $permohonan->approval_so==null)
|
||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
value="rute_{{ $index }}">
|
||||
<input id="inputRute-{{ $index }}" type="file" name="foto_rute[]"
|
||||
class="file-input file-input-bordered w-full" accept="image/*"
|
||||
capture="camera" onchange="previewImage(this, 'foto_rute-preview')">
|
||||
capture="camera" onchange="previewImage(this, 'foto_rute-preview-{{ $index }}')">
|
||||
|
||||
|
||||
<button type="button" id="btnCamera-{{ $index }}" class="btn btn-light"
|
||||
@@ -390,7 +390,7 @@
|
||||
</label>
|
||||
<div class="input-group w-full grid gap-5">
|
||||
<div class="preview-container">
|
||||
<img id="foto_lantai-preview-{{ $loop->index }}"
|
||||
<img id="foto_lantai-preview-{{ $loop->iteration }}"
|
||||
src="{{ asset('storage/' . old('foto_lantai_unit', $item['foto_lantai_unit'])) }}"
|
||||
alt="Foto Lantai" class="mt-2 h-auto"
|
||||
style="{{ old('foto_lantai_unit', $item['foto_lantai_unit']) ? 'display: block;' : 'display: none;' }} width: 30rem;">
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">“Koordinat</label>
|
||||
<label class="form-label max-w-56">Koordinat</label>
|
||||
<div id="perwakilan" class="flex items-baseline w-full gap-5">
|
||||
<div class="grid grid-cols-2 gap-4 items-center w-full">
|
||||
<input class="input" type="text" placeholder="Masukan Koordinat Latitude" type="text"
|
||||
@@ -228,10 +228,12 @@
|
||||
name="kordinat_lng" id="lng"
|
||||
value="{{ old('kordinat_lng', isset($forminspeksi['asset']['kordinat_lng']) ? $forminspeksi['asset']['kordinat_lng'] : '') }}">
|
||||
</div>
|
||||
<a target="_blank" href="https://www.google.com/maps" type="button"
|
||||
class="btn btn-md btn-outline btn-primary">
|
||||
<a onclick="getCoordinates()" type="button" class="btn btn-md btn-outline btn-primary">
|
||||
<i class="ki-filled ki-map"></i>Ambil
|
||||
Koordinat </a>
|
||||
<a target="_blank" href="https://www.google.com/maps" type="button"
|
||||
class="btn btn-md btn-outline btn-success">
|
||||
<i class="ki-filled ki-map"></i>Ke google Maps</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -443,11 +445,9 @@
|
||||
@endphp
|
||||
|
||||
|
||||
<input id="hub_penghuni_tidak_sesuai" class="input"
|
||||
name="hub_penghuni_tidak_sesuai"
|
||||
<input id="hub_penghuni_tidak_sesuai" class="input" name="hub_penghuni_tidak_sesuai"
|
||||
placeholder="Masukkan Hubungin penghuni jaminan"
|
||||
value="{{ old('hub_penghuni_tidak_sesuai', isset($selectedData) ? $selectedData : '') }}"
|
||||
|
||||
style="{{ old('hub_penghuni_tidak_sesuai', $selectedData ?? false) ? '' : 'display: none;' }}">
|
||||
</div>
|
||||
<em id="error-hub_cadeb_penghuni" class="alert text-danger text-sm"></em>
|
||||
@@ -460,6 +460,43 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function getCoordinates() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => {
|
||||
// Ambil latitude dan longitude
|
||||
const lat = position.coords.latitude;
|
||||
const lng = position.coords.longitude;
|
||||
|
||||
// Masukkan ke dalam input field
|
||||
document.getElementById('lat').value = lat;
|
||||
document.getElementById('lng').value = lng;
|
||||
toastrSuccessBuild('Koordinat berhasil diambil!');
|
||||
|
||||
},
|
||||
(error) => {
|
||||
// Handle error
|
||||
switch (error.code) {
|
||||
case error.PERMISSION_DENIED:
|
||||
toastrErrorBuild('Pengguna menolak permintaan geolokasi.');
|
||||
break;
|
||||
case error.POSITION_UNAVAILABLE:
|
||||
toastrErrorBuild('Informasi lokasi tidak tersedia.');
|
||||
break;
|
||||
case error.TIMEOUT:
|
||||
toastrErrorBuild('Permintaan geolokasi mengalami timeout.');
|
||||
break;
|
||||
case error.UNKNOWN_ERROR:
|
||||
toastrErrorBuild('Terjadi kesalahan yang tidak diketahui.');
|
||||
break;
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
toastrErrorBuild('Geolocation tidak didukung oleh browser ini.');
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Cek radio button saat halaman dimuat
|
||||
const sesuaiRadio = document.querySelector('input[name="alamat_sesuai"][value="sesuai"]');
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
<style>
|
||||
.camera-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
video, canvas {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="modal fade" data-modal="true" id="cameraModal" data-backdrop="" data-keyboard="false">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -85,4 +99,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user