diff --git a/app/Exports/LaporanUserLimitExport.php b/app/Exports/LaporanUserLimitExport.php new file mode 100644 index 0000000..eb2ac46 --- /dev/null +++ b/app/Exports/LaporanUserLimitExport.php @@ -0,0 +1,232 @@ +request = $request; + } + + public function collection() + { + $query = Permohonan::query(); + $query = $query->where('status', 'done'); + + // Apply date range filter if provided + if ($this->request->has('start_date') || $this->request->has('end_date')) { + $startDate = $this->request->start_date ?? '1900-01-01'; + $endDate = $this->request->end_date ?? now()->toDateString(); + + $query->where(function ($q) use ($startDate, $endDate) { + + $q->whereHas('penilaian', function ($q2) use ($startDate, $endDate) { + $q2->whereBetween('tanggal_kunjungan', [$startDate, $endDate]); + }); + + // OR check if has penawaran with date in range + $q->orWhereHas('penawaran', function ($q3) use ($startDate, $endDate) { + $q3->whereBetween('tanggal_penilaian_sebelumnya', [$startDate, $endDate]); + }); + }); + } + + // Apply branch filter if provided + if ($this->request->has('branch_id') && !empty($this->request->branch_id)) { + $query->where('branch_id', $this->request->branch_id); + } + + if ($this->request->has('penilai_id') && !empty($this->request->penilai_id)) { + $request = $this->request; // Store in a local variable + $query->whereHas('penilaian._user_penilai.userPenilaiTeam', function ($q) use ($request) { + $q->where('user_id', $request->penilai_id); + }); + } + + // Apply search filter if provided + if ($this->request->has('search') && !empty($this->request->search)) { + $search = $this->request->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('tujuanPenilaian', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('debiture', DB::raw('LOWER(name)'), 'LIKE', '%' . strtolower($search) . '%'); + + $q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('jenisFasilitasKredit', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhereRelation('jenisPenilaian', 'name', 'LIKE', '%' . $search . '%'); + $q->orWhere('status', 'LIKE', '%' . $search . '%'); + }); + } + + // Default ordering + $query->orderBy('nomor_registrasi', 'asc'); + + return $query->get(); + } + + protected $rowNumber = 0; + + public function map($permohonan): array + { + $this->rowNumber++; + $npw = 0; + + if (isset($permohonan->penilai->lpj)) { + $lpj = json_decode($permohonan->penilai->lpj, true); + $npw = str_replace('.', '', $lpj['total_nilai_pasar_wajar'] ?? 0); + } + + return [ + $this->rowNumber, + $permohonan->nomor_registrasi, + $permohonan->debiture->branch->name ?? '', + $permohonan->debiture->name ?? '', + $permohonan->user->name ?? $permohonan->mig_nama_ao ?? '', + $permohonan->tanggal_permohonan ?? '', + $permohonan->penilaian->_user_penilai->userPenilaiTeam->name ?? '', + $permohonan->penilaian && $permohonan->penilaian->tanggal_kunjungan + ? formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) + : '', + formatRupiah($npw, 2), + ]; + } + + public function headings(): array + { + return [ + 'No', + 'Nomor Registrasi', + 'Cabang', + 'Nama Debitur', + 'Pemohon', + 'Tanggal Permohonan', + 'Nama Penilai', + 'Tanggal Laporan', + 'Nilai Pasar Wajar', + + ]; + } + + /** + * @return string + */ + public function title(): string + { + return 'Laporan User Limit'; + } + + /** + * @return string + */ + public function startCell(): string + { + return 'A7'; + } + + /** + * @return array + */ + public function registerEvents(): array + { + return [ + AfterSheet::class => function (AfterSheet $event) { + // Get the sheet + $sheet = $event->sheet->getDelegate(); + + // Set the title + $sheet->setCellValue('A1', 'LAPORAN PENILAIAN JAMINAN'); + $sheet->getStyle('A1')->getFont()->setBold(true)->setSize(16); + + // Merge cells for title + $sheet->mergeCells('A1:AH1'); + $sheet->getStyle('A1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + + // Set the branch information if filtered + $branchInfo = ''; + if ($this->request->has('branch_id') && !empty($this->request->branch_id)) { + $branch = Branch::find($this->request->branch_id); + if ($branch) { + $branchInfo = 'Cabang: ' . $branch->name; + $sheet->setCellValue('A2', $branchInfo); + $sheet->mergeCells('A2:AH2'); + $sheet->getStyle('A2')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + $sheet->getStyle('A2')->getFont()->setBold(true); + } + } + + // Set the period + $startDate = $this->request->start_date ?? ''; + $endDate = $this->request->end_date ?? ''; + + $rowIndex = $branchInfo ? 3 : 2; + + if ($startDate && $endDate) { + $startDateFormatted = Carbon::parse($startDate)->format('d F Y'); + $endDateFormatted = Carbon::parse($endDate)->format('d F Y'); + $sheet->setCellValue('A' . $rowIndex, 'Periode: ' . $startDateFormatted . ' - ' . $endDateFormatted); + } else { + $sheet->setCellValue('A' . $rowIndex, 'Periode: Semua Data'); + } + $sheet->mergeCells('A' . $rowIndex . ':AH' . $rowIndex); + $sheet->getStyle('A' . $rowIndex)->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + + // Set the date of export + $rowIndex++; + $sheet->setCellValue('A' . $rowIndex, 'Tanggal Export: ' . Carbon::now()->format('d F Y H:i:s')); + + // Set the user who exported + $rowIndex++; + $userName = Auth::user() ? Auth::user()->name : 'System'; + $sheet->setCellValue('A' . $rowIndex, 'Diexport oleh: ' . $userName); + + // Add a blank line + $rowIndex++; + $sheet->setCellValue('A' . $rowIndex, ''); + + // Style the header row + $headerRange = 'A7:' . $sheet->getHighestColumn() . '7'; + $sheet->getStyle($headerRange)->getFont()->setBold(true); + $sheet->getStyle($headerRange)->getFill() + ->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID) + ->getStartColor()->setARGB('FFCCCCCC'); + + // Auto-size columns - fixed to handle columns beyond Z + $highestColumn = $sheet->getHighestColumn(); + $highestColumnIndex = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::columnIndexFromString($highestColumn); + + for ($i = 1; $i <= $highestColumnIndex; $i++) { + $currentColumn = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($i); + $sheet->getColumnDimension($currentColumn)->setAutoSize(true); + } + + // Add borders to all cells with data + $dataRange = 'A7:' . $sheet->getHighestColumn() . $sheet->getHighestRow(); + $sheet->getStyle($dataRange)->getBorders()->getAllBorders()->setBorderStyle(\PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN); + + // Center align the header row + $sheet->getStyle($headerRange)->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + + // Set text wrap for header cells + $sheet->getStyle($headerRange)->getAlignment()->setWrapText(true); + }, + ]; + } +} diff --git a/app/Http/Controllers/CategoryDaftarPustakaController.php b/app/Http/Controllers/CategoryDaftarPustakaController.php new file mode 100644 index 0000000..f1478e6 --- /dev/null +++ b/app/Http/Controllers/CategoryDaftarPustakaController.php @@ -0,0 +1,152 @@ +validated(); + if ($validated) { + try { + CategoryDaftarPustaka::create($validated); + return redirect()->route('category-daftar-pustaka.index')->with('success', 'Data Berhasil Disimpan'); + } catch (\Throwable $th) { + return redirect()->route('category-daftar-pustaka.index')->with('error', $th->getMessage()); + } + } + + } + + /** + * Show the specified resource. + */ + public function show($id) + { + $category = CategoryDaftarPustaka::where('id', $id)->first(); + return view('lpj::category-daftar-pustaka.show', compact('category')); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + return view('lpj::category-daftar-pustaka.create', ['category' => CategoryDaftarPustaka::where('id', $id)->first()]); + } + + /** + * Update the specified resource in storage. + */ + public function update(CategoryDaftarPustakaRequest $request, $id) + { + $validated = $request->validated(); + if ($validated) { + try { + CategoryDaftarPustaka::where('id', $id)->update($validated); + return redirect()->route('category-daftar-pustaka.index')->with('success', 'Data Berhasil Disimpan'); + } catch (\Throwable $th) { + return redirect()->route('category-daftar-pustaka.index')->with('error', $th->getMessage()); + } + } + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + try { + CategoryDaftarPustaka::where('id', $id)->delete(); + return response()->json(['success' => true, 'message' => 'Data Berhasil Dihapus']); + } catch (\Throwable $th) { + return response()->json(['success' => false, 'message' => $th->getMessage()]); + } + } + + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('jenis_aset.view')) { + //abort(403, 'Sorry! You are not allowed to view users.'); + } + + // Retrieve data from the database + $query = CategoryDaftarPustaka::query(); + + // Apply search filter if provided + if ($request->has('search') && !empty($request->get('search'))) { + $search = $request->get('search'); + $query->where(function ($q) use ($search) { + $q->where('code', 'LIKE', "%$search%"); + $q->orWhere('name', 'LIKE', "%$search%"); + }); + } + + // Apply sorting if provided + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + // Get the total count of records + $totalRecords = $query->count(); + + // Apply pagination if provided + if ($request->has('page') && $request->has('size')) { + $page = $request->get('page'); + $size = $request->get('size'); + $offset = ($page - 1) * $size; // Calculate the offset + + $query->skip($offset)->take($size); + } + + // Get the filtered count of records + $filteredRecords = $query->count(); + + // Get the data for the current page + $data = $query->get(); + + // Calculate the page count + $pageCount = ceil($totalRecords / $request->get('size')); + + // Calculate the current page number + $currentPage = 0 + 1; + + // Return the response data as a JSON object + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $currentPage, + 'totalCount' => $totalRecords, + 'data' => $data, + ]); + } +} diff --git a/app/Http/Controllers/DaftarPustakaController.php b/app/Http/Controllers/DaftarPustakaController.php new file mode 100644 index 0000000..2241607 --- /dev/null +++ b/app/Http/Controllers/DaftarPustakaController.php @@ -0,0 +1,129 @@ +daftarPustaka = app(DaftarPustakaService::class); + } + + /** + * Display a listing of the resource. + */ + public function index(Request $request) +{ + $categories = CategoryDaftarPustaka::all(); + $daftar_pustaka = $this->daftarPustaka->getAllDaftarPustaka($request); + + return view('lpj::daftar-pustaka.index', [ + 'categories' => $categories, + 'daftar_pustaka' => $daftar_pustaka, + 'page' => $daftar_pustaka->currentPage(), + 'pageCount' => $daftar_pustaka->lastPage(), + 'limit' => $daftar_pustaka->perPage(), + 'total' => $daftar_pustaka->total(), + ]); +} + + + /** + * Show the form for creating a new resource. + */ + public function create() + { + $categories = CategoryDaftarPustaka::all(); + // dd($categories); + return view('lpj::daftar-pustaka.create', compact('categories')); + } + + /** + * Store a newly created resource in storage. + */ + public function store(DaftarPustakaRequest $request) + { + + $validate = $request->validated(); + // dd($validate); + $file = $request->file('attachment'); + if ($validate) { + try { + // Save to database + $this->daftarPustaka->storeDaftarPustaka($validate, $file); + return redirect() + ->route('daftar-pustaka.index') + ->with('success', 'Daftar Pustaka created successfully'); + } catch (Exception $e) { + return redirect() + ->route('daftar-pustaka.create') + ->with('error', 'Failed to create daftar pustaka'); + } + } + + } + + /** + * Show the specified resource. + */ + public function show($id) + { + $daftarPustaka = $this->daftarPustaka->getDaftarPustakaById($id); + $categories = CategoryDaftarPustaka::all(); + + return view('lpj::daftar-pustaka.show', compact('daftarPustaka', 'categories')); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + $daftarPustaka = $this->daftarPustaka->getDaftarPustakaById($id); + $categories = CategoryDaftarPustaka::all(); + return view('lpj::daftar-pustaka.create', compact('daftarPustaka', 'categories')); + } + + /** + * Update the specified resource in storage. + */ + public function update(DaftarPustakaRequest $request, $id) + { + $validate = $request->validated(); + if ($validate) { + try { + // Save to database + $file = $request->file('attachment'); + $this->daftarPustaka->updateDaftarPustaka($validate, $file, $id); + return redirect() + ->route('daftar-pustaka.index') + ->with('success', 'Daftar Pustaka updated successfully'); + } catch (Exception $e) { + return redirect() + ->route('daftar-pustaka.create') + ->with('error', 'Failed to update daftar pustaka'); + } + } + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + try { + $this->daftarPustaka->deleteDaftarPustaka($id); + return response()->json(['success' => true, 'message' => 'Daftar Pustaka deleted successfully']); + } catch (Exception $e) { + return response()->json(['success' => false, 'message' => 'Failed to delete daftar pustaka']); + } + } +} diff --git a/app/Http/Controllers/LaporanUserController.php b/app/Http/Controllers/LaporanUserController.php index 7d48559..3d6801b 100644 --- a/app/Http/Controllers/LaporanUserController.php +++ b/app/Http/Controllers/LaporanUserController.php @@ -4,6 +4,8 @@ namespace Modules\Lpj\Http\Controllers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; + use Maatwebsite\Excel\Facades\Excel; +use Modules\Lpj\Exports\LaporanUserLimitExport; use Modules\Lpj\Services\LaporanUserService; class LaporanUserController extends Controller @@ -38,4 +40,12 @@ class LaporanUserController extends Controller return $this->laporanUserService->dataForDatatables($request); } + public function export(Request $request) + { + $startDate = $request->start_date; + $endDate = $request->end_date; + // name of the file + $fileName = 'laporan_user_limit' . $startDate . '_' . $endDate . '.xlsx'; + return Excel::download(new LaporanUserLimitExport($request), $fileName); + } } diff --git a/app/Http/Requests/CategoryDaftarPustakaRequest.php b/app/Http/Requests/CategoryDaftarPustakaRequest.php new file mode 100644 index 0000000..0907835 --- /dev/null +++ b/app/Http/Requests/CategoryDaftarPustakaRequest.php @@ -0,0 +1,33 @@ + 'required|max:255', + ]; + + if ($this->method() == 'PUT') { + $rules['code'] = 'required|max:50|unique:category_daftar_pustaka,code,' . $this->id; + } else { + $rules['code'] = 'required|max:50|unique:category_daftar_pustaka,code'; + } + return $rules; + } + + /** + * Determine if the user is authorized to make this request. + */ + public function authorize(): bool + { + return true; + } +} diff --git a/app/Http/Requests/DaftarPustakaRequest.php b/app/Http/Requests/DaftarPustakaRequest.php new file mode 100644 index 0000000..285da48 --- /dev/null +++ b/app/Http/Requests/DaftarPustakaRequest.php @@ -0,0 +1,38 @@ + 'required|max:255', + 'category_id' => 'required', + 'deskripsi' => 'nullable', + ]; + + if ($this->method() == 'PUT') { + $rules['attachment'] = 'nullable|mimes:pdf,jpg,jpeg,png,gif'; + } else { + $rules['attachment'] = 'required|mimes:pdf,jpg,jpeg,png,gif'; + } + + return $rules; + + } + + /** + * Determine if the user is authorized to make this request. + */ + public function authorize(): bool + { + return true; + } +} diff --git a/app/Models/CategoryDaftarPustaka.php b/app/Models/CategoryDaftarPustaka.php new file mode 100644 index 0000000..7101f18 --- /dev/null +++ b/app/Models/CategoryDaftarPustaka.php @@ -0,0 +1,27 @@ +hasMany(DaftarPustaka::class); + } + +} diff --git a/app/Models/DaftarPustaka.php b/app/Models/DaftarPustaka.php new file mode 100644 index 0000000..688b08c --- /dev/null +++ b/app/Models/DaftarPustaka.php @@ -0,0 +1,29 @@ +belongsTo(CategoryDaftarPustaka::class); + } +} diff --git a/app/Services/DaftarPustakaService.php b/app/Services/DaftarPustakaService.php new file mode 100644 index 0000000..0d18e35 --- /dev/null +++ b/app/Services/DaftarPustakaService.php @@ -0,0 +1,94 @@ +handleUpload($file); + } + return DaftarPustaka::create($data); + } + + public function updateDaftarPustaka($data, $file, $id) + { + // Ambil data inputan yang diperlukan saja + + $daftarPustaka = DaftarPustaka::findOrFail($id); + + // Jika ada file baru yang diupload + if ($file) { + // (Opsional) Hapus file lama + if ($daftarPustaka->attachment && file_exists(public_path($daftarPustaka->attachment))) { + unlink(public_path($daftarPustaka->attachment)); + } + + // Upload file baru + $data['attachment'] = $this->handleUpload($file); + } + + // Update data + $daftarPustaka->update($data); + + return $daftarPustaka; + } + + + public function deleteDaftarPustaka($id) + { + return DaftarPustaka::where('id', $id)->delete(); + } + + public function getDaftarPustakaById($id) + { + return DaftarPustaka::where('id', $id)->first(); + } + + // get all with pagination + public function getAllDaftarPustaka($request) +{ + $query = DaftarPustaka::query(); + + // Filter pencarian + if (!empty($request->get('search'))) { + $search = $request->get('search'); + $query->where(function ($q) use ($search) { + $q->orWhere('judul', 'LIKE', "%$search%"); + }); + } + + // Filter kategori + if (!empty($request->get('category'))) { + $category = explode(',', $request->input('category')); + $query->whereIn('category_id', $category); + } + + // Default pagination + $page = (int) $request->get('page', 1); + $size = (int) $request->get('size', 10); + + return $query->paginate($size, ['*'], 'page', $page); +} + + + private function handleUpload($file) + { + $today = now(); + $folderPath = 'daftar_pustaka/' . $today->format('Y/m/d'); + + if (!file_exists(public_path($folderPath))) { + mkdir(public_path($folderPath), 0755, true); + } + + $fileName = $file->getClientOriginalName(); + $file->move(public_path($folderPath), $fileName); + + return $folderPath . '/' . $fileName; + } + + +} diff --git a/app/Services/LaporanBiayaService.php b/app/Services/LaporanBiayaService.php new file mode 100644 index 0000000..049ab91 --- /dev/null +++ b/app/Services/LaporanBiayaService.php @@ -0,0 +1,21 @@ +where('status', 'done'); + { + // Retrieve data from the database + $query = Permohonan::query(); + $query = $query->where('status', 'done'); - // Apply search filter if provided - if ($request->has('search') && !empty($request->get('search'))) { - $search = json_decode($request->get('search')); + // Apply search filter if provided + if ($request->has('search') && !empty($request->get('search'))) { + $search = json_decode($request->get('search')); - if (isset($search->start_date) || isset($search->end_date)) { - $query->whereBetween('tanggal_permohonan', [ - $search->start_date ?? '1900-01-01', - $search->end_date ?? now()->toDateString() - ]); - } - - - if (isset($search->penilai_id) && !empty($search->penilai_id)) { - $query->whereHas('penilaian._user_penilai.userPenilaiTeam', function($q) use ($search) { - $q->where('user_id', $search->penilai_id); - }); - } - - if (isset($search->search)) { - - $query->where(function ($q) use ($search) { - $q->where('nomor_registrasi', 'LIKE', '%' . $search->search . '%'); - $q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search->search . '%'); - $q->orWhereRelation('user', 'name', 'LIKE', '%' . $search->search . '%'); - $q->orWhereRelation('tujuanPenilaian', 'name', 'LIKE', '%' . $search->search . '%'); - $q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search->search . '%'); - $q->orWhereRelation('jenisFasilitasKredit', 'name', 'LIKE', '%' . $search->search . '%'); - $q->orWhereRelation('jenisPenilaian', 'name', 'LIKE', '%' . $search->search . '%'); - $q->orWhere('status', 'LIKE', '%' . $search->search . '%'); - }); - } + if (isset($search->start_date) || isset($search->end_date)) { + $query->whereBetween('tanggal_permohonan', [ + $search->start_date ?? '1900-01-01', + $search->end_date ?? now()->toDateString() + ]); } - // Apply sorting if provided - if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { - $order = $request->get('sortOrder'); - $column = $request->get('sortField'); - $query->orderBy($column, $order); + + if (isset($search->penilai_id) && !empty($search->penilai_id)) { + $query->whereHas('penilaian._user_penilai.userPenilaiTeam', function ($q) use ($search) { + $q->where('user_id', $search->penilai_id); + }); } - // Get the total count of records - $totalRecords = $query->count(); + if (isset($search->search)) { - // Apply pagination if provided - if ($request->has('page') && $request->has('size')) { - $page = $request->get('page'); - $size = $request->get('size'); - $offset = ($page - 1) * $size; // Calculate the offset - - $query->skip($offset)->take($size); + $query->where(function ($q) use ($search) { + $q->where('nomor_registrasi', 'LIKE', '%' . $search->search . '%'); + $q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search->search . '%'); + $q->orWhereRelation('user', 'name', 'LIKE', '%' . $search->search . '%'); + $q->orWhereRelation('tujuanPenilaian', 'name', 'LIKE', '%' . $search->search . '%'); + $q->orWhereRelation('branch', 'name', 'LIKE', '%' . $search->search . '%'); + $q->orWhereRelation('jenisFasilitasKredit', 'name', 'LIKE', '%' . $search->search . '%'); + $q->orWhereRelation('jenisPenilaian', 'name', 'LIKE', '%' . $search->search . '%'); + $q->orWhere('status', 'LIKE', '%' . $search->search . '%'); + }); } - - // Get the filtered count of records - $filteredRecords = $query->count(); - - // Get the data for the current page - $data = $query->with(['debiture.branch'])->get(); - - $data = $data->map(function ($permohonan) { - $luas_tanah = 0; - $luas_bangunan = 0; - $nilai_tanah = 0; - $nilai_bangunan = 0; - $npw = 0; - $nilai_liquidasi = 0; - if (isset($permohonan->penilai->lpj)) { - $lpj = json_decode($permohonan->penilai->lpj, true); - $npw = str_replace('.', '', $lpj['total_nilai_pasar_wajar'] ?? 0); - - $luas_tanah = $lpj['luas_tanah'] ?? 0; - $luas_bangunan = $lpj['luas_bangunan'] ?? 0; - // Calculate nilai_tanah dynamically by looking for all keys that start with 'nilai_tanah_' - $nilai_tanah = str_replace('.', '', $lpj['nilai_tanah_2'] ?? 0); - - $nilai_bangunan = str_replace('.', '', $lpj['nilai_bangunan_2'] ?? 0); - $nilai_liquidasi = str_replace('.', '', $lpj['likuidasi_nilai_2'] ?? 0); - } - - return [ - 'id' => $permohonan->id, - 'nomor_registrasi' => $permohonan->nomor_registrasi, - 'tanggal_permohonan' => $permohonan->tanggal_permohonan, - 'branch' => $permohonan->debiture?->branch?->name, - 'name' => $permohonan->debiture?->name, - 'pemohon' => $permohonan->creator?->name, - 'tujuan_penilaian' => $permohonan->tujuanPenilaian?->name, - 'jenis_agunan' => $permohonan->documents?->pluck('jenisJaminan.name')->unique()->implode(', '), - - 'tanggal_laporan' => $permohonan->approval_dd_at ?? $permohonan->approval_eo_at ?? '', - 'tanggal_review' => $permohonan->penilaian?->tanggal_kunjungan ?? '', - 'nama_penilai' => $permohonan->penilaian?->_user_penilai?->userPenilaiTeam?->name, - ]; - }); - - // Calculate the page count - $pageCount = ceil($totalRecords / $request->get('size')); - - // Calculate the current page number - $currentPage = $request->get('page', 1); - - // Return the response data as a JSON object - return response()->json([ - 'draw' => $request->get('draw'), - 'recordsTotal' => $totalRecords, - 'recordsFiltered' => $filteredRecords, - 'pageCount' => $pageCount, - 'page' => $currentPage, - 'totalCount' => $totalRecords, - 'data' => $data, - ]); } + + // Apply sorting if provided + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + // Get the total count of records + $totalRecords = $query->count(); + + // Apply pagination if provided + if ($request->has('page') && $request->has('size')) { + $page = $request->get('page'); + $size = $request->get('size'); + $offset = ($page - 1) * $size; // Calculate the offset + + $query->skip($offset)->take($size); + } + + // Get the filtered count of records + $filteredRecords = $query->count(); + + // Get the data for the current page + $data = $query->with(['documents','debiture.branch'])->get(); + + $data = $data->map(function ($permohonan) { + + $tgl_kunjungan = $permohonan->penilaian?->tanggal_kunjungan; + $tgl_otorisator = $permohonan->approval_dd_at ?? $permohonan->approval_eo_at ?? $permohonan->approval_so_at; + $jangkaWaktu = $this->hitungTotalJangkaWaktuSla($tgl_kunjungan, $tgl_otorisator); + + + + return [ + 'id' => $permohonan->id, + 'nomor_registrasi' => $permohonan->nomor_registrasi, + 'tanggal_permohonan' => $permohonan->tanggal_permohonan, + 'branch' => $permohonan->debiture?->branch?->name, + 'name' => $permohonan->debiture?->name, + 'pemohon' => $permohonan->creator?->name, + 'tujuan_penilaian' => $permohonan->tujuanPenilaian?->name, + 'tanggal_laporan' => $permohonan->approval_dd_at ?? $permohonan->approval_eo_at ?? '', + 'tanggal_approval' => $permohonan->approval_dd_at ?? $permohonan->approval_eo_at ?? '', + 'tanggal_kunjungan' => $permohonan->penilaian?->tanggal_kunjungan ?? '', + 'nama_penilai' => $permohonan->penilaian?->_user_penilai?->userPenilaiTeam?->name, + 'jangka_waktu' => $jangkaWaktu, + 'keterangan' => $permohonan->keterangan + ]; + }); + + // Calculate the page count + $pageCount = ceil($totalRecords / $request->get('size')); + + // Calculate the current page number + $currentPage = $request->get('page', 1); + + // Return the response data as a JSON object + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $currentPage, + 'totalCount' => $totalRecords, + 'data' => $data, + ]); + } + + private function hitungTotalJangkaWaktuSla($tgl_kunjungan,$tgl_otorisator){ + $countHariKerja = hitungHariKerja($tgl_kunjungan, $tgl_otorisator); + return $countHariKerja; + } } diff --git a/app/Services/LaporanUserService.php b/app/Services/LaporanUserService.php index c53dd59..9890aaa 100644 --- a/app/Services/LaporanUserService.php +++ b/app/Services/LaporanUserService.php @@ -85,96 +85,25 @@ class LaporanUserService $data = $query->with(['debiture.branch'])->get(); $data = $data->map(function ($permohonan) { - $luas_tanah = 0; - $luas_bangunan = 0; - $nilai_tanah = 0; - $nilai_bangunan = 0; + $npw = 0; - $nilai_liquidasi = 0; + if (isset($permohonan->penilai->lpj)) { $lpj = json_decode($permohonan->penilai->lpj, true); $npw = str_replace('.', '', $lpj['total_nilai_pasar_wajar'] ?? 0); - - $luas_tanah = $lpj['luas_tanah'] ?? 0; - $luas_bangunan = $lpj['luas_bangunan'] ?? 0; - // Calculate nilai_tanah dynamically by looking for all keys that start with 'nilai_tanah_' - $nilai_tanah = str_replace('.', '', $lpj['nilai_tanah_2'] ?? 0); - - $nilai_bangunan = str_replace('.', '', $lpj['nilai_bangunan_2'] ?? 0); - $nilai_liquidasi = str_replace('.', '', $lpj['likuidasi_nilai_2'] ?? 0); } return [ 'id' => $permohonan->id, 'nomor_registrasi' => $permohonan->nomor_registrasi, - 'jenis_penilaian' => $permohonan->jenisPenilaian?->name, - 'tujuan_penilaian' => $permohonan->tujuanPenilaian?->name, - 'jenis_fasilitas_kredit' => $permohonan->jenisFasilitasKredit?->name, 'branch' => $permohonan->debiture->branch?->name, - 'pemohon' => $permohonan->creator?->name, - 'cif' => $permohonan->debiture->cif, 'name' => $permohonan->debiture?->name, - 'jenis_agunan' => $permohonan->documents?->pluck('jenisJaminan.name') - ->unique() - ->implode(', '), - 'alamat_agunan' => $permohonan->documents?->map(function ($document) { - return formatAlamat($document); - })->unique()->implode(', '), - 'bukti_kepemilikan' => (function () use ($permohonan) { - $legalitasItems = $permohonan->documents?->flatMap(function ($document) { - return $document->detail->map(function ($detail) { - // Jika tidak ada jenis legalitas jaminan, lewati - if (empty($detail->jenisLegalitasJaminan)) { - return null; - } - - // Hanya tampilkan detail yang memiliki dokumen_jaminan - if (empty($detail->dokumen_jaminan)) { - return null; - } - - // Tampilkan nama legalitas jaminan saja - return $detail->jenisLegalitasJaminan->name ?? ''; - }); - })->filter()->unique()->values()->toArray(); - - // Buat daftar bernomor - $result = ''; - foreach ($legalitasItems as $index => $item) { - $result .= ($index + 1) . '. ' . $item . "\n"; - } - - return $result; - })(), - 'nama_pemilik' => $permohonan->documents?->pluck('pemilik.name') - ->unique() - ->implode(', '), - 'luas_tanah' => $luas_tanah . ' m²', - 'nilai_tanah' => formatRupiah($nilai_tanah, 2), - 'luas_bangunan' => $luas_bangunan . ' m²', - 'nilai_bangunan' => formatRupiah($nilai_bangunan, 2), - 'nilai_njop' => formatRupiah($permohonan->nilai_njop, 2), - 'nilai_pasar_wajar' => formatRupiah($npw, 2), - 'nilai_likuidasi' => formatRupiah($nilai_liquidasi, 2), - 'tanggal_documen_diterima' => $permohonan->documents?->map(function ($document) { - return $document->created_at->format('d-m-Y'); - }), - 'tanggal_spk' => '', - 'nomor_spk' => '', - 'tanggal_rencana_kunjunagn' => '', - 'tanggal_kunjungan' => '', - 'taggal_delivered' => '', - 'jangka_waktu_sla' => '', - 'nama_penilai' => $permohonan->penilaian?->_user_penilai?->userPenilaiTeam?->name, - 'nama_team_leader' => $permohonan->penilaian?->teams, - 'saran' => '', - 'catatan' => '', - - + 'pemohon' => $permohonan->creator?->name, 'tanggal_permohonan' => $permohonan->tanggal_permohonan, + 'nama_penilai' => $permohonan->penilaian?->_user_penilai?->userPenilaiTeam?->name, 'tanggal_laporan' => $permohonan->approval_dd_at ?? $permohonan->approval_eo_at ?? '', - 'tanggal_review' => $permohonan->penilaian?->tanggal_kunjungan ?? '', + 'nilai_pasar_wajar' => formatRupiah($npw, 2) ]; }); diff --git a/database/migrations/2025_07_07_025336_create_category_daftar_pustaka_table.php b/database/migrations/2025_07_07_025336_create_category_daftar_pustaka_table.php new file mode 100644 index 0000000..ce6f6d8 --- /dev/null +++ b/database/migrations/2025_07_07_025336_create_category_daftar_pustaka_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('code')->unique()->index(); + $table->string('name'); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('category_daftar_pustaka'); + } +}; diff --git a/database/migrations/2025_07_07_025337_create_daftar_pustaka_table.php b/database/migrations/2025_07_07_025337_create_daftar_pustaka_table.php new file mode 100644 index 0000000..5b61e12 --- /dev/null +++ b/database/migrations/2025_07_07_025337_create_daftar_pustaka_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('judul'); + $table->string('attachment')->nullable(); + $table->text('deskripsi'); + $table->unsignedBigInteger('category_id'); + $table->foreign('category_id')->references('id')->on('category_daftar_pustaka'); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('daftar_pustaka'); + } +}; diff --git a/module.json b/module.json index fc81e7f..0b63135 100644 --- a/module.json +++ b/module.json @@ -607,6 +607,23 @@ "EO Appraisal", "senior-officer" ] + }, + { + "title": "Daftar Pustaka", + "path": "daftar-pustaka", + "icon": "ki-filled ki-filter-tablet text-lg text-primary", + "classes": "", + "attributes": [], + "permission": "", + "roles": [ + "administrator", + "pemohon-ao", + "pemohon-eo", + "admin", + "DD Appraisal", + "EO Appraisal", + "senior-officer" + ] } ], "master": [ @@ -1149,6 +1166,17 @@ "administrator", "admin" ] + }, + { + "title": "Kategori Daftar Pustaka", + "path": "category-daftar-pustaka", + "classes": "", + "attributes": [], + "permission": "", + "roles": [ + "administrator", + "admin" + ] } ] } diff --git a/resources/views/activity/index.blade.php b/resources/views/activity/index.blade.php index eda029b..2f8d2df 100644 --- a/resources/views/activity/index.blade.php +++ b/resources/views/activity/index.blade.php @@ -261,37 +261,67 @@ }, }, actions: { - title: 'Action', - render: (item, data) => { - const status = data.status; // Anggap status berada di dalam objek data - const dokumenjaminan = data.dokumenjaminan || []; + title: 'Action', + render: (item, data) => { + const status = data.status; // Anggap status berada di dalam objek data + const dokumenjaminan = data.dokumenjaminan || []; - return ` + return `
- + ${ ['survey', 'done', 'proses-laporan', 'laporan', 'paparan'].includes(status) ? dokumenjaminan.map(dokumen => { return ` - - - - `; + + + + `; }).join('') : '' }
`; - }, -}, + }, + }, } - + }; + + + let dataTable = new KTDataTable(element, dataTableOptions); + function highlightFreezeRows() { + const table = document.querySelector('#permohonan-table table[data-datatable-table="true"]'); + if (!table) return; + + const rows = table.querySelectorAll('tbody tr'); + + rows.forEach(row => { + const statusCell = row.cells[7]; + if (!statusCell) return; + + const statusText = statusCell.textContent.trim().toLowerCase(); + + if (statusText === 'freeze') { + row.classList.add('bg-red-400', 'text-white'); + } else { + row.classList.remove('bg-red-400', 'text-white'); + } + }); + } + + // Polling setiap 1 detik untuk sementara + setInterval(() => { + highlightFreezeRows(); + }, 500); + + + searchInput.addEventListener('input', function() { const searchValue = this.value.trim(); dataTable.search(searchValue, true); diff --git a/resources/views/category-daftar-pustaka/create.blade.php b/resources/views/category-daftar-pustaka/create.blade.php new file mode 100644 index 0000000..3d94986 --- /dev/null +++ b/resources/views/category-daftar-pustaka/create.blade.php @@ -0,0 +1,64 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{-- {{ Breadcrumbs::render(request()->route()->getName()) }} --}} +@endsection + +@section('content') +
+ +
+ @csrf + @if (isset($category->id)) + @method('PUT') + + @endif +
+
+

