diff --git a/app/Exports/JenisPenilaianExport.php b/app/Exports/JenisPenilaianExport.php new file mode 100644 index 0000000..7d633eb --- /dev/null +++ b/app/Exports/JenisPenilaianExport.php @@ -0,0 +1,46 @@ +id, + $row->code, + $row->name, + $row->created_at + ]; + } + + public function headings(): array + { + return [ + 'ID', + 'Code', + 'Jenis Penilaian', + 'Created At' + ]; + } + + public function columnFormats(): array + { + return [ + 'A' => NumberFormat::FORMAT_NUMBER, + 'D' => NumberFormat::FORMAT_DATE_DATETIME + ]; + } +} diff --git a/app/Exports/RegionExport.php b/app/Exports/RegionExport.php new file mode 100644 index 0000000..a7b2b51 --- /dev/null +++ b/app/Exports/RegionExport.php @@ -0,0 +1,49 @@ +id, + $row->code, + $row->name, + $row->created_at + ]; + } + + public function headings() + : array + { + return [ + 'ID', + 'Code', + 'Name', + 'Created At' + ]; + } + + public function columnFormats() + : array + { + return [ + 'A' => NumberFormat::FORMAT_NUMBER, + 'D' => NumberFormat::FORMAT_DATE_DATETIME + ]; + } + } diff --git a/app/Exports/TeamPenilaianExport.php b/app/Exports/TeamPenilaianExport.php new file mode 100644 index 0000000..3fdc1f7 --- /dev/null +++ b/app/Exports/TeamPenilaianExport.php @@ -0,0 +1,57 @@ +join('regions', 'teams.regions_id', '=', 'regions.id') + ->leftJoin('teams_users', 'teams.id', '=', 'teams_users.teams_id') + ->leftJoin('users', 'teams_users.user_id', '=', 'users.id') + ->groupBy('teams.id', 'teams.name', 'regions.name') + ->get(); + } + + public function map($row): array + { + return [ + $row->team_name, + $row->region_name, + $row->team_group, + ]; + } + + public function headings(): array + { + return [ + 'Name', + 'Region', + 'Anggota Team', + ]; + } + + public function columnFormats(): array + { + return [ + 'A' => NumberFormat::FORMAT_TEXT, + 'B' => NumberFormat::FORMAT_TEXT, + 'C' => NumberFormat::FORMAT_TEXT, + ]; + } +} diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php new file mode 100644 index 0000000..c24eee2 --- /dev/null +++ b/app/Http/Controllers/ActivityController.php @@ -0,0 +1,152 @@ +get(); + + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + 'penilaian' + ], + )->findOrFail($id); + + return view('lpj::activity.activitydetail', compact('id', 'status_permohonan', 'permohonan')); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + return view('lpj::edit'); + } + + /** + * Update the specified resource in storage. + */ + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('debitur.view')) { + // abort(403, 'Sorry! You are not allowed to view users.'); + } + + // Retrieve data from the database + $query = Permohonan::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('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 . '%'); + }); + } + + // Apply status filter if provided + if ($request->has('status') && !empty($request->get('status'))) { + $status = $request->get('status'); + $query->where('status', '=', $status); + } + + // Default sorting if no sort provided + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } else { + $query->orderBy('nomor_registrasi', 'asc'); // Default order by nomor_registrasi + } + + // Get the total count of records before paginating + $totalRecords = $query->count(); + + // Apply pagination if provided + if ($request->has('page') && $request->has('size')) { + $page = (int) $request->get('page', 1); // Default page is 1 + $size = (int) $request->get('size', 10); // Default size is 10 + $offset = ($page - 1) * $size; // Calculate the offset + + // Limit results based on pagination + $query->skip($offset)->take($size); + } + + // Get the filtered count of records (after search & filters applied) + $filteredRecords = $query->count(); + + // Get the data for the current page + $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get(); + + // Calculate the total number of pages + $pageCount = ceil($totalRecords / $request->get('size', 10)); + + // Return the response data as a JSON object + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $request->get('page', 1), + 'totalCount' => $totalRecords, + 'data' => $data, + ]); + } + + + /** + * Download the specified resource from storage. + */ + public function download($id) + { + $document = Permohonan::find($id); + return response()->download(storage_path('app/public/' . $document->dokumen)); + } +} diff --git a/app/Http/Controllers/JenisPenilaianController.php b/app/Http/Controllers/JenisPenilaianController.php new file mode 100644 index 0000000..e70fcdb --- /dev/null +++ b/app/Http/Controllers/JenisPenilaianController.php @@ -0,0 +1,156 @@ +validated(); + + try { + JenisPenilaian::create($validate); + return redirect()->route('basicdata.jenis-penilaian.index')->with('success', 'Jenis Penilaian created successfully'); + } catch (Exception $e) { + return redirect()->route('basicdata.jenis-penilaian.create')->with('error', $e->getMessage()); + } + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + $jenisPenilaian = JenisPenilaian::find($id); + return view('lpj::jenis_penilaian.form', compact('jenisPenilaian')); + } + + /** + * Update the specified resource in storage. + */ + public function update(JenisPenilaianRequest $request, $id) + { + + $validated = $request->validated(); + + + if ($validated) { + try { + $jenisPenilaian = JenisPenilaian::find($id); + $jenisPenilaian->update($validated); + return redirect()->route('basicdata.jenis-penilaian.index')->with('success', 'Jenis Penilaian updated successfully'); + } catch (Exception $e) { + return redirect()->route('basicdata.jenis-penilaian.edit', $id)->with('error', $e->getMessage()); + } + } + + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + try { + $jenisPenilaian = JenisPenilaian::find($id); + $jenisPenilaian->delete(); + echo json_encode(['success' => true, 'message' => 'Jenis Penilaian deleted successfully']); + + } catch (Exception $e) { + echo json_encode(['success' => false, 'message' => 'Failed to delete Jenis Penilaian']); + } + } + + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('jenis_penilaian.view')) { + //abort(403, 'Sorry! You are not allowed to view users.'); + } + + $query = JenisPenilaian::query(); + + 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%"); + }); + } + + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + $totalRecords = $query->count(); + + + $size = $request->get('size'); + $pageCount = 1; + + if ($size > 0) { + if ($request->has('page') && $request->has('size')) { + $page = $request->get('page'); + $offset = ($page - 1) * $size; + $query->skip($offset)->take($size); + $filteredRecords = $query->count(); + $pageCount = ceil($totalRecords / $size); + } + + $data = $query->get(); + } else { + $filteredRecords = $totalRecords; + $data = $query->get(); + } + + $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 + ]); + } + + + public function export() + { + return Excel::download(new JenisPenilaianExport(), 'jenis-penilaian.xlsx'); + } +} diff --git a/app/Http/Controllers/KJPPController.php b/app/Http/Controllers/KJPPController.php index f1f613b..4366426 100644 --- a/app/Http/Controllers/KJPPController.php +++ b/app/Http/Controllers/KJPPController.php @@ -127,7 +127,7 @@ class KJPPController extends Controller if ($file !== null) { // Jika ada file dari database maka hapus file yang lama ke file yang baru $kjpp = KJPP::find($id); - // Storage::delete('public/uploads_pdf/' . $kjpp->attachment); + Storage::delete('public/uploads_pdf/' . $kjpp->attachment); // Simpan file yang diunggah $file->storeAs('public/uploads_pdf', $filename); $validated['attachment'] = $filename; diff --git a/app/Http/Controllers/PenilaianController.php b/app/Http/Controllers/PenilaianController.php new file mode 100644 index 0000000..0576671 --- /dev/null +++ b/app/Http/Controllers/PenilaianController.php @@ -0,0 +1,225 @@ +all());exit; + $validatedData = $request->validated(); + if ($validatedData) { + try { + $penilaian = Penilaian::create($validatedData); + + $permohonan = Permohonan::where('nomor_registrasi', $request->nomor_registrasi); + $permohonan->update([ + 'status' => 'assign', + ]); + + return redirect()->route('penilaian.index')->with('success', 'Penilaian berhasil disimpan'); + } catch (Exception $e) { + + return redirect()->route('penilaian.index')->with('error', $e->getMessage()); + } + } + } + + /** + * Show the form for creating a new resource. + */ + public function create($id) + { + return view('lpj::penilaian.form'); + } + + /** + * Update the specified resource in storage. + */ + public function update(PenilaianRequest $request, $id) + { + $validate = $request->validated(); + if ($validate) { + try { + $penilaian = Penilaian::where('nomor_registrasi', $request->nomor_registrasi)->firstOrFail(); + $penilaian->update($validate); + $permohonan = Permohonan::where('nomor_registrasi', $request->nomor_registrasi); + $permohonan->update([ + 'status' => 'assign', + ]); + + return redirect()->route('penilaian.index', $id)->with('success', 'Penilaian berhasil diubah'); + } catch (Exception $e) { + return redirect()->route('penilaian.index', $id)->with('error', $e->getMessage()); + } + } + } + + /** + * Show the form for editing the specified resource. + */ + public function assignment($id) + { + $permohonan = Permohonan::with( + [ + 'user', + 'debiture.province', + 'debiture.city', + 'debiture.district', + 'debiture.village', + 'branch', + 'tujuanPenilaian', + ], + )->findOrFail($id); + + $jenisPenilaian = JenisPenilaian::all(); + $teamPenilai = Teams::with(['regions', 'teamsUsers'])->get(); + + $penilaian = Penilaian::where('nomor_registrasi', $permohonan->nomor_registrasi)->first(); + + return view('lpj::penilaian.form', compact('permohonan', 'teamPenilai', 'jenisPenilaian', 'penilaian')); + } + + /** + * Remove the specified resource from storage. + */ + + public function revisi(PenilaianRequest $request, $nomor_registrasi) + { + $validatedData = $request->validated(); + if ($validatedData) { + + try { + + if (isset($validatedData['dokumen']) && $request->hasFile('dokumen')) { + $file_name = $validatedData['dokumen']->getClientOriginalName(); + $validatedData['dokumen']->storeAs('public/dokumen_revisi', $file_name); + } + + $dataToUpdate = [ + 'keterangan' => $validatedData['keterangan'], + 'dokumen' => 'dokumen_revisi/' . $file_name, + '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()); + } + } + } + + + + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('debitur.view')) { + // abort(403, 'Sorry! You are not allowed to view users.'); + } + + $query = Permohonan::query(); + + 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 . '%'); + }); + } + + $query->whereRaw('LOWER(status) = ?', ['register']); + + if ($request->has('sortOrder') && !empty($request->get('sortOrder'))) { + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + $totalRecords = $query->count(); + + $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); + } + + $filteredRecords = $query->count(); + $data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get(); + + $pageCount = ceil($totalRecords / $size); + + $currentPage = max(1, $request->get('page', 1)); + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $currentPage, + 'totalCount' => $totalRecords, + 'data' => $data, + ]); + } + + + + 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); + } + + return response()->json([], 200); + } + + +} diff --git a/app/Http/Controllers/RegionController.php b/app/Http/Controllers/RegionController.php new file mode 100644 index 0000000..e6aa981 --- /dev/null +++ b/app/Http/Controllers/RegionController.php @@ -0,0 +1,164 @@ +validated(); + + if ($validate) { + try { + // Save to database + Regions::create($validate); + return redirect() + ->route('basicdata.region.index') + ->with('success', 'region created successfully'); + } catch (Exception $e) { + return redirect() + ->route('basicdata.region.create') + ->with('error', 'Failed to create region'); + } + } + } + + + public function edit($id) + { + $region = Regions::find($id); + return view('lpj::region.create', compact('region')); + + } + + /** + * Update the specified resource in storage. + */ + public function update(RegionRequest $request, $id) + { + $validate = $request->validated(); + + if ($validate) { + try { + // Update in database + $region = Regions::find($id); + $region->update($validate); + return redirect() + ->route('basicdata.region.index') + ->with('success', 'Region updated successfully'); + } catch (Exception $e) { + return redirect() + ->route('basicdata.region.edit', $id) + ->with('error', 'Failed to update region'); + } + } + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + try { + // Delete from database + $region = Regions::find($id); + $region->delete(); + + echo json_encode(['success' => true, 'message' => 'Region deleted successfully']); + } catch (Exception $e) { + echo json_encode(['success' => false, 'message' => 'Failed to delete region']); + } + } + + public function dataForDatatables(Request $request) + { + + + if (is_null($this->user) || !$this->user->can('region.view')) { + //abort(403, 'Sorry! You are not allowed to view users.'); + } + + $query = Regions::query(); + + 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%"); + }); + } + + if($request->has('sortOrder') && !empty($request->get('sortOrder'))){ + $order = $request->get('sortOrder'); + $column = $request->get('sortField'); + $query->orderBy($column, $order); + } + + $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; + + // dump($data); + + // 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 + ]); + } + + public function export() + { + return Excel::download(new RegionExport, 'region.xlsx'); + } +} diff --git a/app/Http/Controllers/TeamsController.php b/app/Http/Controllers/TeamsController.php new file mode 100644 index 0000000..bf0a39b --- /dev/null +++ b/app/Http/Controllers/TeamsController.php @@ -0,0 +1,260 @@ +toArray(); + $region = Regions::whereNotIn('id', $regionTeam)->get(); + + // cek user apakah sudah ada di tabel teams_users + $userTeam = TeamsUsers::pluck('user_id')->toArray(); + $user = User::whereNotIn('id', $userTeam) + ->with('roles') + ->get(); + + return view('lpj::teams.form', compact('region', 'user')); + } + + /** + * Store a newly created resource in storage. + */ + public function store(TeamsRequest $request) + { + $validate = $request->validated(); + + DB::beginTransaction(); + try { + $teams = Teams::create($validate); + + $users = $request->input('user', []); + + // loop untuk insert data users ke tabel teams_users + foreach ($users as $user) { + TeamsUsers::create([ + 'teams_id' => $teams->id, + 'user_id' => $user + ]); + } + + DB::commit(); + + return redirect() + ->route('basicdata.teams.index') + ->with('success', 'Data saved successfully. '); + } catch (Exception $e) { + + DB::rollBack(); + + return redirect() + ->route('basicdata.teams.create') + ->with('error', 'Failed to save data. '); + } + } + + /** + * Show the specified resource. + */ + public function show($id) + { + return view('lpj::show'); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit($id) + { + $teams = Teams::find($id); + + + $region = Regions::all(); + $usedUsers = TeamsUsers::where('teams_id', '!=', $id)->pluck('user_id')->toArray(); + $user = User::whereNotIn('id', $usedUsers) + ->with('roles') + ->get(); + // Ambil user yang sudah ada di tim ini + $selectedUsers = $teams->teamsUsers->pluck('user_id')->toArray(); + + return view('lpj::teams.form', compact('teams', 'region', 'user', 'selectedUsers')); + } + + /** + * Update the specified resource in storage. + */ + public function update(TeamsRequest $request, $id) + { + $validate = $request->validated(); + + DB::beginTransaction(); + try { + $teams = Teams::findOrFail($id); + + // Update data tim + $teams->update($validate); + $userIds = $request->input('user', []); + + $teams->teamsUsers()->delete(); + + + foreach ($userIds as $userId) { + TeamsUsers::create([ + 'teams_id' => $teams->id, + 'user_id' => $userId + ]); + } + + DB::commit(); + + return redirect() + ->route('basicdata.teams.index') + ->with('success', 'Data updated successfully. '); + } catch (Exception $e) { + + DB::rollBack(); + + return redirect() + ->route('basicdata.teams.create') + ->with('error', 'Failed to update data. '); + } + } + + /** + * Remove the specified resource from storage. + */ + public function destroy($id) + { + DB::beginTransaction(); + try { + + $teams = Teams::findOrFail($id); + $teams->teamsUsers()->delete(); + + // Hapus tim + $teams->delete(); + + DB::commit(); + + echo json_encode(['success' => true, 'message' => 'Team has been deleted successfully']); + + } catch (Exception $e) { + DB::rollBack(); + echo json_encode(['success' => false, 'message' => 'Failed to delete Team']); + } + } + + public function dataForDatatables(Request $request) + { + if (is_null($this->user) || !$this->user->can('teams.view')) { + //abort(403, 'Sorry! You are not allowed to view users.'); + } + + // Inisialisasi query + $query = Teams::select('teams.id as id', 'teams.name as team_name', 'regions.name as region_name') + ->join('regions', 'teams.regions_id', '=', 'regions.id') + ->leftJoin('teams_users', 'teams.id', '=', 'teams_users.teams_id') + ->leftJoin('users', 'teams_users.user_id', '=', 'users.id') + ->addSelect('users.id as user_id', 'users.name as user_name'); + + // Filter pencarian + if ($request->has('search') && !empty($request->get('search'))) { + $search = $request->get('search'); + $query->where(function ($q) use ($search) { + $q->where('teams.name', 'LIKE', "%$search%") + ->orWhere('regions.name', 'LIKE', "%$search%") + ->orWhere('users.name', 'LIKE', "%$search%"); + }); + } + + // Sorting + 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 + $size = $request->get('size', 10); + $page = $request->get('page', 1); + $offset = ($page - 1) * $size; + + // Ambil data dengan pagination + $data = $query->skip($offset)->take($size)->get(); + $filteredRecords = $data->count(); + $pageCount = ceil($totalRecords / $size); + + // Ambil ID pengguna dari hasil query + $userIds = $data->pluck('user_id')->unique(); + + // Ambil data pengguna dengan peran mereka + $users = User::whereIn('id', $userIds) + ->with('roles') + ->get() + ->keyBy('id'); + + // Format data + $formattedData = $data->groupBy('id')->map(function ($group) use ($users) { + $team = $group->first(); + $team->user_team = $group->map(function ($item) use ($users) { + $user = $users->get($item->user_id); + return [ + 'nama' => $item->user_name, + 'roles' => $user ? $user->roles->pluck('name')->toArray() : [], + ]; + })->toArray(); + return $team; + })->values(); + + return response()->json([ + 'draw' => $request->get('draw'), + 'recordsTotal' => $totalRecords, + 'recordsFiltered' => $filteredRecords, + 'pageCount' => $pageCount, + 'page' => $page, + 'totalCount' => $totalRecords, + 'data' => $formattedData + ]); + } + + + + + public function export() + { + return Excel::download(new TeamPenilaianExport(), 'team-penilai.xlsx'); + } + + +} diff --git a/app/Http/Requests/JenisPenilaianRequest.php b/app/Http/Requests/JenisPenilaianRequest.php new file mode 100644 index 0000000..f8479f0 --- /dev/null +++ b/app/Http/Requests/JenisPenilaianRequest.php @@ -0,0 +1,41 @@ + 'required|string|max:255', + 'status' => 'nullable|boolean', + 'authorized_at' => 'nullable|datetime', + 'authorized_status' => 'nullable|string|max:1', + 'authorized_by' => 'nullable|exists:users,id', + ]; + + if ($this->method() == 'PUT') { + + $rules['code'] = 'required|string|max:3|unique:jenis_penilaian,code,' . $this->id; + + } else { + $rules['code'] = 'required|string|max:3|unique:jenis_penilaian,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/PenilaianRequest.php b/app/Http/Requests/PenilaianRequest.php new file mode 100644 index 0000000..0d9c1bf --- /dev/null +++ b/app/Http/Requests/PenilaianRequest.php @@ -0,0 +1,59 @@ +input('action'); + + if ($action === 'revisi') { + return [ + 'dokumen' => 'required|file|mimes:pdf', + 'keterangan' => 'required|string', + ]; + } + + + + return [ + 'jenis_penilaian_id' => 'required|max:255', + 'teams_id' => 'required|max:255', + 'tanggal_kunjungan' => 'required|max:255', + 'status' => 'required|string', + 'nomor_registrasi' => 'required|string', + 'surveyor_id' => 'nullable|required_without:penilai_surveyor_id', + 'penilaian_id' => 'nullable|required_without:penilai_surveyor_id', + 'penilai_surveyor_id' => 'nullable|required_without_all:surveyor_id,penilaian_id', + 'keterangan' => 'nullable', + ]; + } + + + /** + * Determine if the user is authorized to make this request. + */ + public function authorize(): bool + { + return true; + } + + protected function prepareForValidation() + { + // Menetapkan nilai default untuk 'status' jika tidak ada dalam request + $this->merge([ + 'status' => $this->status ?? 'assign', + ]); + } +} diff --git a/app/Http/Requests/PermohonanRequest.php b/app/Http/Requests/PermohonanRequest.php index edd4169..8d6ef20 100644 --- a/app/Http/Requests/PermohonanRequest.php +++ b/app/Http/Requests/PermohonanRequest.php @@ -23,6 +23,8 @@ 'status' => 'required|string', 'jenis_fasilitas_kredit_id' => 'required|exists:jenis_fasilitas_kredit,id', 'nilai_plafond_id' => 'required|exists:nilai_plafond,id', + 'status_bayar' => 'required|string', + 'nilai_njop' => 'nullable|numeric' ]; return $rules; diff --git a/app/Http/Requests/RegionRequest.php b/app/Http/Requests/RegionRequest.php new file mode 100644 index 0000000..fd9ab1d --- /dev/null +++ b/app/Http/Requests/RegionRequest.php @@ -0,0 +1,38 @@ + 'required|string|max:255', + 'status' => 'nullable|boolean', + 'authorized_at' => 'nullable|datetime', + 'authorized_status' => 'nullable|string|max:1', + 'authorized_by' => 'nullable|exists:users,id', + ]; + + if ($this->method() == 'PUT') { + $rules['code'] = 'required|string|max:3|unique:regions,code,' . $this->id; + } else { + $rules['code'] = 'required|string|max:3|unique:regions,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/StatusPermohonanRequest.php b/app/Http/Requests/StatusPermohonanRequest.php index 21bd8e5..d0a9ac6 100644 --- a/app/Http/Requests/StatusPermohonanRequest.php +++ b/app/Http/Requests/StatusPermohonanRequest.php @@ -16,6 +16,7 @@ $rules = [ 'description' => 'nullable|max:255', 'status' => 'required|boolean', + 'slug' => 'nullable|max:255', ]; if ($this->method() == 'PUT') { @@ -37,9 +38,9 @@ public function prepareForValidation() { - $this->merge([ + return $this->merge([ 'status' => isset($this->status) ? 1 : 0, - 'slug'=> Str::slug($this->name) + 'slug' => Str::slug($this->name), ]); } } diff --git a/app/Http/Requests/TeamsRequest.php b/app/Http/Requests/TeamsRequest.php new file mode 100644 index 0000000..c77f4a5 --- /dev/null +++ b/app/Http/Requests/TeamsRequest.php @@ -0,0 +1,41 @@ + 'required|string|max:255', + 'status' => 'nullable|boolean', + 'regions_id' => 'required|nullable|exists:regions,id', + 'user.*' => 'nullable|exists:users,id', + 'authorized_at' => 'nullable|datetime', + 'authorized_status' => 'nullable|string|max:1', + 'authorized_by' => 'nullable|exists:users,id', + + ]; + + if ($this->method() == 'PUT') { + $rules['code'] = 'required|string|max:3|unique:teams,code,' . $this->id; + } else { + $rules['code'] = 'required|string|max:3|unique:teams,code'; + } + + return $rules; + } + + /** + * Determine if the user is authorized to make this request. + */ + public function authorize(): bool + { + return true; + } +} diff --git a/app/Models/JenisPenilaian.php b/app/Models/JenisPenilaian.php new file mode 100644 index 0000000..f072a82 --- /dev/null +++ b/app/Models/JenisPenilaian.php @@ -0,0 +1,25 @@ +hasMany(Penilaian::class , 'jenis_penilaian_id', 'id'); + } + +} diff --git a/app/Models/Penilaian.php b/app/Models/Penilaian.php new file mode 100644 index 0000000..93bd3e8 --- /dev/null +++ b/app/Models/Penilaian.php @@ -0,0 +1,56 @@ +belongsTo(JenisPenilaian::class, 'jenis_penilaian_id', 'id'); + } + + public function teams(){ + return $this->belongsTo(Teams::class, 'teams_id', 'id'); + } + + public function users(){ + return $this->belongsTo(User::class, 'user_id', 'id'); + } + + public function userPenilai(){ + return $this->belongsTo(User::class, 'penilaian_id', 'id'); + } + + public function userSurveyor(){ + return $this->belongsTo(User::class, 'surveyor_id', 'id'); + } + + public function userPenilaiSurveyor(){ + return $this->belongsTo(User::class, 'penilai_surveyor_id', 'id'); + } + + public function permohonan(){ + return $this->belongsTo(Permohonan::class, 'nomor_registrasi', 'nomor_registrasi'); + } + + +} diff --git a/app/Models/Permohonan.php b/app/Models/Permohonan.php index cf6d5e6..5b63bdc 100644 --- a/app/Models/Permohonan.php +++ b/app/Models/Permohonan.php @@ -6,6 +6,8 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; use Modules\Lpj\Database\Factories\PermohonanFactory; use Modules\Usermanagement\Models\User; +use Modules\Lpj\Models\TujuanPenilaian; +use Modules\Lpj\Models\JenisFasilitasKredit; class Permohonan extends Base { @@ -18,13 +20,15 @@ class Permohonan extends Base 'tujuan_penilaian_id', 'debiture_id', 'keterangan', + 'dokumen', 'jenis_fasilitas_kredit_id', 'nilai_plafond_id', 'status', 'authorized_at', 'authorized_status', 'authorized_by', - + 'status_bayar', + 'nilai_njop' ]; public function user(){ @@ -54,4 +58,8 @@ class Permohonan extends Base public function jenisFasilitasKredit(){ return $this->belongsTo(JenisFasilitasKredit::class); } + + public function penilaian(){ + return $this->belongsTo(Penilaian::class, 'nomor_registrasi', 'nomor_registrasi'); + } } diff --git a/app/Models/Regions.php b/app/Models/Regions.php new file mode 100644 index 0000000..28836b5 --- /dev/null +++ b/app/Models/Regions.php @@ -0,0 +1,26 @@ +hasMany(Teams::class, 'regions_id', 'id'); + } +} diff --git a/app/Models/Teams.php b/app/Models/Teams.php new file mode 100644 index 0000000..0fd48a8 --- /dev/null +++ b/app/Models/Teams.php @@ -0,0 +1,40 @@ +belongsTo(Regions::class, 'regions_id', 'id'); + } + + public function teamsUsers(){ + return $this->hasMany(TeamsUsers::class, 'teams_id', 'id'); + } + + public function penilaian(){ + return $this->hasMany(Penilaian::class, 'teams_id', 'id'); + } + + + +} + diff --git a/app/Models/TeamsUsers.php b/app/Models/TeamsUsers.php new file mode 100644 index 0000000..a47cae9 --- /dev/null +++ b/app/Models/TeamsUsers.php @@ -0,0 +1,33 @@ +belongsTo(Teams::class, 'teams_id', 'id'); + } + + + public function user() + { + return $this->belongsTo(User::class, 'user_id', 'id'); + } +} diff --git a/database/migrations/2024_09_05_030302_create_regions_table.php b/database/migrations/2024_09_05_030302_create_regions_table.php new file mode 100644 index 0000000..3f942ff --- /dev/null +++ b/database/migrations/2024_09_05_030302_create_regions_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('code')->unique()->index(); + $table->string('name'); + $table->char('status')->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('regions'); + } +}; diff --git a/database/migrations/2024_09_05_030338_create_jenis_penilaian_table.php b/database/migrations/2024_09_05_030338_create_jenis_penilaian_table.php new file mode 100644 index 0000000..bf31ab4 --- /dev/null +++ b/database/migrations/2024_09_05_030338_create_jenis_penilaian_table.php @@ -0,0 +1,37 @@ +id(); + $table->string('code')->unique()->index(); + $table->string('name'); + $table->char('status')->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('jenis_penilaian'); + } +}; diff --git a/database/migrations/2024_09_05_030405_create_teams_table.php b/database/migrations/2024_09_05_030405_create_teams_table.php new file mode 100644 index 0000000..8ecffde --- /dev/null +++ b/database/migrations/2024_09_05_030405_create_teams_table.php @@ -0,0 +1,41 @@ +id(); + $table->foreignIdFor(Regions::class)->constrained()->onDelete('cascade'); + $table->string('code')->unique()->index(); + $table->string('name'); + $table->char('status')->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('teams'); + } +}; diff --git a/database/migrations/2024_09_05_030417_create_teams_users_table.php b/database/migrations/2024_09_05_030417_create_teams_users_table.php new file mode 100644 index 0000000..32167ee --- /dev/null +++ b/database/migrations/2024_09_05_030417_create_teams_users_table.php @@ -0,0 +1,39 @@ +id(); + $table->foreignIdFor(Teams::class)->constrained()->onDelete('cascade'); + $table->unsignedBigInteger('user_id'); + $table->boolean('status')->default(true)->nullable(); + $table->char('authorized_status', 1)->nullable(); + $table->timestamps(); + $table->timestamp('authorized_at')->nullable(); + $table->unsignedBigInteger('authorized_by')->nullable(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->unsignedBigInteger('deleted_by')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('teams_users'); + } +}; diff --git a/database/migrations/2024_09_05_070712_create_penilaian_table.php b/database/migrations/2024_09_05_070712_create_penilaian_table.php new file mode 100644 index 0000000..cb0a397 --- /dev/null +++ b/database/migrations/2024_09_05_070712_create_penilaian_table.php @@ -0,0 +1,46 @@ +id(); + $table->foreignIdFor(JenisPenilaian::class); + $table->foreignIdFor(Teams::class); + $table->datetime('tanggal_kunjungan'); + $table->text('keterangan')->nullable(); + $table->string('status')->nullable(); + $table->string('nomor_registrasi')->references('nomor_registrasi')->on(Permohonan::class)->nullable(); + $table->integer('penilaian_id')->nullable(); + $table->integer('surveyor_id')->nullable(); + $table->integer('penilai_surveyor_id')->nullable(); + $table->timestamps(); + $table->char('authorized_status', 1)->nullable(); + $table->timestamp('authorized_at')->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('penilaian'); + } +}; diff --git a/database/migrations/2024_09_19_075113_update_permohonan_table.php b/database/migrations/2024_09_19_075113_update_permohonan_table.php new file mode 100644 index 0000000..ec58aca --- /dev/null +++ b/database/migrations/2024_09_19_075113_update_permohonan_table.php @@ -0,0 +1,30 @@ +enum('status_bayar',['sudah_bayar','belum_bayar'])->default('sudah_bayar'); + $table->string('nilai_njop')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('permohonan', function (Blueprint $table) { + $table->dropColumn('status_bayar'); + $table->dropColumn('nilai_njop'); + }); + } +}; diff --git a/database/migrations/2024_09_24_014023_update_permohonan_table.php b/database/migrations/2024_09_24_014023_update_permohonan_table.php new file mode 100644 index 0000000..6103ce2 --- /dev/null +++ b/database/migrations/2024_09_24_014023_update_permohonan_table.php @@ -0,0 +1,29 @@ +string('dokumen')->nullable()->after('status'); + $table->string('keterangan')->nullable()->after('dokumen'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('permohonan', function (Blueprint $table) { + $table->dropColumn('dokumen'); + $table->dropColumn('keterangan'); + }); + } +}; diff --git a/module.json b/module.json index 64686ef..9060084 100644 --- a/module.json +++ b/module.json @@ -211,6 +211,46 @@ "attributes": [], "permission": "", "roles": [] + }, + { + "title": "Region", + "path": "basicdata.region", + "classes": "", + "attributes": [], + "permission": "", + "roles": [] + }, + { + "title": "Staff Appraisal", + "path": "basicdata.teams", + "classes": "", + "attributes": [], + "permission": "", + "roles": [] + }, + { + "title": "Jenis Penilaian", + "path": "basicdata.jenis-penilaian", + "classes": "", + "attributes": [], + "permission": "", + "roles": [] + }, + { + "title": "KJPP", + "path": "basicdata.kjpp", + "classes": "", + "attributes": [], + "permission": "", + "roles": [] + }, + { + "title": "Ijin Usaha", + "path": "basicdata.ijin_usaha", + "classes": "", + "attributes": [], + "permission": "", + "roles": [] } ] } diff --git a/resources/views/activity/activitydetail.blade.php b/resources/views/activity/activitydetail.blade.php new file mode 100644 index 0000000..ec335f0 --- /dev/null +++ b/resources/views/activity/activitydetail.blade.php @@ -0,0 +1,120 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName()) }} +@endsection + +@section('content') + @push('styles') + + @endpush +
+
+
+

+ Activity Permohonan +

+
+ + Back +
+
+
+
+

+ Nomor Register Permohonan: +

+ + {{ $permohonan->nomor_registrasi }} + +
+ +
+

+ Pemohon: +

+ + {{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }} + +
+ +
+

+ Tujan Permohonan: +

+ + {{ $permohonan->tujuanPenilaian->name }} + +
+ +
+
+ + +
+
+

+ Status Activity +

+
+
+
+ @foreach ($status_permohonan as $index => $status) + {{-- Cek apakah status adalah "Revisi" dan status permohonan tidak sama, maka tidak ditampilkan --}} + @if (strtolower($status->name) == 'revisi' && strtolower($status->name) != strtolower($permohonan->status)) + @continue + @endif + +
+ @if ($index < count($status_permohonan) - 1) +
+
+ @endif + +
+ @switch(strtolower($status->name)) + @case('order') + + @break + + @case('revisi') + + @break + + @case('register') + + @break + + @case('assign') + + @break + + @case('survey') + + @break + + @default + + @endswitch + +
+ @include('lpj::activity.components.status') +
+ @endforeach +
+
+ +
+
+@endsection diff --git a/resources/views/activity/components/status.blade.php b/resources/views/activity/components/status.blade.php new file mode 100644 index 0000000..0952cc3 --- /dev/null +++ b/resources/views/activity/components/status.blade.php @@ -0,0 +1,94 @@ +
+
+
+ {{ $status->name . ' ' . $status->description }} +
+ + @if (strtolower($status->name) == 'order') + {{ $permohonan->created_at }} + @elseif (strtolower($status->name) == strtolower($permohonan->status)) + {{ $permohonan->updated_at }} + @endif + +
+ + @php + $isCurrentStatus = strtolower($status->name) == strtolower($permohonan->status); + $hasKeterangan = isset($permohonan->keterangan); + @endphp + + {{-- Tampilkan keterangan jika status 'register' --}} + @if (strtolower($status->name) == 'register' && $hasKeterangan && $isCurrentStatus) +
+
+

+ {{ $permohonan->keterangan }} +

+
+
+ @endif + + {{-- Tampilkan dokumen dan keterangan jika status 'revisi' --}} + @if (strtolower($status->name) == 'revisi' && $hasKeterangan) +
+
+ + {{ basename($permohonan->dokumen) }} + + +

+ {{ $permohonan->keterangan }} +

+
+
+ @endif + + {{-- Tampilkan informasi assign jika status 'assign' --}} + @if (strtolower($status->name) == 'assign' && $isCurrentStatus) +
+
+ {{-- Informasi Penilai, Surveyor, dan Penilai Surveyor --}} +
+ @isset($permohonan->penilaian) + @if ($penilai = $permohonan->penilaian->userPenilai->name ?? null) +
+

Penilai:

+ {{ $penilai }} +
+ @endif + + @if ($surveyor = $permohonan->penilaian->userSurveyor->name ?? null) +
+

Surveyor:

+ {{ $surveyor }} +
+ @endif + + @if ($penilaiSurveyor = $permohonan->penilaian->userPenilaiSurveyor->name ?? null) +
+

Penilai Surveyor:

+ {{ $penilaiSurveyor }} +
+ @endif + @endisset +
+ + {{-- Teams --}} +
+

Teams:

+
    + @foreach ($permohonan->penilaian->teams->teamsUsers as $item) +
  • {{ $item->user->name }}
  • + @endforeach +
+
+ + {{-- Catatan --}} +
+

Catatan:

+ {{ $permohonan->penilaian->keterangan }} +
+
+
+ @endif +
diff --git a/resources/views/activity/index.blade.php b/resources/views/activity/index.blade.php new file mode 100644 index 0000000..4dd0179 --- /dev/null +++ b/resources/views/activity/index.blade.php @@ -0,0 +1,211 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('activity') }} +@endsection +@section('content') +
+
+
+
+ Activity +
+
+

