Merge pull request 'perbaikan form inspeksi dan ganti surveyor' (#99) from feature/senior-officer into staging

Reviewed-on: #99
This commit is contained in:
putrakuningan
2025-02-17 06:09:46 +01:00
3 changed files with 9 additions and 8 deletions

View File

@@ -98,10 +98,10 @@ class ActivityController extends Controller
$permohonan = Permohonan::findOrFail($permohonanId); $permohonan = Permohonan::findOrFail($permohonanId);
// Validasi status permohonan // Validasi status permohonan
if ($permohonan->status !== 'assign') { if ($permohonan->status !== 'assign' && $permohonan->status !== 'proses-survey') {
return response()->json([ return response()->json([
'status' => 'error', 'status' => 'error',
'message' => 'Tidak bisa ganti tim, permohonan ini sudah mengatur jadwal.', 'message' => 'Tidak dapat mengganti tim, status permohonan tidak memungkinkan.',
]); ]);
} }
@@ -392,7 +392,7 @@ class ActivityController extends Controller
$q->where('user_id', $id); $q->where('user_id', $id);
}) })
->whereHas('permohonan', function ($q) { ->whereHas('permohonan', function ($q) {
$q->whereIn('status', ['assign', 'proses-laporan', 'done']); $q->whereIn('status', ['assign', 'proses-laporan', 'done', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule', 'revisi-laporan', 'survey']);
}); });

View File

@@ -316,7 +316,7 @@
title: 'Reschedule Jadwal Kunjungan', title: 'Reschedule Jadwal Kunjungan',
html: ` html: `
<div class="text-left space-y-4"> <div class="text-left space-y-4">
<p class="text-gray-700"> <p class="text-gray-700">
Yakin akan Reschedule Jadwal Kunjungan Yakin akan Reschedule Jadwal Kunjungan
<span class="font-semibold text-blue-600">${noReg}</span> <span class="font-semibold text-blue-600">${noReg}</span>
@@ -339,7 +339,7 @@
placeholder="Masukkan alasan reschedule..."></textarea> placeholder="Masukkan alasan reschedule..."></textarea>
</div> </div>
${rejectedNote ? ` ${rejectedNote && rejectedNote.trim() ? `
<p class="text-gray-700"><strong>Catatan Reject:</strong> ${rejectedNote}</p> <p class="text-gray-700"><strong>Catatan Reject:</strong> ${rejectedNote}</p>
` : ''} ` : ''}
</div> </div>

View File

@@ -7,14 +7,15 @@
{{ $title }} {{ $title }}
</h3> </h3>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
@php
use Illuminate\Support\Facades\Route;
@endphp
@if (isset($id)) @if (isset($id))
<a href="{{ route($backLink, ['id' => $id]) }}" class="btn btn-xs btn-info"> <a href="{{ route($backLink, ['id' => $id]) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back <i class="ki-filled ki-exit-left"></i> Back
</a> </a>
@else @else
@php
use Illuminate\Support\Facades\Route;
@endphp
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']) && @if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']) &&
Route::currentRouteName('otorisator.show')) Route::currentRouteName('otorisator.show'))
<a href="{{ route('otorisator.show', ['id' => $permohonan->id, 'type' => 'Pelaporan']) }}" <a href="{{ route('otorisator.show', ['id' => $permohonan->id, 'type' => 'Pelaporan']) }}"