+ Tambah +

+
+ Back +
+
+
+
+ +
+ id) ? 'readonly' : '' }}> + @error('code') + {{ $message }} + @enderror +
+
+
+ +
+ + @error('name') + {{ $message }} + @enderror +
+
+ +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/category-daftar-pustaka/index.blade.php b/resources/views/category-daftar-pustaka/index.blade.php new file mode 100644 index 0000000..1577c77 --- /dev/null +++ b/resources/views/category-daftar-pustaka/index.blade.php @@ -0,0 +1,147 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{-- {{ Breadcrumbs::render('basicdata.jenis-aset') }} --}} +@endsection + +@section('content') +
+
+
+

+ Daftar Kategori Daftar Pustaka +

+ +
+
+
+ + + + + + + + + +
+ + + Code + + + Name + + Action
+
+ +
+
+
+@endsection + +@push('scripts') + + +@endpush + diff --git a/resources/views/daftar-pustaka/create.blade.php b/resources/views/daftar-pustaka/create.blade.php new file mode 100644 index 0000000..f35d03d --- /dev/null +++ b/resources/views/daftar-pustaka/create.blade.php @@ -0,0 +1,113 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{-- {{ Breadcrumbs::render(request()->route()->getName()) }} --}} +@endsection + +@section('content') +
+
+ @csrf + @if (isset($daftarPustaka->id)) + + @method('PUT') + @endif + +
+
+