+ {{-- Daftar {{}} --}} +

+
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + +
+ + + Nomor Registrasi + + + + Tanggal Permohonan + + + + User Pemohon + + + + Cabang Pemohon + + + + Debitur + + + + Tujuan Penilaian + + + + Status + + + Action
+
+ +
+
+
+
+@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/debitur/components/dokumen.blade.php b/resources/views/debitur/components/dokumen.blade.php index 0dfcc6f..4485b8d 100644 --- a/resources/views/debitur/components/dokumen.blade.php +++ b/resources/views/debitur/components/dokumen.blade.php @@ -59,7 +59,7 @@ @if(isset($document->id)) @endif - @foreach($jenisJaminan as $row) @if(isset($document)) diff --git a/resources/views/jenis_penilaian/form.blade.php b/resources/views/jenis_penilaian/form.blade.php new file mode 100644 index 0000000..9571d8f --- /dev/null +++ b/resources/views/jenis_penilaian/form.blade.php @@ -0,0 +1,64 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName()) }} +@endsection + +@section('content') +
+ +
+ + @if (isset($jenisPenilaian->id)) + @method('PUT') + + @endif + + @csrf +
+
+

+ {{ isset($jenisPenilaian->id) ? 'Edit' : 'Tambah' }} jenis penilaian +

