Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -403,8 +403,8 @@ class PenilaiController extends Controller
|
||||
$jaminanId = $request->query('jaminanId');
|
||||
$provinces = Province::all();
|
||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||
// $nomorLaporan = $this->generateNoLaporan($permohonan, $documentId, 'rap');
|
||||
// $basicData = $this->surveyorController->getCommonData();
|
||||
$nomorLaporan = $this->generateNoLaporan($permohonan, $documentId, 'call-report');
|
||||
$basicData = $this->surveyorController->getCommonData();
|
||||
// $inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||
// Penilai::updateOrCreate(
|
||||
// [
|
||||
@@ -462,7 +462,7 @@ class PenilaiController extends Controller
|
||||
// return view('lpj::penilai.components.call-report', compact('permohonan', 'rap', 'provinces', 'cities',
|
||||
// 'districts',
|
||||
// 'villages','forminspeksi', 'noLpRAP', 'basicData','cekAlamat'));
|
||||
return view('lpj::penilai.components.call-report', compact('permohonan'));
|
||||
return view('lpj::penilai.components.call-report', compact('permohonan','basicData', 'nomorLaporan'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1183,7 +1183,7 @@ class PenilaiController extends Controller
|
||||
|
||||
public function generateNoLaporan($permohonan, $documentId, $type)
|
||||
{
|
||||
$typeMapping = ['lpj' => 'LPJ', 'memo' => 'MAK', 'rap' => 'RAP'];
|
||||
$typeMapping = ['lpj' => 'LPJ', 'memo' => 'MAK', 'rap' => 'RAP', 'call-report' => 'CR'];
|
||||
|
||||
// Cek apakah data sudah ada
|
||||
$laporan = Laporan::where([
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
use Modules\Lpj\Models\TujuanPenilaian;
|
||||
use Modules\Lpj\Services\PermohonanHistoryService;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Modules\Lpj\Models\Penilaian;
|
||||
|
||||
class PermohonanController extends Controller
|
||||
{
|
||||
@@ -260,7 +263,7 @@
|
||||
|
||||
public function export()
|
||||
{
|
||||
return Excel::download(new PermohonanExport, 'permohonan.xlsx');
|
||||
return Excel::download(new PermohonanExport(), 'permohonan.xlsx');
|
||||
}
|
||||
|
||||
public function authorization()
|
||||
@@ -404,4 +407,75 @@
|
||||
return redirect()->route('permohonan.index')->with('success', 'Pembatalan Permohonan Menunggu Approval');
|
||||
}
|
||||
|
||||
public function storeAproved(Request $request, $id): JsonResponse
|
||||
{
|
||||
$data = [];
|
||||
if (request()->ajax()) {
|
||||
try {
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
$penilaian->update([
|
||||
'authorized_status' => 1,
|
||||
]);
|
||||
|
||||
$permohonan = Permohonan::findOrFail($request->permohonan_id);
|
||||
|
||||
$permohonan->update([
|
||||
'status' => 'proses-survey'
|
||||
]);
|
||||
|
||||
$data['status'] = 'success';
|
||||
$data['message'] = 'Jadwal '.$request->noReg.' berhasil di aprove';
|
||||
} catch (\Exception $e) {
|
||||
$data['status'] = 'error';
|
||||
$data['message'] = 'Gagal membuat jadwal: ' . $e->getMessage();
|
||||
}
|
||||
|
||||
} else {
|
||||
$data['status'] = 'error';
|
||||
$data['message'] = "no ajax request";
|
||||
}
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
|
||||
public function storeRescheduleSurvey(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
$validatedData = $request->validate([
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'penilaian_id' => 'nullable',
|
||||
'nomor_registrasi' => 'required',
|
||||
'reschedule_note' => 'required',
|
||||
'reschedule_date' => 'required',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
$permohonan = Permohonan::findOrFail($request->permohonan_id);
|
||||
$permohonan->update([
|
||||
'status' => 'request-reschedule'
|
||||
]);
|
||||
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
|
||||
$penilaian->update([
|
||||
'reschedule_date' => $request->reschedule_date,
|
||||
'reschedule_note' => $request->reschedule_note,
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'Proses request reschedule permohonan Nomor registrasi '.$request->nomor_registrasi.' berhasil',
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => 'Gagal membuat request reschedule: ' . $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -929,46 +929,14 @@ class SurveyorController extends Controller
|
||||
->route('surveyor.index')
|
||||
->with('success', 'Jadwal berhasil dibuat.');
|
||||
} catch (\Exception $e) {
|
||||
\Log::error('Error sending email: ' . $e->getMessage());
|
||||
return redirect()
|
||||
->route('surveyor.index')
|
||||
->with('error', 'Tanggal dan catatan tidak boleh kosong');
|
||||
->with('error', 'Internal Server Error: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function storeAproved(Request $request, $id): JsonResponse
|
||||
{
|
||||
$data = [];
|
||||
if (request()->ajax()) {
|
||||
try {
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
$penilaian->update([
|
||||
'authorized_status' => 1,
|
||||
]);
|
||||
|
||||
$permohonan = Permohonan::findOrFail($request->permohonan_id);
|
||||
|
||||
$permohonan->update([
|
||||
'status' => 'survey'
|
||||
]);
|
||||
|
||||
$data['status'] = 'success';
|
||||
$data['message'] = 'Jadwal '.$request->noReg.' berhasil di aprove';
|
||||
} catch (\Exception $e) {
|
||||
$data['status'] = 'error';
|
||||
$data['message'] = 'Gagal membuat jadwal: ' . $e->getMessage();
|
||||
}
|
||||
|
||||
} else {
|
||||
$data['status'] = 'error';
|
||||
$data['message'] = "no ajax request";
|
||||
}
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
|
||||
public function storeFreeze($id, Request $request)
|
||||
{
|
||||
try {
|
||||
@@ -2048,7 +2016,7 @@ class SurveyorController extends Controller
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereRaw('LOWER(status) IN (?, ?)', ['assign', 'survey']);
|
||||
$query->whereRaw('LOWER(status) IN (?, ?, ?, ?, ?, ? ,?)', ['assign', 'survey', 'proses-survey', 'request-reschedule', 'reschedule', 'rejected-reschedule', 'approved-reschedule' ]);
|
||||
|
||||
|
||||
if (!Auth::user()->hasRole('administrator')) {
|
||||
@@ -3553,5 +3521,117 @@ class SurveyorController extends Controller
|
||||
return $pdf->download($fileName);
|
||||
}
|
||||
|
||||
public function approveReschedule(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
// Validasi data yang diterima
|
||||
$validatedData = $request->validate([
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'nomor_registrasi' => 'required'
|
||||
]);
|
||||
|
||||
// Memulai transaksi
|
||||
DB::beginTransaction();
|
||||
|
||||
// Update status permohonan menjadi "reschedule"
|
||||
$permohonan = Permohonan::findOrFail($validatedData['permohonan_id']);
|
||||
$permohonan->update([
|
||||
'status' => 'approved-reschedule',
|
||||
]);
|
||||
|
||||
// Update data penilaian dengan waktu reschedule
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
$penilaian->update([
|
||||
'waktu_penilaian' => $penilaian->reschedule_date,
|
||||
]);
|
||||
|
||||
// Commit transaksi
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'Reschedule jadwal dengan nomor registrasi ' . $validatedData['nomor_registrasi'] . ' berhasil disetujui.',
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
// Rollback jika ada error
|
||||
DB::rollBack();
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => 'Gagal menyetujui reschedule: ' . $e->getMessage(),
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reject reschedule request.
|
||||
*/
|
||||
public function rejectReschedule(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
// Validasi data yang diterima
|
||||
$validatedData = $request->validate([
|
||||
'permohonan_id' => 'required|exists:permohonan,id',
|
||||
'rejected_note' => 'required|string|max:255',
|
||||
'nomor_registrasi' => 'required|string',
|
||||
]);
|
||||
|
||||
// Memulai transaksi
|
||||
DB::beginTransaction();
|
||||
|
||||
// Update status permohonan menjadi "rejected-reschedule"
|
||||
$permohonan = Permohonan::findOrFail($validatedData['permohonan_id']);
|
||||
$permohonan->update([
|
||||
'status' => 'rejected-reschedule',
|
||||
]);
|
||||
|
||||
// Update data penilaian dengan catatan penolakan
|
||||
$penilaian = Penilaian::findOrFail($id);
|
||||
$penilaian->update([
|
||||
'rejected_note' => $validatedData['rejected_note'],
|
||||
]);
|
||||
|
||||
// Commit transaksi
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'Reschedule jadwal dengan nomor registrasi ' . $validatedData['nomor_registrasi'] . ' berhasil ditolak dengan alasan: ' . $validatedData['rejected_note'],
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
// Rollback jika ada error
|
||||
DB::rollBack();
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => 'Gagal menolak reschedule: ' . $e->getMessage(),
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function storeProsesSurvey(Request $request, $id)
|
||||
{
|
||||
try {
|
||||
|
||||
$validated = $request->validate([
|
||||
'permohonan_id' => 'required|integer|exists:permohonan,id',
|
||||
]);
|
||||
|
||||
|
||||
$permohonan = Permohonan::findOrFail($id);
|
||||
|
||||
$permohonan->status = 'survey';
|
||||
$permohonan->save();
|
||||
|
||||
// Berikan respons JSON
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'message' => 'Status permohonan berhasil diubah menjadi "survey".',
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
// Tangani error
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => $e->getMessage(),
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class Penilaian extends Model
|
||||
protected $fillable = [
|
||||
'jenis_penilaian_id', 'penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi',
|
||||
'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_at',
|
||||
'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by','waktu_penilaian', 'deskripsi_penilaian'
|
||||
'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by','waktu_penilaian', 'deskripsi_penilaian', 'reschedule_date','reschedule_note','rejected_note'
|
||||
];
|
||||
|
||||
public function jenis_penilaian()
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('penilaian', function (Blueprint $table) {
|
||||
$table->datetime('reschedule_date')->nullable()->after('waktu_penilaian');
|
||||
$table->text('reschedule_note')->nullable()->after('reschedule_date');
|
||||
$table->text('rejected_note')->nullable()->after('reschedule_note');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('penilaian', function (Blueprint $table) {
|
||||
$table->dropColumn(['reschedule_date', 'reschedule_note', 'rejected_note']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -8,11 +8,13 @@
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
@php
|
||||
$senior_officer = null;
|
||||
$jenisJaminan = null;
|
||||
if ($permohonan->debiture && $permohonan->documents) {
|
||||
foreach ($permohonan->documents as $dokumen) {
|
||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||
$teams = $permohonan->region->teams;
|
||||
|
||||
$jenisJaminan = $dokumen->jenisJaminan->name;
|
||||
if ($teams) {
|
||||
foreach ($teams as $team) {
|
||||
$team_users = $team->teamsUsers;
|
||||
@@ -36,7 +38,7 @@
|
||||
<form id="formInspeksi" method="POST" enctype="multipart/form-data" class="grid gap-5">
|
||||
@csrf
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $permohonan->nomor_registrasi ?? '' }}">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id ?? "" }}">
|
||||
<input type="hidden" name="permohonan_id" value="{{ $permohonan->id ?? '' }}">
|
||||
<input type="hidden" name="dokument_id" value="{{ request('documentId') }}">
|
||||
<input type="hidden" name="action" value="callReport">
|
||||
<input type="hidden" name="type" value="callReport">
|
||||
@@ -62,7 +64,7 @@
|
||||
<label class="form-label max-w-56">Dari</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
||||
value="{{ $callReport['dari'] ?? '' }}">
|
||||
value="{{ $callReport['dari'] ?? $permohonan->branch->name ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
@@ -92,10 +94,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md ">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Menindak lanjuti permintaan <b>
|
||||
{{$permohonan->tujuanPenilaian->name ?? ''}}</b>, BAG CABang <b>{{ $permohonan->branch->name }}</b>
|
||||
{{ $permohonan->tujuanPenilaian->name ?? '' }}</b>, BAG CABang
|
||||
<b>{{ $permohonan->branch->name }}</b>
|
||||
disampaikan hal sebagai berikut:
|
||||
</h1>
|
||||
</div>
|
||||
@@ -105,72 +110,47 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<div class="grid gap-2.5 w-full">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="lokasi" class="form-label max-w-56">Nama Debitur</label>
|
||||
<label for="nama_debiture" class="form-label max-w-56">Nama Debitur</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="lokasi" name="lokasi" class="input w-full"
|
||||
placeholder="Masukkan Jl."
|
||||
value="{{ $memo->lokasi->lokasi ?? old('lokasi') }}">
|
||||
<input type="text" id="nama_debiture" name="nama_debiture" class="input w-full"
|
||||
placeholder="Nama Debiture"
|
||||
value="{{ $permohonan->debiture->name ?? old('nama_debiture') }}" @readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">KJPP</label>
|
||||
<label for="kjjp" class="form-label max-w-56">KJPP</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||
<input type="text" id="kjjp" name="kjjp" class="input w-full"
|
||||
placeholder="Masukkan kjjp"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Jenis Aset</label>
|
||||
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
|
||||
<option value="">Select Jenis asset</option>
|
||||
@isset($basicData['jenisJaminan'] )
|
||||
@foreach ($basicData['jenisJaminan'] as $item)
|
||||
<option value="{{ $item->name }}"
|
||||
{{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
|
||||
{{ $item->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endisset
|
||||
</select>
|
||||
<input type="text" id="jenis_asset" name="jenis_asset" class="input w-full"
|
||||
placeholder="Masukkan jenis_asset" value="{{ $jenisJaminan ?? old('jenis_asset') }}"
|
||||
@readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Lokasi Objek Penilaian</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Dokumen </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Tanggal Penilaian </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
<input type="date" id="tanggal_penilaian" name="tanggal_penilaian" class="input w-full"
|
||||
placeholder="Masukkan Tanggal Penilai"
|
||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Lelang ke </label>
|
||||
<label for="Lelang" class="form-label max-w-56">Lelang ke </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
<input type="text" id="lelang" name="lelang" class="input w-full"
|
||||
placeholder="Masukkan Lelang"
|
||||
value="{{ $memo->lokasi->penilai ?? old('penilai') }}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,16 +158,14 @@
|
||||
<label for="penilai" class="form-label max-w-56">Nilai Pasar Wajar (NPW)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="likuidasi" name="likuidasi" class="input w-full"
|
||||
placeholder="Masukkan likuidasi"
|
||||
value="{{ old('likuidasi') }}">
|
||||
placeholder="Masukkan likuidasi" value="{{ old('likuidasi') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="penilai" class="form-label max-w-56">Nilai Likuidasi (NL)</label>
|
||||
<label for="likuidasi_nilai_1" class="form-label max-w-56">Nilai Likuidasi (NL)</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
value="">
|
||||
<input type="text" id="likuidasi_nilai_1" name="likuidasi_nilai_1" class="input w-full"
|
||||
placeholder="Masukkan likuidasi_nilai_1" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -202,7 +180,8 @@
|
||||
|
||||
<div class="card border border-agi-100 w-full bg-white rounded-lg shadow-md ">
|
||||
<div class="card-header bg-agi-50">
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Penilaian ke lokasi objek telah dilakukan oleh :
|
||||
<h1 class="text-md font-medium text-gray-900 uppercase">Penilaian ke lokasi objek telah dilakukan oleh
|
||||
:
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -215,7 +194,7 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="staf" name="staf" class="input w-full"
|
||||
placeholder="Masukkan Nama Staff"
|
||||
value="{{ $penilai->userPenilaiTeam->name ?? "" }}" @readonly(true)>
|
||||
value="{{ $penilai->userPenilaiTeam->name ?? '' }}" @readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -224,24 +203,25 @@
|
||||
<label for="penilai" class="form-label max-w-56">Pihak KJPP</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="penilai" name="pihak_kjjpp" class="input w-full"
|
||||
placeholder="Masukkan Pihak KJPP"
|
||||
value="">
|
||||
value="{{$forminspeksi['signature']['kjjp']['name'] ?? ''}}" @readonly(true) placeholder="Masukkan Nama KJPP">
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="pihak_bag" class="form-label max-w-56">Pihak BAGI Cab </label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
|
||||
<input type="text" id="pihak_bag" name="pihak_bag" class="input w-full"
|
||||
placeholder="Masukkan Pihak Bag"
|
||||
value="{{ $permohonan->user->name ?? '' }}" @readonly(true)>
|
||||
placeholder="Masukkan Pihak Bag" value="{{ $permohonan->user->name ?? '' }} || {{ $permohonan->branch->name }}"
|
||||
@readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||
<label for="debitur_perwakilan" class="form-label max-w-56">Debitur/perwakilan debitur </label>
|
||||
<label for="debitur_perwakilan" class="form-label max-w-56">Debitur/perwakilan debitur
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan" class="input w-full"
|
||||
placeholder="Masukkan Penilai"
|
||||
<input type="text" id="debitur_perwakilan" name="debitur_perwakilan"
|
||||
class="input w-full" placeholder="Masukkan Penilai"
|
||||
value="{{ $permohonan->debiture->name ?? '' }}" @readonly(true)>
|
||||
</div>
|
||||
</div>
|
||||
@@ -274,7 +254,8 @@
|
||||
@else
|
||||
<div class="fakta_positif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_positif[]" rows="3">{{ old('fakta_positif.0', '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -302,7 +283,8 @@
|
||||
@else
|
||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||
<textarea class="textarea mt-2" name="fakta_negatif[]" rows="3">{{ old('fakta_negatif.0', $callReport['fakta']['fakta_negatif'][0] ?? '') }}</textarea>
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button" style="display: none;">
|
||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||
style="display: none;">
|
||||
<i class="ki-outline ki-trash"></i>
|
||||
</button>
|
||||
<em id="error-fakta_negatif" class="alert text-danger text-sm"></em>
|
||||
|
||||
@@ -204,8 +204,15 @@
|
||||
render: (item, data) => {
|
||||
let actionHtml = `<div class="flex flex-nowrap justify-end gap-1.5">`;
|
||||
|
||||
if (data.status === 'proses-survey' || data.status == 'rejected-reschedule') {
|
||||
actionHtml += `
|
||||
<a onclick="surveyorRescheduleJadwalSurvey(${data.id},${data.penilaian.id},'${data.nomor_registrasi}', '${data.debiture.name}', '${data.penilaian.waktu_penilaian}', '${data.penilaian.rejected_note}')" class="delete btn btn-sm btn-outline btn-light" title="Reschedule Jadwal Survey">
|
||||
<i class="ki-filled ki-calendar-remove"></i>
|
||||
</a>`;
|
||||
}
|
||||
|
||||
if (data && data.penilaian && data.penilaian.waktu_penilaian !== null && data.status !==
|
||||
'done' && data.penilaian.authorized_status == null) {
|
||||
'done' && data.penilaian.authorized_status == null || data.status === 'approved-reschedule') {
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-outline btn-primary" href="javascript:void(0)" onclick="surveyorApproveKunjungan(${data.id},${data.penilaian.id},'${data.nomor_registrasi}', '${data.debiture.name}', '${data.penilaian.waktu_penilaian}')" title="Approve Jadwal Kunjungan No Reg ${data.nomor_registrasi}" >
|
||||
<i class="ki-filled ki-calendar-edit"></i>
|
||||
@@ -230,7 +237,10 @@
|
||||
<a onclick="deleteData(${data.id}, '${data.nomor_registrasi}','${data.debiture.name}')" class="delete btn btn-sm btn-outline btn-danger" title="Batalkan Permohonan">
|
||||
<i class="ki-outline ki-cross-square"></i>
|
||||
</a>`;
|
||||
|
||||
}
|
||||
|
||||
|
||||
actionHtml += `</div>`;
|
||||
|
||||
return actionHtml;
|
||||
@@ -263,7 +273,7 @@
|
||||
//define variable
|
||||
// $id ==> penilaian.id
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = "{{ URL::to('/surveyor/storeAproved') }}" + "/" + idPenilaian;
|
||||
let useURL = "{{ URL::to('/permohonan/store-approved') }}" + "/" + idPenilaian;
|
||||
|
||||
var input_data = new Object();
|
||||
input_data._token = token;
|
||||
@@ -300,6 +310,95 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
function surveyorRescheduleJadwalSurvey(permohonanId, idPenilaian, noReg, debitur, waktuPenilaian, rejectedNote) {
|
||||
Swal.fire({
|
||||
title: 'Reschedule Jadwal Kunjungan',
|
||||
html: `
|
||||
<div class="text-left space-y-4">
|
||||
|
||||
<p class="text-gray-700">
|
||||
Yakin akan Reschedule Jadwal Kunjungan
|
||||
<span class="font-semibold text-blue-600">${noReg}</span>
|
||||
untuk Debitur
|
||||
<span class="font-semibold text-blue-600">${debitur}</span>
|
||||
pada waktu
|
||||
<span class="font-semibold">${window.formatTanggalWaktuIndonesia(waktuPenilaian)}</span>?
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<label for="reschedule_date" class="block text-sm font-medium text-gray-700 mb-1">Tanggal Baru</label>
|
||||
<input type="datetime-local" id="reschedule_date"
|
||||
class="block w-full px-4 py-2 border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="reschedule_note" class="block text-sm font-medium text-gray-700 mb-1">Catatan</label>
|
||||
<textarea id="reschedule_note"
|
||||
class="block w-full px-4 py-2 border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"
|
||||
placeholder="Masukkan alasan reschedule..."></textarea>
|
||||
</div>
|
||||
|
||||
${rejectedNote ? `
|
||||
<p class="text-gray-700"><strong>Catatan Reject:</strong> ${rejectedNote}</p>
|
||||
` : ''}
|
||||
</div>
|
||||
`,
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Reschedule',
|
||||
preConfirm: () => {
|
||||
const rescheduleDate = document.getElementById('reschedule_date').value;
|
||||
const rescheduleNote = document.getElementById('reschedule_note').value;
|
||||
|
||||
if (!rescheduleDate || !rescheduleNote) {
|
||||
Swal.showValidationMessage('Semua inputan wajib diisi!');
|
||||
return false;
|
||||
}
|
||||
|
||||
return { rescheduleDate, rescheduleNote };
|
||||
}
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
const { rescheduleDate, rescheduleNote } = result.value;
|
||||
|
||||
// Data to send
|
||||
const data = {
|
||||
_token: "{{ csrf_token() }}",
|
||||
penilaian_id: idPenilaian,
|
||||
nomor_registrasi: noReg,
|
||||
permohonan_id: permohonanId,
|
||||
reschedule_date: rescheduleDate,
|
||||
reschedule_note: rescheduleNote
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: `{{ URL::to('/permohonan/store-reschedule-survey') }}/${idPenilaian}`,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
if (response.status === 'success') {
|
||||
Swal.fire('Sukses Reschedule!', response.message, 'success').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
Swal.fire('Error!', response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(response) {
|
||||
const errorMessage = response.responseJSON?.message || 'Terjadi kesalahan saat memproses data.';
|
||||
Swal.fire('Error!', errorMessage, 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// window.formatTanggalIndonesia(date)
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
$luas_bangunan = 'N/A';
|
||||
if ($item->detail) {
|
||||
foreach ($item->detail as $luas) {
|
||||
if (isset($luas->name) && $luas->name === 'IMB') {
|
||||
if (isset($luas->name) && $luas->jenis_legalitas_jaminan_id === 10) {
|
||||
$details = json_decode($luas->details, true);
|
||||
$luas_bangunan = isset($details['luas_bangunan']) ? $details['luas_bangunan'] : 'N/A';
|
||||
break;
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
<label for="city" class="form-label max-w-56">Kabupaten/Kota</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="text" id="city" class="input w-full cursor-not-allowed" readonly
|
||||
value="{{ isset($permohonan->debiture->city) ? $permohonan->debiture->city->name : '' }}">
|
||||
value="{{ isset($permohonan->debiture->city) ? strtolower($permohonan->debiture->city->name) : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="district_code"
|
||||
@@ -559,9 +559,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
function loadCities() {
|
||||
const citySelect = document.getElementById("city_code");
|
||||
|
||||
if (citySelect) {
|
||||
// Hapus semua opsi sebelumnya
|
||||
citySelect.innerHTML = '<option value="">Pilih Kota/Kabupaten</option>';
|
||||
|
||||
cities.forEach((city) => {
|
||||
// Ubah nama kota menjadi lowercase
|
||||
const cityNameLowercase = city.name.toLowerCase();
|
||||
|
||||
// Tambahkan opsi ke dropdown
|
||||
const option = document.createElement("option");
|
||||
option.value = city.code;
|
||||
option.textContent = cityNameLowercase; // Nama dalam lowercase
|
||||
citySelect.appendChild(option);
|
||||
});
|
||||
} else {
|
||||
console.error("Element with ID 'city_code' not found.");
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
loadSavedLocationData();
|
||||
loadCities();
|
||||
});
|
||||
// Fungsi untuk memuat data lokasi yang tersimpan
|
||||
|
||||
</script>
|
||||
@include('lpj::surveyor.js.utils')
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
}
|
||||
@endphp
|
||||
|
||||
<img id="foto_tempat-preview" src="{{ $fotoSrc ?: asset('images/default-placeholder.png') }}"
|
||||
<img id="foto_tempat-preview" src="{{ $fotoSrc ?: '' }}"
|
||||
alt="Foto Tempat" class="mt-2 max-w-full h-auto"
|
||||
style="max-width: 30rem; {{ $fotoSrc ? '' : 'display: none;' }}">
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Jarak ke CBD Point</label>
|
||||
<input type="text" class="input mt-2" name="jarak_cbd_point" placeholder="Km"
|
||||
<input type="text" class="input mt-2" name="jarak_cbd_point" placeholder="Masukkan Jarak ke CBD Point"
|
||||
value="{{ old('jarak_cbd_point', isset($forminspeksi['lingkungan']['jarak_cbd_point']) ? $forminspeksi['lingkungan']['jarak_cbd_point'] : '') }}">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-gray-700">Nama CBD Point</label>
|
||||
<input type="text" class="input mt-2" name="nama_cbd_point" placeholder="Km"
|
||||
<input type="text" class="input mt-2" name="nama_cbd_point" placeholder="Masukkan Nama CBD Point"
|
||||
value="{{ old('nama_cbd_point', isset($forminspeksi['lingkungan']['nama_cbd_point']) ? $forminspeksi['lingkungan']['nama_cbd_point'] : '') }}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,7 +40,7 @@
|
||||
$forminspeksi['lingkungan']['lebar_perkerasan_jalan'] ?? '',
|
||||
);
|
||||
@endphp
|
||||
<input type="text" name="lebar_perkerasan_jalan" class="input mt-2" placeholder="Meter"
|
||||
<input type="text" name="lebar_perkerasan_jalan" class="input mt-2" placeholder="Masukkan Lebar Perkerasan Jalan"
|
||||
value="{{ $lebarPerkerasanJalan }}">
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
$luas_tanah = 'N/A';
|
||||
if ($item->detail) {
|
||||
foreach ($item->detail as $luas) {
|
||||
if (isset($luas->name) && $luas->name === 'Sertifikat') {
|
||||
if (isset($luas->name) && $luas->jenis_legalitas_jaminan_id === 1) {
|
||||
$details = json_decode($luas->details, true);
|
||||
$luas_tanah = isset($details['luas_tanah']) ? $details['luas_tanah'] : 'N/A';
|
||||
break;
|
||||
@@ -191,7 +191,7 @@
|
||||
@elseif (strcasecmp($item->name, 'Lebih Rendah') == 0)
|
||||
<input id="input-lebih-rendah" type="text"
|
||||
style="{{ isset($forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah']) && $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ? '' : 'display: none;' }}"
|
||||
name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m2"
|
||||
name="ketinggian_lebih_rendah" class="input w-full mt-2" placeholder="m"
|
||||
value="{{ old('ketinggian_lebih_rendah', $forminspeksi['tanah']['ketinggian_tanah']['lebih_rendah'] ?? '') }}"/>
|
||||
@endif
|
||||
|
||||
@@ -217,6 +217,11 @@
|
||||
{{ old('kontur_jalan', isset($forminspeksi['tanah']['kontur_jalan']) ? $forminspeksi['tanah']['kontur_jalan'] : '') == 'rata' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Rata</span>
|
||||
</label>
|
||||
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||
<input type="radio" class="radio" name="kontur_jalan" value="Menanjak"
|
||||
{{ old('kontur_jalan', isset($forminspeksi['tanah']['kontur_jalan']) ? $forminspeksi['tanah']['kontur_jalan'] : '') == 'Menanjak' ? 'checked' : '' }}>
|
||||
<span class="ml-2">Menanjak</span>
|
||||
</label>
|
||||
</div>
|
||||
<em id="error-kontur_jalan" class="alert text-danger text-sm"></em>
|
||||
</div>
|
||||
|
||||
@@ -199,6 +199,149 @@
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function approveReschedule(penilaianId,permohonanId, noReg, debitur, reschedule_date, reschedule_note) {
|
||||
Swal.fire({
|
||||
title: 'Konfirmasi',
|
||||
html: `
|
||||
<p>Yakin akan Menyetujui atau Menolak Reschedule Jadwal Kunjungan <b>${noReg}</b> untuk Debitur <b>${debitur}</b>
|
||||
pada waktu <b>${window.formatTanggalWaktuIndonesia(reschedule_date)}</b>?</p>
|
||||
<p><b>Catatan: </b> <br/>${reschedule_note}</p>
|
||||
`,
|
||||
icon: 'warning',
|
||||
showDenyButton: true,
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
denyButtonColor: '#d33',
|
||||
confirmButtonText: 'Approve',
|
||||
denyButtonText: 'Reject'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// Approve action
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = "{{ URL::to('/surveyor/store-approve-reschedule') }}" + "/" + penilaianId;
|
||||
|
||||
var input_data = {
|
||||
_token : token,
|
||||
permohonan_id : permohonanId,
|
||||
nomor_registrasi: noReg
|
||||
}
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if ('success' == response.status) {
|
||||
Swal.fire('Sukses!', response.message, 'success').then(() => {
|
||||
location.reload(true);
|
||||
});
|
||||
} else {
|
||||
Swal.fire('Error!', response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(response, textStatus, errorThrown) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
} else if (result.isDenied) {
|
||||
// Reject action
|
||||
Swal.fire({
|
||||
title: 'Masukkan Keterangan',
|
||||
input: 'textarea',
|
||||
inputPlaceholder: 'Tuliskan alasan penolakan di sini...',
|
||||
inputAttributes: {
|
||||
'aria-label': 'Tuliskan alasan penolakan di sini'
|
||||
},
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Submit',
|
||||
cancelButtonText: 'Batal'
|
||||
}).then((rejectResult) => {
|
||||
if (rejectResult.isConfirmed && rejectResult.value) {
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = "{{ URL::to('/surveyor/store-rejected-reschedule') }}" + "/" + penilaianId;
|
||||
|
||||
|
||||
var input_data = {
|
||||
_token : token,
|
||||
permohonan_id : permohonanId,
|
||||
nomor_registrasi: noReg,
|
||||
rejected_note : rejectResult.value
|
||||
}
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if ('success' == response.status) {
|
||||
Swal.fire('Ditolak!', response.message, 'success').then(() => {
|
||||
location.reload(true);
|
||||
});
|
||||
} else {
|
||||
Swal.fire('Error!', response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(response, textStatus, errorThrown) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
} else if (rejectResult.dismiss === Swal.DismissReason.cancel) {
|
||||
Swal.fire('Dibatalkan', 'Aksi penolakan dibatalkan.', 'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function prosesSurvey(permohonanId, nomor_registrasi) {
|
||||
Swal.fire({
|
||||
title: 'Konfirmasi',
|
||||
text: `Yakin akan Melakukan Inspeksi dengan nomor registrasi ${nomor_registrasi}?`,
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Setujui',
|
||||
cancelButtonText: 'Batal',
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// Mendefinisikan URL dan data
|
||||
let token = "{{ csrf_token() }}";
|
||||
let useURL = `{{ URL::to('/surveyor/store-proses-survey') }}/${permohonanId}`;
|
||||
|
||||
let input_data = {
|
||||
_token: token,
|
||||
permohonan_id: permohonanId
|
||||
};
|
||||
|
||||
// Melakukan AJAX request
|
||||
$.ajax({
|
||||
url: useURL,
|
||||
type: "PUT",
|
||||
cache: false,
|
||||
data: input_data,
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
if (response.status === 'success') {
|
||||
// Arahkan langsung ke halaman inspeksi
|
||||
window.location.href = `surveyor/${permohonanId}/show?form=inspeksi`;
|
||||
} else {
|
||||
Swal.fire('Error!', response.message, 'error');
|
||||
}
|
||||
},
|
||||
error: function(response) {
|
||||
const errorMessage = response.responseJSON?.message || 'Terjadi kesalahan saat memproses data.';
|
||||
Swal.fire('Error!', errorMessage, 'error');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -257,10 +400,19 @@
|
||||
title: 'Action',
|
||||
render: (item, data) => {
|
||||
let actionHtml = '';
|
||||
// if (data.documents.length > 0) {
|
||||
|
||||
if (data.status === 'request-reschedule') {
|
||||
actionHtml += `
|
||||
<button class="btn btn-sm btn-icon btn-clear btn-success"
|
||||
onclick="approveReschedule('${data.penilaian.id}','${data.id}', '${data.nomor_registrasi}', '${data.debiture?.name}', '${data.penilaian.reschedule_date}', '${data.penilaian.reschedule_note}')"
|
||||
title="Approve Reschedule">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
</button>
|
||||
`;
|
||||
} else {
|
||||
if (data.penilaian.waktu_penilaian == null ||
|
||||
(data.penilaian.waktu_penilaian && data.penilaian.authorized_status == null)) {
|
||||
// Tombol Buat Jadwal Kunjungan
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-primary"
|
||||
data-modal-toggle="#modal_jadwal"
|
||||
@@ -269,8 +421,27 @@
|
||||
<i class="ki-filled ki-calendar-edit"></i>
|
||||
</a>
|
||||
`;
|
||||
} else {
|
||||
|
||||
if (data.penilaian.waktu_penilaian && data.penilaian.authorized_status == null) {
|
||||
// Tambahkan elemen berdampingan
|
||||
actionHtml += `
|
||||
<span class="badge badge-xs badge-outline badge-warning text-4xs">Menunggu Pemohon</span>
|
||||
`;
|
||||
}
|
||||
} else if (data.status === 'approved-reschedule' || data.status === 'rejected-reschedule') {
|
||||
actionHtml += `
|
||||
<span class="badge badge-xs badge-outline badge-warning text-4xs">Menunggu Pemohon</span>
|
||||
`;
|
||||
} else if(data.status === 'proses-survey'){
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-clarity"
|
||||
onclick="prosesSurvey(${data.id}, '${data.nomor_registrasi}')"
|
||||
title="Masuk Form Inspeksi">
|
||||
<i class="ki-filled ki-tablet-ok"></i>
|
||||
</a>
|
||||
`;
|
||||
}else {
|
||||
// Tombol Lihat Form Inspeksi dan Freeze Survey
|
||||
actionHtml += `
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning"
|
||||
href="surveyor/${data.id}/show?form=inspeksi"
|
||||
@@ -285,15 +456,12 @@
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
// } else {
|
||||
|
||||
// actionHtml =
|
||||
// `<span class="badge badge-sm badge-danger uppercase flex justify-center">Lengkapi Aset Jaminan</span>`;
|
||||
// }
|
||||
}
|
||||
|
||||
return actionHtml;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -382,6 +382,8 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::get('datatables', [PermohonanController::class, 'dataForDatatables'])->name('datatables');
|
||||
Route::get('export', [PermohonanController::class, 'export'])->name('export');
|
||||
Route::get('print/{id}', [PermohonanController::class, 'print'])->name('print');
|
||||
Route::put('store-approved/{id}', [PermohonanController::class, 'storeAproved'])->name('storeAproved');
|
||||
Route::put('store-reschedule-survey/{id}', [PermohonanController::class, 'storeRescheduleSurvey'])->name('storeRescheduleSurvey');
|
||||
});
|
||||
|
||||
Route::get('authorization', [PermohonanController::class, 'authorization'])->name('authorization.index');
|
||||
@@ -551,7 +553,7 @@ Route::middleware(['auth'])->group(function () {
|
||||
Route::post('store', [SurveyorController::class, 'store'])->name('store');
|
||||
Route::post('storeDenah', [SurveyorController::class, 'storeDenah'])->name('storeDenah');
|
||||
Route::put('storeJadwal', [SurveyorController::class, 'storeJadwal'])->name('storeJadwal');
|
||||
Route::put('storeAproved/{storeAproved}', [SurveyorController::class, 'storeAproved'])->name('storeAproved');
|
||||
|
||||
Route::post('storeFreeze/{id}', [SurveyorController::class, 'storeFreeze'])->name('storeFreeze');
|
||||
Route::post('storeFoto', [SurveyorController::class, 'storeFoto'])->name('storeFoto');
|
||||
Route::put('updateFoto', [SurveyorController::class, 'updateFoto'])->name('updateFoto');
|
||||
@@ -577,6 +579,11 @@ Route::middleware(['auth'])->group(function () {
|
||||
|
||||
Route::get('/print-out-inspeksi/{permohonan_id}/{dokument_id}/{jenis_jaminan_id}', [SurveyorController::class, 'print_out_inspeksi'])->name('print_out_inspeksi');
|
||||
|
||||
// resedule
|
||||
Route::put('store-approve-reschedule/{id}', [SurveyorController::class, 'approveReschedule'])->name('approveReschedule');
|
||||
Route::put('store-rejected-reschedule/{id}', [SurveyorController::class, 'rejectReschedule'])->name('rejectReschedule');
|
||||
Route::put('store-proses-survey/{id}', [SurveyorController::class, 'storeProsesSurvey'])->name('storeProsesSurvey');
|
||||
|
||||
});
|
||||
|
||||
Route::name('penilai.')->prefix('penilai')->group(function () {
|
||||
|
||||
Reference in New Issue
Block a user