+ {{ isset($daftarPustaka->id) ? 'Edit' : 'Tambah' }} Daftar Pustaka +

+
+ Back +
+
+
+
+ +
+ + @error('judul') + {{ $message }} + @enderror +
+
+
+ +
+ + @error('attachment') + {{ $message }} + @enderror +
+
+ @if (isset($daftarPustaka->attachment)) +
+ +
+ {{-- ambil nama file pathnya hilangkan --}} + {{ basename($daftarPustaka->attachment) }}   + + +
+
+ @endif + +
+ + + +
+ + @error('category_id') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('deskripsi') + {{ $message }} + @enderror +
+
+ + +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/daftar-pustaka/index.blade.php b/resources/views/daftar-pustaka/index.blade.php new file mode 100644 index 0000000..057c59f --- /dev/null +++ b/resources/views/daftar-pustaka/index.blade.php @@ -0,0 +1,296 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{-- {{ Breadcrumbs::render('basicdata.ijin_usaha') }} --}} +@endsection + +@section('content') + + +
+
+
+ + + + + ⌘ K + +
+ + + + + Filter + + + + Reset Filter + +
+ +
+

+ page {{ $page }} of {{ $pageCount }} — {{ $limit }} items per page, total + {{ $total }} items. +

+
+ +
+ + + + + + + @if (auth()->user()->hasRole(['administrator', 'admin'])) + + + Tambah + + @endif +
+
+ +
+ + + +
+ @if (isset($daftar_pustaka)) + @foreach ($daftar_pustaka as $item) +
+ +
+
+ +
+
+
+ +
+ + +