+
+ Back +
+
+
+
+ +
+ + @error('code') + {{ $message }} + @enderror +
+
+
+ +
+ + @error('name') + {{ $message }} + @enderror +
+
+
+ +
+
+
+
+
+@endsection diff --git a/resources/views/jenis_penilaian/index.blade.php b/resources/views/jenis_penilaian/index.blade.php new file mode 100644 index 0000000..7e26e37 --- /dev/null +++ b/resources/views/jenis_penilaian/index.blade.php @@ -0,0 +1,160 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('basicdata.jenis-penilaian') }} +@endsection + +@section('content') +
+
+
+

+ Daftar Jenis penilaian +

+ +
+
+
+ + + + + + + + + +
+ + + Code + + + Jenis penilaian + + Action
+
+ + + +
+
+
+@endsection + + + +@push('scripts') + + + +@endpush diff --git a/resources/views/pemilik_jaminan/form.blade.php b/resources/views/pemilik_jaminan/form.blade.php index cc39a92..1efcb79 100644 --- a/resources/views/pemilik_jaminan/form.blade.php +++ b/resources/views/pemilik_jaminan/form.blade.php @@ -71,21 +71,31 @@ Nama Lengkap
- - @error('name') - {{ $message }} - @enderror +
+
+ + @error('name') + {{ $message }} + @enderror +
+
+ + @error('nomor_id') + {{ $message }} + @enderror +
+
+ +
+
- - @error('nomor_id') - {{ $message }} - @enderror +
@@ -242,3 +252,43 @@ @endsection + + +@push('scripts') + +@endpush diff --git a/resources/views/penilaian/form.blade.php b/resources/views/penilaian/form.blade.php new file mode 100644 index 0000000..63b642c --- /dev/null +++ b/resources/views/penilaian/form.blade.php @@ -0,0 +1,617 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render(request()->route()->getName()) }} +@endsection + +@push('styles') + +@endpush + + +@section('content') +
+
+
+

