Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into andydev
This commit is contained in:
@@ -33,6 +33,11 @@
|
||||
.dropdowns-content a:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.break-words {
|
||||
word-break: break-word;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@@ -46,7 +51,6 @@
|
||||
@php
|
||||
|
||||
$sortedTeamsActivity = $teamsActivity->sortBy(function ($item) {
|
||||
|
||||
return $item->team->penilaianTeam
|
||||
->filter(function ($penilaianTeam) use ($item) {
|
||||
return $penilaianTeam->user_id == $item->user->id;
|
||||
@@ -64,8 +68,9 @@
|
||||
style="margin-start: 10px">
|
||||
<table class="table table-auto align-middle text-gray-700 font-medium text-sm">
|
||||
<tr>
|
||||
<th class="min-w-[150px]">
|
||||
<span class="text-base text-gray-900 font-normal">{{ $item->user->name }}</span>
|
||||
<th class="min-w-[150px]" style="width: 600px">
|
||||
<span
|
||||
class="text-base text-gray-900 font-normal break-words">{{ $item->user->name }}</span>
|
||||
</th>
|
||||
<th class="min-w-[150px]">
|
||||
<span class="text-base text-gray-900 font-normal">
|
||||
@@ -86,13 +91,14 @@
|
||||
class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden"></i>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</button>
|
||||
<div class="accordion-content hidden" id="accordion_{{ $index }}content_{{ $index }}">
|
||||
<div class="mx-8 pb-4" style="margin-bottom: 20px">
|
||||
<div class="card card-grid min-w-full" data-datatable="false"
|
||||
id="activity-table-{{ $index }}"
|
||||
data-api-url="{{ route('activity.progres.datatables', ['id' => $item->user->id ]) }}">
|
||||
data-api-url="{{ route('activity.progres.datatables', ['id' => $item->user->id]) }}">
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table
|
||||
@@ -176,7 +182,8 @@
|
||||
},
|
||||
jenis_asset: {
|
||||
title: 'Jenis Asset',
|
||||
render: (item, data) => `${data.permohonan.debiture.documents.map(d => d.jenis_jaminan.name) || ''}`,
|
||||
render: (item, data) =>
|
||||
`${data.permohonan.debiture.documents.map(d => d.jenis_jaminan.name) || ''}`,
|
||||
},
|
||||
jenis_report: {
|
||||
title: 'Jenis Report',
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<!-- Modal for PDF viewing -->
|
||||
<div id="pdfModal" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex items-center justify-center hidden w-full">
|
||||
<!-- Modal for PDF and Image viewing -->
|
||||
<div id="previewModal" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex items-center justify-center hidden w-full z-50">
|
||||
<div class="bg-white rounded-lg overflow-hidden shadow-xl transform transition-all min-w-3xl w-[1500px] h-[1200px]">
|
||||
<div class="p-4 h-full">
|
||||
<button onclick="closePDFModal()" class="float-right text-2xl">
|
||||
<i class="ki-filled ki-cross-square text-red-600"></i>
|
||||
</button>
|
||||
<div id="pdfViewer" class="h-full"></div>
|
||||
<div class="p-4 h-full flex flex-col">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<button id="downloadBtn" class="btn btn-primary btn-sm">
|
||||
<i class="ki-duotone ki-cloud-download me-1"><span class="path1"></span><span class="path2"></span></i>
|
||||
Download File
|
||||
</button>
|
||||
<button onclick="closePreviewModal()" class="text-2xl">
|
||||
<i class="ki-filled ki-cross-square text-red-600"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="previewContent" class="flex-grow"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,13 +19,48 @@
|
||||
@push('scripts')
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.3.0/pdfobject.min.js"></script>
|
||||
<script>
|
||||
let currentFileUrl = '';
|
||||
|
||||
function viewPDF(url) {
|
||||
PDFObject.embed(url, "#pdfViewer");
|
||||
document.getElementById('pdfModal').classList.remove('hidden');
|
||||
currentFileUrl = url;
|
||||
const fileExtension = url.split('.').pop().toLowerCase();
|
||||
const previewContent = document.getElementById('previewContent');
|
||||
|
||||
if (['pdf'].includes(fileExtension)) {
|
||||
PDFObject.embed(url, "#previewContent");
|
||||
} else if (['jpg', 'jpeg', 'png', 'gif'].includes(fileExtension)) {
|
||||
previewContent.innerHTML = `<img src="${url}" alt="Preview" class="max-w-full max-h-full object-contain">`;
|
||||
} else {
|
||||
previewContent.innerHTML = '<p class="text-center">Unsupported file type</p>';
|
||||
}
|
||||
|
||||
document.getElementById('previewModal').classList.remove('hidden');
|
||||
document.addEventListener('keydown', handleEscKey);
|
||||
}
|
||||
|
||||
function closePDFModal() {
|
||||
document.getElementById('pdfModal').classList.add('hidden');
|
||||
function closePreviewModal() {
|
||||
document.getElementById('previewModal').classList.add('hidden');
|
||||
document.removeEventListener('keydown', handleEscKey);
|
||||
}
|
||||
|
||||
function handleEscKey(event) {
|
||||
if (event.key === 'Escape') {
|
||||
closePreviewModal();
|
||||
}
|
||||
}
|
||||
|
||||
// Close modal when clicking outside the content
|
||||
document.getElementById('previewModal').addEventListener('click', function(event) {
|
||||
if (event.target === this) {
|
||||
closePreviewModal();
|
||||
}
|
||||
});
|
||||
|
||||
// Download functionality
|
||||
document.getElementById('downloadBtn').addEventListener('click', function() {
|
||||
if (currentFileUrl) {
|
||||
window.open(currentFileUrl, '_blank');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -161,23 +161,33 @@
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex items-center gap-2">
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" accept=".pdf,image/*">
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
</div>
|
||||
<div id="additional-files-{{ $n }}"></div>
|
||||
</div>
|
||||
|
||||
@if(isset($detail->dokumen_jaminan))
|
||||
@php
|
||||
$dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan];
|
||||
@endphp
|
||||
@foreach($dokumen_jaminan as $index => $dokumen)
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
@endforeach
|
||||
@if(isset($detail->dokumen_jaminan))
|
||||
@php
|
||||
$dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan];
|
||||
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor)) ? json_decode($detail->dokumen_nomor) : ($detail->dokumen_nomor ? [$detail->dokumen_nomor] : []);
|
||||
@endphp
|
||||
<div class="flex flex-col w-full gap-2">
|
||||
@foreach($dokumen_jaminan as $index => $dokumen)
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
@if(!empty($dokumen_nomor))
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : {{ $dokumen_nomor[$index] }}</span>
|
||||
@endif
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -250,7 +260,7 @@
|
||||
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||
<div class="flex items-center gap-2">
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" accept=".pdf,image/*">
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||
</div>
|
||||
<div id="additional-files-{{ $n }}"></div>
|
||||
@@ -510,10 +520,12 @@
|
||||
Dokumen Jaminan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full" id="file-container-${index}">
|
||||
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id) : ''}
|
||||
<div class="flex flex-col w-full gap-2">
|
||||
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id, item.dokumen_nomor) : ''}
|
||||
</div>
|
||||
<div class="flex items-center gap-2 my-2 w-full">
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" accept=".pdf,image/*">
|
||||
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput(${index})">Add File</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -544,32 +556,13 @@
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function renderExistingFiles(dokumenJaminan, debiturId, itemId) {
|
||||
if (typeof dokumenJaminan === 'string') {
|
||||
return `
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="badge badge-sm badge-outline mt-2 mr-2">
|
||||
${dokumenJaminan.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
`;
|
||||
} else if (Array.isArray(dokumenJaminan)) {
|
||||
return dokumenJaminan.map(file => `
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${encodeURIComponent(file)}" class="badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
`).join('');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function addFileInput(index) {
|
||||
const container = document.getElementById(`file-container-${index}`);
|
||||
const newInput = document.createElement('div');
|
||||
newInput.className = 'flex items-center gap-2 mb-2 w-full';
|
||||
newInput.innerHTML = `
|
||||
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
|
||||
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" accept=".pdf,image/*">
|
||||
<button type="button" class="flex-none btn btn-danger w-[100px] text-center" onclick="removeFileInput(this)">Remove</button>
|
||||
`;
|
||||
container.appendChild(newInput);
|
||||
@@ -579,23 +572,53 @@
|
||||
button.closest('.flex.items-center.gap-2.mb-2').remove();
|
||||
}
|
||||
|
||||
function renderExistingFiles(dokumenJaminan, debiturId, itemId) {
|
||||
if (typeof dokumenJaminan === 'string') {
|
||||
function renderExistingFiles(dokumenJaminan, debiturId, itemId, dokumenNomor) {
|
||||
if (typeof dokumenJaminan === 'string' && typeof dokumenNomor === 'string') {
|
||||
return `
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="badge badge-sm badge-outline mt-2">
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="flex-none badge badge-sm badge-outline mt-2">
|
||||
${dokumenJaminan.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
} else if (Array.isArray(dokumenJaminan)) {
|
||||
return dokumenJaminan.map(file => `
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
}else if (typeof dokumenJaminan === 'string' && dokumenNomor === null) {
|
||||
return `
|
||||
<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : --</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="flex-none badge badge-sm badge-outline mt-2">
|
||||
${dokumenJaminan.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
} else if (Array.isArray(dokumenJaminan) && Array.isArray(dokumenNomor)) {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor[index] || 'N/A'}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
} else if (Array.isArray(dokumenJaminan) && typeof dokumenNomor === 'string') {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor} || 'N/A'}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
} else if (Array.isArray(dokumenJaminan) && dokumenNomor === 'null') {
|
||||
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
|
||||
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor} || 'N/A'}</span>
|
||||
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
${file.split('/').pop()}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a></div>
|
||||
`).join('');
|
||||
}
|
||||
return '';
|
||||
return dokumenNomor;
|
||||
}
|
||||
|
||||
function getCustomFieldInput(type, fieldName, value) {
|
||||
|
||||
@@ -71,10 +71,23 @@
|
||||
{{ $loop->index+1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
||||
</span>
|
||||
<div>
|
||||
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
|
||||
<a href="{{ route('debitur.jaminan.download',['id'=>$debitur->id,'dokumen'=>$detail->id]) }}" class="badge badge-sm badge-outline mt-2 badge-info"><i class="ki-filled ki-cloud-download mr-2"></i> Download</a>
|
||||
@if(isset($detail->dokumen_jaminan))
|
||||
@php
|
||||
$dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan];
|
||||
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor)) ? json_decode($detail->dokumen_nomor) : ($detail->dokumen_nomor ? [$detail->dokumen_nomor] : []);
|
||||
@endphp
|
||||
@foreach($dokumen_jaminan as $index => $dokumen)
|
||||
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
||||
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
||||
{{ basename($dokumen) }}
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a>
|
||||
@endif
|
||||
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($dokumen_jaminan[$index]) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
|
||||
<br>
|
||||
@endforeach
|
||||
@endif
|
||||
<span class="badge badge-sm badge-outline badge-warning mt-2" onclick="viewPDF('{{ Storage::url($detail->dokumen_jaminan) }}')"><i class="ki-filled ki-eye mr-2"></i>Preview</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-t border-gray-300 border-dashed">
|
||||
|
||||
@@ -222,12 +222,32 @@
|
||||
<label class="form-label max-w-56">
|
||||
Email Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<div class="flex flex-wrap items-baseline w-full gap-1.5">
|
||||
<input class="input @error('email_kantor') border-danger @enderror" type="text"
|
||||
name="email_kantor" value="{{ $kjpp->email_kantor ?? old('email_kantor') }}">
|
||||
@error('email_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
<div id="detail_email_kantor" class="flex flex-wrap items-center w-full gap-2">
|
||||
@if (isset($kjpp->detail_email_kantor))
|
||||
@foreach ($detailEmailKantor as $detail_email_kantor)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('email_kantor') border-danger @enderror"
|
||||
type="text" name="detail_email_kantor[email_kantor][]"
|
||||
value="{{ $detail_email_kantor->email_kantor ?? old('detail_email_kantor.email_kantor') }}">
|
||||
@error('email_kantor')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn btn-danger btn-xs delete-button-edit">Hapus</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<button type="button" id="tambah_email_kantor" class="btn btn-primary btn-xs">Tambah
|
||||
Email Kantor</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -277,6 +297,51 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_reviewer" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (isset($kjpp->detail_nama_pic_reviewer) && isset($kjpp->detail_nomor_hp_pic_reviewer))
|
||||
@foreach (json_decode($detailJoinPicReviewer) as $detail_pic_reviewer)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_reviewer') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_reviewer[nama_pic_reviewer][]"
|
||||
value="{{ $detail_pic_reviewer->nama_pic_reviewer ?? old('detail_nama_pic_reviewer.nama_pic_reviewer') }}">
|
||||
@error('nama_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_reviewer') border-danger @enderror"
|
||||
type="text"
|
||||
name="detail_nomor_hp_pic_reviewer[nomor_hp_pic_reviewer][]"
|
||||
value="{{ $detail_pic_reviewer->nomor_hp_pic_reviewer ?? old('detail_nomor_hp_pic_reviewer.nomor_hp_pic_reviewer') }}">
|
||||
@error('nomor_hp_pic_reviewer')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<button type="button" id="tambah_nama_pic_reviewer" class="btn btn-primary btn-xs">Tambah
|
||||
PIC Reviewer</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Admin
|
||||
@@ -300,28 +365,114 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_admin" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (isset($kjpp->detail_nama_pic_admin) && isset($kjpp->detail_nomor_hp_pic_admin))
|
||||
@foreach (json_decode($detailJoinPicAdmin) as $detail_pic_admin)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_admin') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_admin[nama_pic_admin][]"
|
||||
value="{{ $detail_pic_admin->nama_pic_admin ?? old('detail_nama_pic_admin.nama_pic_admin') }}">
|
||||
@error('nama_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_admin') border-danger @enderror"
|
||||
type="text" name="detail_nomor_hp_pic_admin[nomor_hp_pic_admin][]"
|
||||
value="{{ $detail_pic_admin->nomor_hp_pic_admin ?? old('detail_nomor_hp_pic_admin.nomor_hp_pic_admin') }}">
|
||||
@error('nomor_hp_pic_admin')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<button type="button" id="tambah_nama_pic_admin" class="btn btn-primary btn-xs">Tambah
|
||||
PIC Admin</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror" type="text"
|
||||
name="nama_pic_marketing"
|
||||
value="{{ $kjpp->nama_pic_marketing ?? old('nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror" type="text"
|
||||
name="nama_pic_marketing"
|
||||
value="{{ $kjpp->nama_pic_marketing ?? old('nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<input class="input @error('nomor_hp_pic_marketing') border-danger @enderror" type="text"
|
||||
name="nomor_hp_pic_marketing"
|
||||
value="{{ $kjpp->nomor_hp_pic_marketing ?? old('nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap">
|
||||
<div id="detail_nama_pic_marketing" class="flex flex-wrap items-baseline w-full gap-2.5">
|
||||
@if (isset($kjpp->detail_nama_pic_marketing) && isset($kjpp->detail_nomor_hp_pic_marketing))
|
||||
@foreach (json_decode($detailJoinPicMarketing) as $detail_pic_marketing)
|
||||
<div class="flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full">
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nama_pic_marketing') border-danger @enderror"
|
||||
type="text" name="detail_nama_pic_marketing[nama_pic_marketing][]"
|
||||
value="{{ $detail_pic_marketing->nama_pic_marketing ?? old('detail_nama_pic_marketing.nama_pic_marketing') }}">
|
||||
@error('nama_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input
|
||||
class="input @error('nomor_hp_pic_marketing') border-danger @enderror"
|
||||
type="text"
|
||||
name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]"
|
||||
value="{{ $detail_pic_marketing->nomor_hp_pic_marketing ?? old('detail_nomor_hp_pic_marketing.nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button-edit">
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input @error('nomor_hp_pic_marketing') border-danger @enderror"
|
||||
type="text" name="nomor_hp_pic_marketing"
|
||||
value="{{ $kjpp->nomor_hp_pic_marketing ?? old('nomor_hp_pic_marketing') }}">
|
||||
@error('nomor_hp_pic_marketing')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
<button type="button" id="tambah_nama_pic_marketing" class="btn btn-primary btn-xs">Tambah
|
||||
PIC Marketing</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -397,3 +548,5 @@
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('lpj::kjpp.scripts.index')
|
||||
|
||||
120
resources/views/kjpp/scripts/index.blade.php
Normal file
120
resources/views/kjpp/scripts/index.blade.php
Normal file
@@ -0,0 +1,120 @@
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const emailKantorDiv = document.getElementById('detail_email_kantor');
|
||||
|
||||
function addDeleteListeners() {
|
||||
document.querySelectorAll(".delete-button").forEach(button => {
|
||||
button.addEventListener("click", function() {
|
||||
this.closest(
|
||||
".flex.flex-col.lg\\:flex-row.gap-2.items-baseline.lg\\:items-center.w-full"
|
||||
)
|
||||
.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function DeleteEditListeners() {
|
||||
document.querySelectorAll(".delete-button-edit").forEach(button => {
|
||||
button.addEventListener("click", function() {
|
||||
this.closest(
|
||||
".flex.flex-col.lg\\:flex-row.gap-2.items-baseline.lg\\:items-center.w-full"
|
||||
)
|
||||
.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
DeleteEditListeners();
|
||||
|
||||
document.getElementById("tambah_email_kantor").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_email_kantor[email_kantor][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
emailKantorDiv.appendChild(newDiv);
|
||||
|
||||
addDeleteListeners();
|
||||
});
|
||||
|
||||
const namaPicReviewerDiv = document.getElementById('detail_nama_pic_reviewer');
|
||||
|
||||
document.getElementById("tambah_nama_pic_reviewer").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nama_pic_reviewer[nama_pic_reviewer][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_reviewer[nomor_hp_pic_reviewer][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
namaPicReviewerDiv.appendChild(newDiv);
|
||||
|
||||
addDeleteListeners();
|
||||
})
|
||||
|
||||
const namaPicAdminDiv = document.getElementById('detail_nama_pic_admin');
|
||||
|
||||
document.getElementById("tambah_nama_pic_admin").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nama_pic_admin[nama_pic_admin][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_admin[nomor_hp_pic_admin][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
namaPicAdminDiv.appendChild(newDiv);
|
||||
|
||||
addDeleteListeners();
|
||||
})
|
||||
|
||||
const namaPicMarketingDiv = document.getElementById('detail_nama_pic_marketing');
|
||||
|
||||
document.getElementById("tambah_nama_pic_marketing").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<label class="form-label max-w-56">
|
||||
Nama PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nama_pic_marketing[nama_pic_marketing][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pic_marketing[nomor_hp_pic_marketing][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
namaPicMarketingDiv.appendChild(newDiv);
|
||||
|
||||
addDeleteListeners();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -42,9 +42,7 @@
|
||||
<label class="form-label max-w-56">Nomor Ijin Usaha</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
@foreach ($ijin_usaha as $iu)
|
||||
{{ $iu->code }}
|
||||
@endforeach
|
||||
{{ $kjpp->nomor_ijin_usaha }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,22 +51,36 @@
|
||||
Alamat Kantor
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->address }} , Kel.
|
||||
@foreach ($villages as $village)
|
||||
{{ $village->name }}
|
||||
@endforeach , Kec.
|
||||
@foreach ($districts as $district)
|
||||
{{ $district->name }}
|
||||
@endforeach ,
|
||||
@foreach ($cities as $city)
|
||||
{{ ucwords(strtolower($city->name)) }}
|
||||
@endforeach ,
|
||||
@foreach ($provinces as $province)
|
||||
{{ $province->name }}
|
||||
@endforeach, Kode Pos.
|
||||
@foreach ($villages as $village)
|
||||
{{ $village->postal_code }}
|
||||
@endforeach
|
||||
<p class="flex style-w-full text-gray-600 font-medium text-sm">{{ $kjpp->address }}
|
||||
@if (isset($kjpp->village_code))
|
||||
, Kel.
|
||||
@foreach ($villages as $village)
|
||||
{{ $village->name }}
|
||||
@endforeach
|
||||
@endif
|
||||
@if (isset($kjpp->district_code))
|
||||
, Kec.
|
||||
@foreach ($districts as $district)
|
||||
{{ $district->name }}
|
||||
@endforeach
|
||||
@endif
|
||||
@if (isset($kjpp->city_code))
|
||||
,@foreach ($cities as $city)
|
||||
{{ ucwords(strtolower($city->name)) }}
|
||||
@endforeach
|
||||
@endif
|
||||
@if (isset($kjpp->province_code))
|
||||
,
|
||||
@foreach ($provinces as $province)
|
||||
{{ $province->name }}
|
||||
@endforeach
|
||||
@endif
|
||||
@if (isset($kjpp->postal_code))
|
||||
, Kode Pos.
|
||||
@foreach ($villages as $village)
|
||||
{{ $village->postal_code }}
|
||||
@endforeach
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +96,13 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->email_kantor }}</p>
|
||||
@if (isset($kjpp->detail_email_kantor))
|
||||
@foreach (json_decode($kjpp->detail_email_kantor) as $detail_email_kantor)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_email_kantor->email_kantor }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -106,12 +125,26 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_reviewer }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_reviewer))
|
||||
@foreach (json_decode($kjpp->detail_nama_pic_reviewer) as $detail_nama_pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nama_pic_reviewer->nama_pic_reviewer }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Reviewer
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_reviewer }}</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_reviewer))
|
||||
@foreach (json_decode($kjpp->detail_nomor_hp_pic_reviewer) as $detail_nomor_hp_pic_reviewer)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nomor_hp_pic_reviewer->nomor_hp_pic_reviewer }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -120,12 +153,26 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_admin }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_admin))
|
||||
@foreach (json_decode($kjpp->detail_nama_pic_admin) as $detail_nama_pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nama_pic_admin->nama_pic_admin }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Admin
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_admin }}</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_admin))
|
||||
@foreach (json_decode($kjpp->detail_nomor_hp_pic_admin) as $detail_nomor_hp_pic_admin)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nomor_hp_pic_admin->nomor_hp_pic_admin }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -134,12 +181,26 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_marketing }}</p>
|
||||
@if (isset($kjpp->detail_nama_pic_marketing))
|
||||
@foreach (json_decode($kjpp->detail_nama_pic_marketing) as $detail_nama_pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nama_pic_marketing->nama_pic_marketing }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP PIC Marketing
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_marketing }}</p>
|
||||
@if (isset($kjpp->detail_nomor_hp_pic_marketing))
|
||||
@foreach (json_decode($kjpp->detail_nomor_hp_pic_marketing) as $detail_nomor_hp_pic_marketing)
|
||||
<p class="flex w-full text-gray-600 font-medium text-sm">
|
||||
{{ $detail_nomor_hp_pic_marketing->nomor_hp_pic_marketing }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -209,3 +270,19 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('styles')
|
||||
<style>
|
||||
@media (min-width: 1024px) {
|
||||
.style-w-full {
|
||||
max-width: 25rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.style-w-full {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@@ -210,11 +210,6 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- @php
|
||||
var_dump($penilaianTeam);
|
||||
@endphp --}}
|
||||
|
||||
<div
|
||||
class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 {{ $penilaianTeam->isEmpty() ? '' : 'hidden' }}">
|
||||
<label class="form-label max-w-56">
|
||||
@@ -264,8 +259,7 @@
|
||||
|
||||
@if (
|
||||
$penilaianTeam->isNotEmpty() &&
|
||||
$penilaianTeam->contains(fn($item) => $item->role == 'surveyor' && is_null($item->user_id))
|
||||
)
|
||||
$penilaianTeam->contains(fn($item) => $item->role == 'surveyor' && is_null($item->user_id)))
|
||||
<div id="surveyorId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Surveyor yang di tunjuk
|
||||
@@ -305,7 +299,7 @@
|
||||
@endforeach
|
||||
|
||||
@if ($penilaianTeam->isEmpty())
|
||||
<option value="pilih_dari_region">pilih dari region berdeda
|
||||
<option value="pilih_dari_region">Pilih Surveyor Dari Region
|
||||
</option>
|
||||
@endif
|
||||
</select>
|
||||
@@ -344,10 +338,8 @@
|
||||
|
||||
|
||||
@if (
|
||||
$penilaianTeam->isNotEmpty() &&
|
||||
$penilaianTeam->contains(fn($item) => $item->role == 'penilai' && is_null($item->user_id))
|
||||
)
|
||||
|
||||
$penilaianTeam->isNotEmpty() &&
|
||||
$penilaianTeam->contains(fn($item) => $item->role == 'penilai' && is_null($item->user_id)))
|
||||
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Penilai yang di tunjuk
|
||||
@@ -371,7 +363,7 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
@elseif($penilaianTeam->isEmpty())
|
||||
@elseif($penilaianTeam->isEmpty())
|
||||
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Penilai yang di tunjuk
|
||||
@@ -385,7 +377,7 @@
|
||||
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||
@endforeach
|
||||
@if ($penilaianTeam->isEmpty())
|
||||
<option value="pilih_dari_region">pilih dari region berdeda
|
||||
<option value="pilih_dari_region">Pilih Penilai Dari Region
|
||||
</option>
|
||||
@endif
|
||||
</select>
|
||||
@@ -437,6 +429,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan
|
||||
@@ -566,12 +559,6 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const revisiForm = document.getElementById('revisiForm');
|
||||
const btnSubmit = document.getElementById('btnSubmit');
|
||||
@@ -613,4 +600,9 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -40,6 +40,24 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Nilai Plafond:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $permohonan->nilaiPlafond->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Status Bayar:
|
||||
</h3>
|
||||
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_',' ',$permohonan->status_bayar) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -139,7 +157,7 @@
|
||||
@include('lpj::component.detail-jaminan')
|
||||
|
||||
<div class="card">
|
||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST">
|
||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST" id="authorizationForm">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
@csrf
|
||||
<div class="card-body lg:py-7.5">
|
||||
@@ -149,6 +167,16 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea" rows="3" type="number" id="keterangan" name="keterangan"></textarea>
|
||||
<em class="alert text-danger text-sm" id="keterangan-message"></em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mt-2" id="fileUploadSection">
|
||||
<label class="form-label max-w-56">
|
||||
Upload File Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="file" class="file-input" id="revisionFile" name="revisionFile">
|
||||
<em class="alert text-danger text-sm hidden" id="file-message"></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,7 +184,7 @@
|
||||
<button type="submit" name="status" value="preregister" class="btn btn-success">
|
||||
Approve
|
||||
</button>
|
||||
<button type="submit" name="status" value="revisi" class="btn btn-warning ml-3">
|
||||
<button type="submit" name="status" value="revisi" id="revisi" class="btn btn-warning ml-3">
|
||||
Revisi
|
||||
</button>
|
||||
</div>
|
||||
@@ -164,3 +192,45 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const form = document.getElementById('authorizationForm');
|
||||
const keterangan = document.getElementById('keterangan');
|
||||
const revisiBtn = document.getElementById('revisi');
|
||||
const keteranganMessage = document.getElementById('keterangan-message');
|
||||
|
||||
const revisionFile = document.getElementById('revisionFile');
|
||||
const fileMessage = document.getElementById('file-message');
|
||||
|
||||
|
||||
form.addEventListener('submit', function(event) {
|
||||
if (event.submitter === revisiBtn && keterangan.value.trim() === '') {
|
||||
event.preventDefault();
|
||||
keteranganMessage.textContent = 'Catatan harus diisi.';
|
||||
} else {
|
||||
keteranganMessage.textContent = '';
|
||||
}
|
||||
|
||||
if (!revisionFile.files.length) {
|
||||
event.preventDefault();
|
||||
fileMessage.textContent = 'File revisi harus diunggah.';
|
||||
fileMessage.classList.remove('hidden');
|
||||
} else {
|
||||
fileMessage.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// Add event listener for typing in keterangan textarea
|
||||
keterangan.addEventListener('input', function() {
|
||||
keteranganMessage.classList.add('hidden');
|
||||
});
|
||||
|
||||
// Add event listener for file selection
|
||||
revisionFile.addEventListener('change', function() {
|
||||
fileMessage.classList.add('hidden');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -136,10 +136,10 @@
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
<a onclick="showRegistrasiFinal(${data.id})" class="btn btn-sm btn-icon btn-clear btn-primary" title="Detail">
|
||||
<a onclick="showRegistrasiFinal(${data.permohonan.id})" class="btn btn-sm btn-icon btn-clear btn-primary" title="Detail">
|
||||
<i class="ki-outline ki-eye"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" title="Proses Penawaran" href="registrasifinal/${data.id}/edit">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-info" title="Proses Penawaran" href="registrasifinal/${data.permohonan.id}/edit">
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>
|
||||
</div>`;
|
||||
|
||||
@@ -161,27 +161,27 @@
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
var iconSpkShow ='';
|
||||
var iconSpkCreate='';
|
||||
var spkShow ='';
|
||||
var spkCreate='';
|
||||
if(!data.dokumen)
|
||||
{
|
||||
iconSpkCreate=`<a class="btn btn-sm btn-icon btn-clear btn-info" title="Proses Penawaran" onclick="spkCreate(${data.id})" >
|
||||
spkCreate=`<a class="btn btn-sm btn-icon btn-clear btn-info" title="Proses Penawaran" onclick="spkCreate(${data.penawaran.id})" >
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>`;
|
||||
}
|
||||
else
|
||||
{
|
||||
iconSpkShow =`<div class="flex flex-nowrap justify-center">
|
||||
<a href="${data.dokumen}" class="btn btn-sm btn-icon btn-clear btn-primary" title="Download SPK" download >
|
||||
spkShow =`<div class="flex flex-nowrap justify-center">
|
||||
<a href="/spk/${data.id}/download" class="btn btn-sm btn-icon btn-clear btn-primary" title="Download SPK">
|
||||
<i class="ki-filled ki-cloud-download"></i>
|
||||
</a> `;
|
||||
iconSpkCreate=`<a class="btn btn-sm btn-icon btn-clear btn-info" title="Buat SPK" onclick="spkCreate(${data.id})" >
|
||||
spkCreate=`<a class="btn btn-sm btn-icon btn-clear btn-info" title="Buat SPK" onclick="spkCreate(${data.penawaran.id})" >
|
||||
<i class="ki-outline ki-notepad-edit"></i>
|
||||
</a>`;
|
||||
}
|
||||
|
||||
return `<div class="flex flex-nowrap justify-center">`
|
||||
+iconSpkShow+iconSpkCreate+
|
||||
return `<div class="flex flex-nowrap justify-center">`
|
||||
+spkShow+spkCreate+
|
||||
`</div>`;
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user