+ {{ $item->judul }}

+

+ {{-- batasi panjang deskripsi 50 --}} + {{ substr($item->deskripsi, 0, 50) }} +

+
+
+

+ # {{ $item->category->name }}

+ + @auth + @if (auth()->user()->hasRole(['administrator', 'admin'])) + + @endif + @endauth + +
+
+
+ @endforeach + @endif +
+ + + + + + +
+@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/daftar-pustaka/show.blade.php b/resources/views/daftar-pustaka/show.blade.php new file mode 100644 index 0000000..2ca6c40 --- /dev/null +++ b/resources/views/daftar-pustaka/show.blade.php @@ -0,0 +1,96 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{-- {{ Breadcrumbs::render(request()->route()->getName()) }} --}} +@endsection + + +@section('content') +
+ +
+ @csrf +
+
+

+ {{ $daftarPustaka->judul ?? '' }} +

+
+ Back +
+
+
+
+
+ + @php + + $fileExtension = pathinfo($daftarPustaka->attachment, PATHINFO_EXTENSION); + // cek extension + $isPdf = $fileExtension == 'pdf'; + $imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'webp']; + $isImage = in_array(strtolower($fileExtension), $imageExtensions); + $fileUrl = asset('storage/' . $daftarPustaka->attachment); + @endphp + + @if ($isPdf) + + @elseif ($isImage) + + @else +

