Merge remote-tracking branch 'composer/feature/senior-officer' into staging
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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user