Merge remote-tracking branch 'origin/feature/senior-officer' into staging
This commit is contained in:
@@ -30,10 +30,11 @@ class PenilaianController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
|
||||
public function store(PenilaianRequest $request)
|
||||
{
|
||||
//print_r($request->all());exit;
|
||||
$validatedData = $request->validated();
|
||||
|
||||
if ($validatedData) {
|
||||
try {
|
||||
$penilaian = Penilaian::create($validatedData);
|
||||
@@ -98,12 +99,28 @@ class PenilaianController extends Controller
|
||||
],
|
||||
)->findOrFail($id);
|
||||
|
||||
$jenisPenilaian = JenisPenilaian::all();
|
||||
$teamPenilai = Teams::with(['regions', 'teamsUsers'])->get();
|
||||
$idPenilaian = $permohonan->jenis_penilaian_id;
|
||||
$idRegion = $permohonan->region_id;
|
||||
|
||||
$jenisPenilaian = JenisPenilaian::find($idPenilaian);
|
||||
|
||||
|
||||
$teamPenilai = Teams::with(['regions', 'teamsUsers', 'teamsUsers.user', ])
|
||||
->whereHas('regions', function ($q) use ($idRegion) {
|
||||
$q->where('id', $idRegion);
|
||||
})->get();
|
||||
|
||||
|
||||
$regionName = null;
|
||||
foreach ($teamPenilai as $item) {
|
||||
$regionName = $item->regions;
|
||||
}
|
||||
|
||||
// dd($teamPenilai);
|
||||
|
||||
$penilaian = Penilaian::where('nomor_registrasi', $permohonan->nomor_registrasi)->first();
|
||||
|
||||
return view('lpj::penilaian.form', compact('permohonan', 'teamPenilai', 'jenisPenilaian', 'penilaian'));
|
||||
return view('lpj::penilaian.form', compact('permohonan', 'teamPenilai', 'jenisPenilaian', 'penilaian', 'regionName'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,15 +145,13 @@ class PenilaianController extends Controller
|
||||
'status' => 'revisi',
|
||||
];
|
||||
|
||||
// dump($dataToUpdate);
|
||||
|
||||
$permohonan = Permohonan::where('nomor_registrasi', $nomor_registrasi)->first();
|
||||
|
||||
$permohonan->update($dataToUpdate);
|
||||
return redirect()->route('penilaian.index')->with('success', 'Penilaian berhasil direvisi');
|
||||
} catch (Exception $e) {
|
||||
dump($e->getMessage());
|
||||
// return redirect()->route('penilaian.index')->with('error', $e->getMessage());
|
||||
return redirect()->route('penilaian.index')->with('error', $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,7 +179,7 @@ class PenilaianController extends Controller
|
||||
});
|
||||
}
|
||||
|
||||
$query->whereRaw('LOWER(status) = ?', ['register']);
|
||||
$query->whereRaw('LOWER(status) = ?', ['registered']);
|
||||
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
@@ -205,20 +220,132 @@ class PenilaianController extends Controller
|
||||
|
||||
|
||||
|
||||
public function getUserTeams($id)
|
||||
{
|
||||
$teamsUser = TeamsUsers::where('teams_id', $id)->get();
|
||||
$userIds = $teamsUser->pluck('user_id');
|
||||
$users = User::whereIn('id', $userIds)
|
||||
->with('roles')
|
||||
->get();
|
||||
|
||||
|
||||
if ($users->isNotEmpty()) {
|
||||
return response()->json($users, 200);
|
||||
public function otorisator(Request $request){
|
||||
|
||||
$type = $request->route('type');
|
||||
$header = '';
|
||||
|
||||
switch ($type) {
|
||||
case 'pelaporan':
|
||||
$header = 'Pelaporan';
|
||||
break;
|
||||
case 'pembayaran':
|
||||
$header = 'Pembayaran';
|
||||
break;
|
||||
case 'pembatalan':
|
||||
$header = 'Pembatalan';
|
||||
break;
|
||||
case 'sla':
|
||||
$header = 'SLA';
|
||||
break;
|
||||
default:
|
||||
$header = 'Pelaporan';
|
||||
break;
|
||||
}
|
||||
|
||||
return response()->json([], 200);
|
||||
return view('lpj::penilaian.otorisator.index', compact('header'));
|
||||
}
|
||||
|
||||
public function show($id){
|
||||
|
||||
$permohonan = Permohonan::find($id);
|
||||
|
||||
return view('lpj::penilaian.otorisator.show', compact('permohonan'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function dataForAuthorization(Request $request, $otorisator)
|
||||
{
|
||||
|
||||
if (is_null($this->user) || !$this->user->can('debitur.view')) {
|
||||
// abort(403, 'Sorry! You are not allowed to view users.');
|
||||
}
|
||||
|
||||
|
||||
$status = '';
|
||||
|
||||
switch ($otorisator) {
|
||||
case 'Pelaporan':
|
||||
$status = 'proses paparan';
|
||||
break;
|
||||
case 'Pembayaran':
|
||||
$status = 'proses pembayaran';
|
||||
break;
|
||||
default:
|
||||
$status = '';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$query = Permohonan::query();
|
||||
|
||||
// Pencarian berdasarkan parameter search
|
||||
if ($request->has('search') && !empty($request->get('search'))) {
|
||||
$search = $request->get('search');
|
||||
$query->where(function ($q) use ($search) {
|
||||
$q->where('nomor_registrasi', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('user', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('debiture', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('tujuanPenilaian', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search . '%');
|
||||
$q->orWhere('status', 'LIKE', '%' . $search . '%');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (!empty($otorisator)) {
|
||||
$query->whereRaw('LOWER(status) = ?', [strtolower($status)]);
|
||||
}
|
||||
|
||||
// Sorting berdasarkan sortField dan sortOrder
|
||||
if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) {
|
||||
$order = $request->get('sortOrder');
|
||||
$column = $request->get('sortField');
|
||||
$query->orderBy($column, $order);
|
||||
}
|
||||
|
||||
// Hitung total records
|
||||
$totalRecords = $query->count();
|
||||
|
||||
// Pagination (default page size 10)
|
||||
$size = $request->get('size', 10);
|
||||
if ($size == 0) {
|
||||
$size = 10;
|
||||
}
|
||||
|
||||
if ($request->has('page') && $request->has('size')) {
|
||||
$page = $request->get('page', 1);
|
||||
$offset = ($page - 1) * $size;
|
||||
|
||||
$query->skip($offset)->take($size);
|
||||
}
|
||||
|
||||
// Filtered records
|
||||
$filteredRecords = $query->count();
|
||||
|
||||
// Ambil data dengan relasi
|
||||
$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get();
|
||||
|
||||
// Hitung jumlah halaman
|
||||
$pageCount = ceil($totalRecords / $size);
|
||||
|
||||
// Ambil current page
|
||||
$currentPage = max(1, $request->get('page', 1));
|
||||
|
||||
// Return JSON response
|
||||
return response()->json([
|
||||
'draw' => $request->get('draw'),
|
||||
'recordsTotal' => $totalRecords,
|
||||
'recordsFiltered' => $filteredRecords,
|
||||
'pageCount' => $pageCount,
|
||||
'page' => $currentPage,
|
||||
'totalCount' => $totalRecords,
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
56
module.json
56
module.json
@@ -131,6 +131,60 @@
|
||||
"so"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Otorisator",
|
||||
"path": "otorisator",
|
||||
"icon": "ki-filled ki-security-user text-lg",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"so"
|
||||
],
|
||||
"sub": [
|
||||
{
|
||||
"title": "Pelaporan",
|
||||
"path": "otorisator.pelaporan",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"so"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Pembayaran",
|
||||
"path": "otorisator.pembayaran",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"so"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Pembatalan",
|
||||
"path": "otorisator.pembatalan",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"so"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "SLA",
|
||||
"path": "otorisator.sla",
|
||||
"classes": "",
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"so"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
"title": "Activity",
|
||||
@@ -151,7 +205,7 @@
|
||||
"attributes": [],
|
||||
"permission": "",
|
||||
"roles": [
|
||||
"administrator","pemohon-ao","pemohon-eo","admin"
|
||||
"administrator","pemohon-ao","pemohon-eo","admin", "so"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Data Jaminan
|
||||
Laporan
|
||||
</h3>
|
||||
</div>
|
||||
<div data-accordion="true">
|
||||
@@ -283,21 +283,12 @@
|
||||
<input type="hidden" name="nomor_registrasi"
|
||||
value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('jenis_penilaian_id') border-danger bg-danger-light @enderror"
|
||||
name="jenis_penilaian_id" id="jenis_penilaian_id">
|
||||
<option value="">Jenis Penilaian</option>
|
||||
|
||||
@foreach ($jenisPenilaian as $item)
|
||||
@if (isset($penilaian->nomor_registrasi))
|
||||
<option value="{{ $item->id }}"
|
||||
{{ $penilaian->teams_id == $item->id ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@else
|
||||
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<input class="input"
|
||||
type="hidden" name="jenis_penilaian_id" value="{{ $jenisPenilaian->id }}"
|
||||
>
|
||||
<input class="input @error('jenis_penilaian_id') border-danger bg-danger-light @enderror"
|
||||
type="text" value="{{ $jenisPenilaian->name }}"
|
||||
readonly>
|
||||
@error('jenis_penilaian_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -309,20 +300,11 @@
|
||||
Tim Penilai yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('teams_id') border-danger bg-danger-light @enderror"
|
||||
name="teams_id" id="teams_id">
|
||||
<option value="">Pilih Tim Penilai</option>
|
||||
@foreach ($teamPenilai as $item)
|
||||
@if (isset($penilaian->nomor_registrasi))
|
||||
<option value="{{ $item->id }}"
|
||||
{{ $penilaian->teams_id == $item->id ? 'selected' : '' }}>
|
||||
{{ $item->regions->name }}</option>
|
||||
@else
|
||||
<option value="{{ $item->id }}">{{ $item->regions->name }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
<input class="input"
|
||||
type="hidden" name="teams_id" value="{{ $regionName->id }}"
|
||||
>
|
||||
<input class="input @error('teams_id') border-danger bg-danger-light @enderror"
|
||||
type="text" value="{{ $regionName->name }}" readonly>
|
||||
@error('teams_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -335,8 +317,11 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="surveyor_id" name="surveyor_id"
|
||||
class="select input @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
class="tomselect input @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Surveyor</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@error('surveyor_id')
|
||||
@@ -351,8 +336,11 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="penilaian_id" name="penilaian_id"
|
||||
class="input select @error('penilaian_id') border-danger bg-danger-light @enderror w-full">
|
||||
class="input tomselect @error('penilaian_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('penilaian_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@@ -366,8 +354,11 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="penilai_surveyor_id" name="penilai_surveyor_id"
|
||||
class="input select @error('penilai_surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
class="input tomselect @error('penilai_surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Surveyor dan Penilai</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('penilai_surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@@ -482,7 +473,7 @@
|
||||
</div>
|
||||
@endsection
|
||||
@push('scripts')
|
||||
<script>
|
||||
{{-- <script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let teamsSelect = document.getElementById('teams_id');
|
||||
let penilaiSelect = document.getElementById('penilaian_id');
|
||||
@@ -570,48 +561,48 @@
|
||||
fetchPenilai(selectedTeamId);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script> --}}
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const revisiForm = document.getElementById('revisiForm');
|
||||
const btnSubmit = document.getElementById('btnSubmit');
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const revisiForm = document.getElementById('revisiForm');
|
||||
const btnSubmit = document.getElementById('btnSubmit');
|
||||
|
||||
btnSubmit.addEventListener('click', function(event) {
|
||||
// Cegah form dari pengiriman default
|
||||
event.preventDefault();
|
||||
btnSubmit.addEventListener('click', function(event) {
|
||||
// Cegah form dari pengiriman default
|
||||
event.preventDefault();
|
||||
|
||||
// Ambil nilai dari input dan textarea
|
||||
const dokumenRevisi = document.getElementById('dokumen').value;
|
||||
const keteranganRevisi = document.getElementById('keterangan').value.trim();
|
||||
// Ambil nilai dari input dan textarea
|
||||
const dokumenRevisi = document.getElementById('dokumen').value;
|
||||
const keteranganRevisi = document.getElementById('keterangan').value.trim();
|
||||
|
||||
// Bersihkan pesan kesalahan sebelumnya
|
||||
document.querySelectorAll('.alert.text-danger').forEach(el => el.remove());
|
||||
// Bersihkan pesan kesalahan sebelumnya
|
||||
document.querySelectorAll('.alert.text-danger').forEach(el => el.remove());
|
||||
|
||||
// Validasi: jika ada field kosong, tampilkan pesan kesalahan
|
||||
let isValid = true;
|
||||
// Validasi: jika ada field kosong, tampilkan pesan kesalahan
|
||||
let isValid = true;
|
||||
|
||||
if (!dokumenRevisi) {
|
||||
const errorMessage = document.createElement('em');
|
||||
errorMessage.className = 'alert text-danger text-sm';
|
||||
errorMessage.innerText = 'Dokumen Revisi harus diisi.';
|
||||
document.getElementById('dokumen').parentElement.appendChild(errorMessage);
|
||||
isValid = false; // Set isValid ke false
|
||||
}
|
||||
if (!dokumenRevisi) {
|
||||
const errorMessage = document.createElement('em');
|
||||
errorMessage.className = 'alert text-danger text-sm';
|
||||
errorMessage.innerText = 'Dokumen Revisi harus diisi.';
|
||||
document.getElementById('dokumen').parentElement.appendChild(errorMessage);
|
||||
isValid = false; // Set isValid ke false
|
||||
}
|
||||
|
||||
if (!keteranganRevisi) {
|
||||
const errorMessage = document.createElement('em');
|
||||
errorMessage.className = 'alert text-danger text-sm';
|
||||
errorMessage.innerText = 'Catatan harus diisi.';
|
||||
document.getElementById('keterangan').parentElement.appendChild(errorMessage);
|
||||
isValid = false; // Set isValid ke false
|
||||
}
|
||||
if (!keteranganRevisi) {
|
||||
const errorMessage = document.createElement('em');
|
||||
errorMessage.className = 'alert text-danger text-sm';
|
||||
errorMessage.innerText = 'Catatan harus diisi.';
|
||||
document.getElementById('keterangan').parentElement.appendChild(errorMessage);
|
||||
isValid = false; // Set isValid ke false
|
||||
}
|
||||
|
||||
// Jika semua field valid, kirim form
|
||||
if (isValid) {
|
||||
revisiForm.submit();
|
||||
}
|
||||
// Jika semua field valid, kirim form
|
||||
if (isValid) {
|
||||
revisiForm.submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -7,13 +7,10 @@
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<div class="card-title flex flex-row gap-1.5">
|
||||
Daftar Penilaian
|
||||
</div>
|
||||
<div class=" card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="permohonan-table" data-api-url="{{ route('penilaian.datatables') }}">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<h3 class="card-title">
|
||||
{{-- Daftar {{}} --}}
|
||||
Daftar assignment
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
@@ -27,9 +24,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="permohonan-table" data-api-url="{{ route('penilaian.datatables') }}">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
|
||||
163
resources/views/penilaian/otorisator/index.blade.php
Normal file
163
resources/views/penilaian/otorisator/index.blade.php
Normal file
@@ -0,0 +1,163 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('penilaian') }}
|
||||
@endsection --}}
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card pb-2.5">
|
||||
<div class=" card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="permohonan-table" data-api-url="{{ route('otorisator.datatables', ['otorisator' => $header ]) }}">
|
||||
<div class="card-header py-5 flex-wrap">
|
||||
<h3 class="card-title">
|
||||
Daftar {{$header}}
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||
<input placeholder="Search Penilaian" id="search" type="text" value="">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('permohonan.export') }}"> Export to Excel </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm" data-datatable-table="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-14">
|
||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="tanggal_permohonan">
|
||||
<span class="sort"> <span class="sort-label"> Tanggal Permohonan </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="user_id">
|
||||
<span class="sort"> <span class="sort-label"> User Pemohon </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="branch_id">
|
||||
<span class="sort"> <span class="sort-label"> Cabang Pemohon </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="debitur_id">
|
||||
<span class="sort"> <span class="sort-label"> Debitur </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="tujuan_penilaian_id">
|
||||
<span class="sort"> <span class="sort-label"> Tujuan Penilaian </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="status">
|
||||
<span class="sort"> <span class="sort-label"> Status </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
||||
<div class="flex items-center gap-2">
|
||||
Show
|
||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<span data-datatable-info="true"> </span>
|
||||
<div class="pagination" data-datatable-pagination="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<script type="module">
|
||||
const element = document.querySelector('#permohonan-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
|
||||
const apiUrl = element.getAttribute('data-api-url');
|
||||
const dataTableOptions = {
|
||||
apiEndpoint: apiUrl,
|
||||
pageSize: 5,
|
||||
columns: {
|
||||
select: {
|
||||
render: (item, data, context) => {
|
||||
const checkbox = document.createElement('input');
|
||||
checkbox.className = 'checkbox checkbox-sm';
|
||||
checkbox.type = 'checkbox';
|
||||
checkbox.value = data.id.toString();
|
||||
checkbox.setAttribute('data-datatable-row-check', 'true');
|
||||
return checkbox.outerHTML.trim();
|
||||
},
|
||||
},
|
||||
nomor_registrasi: {
|
||||
title: 'Nomor Registrasi',
|
||||
},
|
||||
tanggal_permohonan: {
|
||||
title: 'Tanggal Permohonan'
|
||||
},
|
||||
user_id: {
|
||||
title: 'User Pemohon',
|
||||
render: (item, data) => {
|
||||
return `${data.user.name}`;
|
||||
},
|
||||
},
|
||||
branch_id: {
|
||||
title: 'Cabang Pemohon',
|
||||
render: (item, data) => {
|
||||
return `${data.branch.name}`;
|
||||
},
|
||||
},
|
||||
debitur_id: {
|
||||
title: 'Debitur',
|
||||
render: (item, data) => {
|
||||
return `${data.debiture.name}`;
|
||||
},
|
||||
},
|
||||
tujuan_penilaian_id: {
|
||||
title: 'Tujuan Penilaian',
|
||||
render: (item, data) => {
|
||||
return `${data.tujuan_penilaian.name}`;
|
||||
},
|
||||
},
|
||||
status: {
|
||||
title: 'Status'
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning " href="otorisator/show/${data.id}">
|
||||
<i class="ki-outline ki-eye"></i>
|
||||
</a>
|
||||
</div>`;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||
// Custom search functionality
|
||||
searchInput.addEventListener('input', function () {
|
||||
const searchValue = this.value.trim();
|
||||
dataTable.search(searchValue, true);
|
||||
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
173
resources/views/penilaian/otorisator/show.blade.php
Normal file
173
resources/views/penilaian/otorisator/show.blade.php
Normal file
@@ -0,0 +1,173 @@
|
||||
@extends('layouts.main')
|
||||
|
||||
{{-- @section('breadcrumbs')
|
||||
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||
@endsection --}}
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-header" id="advanced_settings_appearance">
|
||||
<h3 class="card-title">
|
||||
Data Permohonan
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Nomor Register Permohonan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $permohonan->nomor_registrasi }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Pemohon:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Tujan Permohonan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $permohonan->tujuanPenilaian->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Detail Debutur
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-table scrollable-x-auto pb-3">
|
||||
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
||||
<div class="col-span-1">
|
||||
<table class="table align-middle text-sm text-gray-500">
|
||||
<tr>
|
||||
<td class="py-2 text-gray-600 font-normal">
|
||||
Name
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->name ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3">
|
||||
Email
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->email ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3">
|
||||
Phone
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->phone ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="py-3 text-gray-600 font-normal">
|
||||
Address
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->address ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3 text-gray-600 font-normal">
|
||||
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-span-1">
|
||||
<table class="table align-middle text-sm text-gray-500">
|
||||
<tr>
|
||||
<td class="py-3 text-gray-600 font-normal">
|
||||
Cabang
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3 text-gray-600 font-normal">
|
||||
CIF
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->cif ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3 text-gray-600 font-normal">
|
||||
Nomor Rekening
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="py-3">
|
||||
NPWP
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->npwp ?? "" }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card min-w-full">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
Laporan
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
@csrf
|
||||
<div class="card-body lg:py-7.5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Catatan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea" rows="3" type="number" id="address" name="address"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer flex justify-end">
|
||||
<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">
|
||||
Revisi
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -445,3 +445,10 @@
|
||||
$trail->parent('registrasi');
|
||||
$trail->push('Detail Permohona');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Breadcrumbs::for('otorisator.pelaporan.index', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('otorisator');
|
||||
$trail->push('Otorisator', route('otorisator.pelaporan.index'));
|
||||
});
|
||||
|
||||
@@ -486,6 +486,20 @@ Route::middleware(['auth'])->group(function () {
|
||||
/**
|
||||
* Route end activity
|
||||
*/
|
||||
|
||||
|
||||
Route::name('otorisator.')->prefix('otorisator')->group(function () {
|
||||
Route::get('pelaporan', [PenilaianController::class, 'otorisator'])->name('pelaporan.index')->defaults('type', 'pelaporan');
|
||||
Route::get('pembayaran', [PenilaianController::class, 'otorisator'])->name('pembayaran.index')->defaults('type', 'pembayaran');
|
||||
Route::get('pembatalan', [PenilaianController::class, 'otorisator'])->name('pembatalan.index')->defaults('type', 'pembatalan');
|
||||
Route::get('sla', [PenilaianController::class, 'otorisator'])->name('sla.index')->defaults('type', 'sla');
|
||||
Route::get('/datatables/{otorisator}', [PenilaianController::class, 'dataForAuthorization'])->name('datatables');
|
||||
Route::get('show/{id}', [PenilaianController::class, 'show'])->name('show');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
require __DIR__ . '/registrasi.php';
|
||||
|
||||
Reference in New Issue
Block a user