+ Data Permohonan +

+
+ + Back +
+
+
+
+

+ Nomor Register Permohonan: +

+ + {{ $permohonan->nomor_registrasi }} + +
+ +
+

+ Pemohon: +

+ + {{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }} + +
+ +
+

+ Tujan Permohonan: +

+ + {{ $permohonan->tujuanPenilaian->name }} + +
+ +
+
+ +
+
+

+ Detail Debutur +

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Name + + {{ $permohonan->debiture->name ?? '' }} +
+ Email + + {{ $permohonan->debiture->email ?? '' }} +
+ Phone + + {{ $permohonan->debiture->phone ?? '' }} +
+ Address + + {{ $permohonan->debiture->address ?? '' }} +
+   + + {{ $permohonan->debiture->village->name ?? '' }}, + {{ $permohonan->debiture->district->name ?? '' }}, + {{ $permohonan->debiture->city->name ?? '' }}, + {{ $permohonan->debiture->province->name ?? '' }} - + {{ $permohonan->debiture->village->postal_code ?? '' }} +
+
+
+ + + + + + + + + + + + + + + + + +
+ Cabang + + {{ $permohonan->debiture->branch->name ?? '' }} +
+ CIF + + {{ $permohonan->debiture->cif ?? '' }} +
+ Nomor Rekening + + {{ $permohonan->debiture->nomor_rekening ?? '' }} +
+ NPWP + + {{ $permohonan->debiture->npwp ?? '' }} +
+
+
+
+
+ +
+
+

