Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -603,8 +603,15 @@ class PenilaianController extends Controller
|
|||||||
break;
|
break;
|
||||||
case 'paparan':
|
case 'paparan':
|
||||||
if (Auth::user()->roles[0]->name === 'senior-officer' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so === null) {
|
if (Auth::user()->roles[0]->name === 'senior-officer' || Auth::user()->roles[0]->name === 'administrator' && $authorization->approve_so === null) {
|
||||||
|
$status = '3';
|
||||||
|
if (in_array($permohonan->nilai_plafond_id, [3])) {
|
||||||
|
$status = '1';
|
||||||
|
$permohonan->update([
|
||||||
|
'status' => $authorization->request
|
||||||
|
]);
|
||||||
|
}
|
||||||
$authorization->update([
|
$authorization->update([
|
||||||
'status' => '3',
|
'status' => $status,
|
||||||
'status_so' => '1',
|
'status_so' => '1',
|
||||||
'approve_so' => Auth::user()->id,
|
'approve_so' => Auth::user()->id,
|
||||||
'approve_so_at' => now(),
|
'approve_so_at' => now(),
|
||||||
@@ -615,9 +622,10 @@ class PenilaianController extends Controller
|
|||||||
'tanggal_paparan' => $request->tanggalPaparan,
|
'tanggal_paparan' => $request->tanggalPaparan,
|
||||||
'keterangan' => $request->keterangan
|
'keterangan' => $request->keterangan
|
||||||
]);
|
]);
|
||||||
|
|
||||||
} elseif (Auth::user()->roles[0]->name === 'EO Appraisal') {
|
} elseif (Auth::user()->roles[0]->name === 'EO Appraisal') {
|
||||||
$status = '2';
|
$status = '2';
|
||||||
if (in_array($permohonan->nilai_plafond_id, [1,2])) {
|
if (in_array($permohonan->nilai_plafond_id, [1,2, 3])) {
|
||||||
$status = '1';
|
$status = '1';
|
||||||
$permohonan->update([
|
$permohonan->update([
|
||||||
'status' => $authorization->request
|
'status' => $authorization->request
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
/* Image Styling */
|
/* Image Styling */
|
||||||
.photo-item img {
|
.photo-item img {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 400px;
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
@@ -59,7 +60,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.photo-image {
|
.photo-image {
|
||||||
width: 100;
|
|
||||||
height: 400px;
|
height: 400px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,36 @@
|
|||||||
@include('lpj::penilai.components.header')
|
@include('lpj::penilai.components.header')
|
||||||
|
|
||||||
|
@php
|
||||||
|
$data = '';
|
||||||
|
foreach ($permohonan->documents as $dokumen) {
|
||||||
|
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||||
|
|
||||||
|
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||||
|
$surveyor = $permohonan->penilaian->userPenilai->where('role', 'surveyor')->first();
|
||||||
|
$teams = $permohonan->region->teams;
|
||||||
|
|
||||||
|
if ($teams) {
|
||||||
|
foreach ($teams as $team) {
|
||||||
|
$team_users = $team->teamsUsers;
|
||||||
|
// print_r($team_users);
|
||||||
|
if ($team_users) {
|
||||||
|
foreach ($team_users as $team_user) {
|
||||||
|
$user = $team_user->user;
|
||||||
|
|
||||||
|
if ($user && $user->hasRole('senior-officer')) {
|
||||||
|
$senior_officer = $user;
|
||||||
|
break 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
use Modules\Usermanagement\Models\User;
|
||||||
|
$penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first();
|
||||||
|
|
||||||
|
$data = rtrim($data, ', ');
|
||||||
|
@endphp
|
||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
|
|||||||
@@ -172,7 +172,7 @@
|
|||||||
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) &&
|
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) &&
|
||||||
$permohonan->approval_so &&
|
$permohonan->approval_so &&
|
||||||
$permohonan->approval_eo == 0 &&
|
$permohonan->approval_eo == 0 &&
|
||||||
in_array($permohonan->nilai_plafond_id, [1, 2, 4]))
|
in_array($permohonan->nilai_plafond_id, [1, 2,3, 4]))
|
||||||
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
<button onclick="otorisatorData({{ $permohonan->id }})" type="button" class="btn btn-primary">
|
||||||
<i class="ki-filled ki-double-check"></i>
|
<i class="ki-filled ki-double-check"></i>
|
||||||
Otorisator {{ $header ?? '' }}
|
Otorisator {{ $header ?? '' }}
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) && $authorization->approve_so && $authorization->approve_eo == null && in_array($permohonan->nilai_plafond_id, [1, 2,4]))
|
@if (Auth::user()->hasAnyRole(['administrator', 'EO Appraisal']) && $authorization->approve_so && $authorization->approve_eo == null && in_array($permohonan->nilai_plafond_id, [1, 2,3,4]) && $permohonan->status === 'proses-paparan')
|
||||||
<button onclick="otorisatorData({{ $authorization->id }},'EO')" type="button"
|
<button onclick="otorisatorData({{ $authorization->id }},'EO')" type="button"
|
||||||
class="btn btn-primary">
|
class="btn btn-primary">
|
||||||
<i class="ki-filled ki-double-check"></i>
|
<i class="ki-filled ki-double-check"></i>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) && $authorization->approve_eo && $authorization->approve_dd == null && in_array($permohonan->nilai_plafond_id, [4]))
|
@if (Auth::user()->hasAnyRole(['administrator', 'DD Appraisal']) && $authorization->approve_eo && $authorization->approve_dd == null && in_array($permohonan->nilai_plafond_id, [4]) &&$permohonan->status === 'proses-paparan')
|
||||||
<button onclick="otorisatorData({{ $authorization->id }},'DD')" type="button"
|
<button onclick="otorisatorData({{ $authorization->id }},'DD')" type="button"
|
||||||
class="btn btn-primary">
|
class="btn btn-primary">
|
||||||
<i class="ki-filled ki-double-check"></i>
|
<i class="ki-filled ki-double-check"></i>
|
||||||
|
|||||||
@@ -364,6 +364,8 @@
|
|||||||
param_name: paramName
|
param_name: paramName
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Add file to existing files set to prevent duplicates
|
// Add file to existing files set to prevent duplicates
|
||||||
existingFiles.add(file.name);
|
existingFiles.add(file.name);
|
||||||
|
|
||||||
@@ -830,6 +832,9 @@
|
|||||||
|
|
||||||
const filePreviewElement = file.previewElement;
|
const filePreviewElement = file.previewElement;
|
||||||
|
|
||||||
|
console.log(file.originalPath);
|
||||||
|
|
||||||
|
|
||||||
if (!filePreviewElement) {
|
if (!filePreviewElement) {
|
||||||
console.error('File preview element not found for:', file);
|
console.error('File preview element not found for:', file);
|
||||||
return;
|
return;
|
||||||
@@ -874,7 +879,7 @@
|
|||||||
url: "{{ route('surveyor.hapusFoto') }}",
|
url: "{{ route('surveyor.hapusFoto') }}",
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
data: {
|
data: {
|
||||||
path: file.originalPath,
|
path: response.path,
|
||||||
permohonan_id: {{ $permohonan->id ?? 0 }},
|
permohonan_id: {{ $permohonan->id ?? 0 }},
|
||||||
dokument_id: '{{ request('dokument') ?? '' }}',
|
dokument_id: '{{ request('dokument') ?? '' }}',
|
||||||
param_name: response.param_name
|
param_name: response.param_name
|
||||||
|
|||||||
@@ -309,7 +309,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkLaporan(permohonanId, documentId, inspeksiId, jaminanId, statusLpj) {
|
function checkLaporan(permohonanId, documentId, inspeksiId, statusLpj) {
|
||||||
// showLoadingSwal('Tunggu...');
|
// showLoadingSwal('Tunggu...');
|
||||||
fetch(
|
fetch(
|
||||||
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}`
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.status) {
|
if (data.status) {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}&statusLpj=${statusLpj}&type=${data.status}`;
|
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&inspeksiId=${inspeksiId}&statusLpj=${statusLpj}&type=${data.status}`;
|
||||||
} else {
|
} else {
|
||||||
// Jika laporan belum ada, tampilkan pesan peringatan
|
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
|
|||||||
Reference in New Issue
Block a user