File tidak bisa ditampilkan, silakan unduh di sini.

+ @endif + + +
+
+ +
+
+
+ {{ $daftarPustaka->deskripsi ?? '' }} +
+
+
+
+
+@endsection + +{{-- @push('scripts') + + + +@endpush --}} diff --git a/resources/views/laporan-biaya/external.blade.php b/resources/views/laporan-biaya/external.blade.php index bc59c17..b39e173 100644 --- a/resources/views/laporan-biaya/external.blade.php +++ b/resources/views/laporan-biaya/external.blade.php @@ -44,15 +44,6 @@ @endforeach -
- - -
@@ -73,7 +64,7 @@

- Laporan Hasil Penilaian Jaminan Internal & External + Rekap Penyelesaian External

@@ -89,130 +80,53 @@ Nomor Registrasi - - Tanggal Permohonan - - Cabang - - Pemohon - - - - CIF - - - + Nama Debitur + + Tanggal KSL + + + + + Nomor KSL + + + + Nominal KSL + + + - Jenis Penilaian + Tanggal Penyelesaian - Tujuan Penilaian + Nominal Penyelesaian - Jenis Fasilitas Kredit + No. Rekening (Tujuan Akhir) + + + + Sisa KSL - Jenis Agunan + Memo - Alamat Agunan + Status - - Bukti Kepemilikan - - - - Nama Pemilik - - - - Luas Tanah - - - - Nilai Tanah - - - - Luas Bangunan - - - - Nilai Bangunan - - - - Nilai NJOP - - - - Nilai Pasar Wajar - - - - Nilai Likuidasi - - - - Tanggal Dokumen Diterima - - - - Tanggal SPK - - - - Nomor SPK - - - - Tanggal Rencana Kunjungan - - - - Tanggal Kunjungan - - - - Tanggal Delivered - - - - Jangka Waktu SLA - - - - Tanggal Laporan - - - - Tanggal Review - - - - Nama Penilai - - - - Nama Team Leader - - - - Saran - - + Catatan @@ -266,144 +180,41 @@ nomor_registrasi: { title: 'Nomor Registrasi', }, - tanggal_permohonan: { + branch: { + title: 'Cabang', + }, + name: { + title: 'Nama Debitur', + }, + tanggal_ksl: { title: 'Tanggal Permohonan', render: (item, data) => { return data.tanggal_permohonan ? window.formatTanggalIndonesia(data.tanggal_permohonan) : '-'; }, }, - branch: { - title: 'Cabang', - }, - pemohon: { - title: 'Pemohon', - }, - cif: { + nomor_ksl: { title: 'CIF', }, - name: { - title: 'Nama Debitur', - }, - jenis_penilaian: { + nominal_ksl: { title: 'Jenis Penilaian', }, - tujuan_penilaian: { + tanggal_penyelesaian: { title: 'Tujuan Penilaian', }, - jenis_fasilitas_kredit: { + nominal_penyelesaian: { title: 'Jenis Fasilitas Kredit', }, - jenis_agunan: { + nomor_rekening: { + title: 'Nomor Rekening', + }, + sisa_ksl: { title: 'Jenis Agunan', }, - alamat_agunan: { - title: 'Alamat Agunan', + memo: { + title: 'Memo', }, - bukti_kepemilikan: { - title: 'Bukti Kepemilikan', - render: (item, data) => { - if (data.bukti_kepemilikan) { - // Ganti karakter baris baru dengan tag
untuk HTML - return data.bukti_kepemilikan.split('\n').join('
'); - } - return '-'; - }, - }, - nama_pemilik: { - title: 'Nama Pemilik', - }, - luas_tanah: { - title: 'Luas Tanah', - }, - nilai_tanah: { - title: 'Nilai Tanah', - render: (item, data) => { - return data.nilai_tanah ?? '-'; - }, - }, - luas_bangunan: { - title: 'Luas Bangunan', - }, - nilai_bangunan: { - title: 'Nilai Bangunan', - render: (item, data) => { - return data.nilai_bangunan ?? '-'; - }, - }, - nilai_njop: { - title: 'Nilai NJOP', - render: (item, data) => { - return data.nilai_njop ?? '-'; - }, - }, - nilai_pasar_wajar: { - title: 'Nilai Pasar Wajar', - render: (item, data) => { - return data.nilai_pasar_wajar ?? '-'; - }, - }, - nilai_likuidasi: { - title: 'Nilai Likuidasi', - render: (item, data) => { - return data.nilai_likuidasi ?? '-'; - }, - }, - tanggal_documen_diterima: { - title: 'Tanggal Dokumen Diterima', - render: (item, data) => { - return data.tanggal_documen_diterima ? window.formatTanggalIndonesia(data.tanggal_documen_diterima) : '-'; - }, - }, - tanggal_spk: { - title: 'Tanggal SPK', - render: (item, data) => { - return data.tanggal_spk ? window.formatTanggalIndonesia(data.tanggal_spk) : '-'; - }, - }, - nomor_spk: { - title: 'Nomor SPK', - }, - tanggal_rencana_kunjunagn: { - title: 'Tanggal Rencana Kunjungan', - render: (item, data) => { - return data.tanggal_rencana_kunjunagn ? window.formatTanggalIndonesia(data.tanggal_rencana_kunjunagn) : '-'; - }, - }, - tanggal_kunjungan: { - title: 'Tanggal Kunjungan', - render: (item, data) => { - return data.tanggal_kunjungan ? window.formatTanggalIndonesia(data.tanggal_kunjungan) : '-'; - }, - }, - taggal_delivered: { - title: 'Tanggal Delivered', - render: (item, data) => { - return data.taggal_delivered ? window.formatTanggalIndonesia(data.taggal_delivered) : '-'; - }, - }, - jangka_waktu_sla: { - title: 'Jangka Waktu SLA', - }, - tanggal_laporan: { - title: 'Tanggal Laporan', - render: (item, data) => { - return data.tanggal_laporan ? window.formatTanggalIndonesia(data.tanggal_laporan) : '-'; - }, - }, - tanggal_review: { - title: 'Tanggal Review', - render: (item, data) => { - return data.tanggal_review ? window.formatTanggalIndonesia(data.tanggal_review) : '-'; - }, - }, - nama_penilai: { - title: 'Nama Penilai', - }, - nama_team_leader: { - title: 'Nama Team Leader', - }, - saran: { - title: 'Saran', + status: { + title: 'Status', }, catatan: { title: 'Catatan', diff --git a/resources/views/laporan-biaya/internal.blade.php b/resources/views/laporan-biaya/internal.blade.php index 860f8cc..5f5658a 100644 --- a/resources/views/laporan-biaya/internal.blade.php +++ b/resources/views/laporan-biaya/internal.blade.php @@ -44,15 +44,7 @@ @endforeach
-
- - -
+ @@ -73,7 +65,7 @@

- Laporan Hasil Penilaian Jaminan Internal & External + Rekap Penyelesaian Internal

@@ -81,7 +73,7 @@
- + @@ -89,130 +81,49 @@ Nomor Registrasi - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + + + - - - - + + + + + + + + - @@ -142,11 +141,17 @@ render: (item, data) => `${window.formatTanggalIndonesia(data.created_at)}`, }, + tanggal_kunjungan: { title: 'Tgl Kunjungan', render: (item, data) => `${window.formatTanggalIndonesia(data.waktu_penilaian) || ''}`, }, + tanggal_reported: { + title: 'Tgl Kunjungan', + render: (item, data) => + `${window.formatTanggalIndonesia(data.waktu_penilaian) || ''}`, + }, progress: { title: 'Progress', render: (item, data) => { @@ -182,20 +187,7 @@ return `${window.formatTanggalIndonesia(data.paparan)}`; } }, - approve: { - title: 'Approve', - render: (item, data) => { - // Gabungkan nama dengan
untuk pemisah baris baru - let dataHtml = ` - ${data.permohonan?.approve_so?.name || ''} -
- ${data.permohonan?.approve_eo?.name || ''} -
- ${data.permohonan?.approve_dd?.name || ''} - `; - return dataHtml; - }, - }, + keterangan: { diff --git a/resources/views/laporan-sla-penilai/index.blade.php b/resources/views/laporan-sla-penilai/index.blade.php index 1515a15..8e05868 100644 --- a/resources/views/laporan-sla-penilai/index.blade.php +++ b/resources/views/laporan-sla-penilai/index.blade.php @@ -104,10 +104,6 @@ Tujuan Penilaian - + +
- Tanggal Permohonan - - Cabang - Pemohon - - - CIF - - + Nama Debitur + Tanggal KSL + + + Nomor KSL + + + Nominal KSL + + - Jenis Penilaian + Tanggal Penyelesaian - Tujuan Penilaian + Nominal Penyelesaian - Jenis Fasilitas Kredit + Sisa KSL - Jenis Agunan + Memo - Alamat Agunan + Status - Bukti Kepemilikan - - - Nama Pemilik - - - Luas Tanah - - - Nilai Tanah - - - Luas Bangunan - - - Nilai Bangunan - - - Nilai NJOP - - - Nilai Pasar Wajar - - - Nilai Likuidasi - - - Tanggal Dokumen Diterima - - - Tanggal SPK - - - Nomor SPK - - - Tanggal Rencana Kunjungan - - - Tanggal Kunjungan - - - Tanggal Delivered - - - Jangka Waktu SLA - - - Tanggal Laporan - - - Tanggal Review - - - Nama Penilai - - - Nama Team Leader - - - Saran - - Catatan @@ -266,144 +177,38 @@ nomor_registrasi: { title: 'Nomor Registrasi', }, - tanggal_permohonan: { + branch: { + title: 'Cabang', + }, + name: { + title: 'Nama Debitur', + }, + tanggal_ksl: { title: 'Tanggal Permohonan', render: (item, data) => { return data.tanggal_permohonan ? window.formatTanggalIndonesia(data.tanggal_permohonan) : '-'; }, }, - branch: { - title: 'Cabang', - }, - pemohon: { - title: 'Pemohon', - }, - cif: { + nomor_ksl: { title: 'CIF', }, - name: { - title: 'Nama Debitur', - }, - jenis_penilaian: { + nominal_ksl: { title: 'Jenis Penilaian', }, - tujuan_penilaian: { + tanggal_penyelesaian: { title: 'Tujuan Penilaian', }, - jenis_fasilitas_kredit: { + nominal_penyelesaian: { title: 'Jenis Fasilitas Kredit', }, - jenis_agunan: { + sisa_ksl: { title: 'Jenis Agunan', }, - alamat_agunan: { - title: 'Alamat Agunan', + memo: { + title: 'Memo', }, - bukti_kepemilikan: { - title: 'Bukti Kepemilikan', - render: (item, data) => { - if (data.bukti_kepemilikan) { - // Ganti karakter baris baru dengan tag
untuk HTML - return data.bukti_kepemilikan.split('\n').join('
'); - } - return '-'; - }, - }, - nama_pemilik: { - title: 'Nama Pemilik', - }, - luas_tanah: { - title: 'Luas Tanah', - }, - nilai_tanah: { - title: 'Nilai Tanah', - render: (item, data) => { - return data.nilai_tanah ?? '-'; - }, - }, - luas_bangunan: { - title: 'Luas Bangunan', - }, - nilai_bangunan: { - title: 'Nilai Bangunan', - render: (item, data) => { - return data.nilai_bangunan ?? '-'; - }, - }, - nilai_njop: { - title: 'Nilai NJOP', - render: (item, data) => { - return data.nilai_njop ?? '-'; - }, - }, - nilai_pasar_wajar: { - title: 'Nilai Pasar Wajar', - render: (item, data) => { - return data.nilai_pasar_wajar ?? '-'; - }, - }, - nilai_likuidasi: { - title: 'Nilai Likuidasi', - render: (item, data) => { - return data.nilai_likuidasi ?? '-'; - }, - }, - tanggal_documen_diterima: { - title: 'Tanggal Dokumen Diterima', - render: (item, data) => { - return data.tanggal_documen_diterima ? window.formatTanggalIndonesia(data.tanggal_documen_diterima) : '-'; - }, - }, - tanggal_spk: { - title: 'Tanggal SPK', - render: (item, data) => { - return data.tanggal_spk ? window.formatTanggalIndonesia(data.tanggal_spk) : '-'; - }, - }, - nomor_spk: { - title: 'Nomor SPK', - }, - tanggal_rencana_kunjunagn: { - title: 'Tanggal Rencana Kunjungan', - render: (item, data) => { - return data.tanggal_rencana_kunjunagn ? window.formatTanggalIndonesia(data.tanggal_rencana_kunjunagn) : '-'; - }, - }, - tanggal_kunjungan: { - title: 'Tanggal Kunjungan', - render: (item, data) => { - return data.tanggal_kunjungan ? window.formatTanggalIndonesia(data.tanggal_kunjungan) : '-'; - }, - }, - taggal_delivered: { - title: 'Tanggal Delivered', - render: (item, data) => { - return data.taggal_delivered ? window.formatTanggalIndonesia(data.taggal_delivered) : '-'; - }, - }, - jangka_waktu_sla: { - title: 'Jangka Waktu SLA', - }, - tanggal_laporan: { - title: 'Tanggal Laporan', - render: (item, data) => { - return data.tanggal_laporan ? window.formatTanggalIndonesia(data.tanggal_laporan) : '-'; - }, - }, - tanggal_review: { - title: 'Tanggal Review', - render: (item, data) => { - return data.tanggal_review ? window.formatTanggalIndonesia(data.tanggal_review) : '-'; - }, - }, - nama_penilai: { - title: 'Nama Penilai', - }, - nama_team_leader: { - title: 'Nama Team Leader', - }, - saran: { - title: 'Saran', + status: { + title: 'Status', }, catatan: { title: 'Catatan', diff --git a/resources/views/laporan-monitoring/show.blade.php b/resources/views/laporan-monitoring/show.blade.php index ca836b7..1dd2301 100644 --- a/resources/views/laporan-monitoring/show.blade.php +++ b/resources/views/laporan-monitoring/show.blade.php @@ -35,20 +35,19 @@
Nama DebiturTujuan PenilaianStatus BayarJenis AssetPenugasanJenis ReportTgl RegisterTgl AssignCabangLokasi JaminanTUjuan Penilaian Tgl KunjunganProgressSLA LaporanSLA PaparanApproveTgl Lpj DoneSLA Buku KjppStatusPoinSLA INTERNALSLA PENDAMPINGAN KJPPAbsensiZabtu KeteranganAction
- Penilaian - - Tanggal Dokuemen @@ -117,12 +113,20 @@ Tanggal Approval + Tanggal Kunjungan + + Jangka Waktu + Keterangan + +
@@ -191,29 +195,34 @@ tujuan_penilaian: { title: 'Tujuan Penilaian', }, - jenis_agunan: { - title: 'Jenis Agunan', - }, - tanggal_laporan: { title: 'Tanggal Laporan', render: (item, data) => { return data.tanggal_laporan ? window.formatTanggalIndonesia(data.tanggal_laporan) : '-'; }, }, - tanggal_review: { - title: 'Tanggal Review', + tanggal_approval: { + title: 'Tanggal Approval', render: (item, data) => { - return data.tanggal_review ? window.formatTanggalIndonesia(data.tanggal_review) : '-'; + return data.tanggal_approval ? window.formatTanggalIndonesia(data.tanggal_approval) : '-'; }, }, - jangka_waktu: { - title: 'Jangka Waktu', + tanggal_kunjungan: { + title: 'Tanggal Kunjungan', render: (item, data) => { - return data.jangka_waktu ?? '3'; + return data.tanggal_kunjungan ? window.formatTanggalIndonesia(data.tanggal_kunjungan) : '-'; }, }, + jangka_waktu: { + title: 'Jangka Waktu', + render: (item, data) => { + return data.jangka_waktu ?? '-'; + }, + }, + keterangan: { + title: 'Keterangan', + } } }; diff --git a/resources/views/laporan-user/index.blade.php b/resources/views/laporan-user/index.blade.php index 5f2e629..dae9788 100644 --- a/resources/views/laporan-user/index.blade.php +++ b/resources/views/laporan-user/index.blade.php @@ -9,7 +9,7 @@
-

Laporan User Pemohon

+

Laporan User Penilai

@@ -49,7 +49,7 @@ Terapkan Filter - + Export to Excel @@ -77,132 +77,37 @@ Nomor Registrasi - - Tanggal Permohonan - - Cabang + + + Nama Debitur + Pemohon - - CIF - - - - Nama Debitur - - + + - Jenis Penilaian + Tgl Terima - Tujuan Penilaian - - - - Jenis Fasilitas Kredit - - - - Jenis Agunan + Penilai + - Alamat Agunan + Tgl Laporan - - Bukti Kepemilikan - - - - Nama Pemilik - - - - Luas Tanah - - - - Nilai Tanah - - - - Luas Bangunan - - - - Nilai Bangunan - - - - Nilai NJOP - - - - Nilai Pasar Wajar - - - - Nilai Likuidasi - - - - Tanggal Dokumen Diterima - - - - Tanggal SPK - - - - Nomor SPK - - - - Tanggal Rencana Kunjungan - - - - Tanggal Kunjungan - - - - Tanggal Delivered - - - - Jangka Waktu SLA - - - - Tanggal Laporan - - - - Tanggal Review - - - - Nama Penilai - - - - Nama Team Leader - - - - Saran - - + + - Catatan + Nilai Pasar Wajar @@ -252,6 +157,15 @@ }, nomor_registrasi: { title: 'Nomor Registrasi', + }, + branch: { + title: 'Cabang', + }, + name: { + title: 'Nama Debitur', + }, + pemohon: { + title: 'Pemohon', }, tanggal_permohonan: { title: 'Tanggal Permohonan', @@ -259,68 +173,14 @@ return data.tanggal_permohonan ? window.formatTanggalIndonesia(data.tanggal_permohonan) : '-'; }, }, - branch: { - title: 'Cabang', + nama_penilai: { + title: 'Nama Penilai', }, - pemohon: { - title: 'Pemohon', - }, - cif: { - title: 'CIF', - }, - name: { - title: 'Nama Debitur', - }, - jenis_penilaian: { - title: 'Jenis Penilaian', - }, - tujuan_penilaian: { - title: 'Tujuan Penilaian', - }, - jenis_fasilitas_kredit: { - title: 'Jenis Fasilitas Kredit', - }, - jenis_agunan: { - title: 'Jenis Agunan', - }, - alamat_agunan: { - title: 'Alamat Agunan', - }, - bukti_kepemilikan: { - title: 'Bukti Kepemilikan', + + tanggal_laporan: { + title: 'Tanggal Dokumen Diterima', render: (item, data) => { - if (data.bukti_kepemilikan) { - // Ganti karakter baris baru dengan tag
untuk HTML - return data.bukti_kepemilikan.split('\n').join('
'); - } - return '-'; - }, - }, - nama_pemilik: { - title: 'Nama Pemilik', - }, - luas_tanah: { - title: 'Luas Tanah', - }, - nilai_tanah: { - title: 'Nilai Tanah', - render: (item, data) => { - return data.nilai_tanah ?? '-'; - }, - }, - luas_bangunan: { - title: 'Luas Bangunan', - }, - nilai_bangunan: { - title: 'Nilai Bangunan', - render: (item, data) => { - return data.nilai_bangunan ?? '-'; - }, - }, - nilai_njop: { - title: 'Nilai NJOP', - render: (item, data) => { - return data.nilai_njop ?? '-'; + return data.tanggal_laporan ? window.formatTanggalIndonesia(data.tanggal_laporan) : '-'; }, }, nilai_pasar_wajar: { @@ -328,72 +188,6 @@ render: (item, data) => { return data.nilai_pasar_wajar ?? '-'; }, - }, - nilai_likuidasi: { - title: 'Nilai Likuidasi', - render: (item, data) => { - return data.nilai_likuidasi ?? '-'; - }, - }, - tanggal_documen_diterima: { - title: 'Tanggal Dokumen Diterima', - render: (item, data) => { - return data.tanggal_documen_diterima ? window.formatTanggalIndonesia(data.tanggal_documen_diterima) : '-'; - }, - }, - tanggal_spk: { - title: 'Tanggal SPK', - render: (item, data) => { - return data.tanggal_spk ? window.formatTanggalIndonesia(data.tanggal_spk) : '-'; - }, - }, - nomor_spk: { - title: 'Nomor SPK', - }, - tanggal_rencana_kunjunagn: { - title: 'Tanggal Rencana Kunjungan', - render: (item, data) => { - return data.tanggal_rencana_kunjunagn ? window.formatTanggalIndonesia(data.tanggal_rencana_kunjunagn) : '-'; - }, - }, - tanggal_kunjungan: { - title: 'Tanggal Kunjungan', - render: (item, data) => { - return data.tanggal_kunjungan ? window.formatTanggalIndonesia(data.tanggal_kunjungan) : '-'; - }, - }, - taggal_delivered: { - title: 'Tanggal Delivered', - render: (item, data) => { - return data.taggal_delivered ? window.formatTanggalIndonesia(data.taggal_delivered) : '-'; - }, - }, - jangka_waktu_sla: { - title: 'Jangka Waktu SLA', - }, - tanggal_laporan: { - title: 'Tanggal Laporan', - render: (item, data) => { - return data.tanggal_laporan ? window.formatTanggalIndonesia(data.tanggal_laporan) : '-'; - }, - }, - tanggal_review: { - title: 'Tanggal Review', - render: (item, data) => { - return data.tanggal_review ? window.formatTanggalIndonesia(data.tanggal_review) : '-'; - }, - }, - nama_penilai: { - title: 'Nama Penilai', - }, - nama_team_leader: { - title: 'Nama Team Leader', - }, - saran: { - title: 'Saran', - }, - catatan: { - title: 'Catatan', } } }; diff --git a/resources/views/penilai/components/print-memo.blade.php b/resources/views/penilai/components/print-memo.blade.php index 9a1e7cd..18cc547 100644 --- a/resources/views/penilai/components/print-memo.blade.php +++ b/resources/views/penilai/components/print-memo.blade.php @@ -193,94 +193,7 @@ Demikian Kami Sampaikan, atas perhatiannya kami ucapkan terimakasih - - @php - use Modules\Usermanagement\Models\User; - - $penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first(); - $imagePathPenilai = storage_path( - 'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign, - ); - - $soUser = User::where('id', $senior_officer->id)->first(); - $imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign); - - $imagePathEO = storage_path( - 'app/public/signatures/' . - User::role('EO Appraisal')->first()->id . - '/' . - User::role('EO Appraisal')->first()->sign, - ); - - $imagePathDD = storage_path( - 'app/public/signatures/' . - User::role('DD Appraisal')->first()->id . - '/' . - User::role('DD Appraisal')->first()->sign, - ); - @endphp - - - @if ($permohonan->approval_so != null) - - @endif - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - - - - @if ($permohonan->approval_so != null) - - @endif - - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - -
- @if (file_exists($imagePathPenilai)) - {{ $imagePathPenilai }} - @endif - - @if (file_exists($imagePathSo)) - {{ $imagePathSo }} - @endif - - @if (file_exists($imagePathEO)) - {{ $imagePathEO }} - @endif - - @if (file_exists($imagePathDD)) - {{ $imagePathDD }} - @endif -
{{ $penilai->userPenilaiTeam->name ?? '' }}
- - {{ ucwords(strtolower('PENILAI')) }} - -
- {{ $senior_officer->name ?? '' }}
- - {{ ucwords(strtolower('SENIOR OFFICER')) }} - - -
- {{ User::role('EO Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('EXECUTIVE OFFICER')) }} - -
- {{ User::role('DD Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('DEPUTY DIRECTOR')) }} - -
+ @include('lpj::penilai.components.signature-approval') diff --git a/resources/views/penilai/components/print-out-call-report.blade.php b/resources/views/penilai/components/print-out-call-report.blade.php index 00303af..82a669a 100644 --- a/resources/views/penilai/components/print-out-call-report.blade.php +++ b/resources/views/penilai/components/print-out-call-report.blade.php @@ -229,93 +229,7 @@ Demikian Kami Sampaikan, atas perhatiannya kami ucapkan terimakasih - - @php - use Modules\Usermanagement\Models\User; - $penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first(); - $imagePathPenilai = storage_path( - 'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign, - ); - - $soUser = User::where('id', $senior_officer->id)->first(); - $imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign); - - $imagePathEO = storage_path( - 'app/public/signatures/' . - User::role('EO Appraisal')->first()->id . - '/' . - User::role('EO Appraisal')->first()->sign, - ); - - $imagePathDD = storage_path( - 'app/public/signatures/' . - User::role('DD Appraisal')->first()->id . - '/' . - User::role('DD Appraisal')->first()->sign, - ); - @endphp - - - @if ($permohonan->approval_so != null) - - @endif - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - - - - @if ($permohonan->approval_so != null) - - @endif - - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - -
- @if (file_exists($imagePathPenilai)) - {{ $imagePathPenilai }} - @endif - - @if (file_exists($imagePathSo)) - {{ $imagePathSo }} - @endif - - @if (file_exists($imagePathEO)) - {{ $imagePathEO }} - @endif - - @if (file_exists($imagePathDD)) - {{ $imagePathDD }} - @endif -
{{ $penilai->userPenilaiTeam->name ?? '' }}
- - {{ ucwords(strtolower('PENILAI')) }} - -
- {{ $senior_officer->name ?? '' }}
- - {{ ucwords(strtolower('SENIOR OFFICER')) }} - - -
- {{ User::role('EO Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('EXECUTIVE OFFICER')) }} - -
- {{ User::role('DD Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('DEPUTY DIRECTOR')) }} - -
+ @include('lpj::penilai.components.signature-approval') diff --git a/resources/views/penilai/components/print-out-rap.blade.php b/resources/views/penilai/components/print-out-rap.blade.php index 32e7432..4647d60 100644 --- a/resources/views/penilai/components/print-out-rap.blade.php +++ b/resources/views/penilai/components/print-out-rap.blade.php @@ -412,91 +412,6 @@ @endisset

Demikian kami sampaikan, atas perhatiannya kami ucapkan terima kasih.

- - @php - use Modules\Usermanagement\Models\User; - - $penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first(); - $imagePathPenilai = storage_path('app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign); - - $soUser = User::where('id', $senior_officer->id)->first(); - $imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign); - - $imagePathEO = storage_path( - 'app/public/signatures/' . - User::role('EO Appraisal')->first()->id . - '/' . - User::role('EO Appraisal')->first()->sign, - ); - - $imagePathDD = storage_path( - 'app/public/signatures/' . - User::role('DD Appraisal')->first()->id . - '/' . - User::role('DD Appraisal')->first()->sign, - ); - @endphp - - - @if ($permohonan->approval_so != null) - - @endif - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - - - - @if ($permohonan->approval_so != null) - - @endif - - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - -
- @if (file_exists($imagePathPenilai)) - {{ $imagePathPenilai }} - @endif - - @if (file_exists($imagePathSo)) - {{ $imagePathSo }} - @endif - - @if (file_exists($imagePathEO)) - {{ $imagePathEO }} - @endif - - @if (file_exists($imagePathDD)) - {{ $imagePathDD }} - @endif -
{{ $penilai->userPenilaiTeam->name ?? '' }}
- - {{ ucwords(strtolower('PENILAI')) }} - -
- {{ $senior_officer->name ?? '' }}
- - {{ ucwords(strtolower('SENIOR OFFICER')) }} - - -
- {{ User::role('EO Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('EXECUTIVE OFFICER')) }} - -
- {{ User::role('DD Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('DEPUTY DIRECTOR')) }} - -
+ @include('lpj::penilai.components.signature-approval') @include('lpj::penilai.components.footer') diff --git a/resources/views/penilai/components/print-out-sederhana.blade.php b/resources/views/penilai/components/print-out-sederhana.blade.php index 67b6e05..5cfc1a9 100644 --- a/resources/views/penilai/components/print-out-sederhana.blade.php +++ b/resources/views/penilai/components/print-out-sederhana.blade.php @@ -503,5 +503,43 @@
+
+ + + + + + + + + + @include('lpj::penilai.components.signature-approval') + +
+ +
+ +
+
    + +
  1. PENILAIAN INI DIBUAT BERDASARKAN ATURAN YANG + BERLAKU DI SUBDIT APPRAISAL
  2. +
  3. LAPORAN INI DIBUAT BERDASARKAN DATA FOTOCOPY + DOKUMEN YANG DITERIMA PENILAI DENGAN ASUMSI BAHWA DATA TERSEBUT SESUAI DENGAN + DOKUMEN ASLINYA
  4. +
  5. PENILAI TIDAK MELAKUKAN PEMBUKTIAN LEBIH RINCI ATAU + PENGAKUAN TERTULIS DARI PIHAK YANG DITEMUI SAAT PENILAIAN, ATAS INFORMASI YANG + DIBERIKAN SECARA LISAN SEHUBUNGAN DENGAN IDENTITAS DIRI DAN HUBUNGAN DI ANTARA + PIHAK TERKAIT SAAT MELAKUKAN INSPEKSI OBJEK YANG DINILAI
  6. +
  7. LAPORAN INI DIGUNAKAN HANYA UNTUK KEPENTINGAN + INTERNAL DAN DILARANG MENYEBARKAN KEPADA PIHAK KETIGA
  8. +
+
+
+ +
+
Demikian laporan penilai jaminan ini di buat secara objektif, tanpa adanya pengaruh baik intern + maupun ekstern
+
@include('lpj::penilai.components.footer') diff --git a/resources/views/penilai/components/print-out-standar.blade.php b/resources/views/penilai/components/print-out-standar.blade.php index 3c35cb3..84f4481 100644 --- a/resources/views/penilai/components/print-out-standar.blade.php +++ b/resources/views/penilai/components/print-out-standar.blade.php @@ -374,94 +374,7 @@ - - @php - use Modules\Usermanagement\Models\User; - - $penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first(); - $imagePathPenilai = storage_path( - 'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign, - ); - - $soUser = User::where('id', $senior_officer->id)->first(); - $imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign); - - $imagePathEO = storage_path( - 'app/public/signatures/' . - User::role('EO Appraisal')->first()->id . - '/' . - User::role('EO Appraisal')->first()->sign, - ); - - $imagePathDD = storage_path( - 'app/public/signatures/' . - User::role('DD Appraisal')->first()->id . - '/' . - User::role('DD Appraisal')->first()->sign, - ); - @endphp - - - @if ($permohonan->approval_so != null) - - @endif - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - - - - @if ($permohonan->approval_so != null) - - @endif - - @if ($permohonan->approval_eo != null) - - @endif - @if ($permohonan->approval_dd != null) - - @endif - -
- @if (file_exists($imagePathPenilai)) - {{ $imagePathPenilai }} - @endif - - @if (file_exists($imagePathSo)) - {{ $imagePathSo }} - @endif - - @if (file_exists($imagePathEO)) - {{ $imagePathEO }} - @endif - - @if (file_exists($imagePathDD)) - {{ $imagePathDD }} - @endif -
{{ $penilai->userPenilaiTeam->name ?? '' }}
- - {{ ucwords(strtolower('PENILAI')) }} - -
- {{ $senior_officer->name ?? '' }}
- - {{ ucwords(strtolower('SENIOR OFFICER')) }} - - -
- {{ User::role('EO Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('EXECUTIVE OFFICER')) }} - -
- {{ User::role('DD Appraisal')->first()->name ?? '' }}
- - {{ ucwords(strtolower('DEPUTY DIRECTOR')) }} - -
+ @include('lpj::penilai.components.signature-approval')

diff --git a/resources/views/penilai/components/signature-approval.blade.php b/resources/views/penilai/components/signature-approval.blade.php new file mode 100644 index 0000000..f71d05c --- /dev/null +++ b/resources/views/penilai/components/signature-approval.blade.php @@ -0,0 +1,105 @@ +
+ @php + use Modules\Usermanagement\Models\User; + + $penilaiUser = User::where('id', $penilai->userPenilaiTeam->id)->first(); + $imagePathPenilai = storage_path( + 'app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign, + ); + + $soUser = User::where('id', $senior_officer->id)->first(); + $imagePathSo = storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign); + + $imagePathEO = storage_path( + 'app/public/signatures/' . + User::role('EO Appraisal')->first()->id . + '/' . + User::role('EO Appraisal')->first()->sign, + ); + + $imagePathDD = storage_path( + 'app/public/signatures/' . + User::role('DD Appraisal')->first()->id . + '/' . + User::role('DD Appraisal')->first()->sign, + ); + @endphp + + + @if ($permohonan->approval_so != null) + + @endif + @if ($permohonan->approval_eo != null) + + @endif + @if ($permohonan->approval_dd != null) + + @endif + + + + @if ($permohonan->approval_so != null) + + @endif + + @if ($permohonan->approval_eo != null) + + @endif + @if ($permohonan->approval_dd != null) + + @endif + +
+ @if (file_exists($imagePathPenilai)) + {{ $imagePathPenilai }} + @endif + + @if (file_exists($imagePathSo)) + {{ $imagePathSo }} + @endif + + @if (file_exists($imagePathEO)) + {{ $imagePathEO }} + @endif + + @if (file_exists($imagePathDD)) + {{ $imagePathDD }} + @endif +
{{ $penilai->userPenilaiTeam->name ?? '' }}
+ + {{ ucwords(strtolower('PENILAI')) }} + +
+ + {{ isset($penilai->updated_at) ? formatTanggalIndonesia($penilai->updated_at) : '' }} + +
+ {{ $senior_officer->name ?? '' }}
+ + {{ ucwords(strtolower('SENIOR OFFICER')) }} + +
+ + {{ isset($permohonan->approval_so_at) ? formatTanggalIndonesia($permohonan->approval_so_at) : '' }} + +
+ {{ User::role('EO Appraisal')->first()->name ?? '' }}
+ + {{ ucwords(strtolower('EXECUTIVE OFFICER')) }} + +
+ + {{ isset($permohonan->approval_eo_at) ? formatTanggalIndonesia($permohonan->approval_eo_at) : '' }} + +
+ {{ User::role('DD Appraisal')->first()->name ?? '' }}
+ + {{ ucwords(strtolower('DEPUTY DIRECTOR')) }} + +
+ + {{ + isset($permohonan->approval_dd_at) ? + formatTanggalIndonesia($permohonan->approval_dd_at) : '' }} + +
diff --git a/resources/views/surveyor/components/print-out/footer.blade.php b/resources/views/surveyor/components/print-out/footer.blade.php index f5faf72..af19b41 100644 --- a/resources/views/surveyor/components/print-out/footer.blade.php +++ b/resources/views/surveyor/components/print-out/footer.blade.php @@ -5,7 +5,7 @@ diff --git a/routes/web.php b/routes/web.php index 76e0df1..fd5dbce 100644 --- a/routes/web.php +++ b/routes/web.php @@ -50,6 +50,9 @@ use Modules\Lpj\Http\Controllers\LaporanMonitoringSoController; use Modules\Lpj\Http\Controllers\LaporanDebitureController; use Modules\Lpj\Http\Controllers\LaporanUserController; use Modules\Lpj\Http\Controllers\LaporanSLAPenilaiController; +use Modules\Lpj\Http\Controllers\DaftarPustakaController; +use Modules\Lpj\Http\Controllers\CategoryDaftarPustakaController; + @@ -743,6 +746,7 @@ Route::middleware(['auth'])->group(function () { // laporan user Route::prefix('laporan-user')->name('laporan-user.')->group(function () { Route::get('/', [LaporanUserController::class, 'index'])->name('index'); + Route::get('export', [LaporanUserController::class, 'export'])->name('export'); Route::get('api/user-pemohon', [LaporanUserController::class, 'searchUserPemohon'])->name('api.user-pemohon'); Route::get('datatables', [LaporanUserController::class, 'dataTableForUserPemohon'])->name('datatables'); }); @@ -766,6 +770,16 @@ Route::middleware(['auth'])->group(function () { Route::get('datatables', [LaporanSLAPenilaiController::class, 'dataForDatatableSLaPenilai'])->name('datatables'); }); + // daftar pustaka + Route::resource('daftar-pustaka', DaftarPustakaController::class); + + // category daftar pustaka + Route::prefix('category-daftar-pustaka')->name('category-daftar-pustaka.')->group(function () { + Route::get('datatables', [CategoryDaftarPustakaController::class, 'dataForDatatables'])->name('datatables'); + }); + + Route::resource('category-daftar-pustaka', CategoryDaftarPustakaController::class); + }); require __DIR__ . '/registrasi.php';
- Jakarta {{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }} + {{ $permohonan->debiture->branch->name ?? '' }} {{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }}