Merge branch 'staging' into feature/senior-officer
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
let resumeButton = '';
|
||||
|
||||
if(data.penilai.resume) {
|
||||
const resumeButton = `
|
||||
resumeButton = `
|
||||
<a href="{{ route('penilai.print-out') }}?permohonanId=${data.id}&documentId=${dokumenID}&inspeksiId=${inspeksiId}&jaminanId=${jenisJaminanID}&statusLpj=0" class="btn btn-sm btn-success">
|
||||
Resume
|
||||
</a>`;
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
<tr>
|
||||
<td>Tanggal Survey</td>
|
||||
<td>:</td>
|
||||
<td>{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}</td>
|
||||
<td>{{ isset($permohonan->penilaian->tanggal_kunjungan) ? formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Surveyor</td>
|
||||
|
||||
72
resources/views/penilai/edit.blade.php
Normal file
72
resources/views/penilai/edit.blade.php
Normal file
@@ -0,0 +1,72 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('penilai.edit') }}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
<div class="card-header bg-agi-50" id="basic_settings">
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
Upload File Paparan
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('pembayaran.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('penilai.storePaparan',['id'=> $permohonan->id]) }}" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id }}">
|
||||
|
||||
<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-baseline w-full">
|
||||
<input readonly type="text" name="nomor_registrasi" id="nomor_registrasi" class="input w-full @error('nomor_registrasi') border-danger bg-danger-light @enderror" value="{{ old('nomor_registrasi', $permohonan->nomor_registrasi ?? '') }}" placeholder="Nomor Registrasi">
|
||||
@error('nomor_registrasi')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Debitur
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input readonly type="text" name="debitur" id="debitur" class="input w-full @error('debitur') border-danger bg-danger-light @enderror" value="{{ old('debitur', $permohonan->debiture->name ?? '') }}" placeholder="Debitur">
|
||||
@error('debitur')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
File Paparan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="file" name="file_paparan" id="file_paparan" class="file-input w-full @error('file_paparan') border-danger bg-danger-light @enderror" accept=".pdf,.jpg,.jpeg,.png">
|
||||
@error('file_paparan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Proses
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
|
||||
@endpush
|
||||
@@ -560,45 +560,9 @@
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes'
|
||||
}).then((result) => {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: `/penilai/storePaparan/${permohonanId}`,
|
||||
type: "PUT",
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.log('Error checking button status:', error, status, xhr);
|
||||
if (xhr.responseJSON.message) {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
|
||||
} else {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
window.location.href = `/penilai/${permohonanId}/edit`;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -159,13 +159,13 @@
|
||||
@endif
|
||||
|
||||
@elseif($dataHeader == 'paparan')
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('penilai.paparan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||
Lihat Data Paparan
|
||||
</a>
|
||||
|
||||
@if($permohonan->penilai->file_paparan)
|
||||
<span class="btn btn-success"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->file_paparan) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Data Paparan</span>
|
||||
@endif
|
||||
@if(Auth::user()->hasAnyRole(['administrator','senior-officer']) && $authorization->approve_so==null)
|
||||
<button onclick="otorisatorData({{ $authorization->id }})" type="button" class="btn btn-primary">
|
||||
<button onclick="otorisatorData({{ $authorization->id }},'SO')" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
</button>
|
||||
@@ -173,8 +173,7 @@
|
||||
|
||||
@if(Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) &&
|
||||
$authorization->approve_so &&
|
||||
$authorization->approve_dd == null &&
|
||||
in_array($permohonan->nilai_plafond_id, [1, 4]))
|
||||
$authorization->approve_dd == null)
|
||||
<button onclick="otorisatorData({{ $authorization->id }},'DD')" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
Otorisator {{ $header ?? '' }}
|
||||
@@ -191,7 +190,7 @@
|
||||
function otorisatorData(dataId, role='') {
|
||||
const dataHeader = @json($header);
|
||||
if(dataHeader == 'Paparan'){
|
||||
if(role == 'DD'){
|
||||
if(role == 'SO'){
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
@@ -252,8 +251,8 @@
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
title: 'Apakah Anda yakin?',
|
||||
text: `Untuk melakukan otorisator ${dataHeader}!`,
|
||||
title: 'Apakah Yakin?',
|
||||
text: `Pastikan bahwa paparan sudah dilakukan!`,
|
||||
icon: 'warning',
|
||||
input: 'textarea',
|
||||
inputLabel: 'Keterangan',
|
||||
@@ -282,7 +281,7 @@
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval dan Tanggal Paparan dari DD',
|
||||
'Data berhasil diotorisasi',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
@@ -74,6 +74,18 @@
|
||||
<span class="sort"> <span class="sort-label">Nilai Plafond </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="tanggal_paparan">
|
||||
<span class="sort"> <span class="sort-label"> Tanggal Paparan </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="approval_so">
|
||||
<span class="sort"> <span class="sort-label"> Approval SO </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="approval_dd">
|
||||
<span class="sort"> <span class="sort-label"> Approval DD </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
|
||||
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
@@ -220,6 +232,34 @@
|
||||
return `${data.nilai_plafond.name}`;
|
||||
},
|
||||
},
|
||||
tanggal_paparan:{
|
||||
title: 'Tanggal Paparan',
|
||||
render: (item, data) => {
|
||||
if(data.tanggal_paparan) {
|
||||
return `${window.formatTanggalIndonesia(data.tanggal_paparan)}`;
|
||||
}
|
||||
|
||||
return "-";
|
||||
},
|
||||
},
|
||||
approval_so: {
|
||||
title: 'Approval SO',
|
||||
render: (item, data) => {
|
||||
if(data.authorization.approve_so) {
|
||||
return `${data.authorization.approve_so.name} | ${window.formatTanggalIndonesia(data.authorization.approve_so_at)}`;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
approval_dd: {
|
||||
title: 'Approval DD',
|
||||
render: (item, data) => {
|
||||
if(data.authorization.approve_dd) {
|
||||
return `${data.authorization.approve_dd.name} | ${window.formatTanggalIndonesia(data.authorization.approve_dd_at)}`;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
|
||||
Reference in New Issue
Block a user