+ Data Jaminan +

+
+
+ @foreach ($permohonan->debiture->documents as $dokumen) +
+ + +
+ @endforeach +
+
+ +
+
+

+ Form Assignment +

+ +
+ +
+
+ @if (isset($penilaian->nomor_registrasi)) + @method('PUT') + @endif + @csrf +
+
+ + +
+ + @error('jenis_penilaian_id') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('teams_id') + {{ $message }} + @enderror +
+
+ +
+ +
+ + + @error('surveyor_id') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('penilaian_id') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('penilai_surveyor_id') + {{ $message }} + @enderror +
+
+ + +
+ + +
+ + @error('tanggal_kunjungan') + {{ $message }} + @enderror +
+
+ +
+ +
+ +
+ @error('keterangan') + {{ $message }} + @enderror +
+
+ + +
+ +
+ + +
+ + + +
+ + + +@endsection +@push('scripts') + + + +@endpush diff --git a/resources/views/penilaian/index.blade.php b/resources/views/penilaian/index.blade.php new file mode 100644 index 0000000..0a5db4c --- /dev/null +++ b/resources/views/penilaian/index.blade.php @@ -0,0 +1,169 @@ +@extends('layouts.main') + +@section('breadcrumbs') + {{ Breadcrumbs::render('penilaian') }} +@endsection + +@section('content') +
+
+
+
+ Daftar Penilaian +
+
+

+ {{-- Daftar {{}} --}} +

+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + + + + + + + + + + + + +
+ + + Nomor Registrasi + + + Tanggal Permohonan + + + User Pemohon + + + Cabang Pemohon + + + Debitur + + + Tujuan Penilaian + + + Status + + Action
+
+ +
+
+
+
+@endsection + + + +@push('scripts') + + +@endpush diff --git a/resources/views/permohonan/form.blade.php b/resources/views/permohonan/form.blade.php index 45be1d5..7c82edd 100644 --- a/resources/views/permohonan/form.blade.php +++ b/resources/views/permohonan/form.blade.php @@ -128,6 +128,34 @@ +
+ +
+ + @error('status') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('nilai_njop') + {{ $message }} + @enderror +
+
+
+
+ +
+ + @error('status') + {{ $message }} + @enderror +
+
+ +
+ +
+ + @error('nilai_njop') + {{ $message }} + @enderror +
+
+