perbaikan CONFLICT prosespenawaran - index.blade.php
This commit is contained in:
@@ -1,10 +1,41 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function formatAlamat($alamat) {
|
use Carbon\Carbon;
|
||||||
return
|
|
||||||
($alamat->address ? $alamat->address . ', ' : '') .
|
function formatTanggalIndonesia($date)
|
||||||
(isset($alamat->village) ? $alamat->village->name.', ' : '') .
|
{
|
||||||
(isset($alamat->city) ? $alamat->city->name.', ' : '') .
|
$carbonDate = Carbon::parse($date);
|
||||||
(isset($alamat->province) ? $alamat->province->name.', ' : '') .
|
$indonesianMonths = [
|
||||||
($alamat->postal_code ?? '');
|
'Januari',
|
||||||
}
|
'Februari',
|
||||||
|
'Maret',
|
||||||
|
'April',
|
||||||
|
'Mei',
|
||||||
|
'Juni',
|
||||||
|
'Juli',
|
||||||
|
'Agustus',
|
||||||
|
'September',
|
||||||
|
'Oktober',
|
||||||
|
'November',
|
||||||
|
'Desember',
|
||||||
|
];
|
||||||
|
$month = $indonesianMonths[$carbonDate->month - 1];
|
||||||
|
return $carbonDate->format('d') . ' ' . $month . ' ' . $carbonDate->format('Y');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function formatRupiah($number)
|
||||||
|
{
|
||||||
|
$number = (float) $number;
|
||||||
|
return 'Rp ' . number_format($number, 2, ',', '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function formatAlamat($alamat)
|
||||||
|
{
|
||||||
|
return ($alamat->address ? $alamat->address . ', ' : '') .
|
||||||
|
(isset($alamat->village) ? $alamat->village->name . ', ' : '') .
|
||||||
|
(isset($alamat->city) ? $alamat->city->name . ', ' : '') .
|
||||||
|
(isset($alamat->province) ? $alamat->province->name . ', ' : '') .
|
||||||
|
($alamat->postal_code ?? '');
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,15 +38,15 @@ class ProsesPenawaranController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve data from the database
|
// Retrieve data from the database
|
||||||
$query =PenawaranTender::query()->where('status','=','tender')->withCount('penawarandetails');
|
$query = PenawaranTender::query()->where('status', '=', 'tender')->withCount('penawarandetails');
|
||||||
|
|
||||||
// Apply search filter if provided
|
// Apply search filter if provided
|
||||||
if ($request->has('search') && !empty($request->get('search'))) {
|
if ($request->has('search') && !empty($request->get('search'))) {
|
||||||
$search = $request->get('search');
|
$search = $request->get('search');
|
||||||
$query->where(function ($q) use ($search) {
|
$query->where(function ($q) use ($search) {
|
||||||
$q->where('nomor_registrasi', 'LIKE', '%' . $search . '%');
|
$q->where('nomor_registrasi', 'LIKE', '%' . $search . '%');
|
||||||
$q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search . '%');
|
$q->orWhere('tanggal_permohonan', 'LIKE', '%' . $search . '%');
|
||||||
|
$q->orWhereRelation('tujuanPenilaianKJPP', 'name', 'LIKE', '%' . $search . '%');
|
||||||
$q->orWhere('status', 'LIKE', '%' . $search . '%');
|
$q->orWhere('status', 'LIKE', '%' . $search . '%');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ class ProsesPenawaranController extends Controller
|
|||||||
|
|
||||||
// Get the data for the current page
|
// Get the data for the current page
|
||||||
//$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get();
|
//$data = $query->with(['user', 'debiture', 'branch', 'tujuanPenilaian'])->get();
|
||||||
$data = $query->get();
|
$data = $query->with(['tujuanPenilaianKJPP'])->get();
|
||||||
|
|
||||||
// Calculate the page count
|
// Calculate the page count
|
||||||
$pageCount = ceil($totalRecords / $request->get('size'));
|
$pageCount = ceil($totalRecords / $request->get('size'));
|
||||||
@@ -109,26 +109,24 @@ class ProsesPenawaranController extends Controller
|
|||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
$id = $request->id;
|
$id = $request->id;
|
||||||
$penawaran = PenawaranTender::findOrFail($id);
|
$penawaran = PenawaranTender::findOrFail($id);
|
||||||
$penawrandetails = PenawaranDetailTender::where('penawaran_id','=',$id)
|
$penawrandetails = PenawaranDetailTender::where('penawaran_id', '=', $id)
|
||||||
->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id')
|
->leftJoin('kjpp', 'kjpp.id', '=', 'detail_penawaran.kjpp_rekanan_id')
|
||||||
->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name')
|
->select('detail_penawaran.*', 'kjpp.code AS kjpp_code', 'kjpp.name AS kjpp_name')
|
||||||
->where('detail_penawaran.status','=',1)
|
->where('detail_penawaran.status', '=', 1)
|
||||||
->get();
|
->get();
|
||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
if ($penawaran) {
|
if ($penawaran) {
|
||||||
$i=0;
|
$i = 0;
|
||||||
foreach($penawrandetails as $obj)
|
foreach ($penawrandetails as $obj) {
|
||||||
{
|
|
||||||
// dd($obj->dokumen_persetujuan);
|
// dd($obj->dokumen_persetujuan);
|
||||||
if($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan))
|
if ($obj->dokumen_persetujuan && Storage::disk('public')->exists($obj->dokumen_persetujuan)) {
|
||||||
{
|
|
||||||
$penawrandetails_path = Storage::url($obj->dokumen_persetujuan);
|
$penawrandetails_path = Storage::url($obj->dokumen_persetujuan);
|
||||||
$penawrandetails[$i]->dokumen_persetujuan = $penawrandetails_path;
|
$penawrandetails[$i]->dokumen_persetujuan = $penawrandetails_path;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$kjpp=null;
|
$kjpp = null;
|
||||||
$kjpp = KJPP::pluck('name', 'id');
|
$kjpp = KJPP::pluck('name', 'id');
|
||||||
$data['penawaran'] = $penawaran;
|
$data['penawaran'] = $penawaran;
|
||||||
$data['penawrandetails'] = $penawrandetails;
|
$data['penawrandetails'] = $penawrandetails;
|
||||||
@@ -157,33 +155,30 @@ class ProsesPenawaranController extends Controller
|
|||||||
$tindakan = null;
|
$tindakan = null;
|
||||||
if (request()->ajax()) {
|
if (request()->ajax()) {
|
||||||
$validator = ProsesPenawaranController::rulesEditnya($request, $id);
|
$validator = ProsesPenawaranController::rulesEditnya($request, $id);
|
||||||
|
|
||||||
if ($validator['fails']) {
|
if ($validator['fails']) {
|
||||||
$data['message'] = $validator['errors'];
|
$data['message'] = $validator['errors'];
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$dataku = ['updated_by' => Auth::id(),
|
$dataku = [
|
||||||
'updated_at' => now(),
|
'updated_by' => Auth::id(),
|
||||||
'biaya_penawaran' => str_replace(".","",$request->biaya_penawaran)
|
'updated_at' => now(),
|
||||||
];
|
'biaya_penawaran' => str_replace(".", "", $request->biaya_penawaran)
|
||||||
|
];
|
||||||
|
|
||||||
if ($request->hasFile('dokumen_persetujuan'))
|
if ($request->hasFile('dokumen_persetujuan')) {
|
||||||
{
|
|
||||||
$file_tmp = $request->file('dokumen_persetujuan');
|
$file_tmp = $request->file('dokumen_persetujuan');
|
||||||
$folderPath = 'uploads/penawaran/';
|
$folderPath = 'uploads/penawaran/';
|
||||||
if ($file_tmp->isValid())
|
if ($file_tmp->isValid()) {
|
||||||
{
|
$myFile = $file_tmp->getClientOriginalName(); // nama file with extension
|
||||||
$myFile=$file_tmp->getClientOriginalName(); // nama file with extension
|
|
||||||
$file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension
|
$file_name = pathinfo($myFile, PATHINFO_FILENAME); // nama file without extension
|
||||||
|
|
||||||
$extension = $file_tmp->getClientOriginalExtension();
|
$extension = $file_tmp->getClientOriginalExtension();
|
||||||
// kjppID_penawaranID_namaFile_userID_time
|
// kjppID_penawaranID_namaFile_userID_time
|
||||||
$newFileName = $request->kjpp_rekanan_id.'_'.$id.'_'.$file_name.'_'.Auth::user()->id."_".time() .'.'. $extension;
|
$newFileName = $request->kjpp_rekanan_id . '_' . $id . '_' . $file_name . '_' . Auth::user()->id . "_" . time() . '.' . $extension;
|
||||||
Storage::disk('public')->put($folderPath.'/'.$newFileName,file_get_contents($file_tmp));
|
Storage::disk('public')->put($folderPath . '/' . $newFileName, file_get_contents($file_tmp));
|
||||||
|
|
||||||
$newFileNameWithPath = $folderPath . $newFileName;
|
$newFileNameWithPath = $folderPath . $newFileName;
|
||||||
$dataku['attachment'] = $myFile;
|
$dataku['attachment'] = $myFile;
|
||||||
@@ -195,26 +190,20 @@ class ProsesPenawaranController extends Controller
|
|||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
$data['detailpenawaran_id'] = $id;
|
$data['detailpenawaran_id'] = $id;
|
||||||
$data['message'] = 'Proses Penawarn KJPP successfully';
|
$data['message'] = 'Proses Penawarn KJPP successfully';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] = 'Silahkan upload file pdf';
|
$data['message'] = 'Silahkan upload file pdf';
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] = 'Silahkan upload file';
|
$data['message'] = 'Silahkan upload file';
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] = 'Proses Penawarn KJPP failed.';
|
$data['message'] = 'Proses Penawarn KJPP failed.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
$data['message'] = 'no ajax request';
|
$data['message'] = 'no ajax request';
|
||||||
@@ -251,58 +240,51 @@ class ProsesPenawaranController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function updateAll(Request $request, $id): JsonResponse
|
public function updateAll(Request $request, $id): JsonResponse
|
||||||
{
|
{
|
||||||
// init
|
// init
|
||||||
$data = array();
|
$data = array();
|
||||||
$dataku = array();
|
$dataku = array();
|
||||||
$model = PenawaranTender::findOrFail($id);
|
$model = PenawaranTender::findOrFail($id);
|
||||||
$checkActiveDateRange = $this->checkActiveDateRangePenawaran($model->start_date, $model->end_date);
|
$checkActiveDateRange = $this->checkActiveDateRangePenawaran($model->start_date, $model->end_date);
|
||||||
|
|
||||||
// cek masa aktif penawaran
|
// cek masa aktif penawaran
|
||||||
if($checkActiveDateRange)
|
if ($checkActiveDateRange) {
|
||||||
{
|
|
||||||
|
$checkKelengkapanDetailKJPP = $this->checkKelengkapanDetailKJPP($id);
|
||||||
$checkKelengkapanDetailKJPP = $this->checkKelengkapanDetailKJPP($id);
|
if ($checkKelengkapanDetailKJPP) {
|
||||||
if($checkKelengkapanDetailKJPP)
|
|
||||||
{
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
$dataku = ['status' => 'tendered',
|
$dataku = [
|
||||||
|
'status' => 'tendered',
|
||||||
'updated_by' => Auth::id(),
|
'updated_by' => Auth::id(),
|
||||||
'updated_at' => now()
|
'updated_at' => now()
|
||||||
];
|
];
|
||||||
|
|
||||||
$dataPermohonan = ['status' => 'tendered',
|
$dataPermohonan = [
|
||||||
|
'status' => 'tendered',
|
||||||
'updated_by' => Auth::id(),
|
'updated_by' => Auth::id(),
|
||||||
'updated_at' => now()
|
'updated_at' => now()
|
||||||
];
|
];
|
||||||
|
|
||||||
$permohonan = Permohonan::where('nomor_registrasi','=', $model->nomor_registrasi)->first();
|
$permohonan = Permohonan::where('nomor_registrasi', '=', $model->nomor_registrasi)->first();
|
||||||
|
|
||||||
$model->update($dataku);
|
$model->update($dataku);
|
||||||
$permohonan->update($dataPermohonan);
|
$permohonan->update($dataPermohonan);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
|
||||||
$data['message'] = "Sukses melakukan Proses Penawaran";
|
$data['message'] = "Sukses melakukan Proses Penawaran";
|
||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
// dd($e);
|
// dd($e);
|
||||||
$data['message'] = "Gagal melakukan Proses Penawaran";
|
$data['message'] = "Gagal melakukan Proses Penawaran";
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data['message'] = "Silahkan lengkapi data KJPP";
|
$data['message'] = "Silahkan lengkapi data KJPP";
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data['message'] = "Penawaran sudah di tutup";
|
$data['message'] = "Penawaran sudah di tutup";
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
}
|
}
|
||||||
@@ -316,57 +298,48 @@ class ProsesPenawaranController extends Controller
|
|||||||
$end_date = strtotime($end_date1);
|
$end_date = strtotime($end_date1);
|
||||||
$todays_date = strtotime(now());
|
$todays_date = strtotime(now());
|
||||||
|
|
||||||
$allow=true;
|
$allow = true;
|
||||||
if ($todays_date >= $start_date && $todays_date <= $end_date)
|
if ($todays_date >= $start_date && $todays_date <= $end_date) {
|
||||||
{
|
|
||||||
//Penawaran dibuka
|
//Penawaran dibuka
|
||||||
$allow=true;
|
$allow = true;
|
||||||
}
|
} else {
|
||||||
else
|
if ($todays_date < $start_date) {
|
||||||
{
|
|
||||||
if($todays_date < $start_date)
|
|
||||||
{
|
|
||||||
//Penawaran Belum dibuka
|
//Penawaran Belum dibuka
|
||||||
$allow=true;
|
$allow = true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//Penawaran sudah ditutup
|
//Penawaran sudah ditutup
|
||||||
$allow=false;
|
$allow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $allow;
|
|
||||||
|
|
||||||
|
return $allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkKelengkapanDetailKJPP($id)
|
public function checkKelengkapanDetailKJPP($id)
|
||||||
{
|
{
|
||||||
$allow=true;
|
$allow = true;
|
||||||
// DB::enableQueryLog();
|
// DB::enableQueryLog();
|
||||||
// detail_penawaran apakah isian biaya_penawaran, attachment, dokumen_persetujuan sudah lengkap?
|
// detail_penawaran apakah isian biaya_penawaran, attachment, dokumen_persetujuan sudah lengkap?
|
||||||
$query = PenawaranDetailTender::select('id')
|
$query = PenawaranDetailTender::select('id')
|
||||||
->where('penawaran_id','=',$id)
|
->where('penawaran_id', '=', $id)
|
||||||
->where(function($query) {
|
->where(function ($query) {
|
||||||
$query->orWhere('biaya_penawaran', '', "");
|
$query->orWhere('biaya_penawaran', '', "");
|
||||||
$query->orWhereNull('biaya_penawaran');
|
$query->orWhereNull('biaya_penawaran');
|
||||||
|
|
||||||
$query->orWhere('attachment', '', "");
|
|
||||||
$query->orWhereNull('attachment');
|
|
||||||
|
|
||||||
$query->orWhere('dokumen_persetujuan', '', "");
|
$query->orWhere('attachment', '', "");
|
||||||
$query->orWhereNull('dokumen_persetujuan');
|
$query->orWhereNull('attachment');
|
||||||
})->get();
|
|
||||||
// $sql = DB::getQueryLog();
|
$query->orWhere('dokumen_persetujuan', '', "");
|
||||||
|
$query->orWhereNull('dokumen_persetujuan');
|
||||||
|
})->get();
|
||||||
if (sizeof($query)>0)
|
// $sql = DB::getQueryLog();
|
||||||
{
|
|
||||||
$allow=false;
|
|
||||||
}
|
if (sizeof($query) > 0) {
|
||||||
|
$allow = false;
|
||||||
|
}
|
||||||
|
|
||||||
return $allow;
|
return $allow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateStatusPenawaranKJPP(Request $request, $id): JsonResponse
|
public function updateStatusPenawaranKJPP(Request $request, $id): JsonResponse
|
||||||
@@ -377,19 +350,20 @@ class ProsesPenawaranController extends Controller
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$model = PenawaranDetailTender::findOrFail($id);
|
$model = PenawaranDetailTender::findOrFail($id);
|
||||||
$data['id']=$id;
|
$data['id'] = $id;
|
||||||
|
|
||||||
$dataku = ['status' => '0',
|
$dataku = [
|
||||||
|
'status' => '0',
|
||||||
'updated_by' => Auth::id(),
|
'updated_by' => Auth::id(),
|
||||||
'updated_at' => now()
|
'updated_at' => now()
|
||||||
];
|
];
|
||||||
|
|
||||||
$model->update($dataku);
|
$model->update($dataku);
|
||||||
|
|
||||||
$data['message'] = "Sukses delete Penawaran KJPP";
|
$data['message'] = "Sukses delete Penawaran KJPP";
|
||||||
$data['status'] = 'success';
|
$data['status'] = 'success';
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
// dd($e);
|
// dd($e);
|
||||||
$data['message'] = "Gagal delete Penawaran KJPP";
|
$data['message'] = "Gagal delete Penawaran KJPP";
|
||||||
$data['status'] = 'error';
|
$data['status'] = 'error';
|
||||||
@@ -400,6 +374,6 @@ class ProsesPenawaranController extends Controller
|
|||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
$prosespenawaran = PenawaranTender::find($id);
|
$prosespenawaran = PenawaranTender::find($id);
|
||||||
return view('lpj::prosespenawaran.show', compact('id','prosespenawaran'));
|
return view('lpj::prosespenawaran.show', compact('id', 'prosespenawaran'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,21 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Modules\Lpj\Models\Permohonan;
|
use Modules\Lpj\Models\Permohonan;
|
||||||
use Modules\Lpj\Models\Branch;
|
use Modules\Lpj\Models\Branch;
|
||||||
|
use Modules\Lpj\Models\Surveyor;
|
||||||
|
use Modules\Lpj\Models\BentukTanah;
|
||||||
|
use Modules\Lpj\Models\KonturTanah;
|
||||||
use Modules\Location\Models\Province;
|
use Modules\Location\Models\Province;
|
||||||
|
use Modules\Lpj\Models\PosisiKavling;
|
||||||
|
use Modules\Lpj\Models\KondisiFisikTanah;
|
||||||
|
use Modules\Lpj\Models\KetinggianTanah;
|
||||||
|
use Modules\Lpj\Models\SifatBangunan;
|
||||||
|
use Modules\Lpj\Models\JenisBangunan;
|
||||||
|
use Modules\Lpj\Models\KondisiBangunan;
|
||||||
|
use Modules\Lpj\Models\SpekBangunan;
|
||||||
|
use Modules\Lpj\Models\SpekKategoritBangunan;
|
||||||
|
use Modules\Lpj\Models\SaranaPelengkap;
|
||||||
|
use Modules\Lpj\Models\ArahMataAngin;
|
||||||
|
use Modules\Lpj\Http\Requests\SurveyorRequest;
|
||||||
|
|
||||||
class SurveyorController extends Controller
|
class SurveyorController extends Controller
|
||||||
{
|
{
|
||||||
@@ -21,21 +35,7 @@ class SurveyorController extends Controller
|
|||||||
return view('lpj::surveyor.index');
|
return view('lpj::surveyor.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
return view('lpj::create');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*/
|
|
||||||
public function store(Request $request): RedirectResponse
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the specified resource.
|
* Show the specified resource.
|
||||||
@@ -51,16 +51,46 @@ class SurveyorController extends Controller
|
|||||||
'debiture.village',
|
'debiture.village',
|
||||||
'branch',
|
'branch',
|
||||||
'tujuanPenilaian',
|
'tujuanPenilaian',
|
||||||
'penilaian'
|
'penilaian',
|
||||||
|
'documents',
|
||||||
],
|
],
|
||||||
)->findOrFail($id);
|
)->findOrFail($id);
|
||||||
|
|
||||||
$surveyor = $id;
|
$surveyor = $id;
|
||||||
$branches = Branch::all();
|
$branches = Branch::all();
|
||||||
$provinces = Province::all();
|
$provinces = Province::all();
|
||||||
|
$bentukTanah = BentukTanah::all();
|
||||||
|
$konturTanah = KonturTanah::all();
|
||||||
|
$posisiKavling = PosisiKavling::all();
|
||||||
|
$ketinggianTanah = KetinggianTanah::all();
|
||||||
|
$kondisiFisikTanah = KondisiFisikTanah::all();
|
||||||
|
$jenisBangunan = JenisBangunan::all();
|
||||||
|
$kondisiBangunan = KondisiBangunan::all();
|
||||||
|
$sifatBangunan = SifatBangunan::all();
|
||||||
|
$spekKategoriBagunan = SpekKategoritBangunan::all();
|
||||||
|
$spekBangunan = SpekBangunan::all();
|
||||||
|
$saranaPelengkap = SaranaPelengkap::all();
|
||||||
|
$arahMataAngin = ArahMataAngin::all();
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::surveyor.detail', compact('permohonan', 'surveyor', 'branches', 'provinces'));
|
return view('lpj::surveyor.detail', compact(
|
||||||
|
'permohonan',
|
||||||
|
'surveyor',
|
||||||
|
'branches',
|
||||||
|
'provinces',
|
||||||
|
'bentukTanah',
|
||||||
|
'konturTanah',
|
||||||
|
'posisiKavling',
|
||||||
|
'kondisiFisikTanah',
|
||||||
|
'ketinggianTanah',
|
||||||
|
'kondisiBangunan',
|
||||||
|
'jenisBangunan',
|
||||||
|
'sifatBangunan',
|
||||||
|
'spekKategoriBagunan',
|
||||||
|
'spekBangunan',
|
||||||
|
'saranaPelengkap',
|
||||||
|
'arahMataAngin',
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -238,7 +268,273 @@ class SurveyorController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function data(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
$type = $request->route('type');
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah'],
|
||||||
|
'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah'],
|
||||||
|
'posisi-kavling' => ['Posisi Kavling', 'posisi-kavling'],
|
||||||
|
'ketinggian-tanah' => ['Ketinggian Tanah', 'ketinggian-tanah'],
|
||||||
|
'kondisi-fisik-tanah' => ['Kondisi Fisik Tanah', 'kondisi-fisik-tanah'],
|
||||||
|
'jenis-bangunan' => ['Jenis Bangunan', 'jenis-bangunan'],
|
||||||
|
'kondisi-bangunan' => ['Kondisi Bangunan', 'kondisi-bangunan'],
|
||||||
|
'sifat-bangunan' => ['Sifat Bangunan', 'sifat-bangunan'],
|
||||||
|
'sarana-pelengkap' => ['Sarana Pelengkap', 'sarana-pelengkap'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$header = $headers[$type] ?? '';
|
||||||
|
|
||||||
|
return view('lpj::surveyor.data.index', compact('header'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function createData($type)
|
||||||
|
{
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah'],
|
||||||
|
'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah'],
|
||||||
|
'posisi-kavling' => ['Posisi Kavling', 'posisi-kavling'],
|
||||||
|
'ketinggian-tanah' => ['Ketinggian Tanah', 'ketinggian-tanah'],
|
||||||
|
'kondisi-fisik-tanah' => ['Kondisi Fisik Tanah', 'kondisi-fisik-tanah'],
|
||||||
|
'jenis-bangunan' => ['Jenis Bangunan', 'jenis-bangunan'],
|
||||||
|
'kondisi-bangunan' => ['Kondisi Bangunan', 'kondisi-bangunan'],
|
||||||
|
'sifat-bangunan' => ['Sifat Bangunan', 'sifat-bangunan'],
|
||||||
|
'sarana-pelengkap' => ['Sarana Pelengkap', 'sarana-pelengkap'],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$header = $headers[$type] ?? '';
|
||||||
|
return view('lpj::surveyor.data.form', compact('header'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function storeData(SurveyorRequest $request, $type)
|
||||||
|
{
|
||||||
|
|
||||||
|
$validate = $request->validated();
|
||||||
|
if ($validate) {
|
||||||
|
|
||||||
|
$type = $request->route('type');
|
||||||
|
|
||||||
|
$modelClasses = [
|
||||||
|
'bentuk-tanah' => BentukTanah::class,
|
||||||
|
'kontur-tanah' => KonturTanah::class,
|
||||||
|
'posisi-kavling' => PosisiKavling::class,
|
||||||
|
'bentuk-tanah' => BentukTanah::class,
|
||||||
|
'kontur-tanah' => KonturTanah::class,
|
||||||
|
'posisi-kavling' => PosisiKavling::class,
|
||||||
|
'ketinggian-tanah' => KetinggianTanah::class,
|
||||||
|
'kondisi-fisik-tanah' => KondisiFisikTanah::class,
|
||||||
|
'jenis-bangunan' => JenisBangunan::class,
|
||||||
|
'kondisi-bangunan' => KondisiBangunan::class,
|
||||||
|
'sifat-bangunan' => SifatBangunan::class,
|
||||||
|
'sarana-pelengkap' => SaranaPelengkap::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!array_key_exists($type, $modelClasses)) {
|
||||||
|
return redirect()
|
||||||
|
->route('basicdata.'. $type .'.index')
|
||||||
|
->with('error', 'Invalid type specified.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$modelClass = $modelClasses[$type];
|
||||||
|
$data = $request->all();
|
||||||
|
$data['status'] = true;
|
||||||
|
$modelClass::create($data);
|
||||||
|
|
||||||
|
return redirect()
|
||||||
|
->route('basicdata.' . $type .'.index')
|
||||||
|
->with('success', 'created successfully');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function editData($type, $id)
|
||||||
|
{
|
||||||
|
$dataMap = [
|
||||||
|
'bentuk-tanah' => ['Bentuk Tanah', 'bentuk-tanah', BentukTanah::class],
|
||||||
|
'kontur-tanah' => ['Kontur Tanah', 'kontur-tanah', KonturTanah::class],
|
||||||
|
'posisi-kavling' => ['Posisi Kavling', 'posisi-kavling', PosisiKavling::class],
|
||||||
|
'ketinggian-tanah' => ['Ketinggian Tanah', 'ketinggian-tanah', KetinggianTanah::class],
|
||||||
|
'kondisi-fisik-tanah' => ['Kondisi Fisik Tanah', 'kondisi-fisik-tanah', KondisiFisikTanah::class],
|
||||||
|
'jenis-bangunan' => ['Jenis Bangunan', 'jenis-bangunan', JenisBangunan::class],
|
||||||
|
'kondisi-bangunan' => ['Kondisi Bangunan', 'kondisi-bangunan', KondisiBangunan::class],
|
||||||
|
'sifat-bangunan' => ['Sifat Bangunan', 'sifat-bangunan', SifatBangunan::class],
|
||||||
|
'spek-bangunan' => ['Spek Bangunan', 'spek-bangunan', SpekBangunan::class],
|
||||||
|
'spek-kategori-bangunan' => ['Spek Kategori Bangunan', 'spek-kategori-bangunan', SpekKategoritBangunan::class],
|
||||||
|
'sarana-pelengkap' => ['Sarana Pelengkap', 'sarana-pelengkap', SaranaPelengkap::class],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if (!array_key_exists($type, $dataMap)) {
|
||||||
|
return redirect()->back()->with('error', 'Invalid type specified.');
|
||||||
|
}
|
||||||
|
|
||||||
|
[$headers, $routeName, $modelClass] = $dataMap[$type];
|
||||||
|
|
||||||
|
$header = $dataMap[$type] ?? '';
|
||||||
|
$model = $modelClass::findOrFail($id);
|
||||||
|
|
||||||
|
return view('lpj::surveyor.data.form', compact('header', 'model'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function updateData(SurveyorRequest $request, $type, $id)
|
||||||
|
{
|
||||||
|
$validate = $request->validated();
|
||||||
|
if ($validate) {
|
||||||
|
$modelClasses = [
|
||||||
|
'bentuk-tanah' => BentukTanah::class,
|
||||||
|
'kontur-tanah' => KonturTanah::class,
|
||||||
|
'posisi-kavling' => PosisiKavling::class,
|
||||||
|
'ketinggian-tanah' => KetinggianTanah::class,
|
||||||
|
'kondisi-fisik-tanah' => KondisiFisikTanah::class,
|
||||||
|
'jenis-bangunan' => JenisBangunan::class,
|
||||||
|
'kondisi-bangunan' => KondisiBangunan::class,
|
||||||
|
'sifat-bangunan' => SifatBangunan::class,
|
||||||
|
'sarana-pelengkap' => SaranaPelengkap::class,
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
// Check if the provided type exists in the modelClasses
|
||||||
|
if (!array_key_exists($type, $modelClasses)) {
|
||||||
|
return redirect()
|
||||||
|
->route('basicdata.' . $type . '.index')
|
||||||
|
->with('error', 'Invalid type specified.');
|
||||||
|
}
|
||||||
|
$modelClass = $modelClasses[$type];
|
||||||
|
$model = $modelClass::findOrFail($id);
|
||||||
|
$model->update($validate);
|
||||||
|
|
||||||
|
// Redirect back with a success message
|
||||||
|
return redirect()
|
||||||
|
->route('basicdata.' . $type . '.index')
|
||||||
|
->with('success', 'Updated successfully');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function dataForDatatablesData(Request $request, $type)
|
||||||
|
{
|
||||||
|
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
|
||||||
|
|
||||||
|
$models = [
|
||||||
|
'Bentuk Tanah' => BentukTanah::class,
|
||||||
|
'Kontur Tanah' => KonturTanah::class,
|
||||||
|
'Posisi Kavling' => PosisiKavling::class,
|
||||||
|
'Ketinggian Tanah' => KetinggianTanah::class,
|
||||||
|
'Kondisi Fisik Tanah' => KondisiFisikTanah::class,
|
||||||
|
'Jenis Bangunan' => JenisBangunan::class,
|
||||||
|
'Kondisi Bangunan' => KondisiBangunan::class,
|
||||||
|
'Sifat Bangunan' => SifatBangunan::class,
|
||||||
|
// 'Spek Kategori Bangunan' => SpekKategoritBangunan::class,
|
||||||
|
// 'Spek Bangunan' => SpekBangunan::class,
|
||||||
|
'Sarana Pelengkap' => SaranaPelengkap::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if (array_key_exists($type, $models)) {
|
||||||
|
$query = $models[$type]::query();
|
||||||
|
} else {
|
||||||
|
throw new InvalidArgumentException("Invalid type: $type");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy($id, $type)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$modelClasses = [
|
||||||
|
'bentuk-tanah' => BentukTanah::class,
|
||||||
|
'kontur-tanah' => KonturTanah::class,
|
||||||
|
'posisi-kavling' => PosisiKavling::class,
|
||||||
|
'ketinggian-tanah' => KetinggianTanah::class,
|
||||||
|
'kondisi-fisik-tanah' => KondisiFisikTanah::class,
|
||||||
|
'jenis-bangunan' => JenisBangunan::class,
|
||||||
|
'kondisi-bangunan' => KondisiBangunan::class,
|
||||||
|
'sifat-bangunan' => SifatBangunan::class,
|
||||||
|
'sarana-pelengkap' => SaranaPelengkap::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if (!array_key_exists($type, $modelClasses)) {
|
||||||
|
return response()->json(['success' => false, 'message' => 'Invalid type specified.'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$modelClass = $modelClasses[$type];
|
||||||
|
$model = $modelClass::findOrFail($id);
|
||||||
|
|
||||||
|
$model->delete();
|
||||||
|
return response()->json(['success' => true, 'message' => 'deleted successfully']);
|
||||||
|
} catch (ModelNotFoundException $e) {
|
||||||
|
return response()->json(['success' => false, 'message' => 'not found.'], 404);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return response()->json(['success' => false, 'message' => 'Failed to delete.'], 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -395,11 +395,6 @@ class TenderController extends Controller
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function proses_penawaran_index()
|
|
||||||
{
|
|
||||||
return view('lpj::proses_penawaran/index');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tambahkan method untuk API di controller
|
// Tambahkan method untuk API di controller
|
||||||
public function checkPenawaranExistence($nomor_registrasi)
|
public function checkPenawaranExistence($nomor_registrasi)
|
||||||
{
|
{
|
||||||
|
|||||||
64
app/Http/Requests/SurveyorRequest.php
Normal file
64
app/Http/Requests/SurveyorRequest.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class SurveyorRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
: array
|
||||||
|
{
|
||||||
|
|
||||||
|
$action = $this->input('action');
|
||||||
|
|
||||||
|
$uniqueTable = [
|
||||||
|
'bentuk-tanah' => 'bentuk_tanah',
|
||||||
|
'kontur-tanah' => 'kontur_tanah',
|
||||||
|
'posisi-kavling' => 'posisi_kavling',
|
||||||
|
'ketinggian-tanah' => 'ketinggian_tanah',
|
||||||
|
'kondisi-fisik-tanah' => 'kondisi_fisik_tanah',
|
||||||
|
'kondisi-bangunan' => 'kondisi_bangunan',
|
||||||
|
'sifat-bangunan' => 'sifat_bangunan',
|
||||||
|
'sarana-pelengkap' => 'sarana_pelengkap',
|
||||||
|
'lalu_lintas_lokasi' => 'lalu_lintas_lokasi',
|
||||||
|
'tingkat-keramaian' => 'tingkat_keramaian',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$rules = [
|
||||||
|
'name' => 'required|max:255',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$id = $this->route('id');
|
||||||
|
|
||||||
|
if ($this->method() == 'PUT' || $this->method() == 'PATCH') {
|
||||||
|
$rules['code'] = 'required|max:50|unique:' . $uniqueTable[$action] . ',code,' . $id;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$rules['code'] = 'required|max:50|unique:' . $uniqueTable[$action] . ',code';
|
||||||
|
}
|
||||||
|
return $rules;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
: bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function prepareForValidation()
|
||||||
|
{
|
||||||
|
$this->merge([
|
||||||
|
'status' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/BentukTanah.php
Normal file
24
app/Models/BentukTanah.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\BentukTanahFactory;
|
||||||
|
|
||||||
|
class BentukTanah extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'bentuk_tanah';
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
|
||||||
|
protected static function newFactory(): BentukTanahFactory
|
||||||
|
{
|
||||||
|
//return BentukTanahFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
22
app/Models/GolonganMasySekitar.php
Normal file
22
app/Models/GolonganMasySekitar.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\GolonganMasySekitarFactory;
|
||||||
|
|
||||||
|
class GolonganMasySekitar extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [];
|
||||||
|
|
||||||
|
protected static function newFactory(): GolonganMasySekitarFactory
|
||||||
|
{
|
||||||
|
//return GolonganMasySekitarFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Models/JenisBangunan.php
Normal file
23
app/Models/JenisBangunan.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\JenisBangunanFactory;
|
||||||
|
|
||||||
|
class JenisBangunan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'jenis_bangunan';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
protected static function newFactory(): JenisBangunanFactory
|
||||||
|
{
|
||||||
|
//return JenisBangunanFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/KetinggianTanah.php
Normal file
24
app/Models/KetinggianTanah.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\KetinggianTanahFactory;
|
||||||
|
|
||||||
|
class KetinggianTanah extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'ketinggian_tanah';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): KetinggianTanahFactory
|
||||||
|
{
|
||||||
|
//return KetinggianTanahFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Models/KondisiBangunan.php
Normal file
23
app/Models/KondisiBangunan.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\KondisiBangunanFactory;
|
||||||
|
|
||||||
|
class KondisiBangunan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'kondisi_bangunan';
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [];
|
||||||
|
|
||||||
|
protected static function newFactory(): KondisiBangunanFactory
|
||||||
|
{
|
||||||
|
//return KondisiBangunanFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Models/KondisiFisikTanah.php
Normal file
23
app/Models/KondisiFisikTanah.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\KondisiFisikTanahFactory;
|
||||||
|
|
||||||
|
class KondisiFisikTanah extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'kondisi_fisik_tanah';
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): KondisiFisikTanahFactory
|
||||||
|
{
|
||||||
|
//return KondisiFisikTanahFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Models/KonturTanah.php
Normal file
23
app/Models/KonturTanah.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\KonturTanahFactory;
|
||||||
|
|
||||||
|
class KonturTanah extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'kontur_tanah';
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): KonturTanahFactory
|
||||||
|
{
|
||||||
|
//return KonturTanahFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Models/LaluLintasLokasi.php
Normal file
23
app/Models/LaluLintasLokasi.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\LaluLintasLokasiFactory;
|
||||||
|
|
||||||
|
class LaluLintasLokasi extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
protected $table = 'lalu_lintas_lokasi';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): LaluLintasLokasiFactory
|
||||||
|
{
|
||||||
|
//return LaluLintasLokasiFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace Modules\Lpj\Models;
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Modules\Lpj\Models\TujuanPenilaianKJPP;
|
||||||
use Modules\Lpj\Models\PenawaranDetailTender;
|
use Modules\Lpj\Models\PenawaranDetailTender;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany; // andy add
|
use Illuminate\Database\Eloquent\Relations\HasMany; // andy add
|
||||||
@@ -17,7 +18,7 @@ class PenawaranTender extends Model
|
|||||||
protected $table = 'penawaran';
|
protected $table = 'penawaran';
|
||||||
|
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
|
|
||||||
// andy add
|
// andy add
|
||||||
public function penawarandetails(): HasMany
|
public function penawarandetails(): HasMany
|
||||||
{
|
{
|
||||||
@@ -29,4 +30,10 @@ class PenawaranTender extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasMany(PenawaranDetailTender::class, 'penawaran_id');
|
return $this->hasMany(PenawaranDetailTender::class, 'penawaran_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// menambahkan relasi tujuan penilaian KJPP
|
||||||
|
public function tujuanPenilaianKJPP()
|
||||||
|
{
|
||||||
|
return $this->hasMany(TujuanPenilaianKJPP::class, 'id', 'tujuan_penilaian_kjpp_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
app/Models/PerkerasanJalan.php
Normal file
22
app/Models/PerkerasanJalan.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\PerkerasanJalanFactory;
|
||||||
|
|
||||||
|
class PerkerasanJalan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): PerkerasanJalanFactory
|
||||||
|
{
|
||||||
|
//return PerkerasanJalanFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/PosisiKavling.php
Normal file
24
app/Models/PosisiKavling.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\PosisiKavlingFactory;
|
||||||
|
|
||||||
|
class PosisiKavling extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'posisi_kavling';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): PosisiKavlingFactory
|
||||||
|
{
|
||||||
|
//return PosisiKavlingFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/SaranaPelengkap.php
Normal file
24
app/Models/SaranaPelengkap.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\SaranaPelengkapFactory;
|
||||||
|
|
||||||
|
class SaranaPelengkap extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'sarana_pelengkap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): SaranaPelengkapFactory
|
||||||
|
{
|
||||||
|
//return SaranaPelengkapFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
24
app/Models/SifatBangunan.php
Normal file
24
app/Models/SifatBangunan.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\SifatBangunanFactory;
|
||||||
|
|
||||||
|
class SifatBangunan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'sifat_bangunan';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): SifatBangunanFactory
|
||||||
|
{
|
||||||
|
//return SifatBangunanFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
31
app/Models/SpekBangunan.php
Normal file
31
app/Models/SpekBangunan.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\SpekBangunanFactory;
|
||||||
|
|
||||||
|
class SpekBangunan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'spek_bangunan';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function bangunanKategori(){
|
||||||
|
return $this->belongsTo(SpekKategoriBangunan::class, 'spek_kategori_bangunan_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function newFactory(): SpekBangunanFactory
|
||||||
|
{
|
||||||
|
//return SpekBangunanFactory::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
28
app/Models/SpekKategoritBangunan.php
Normal file
28
app/Models/SpekKategoritBangunan.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\SpekKategoritBangunanFactory;
|
||||||
|
|
||||||
|
class SpekKategoritBangunan extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $table = 'spek_kategori_bangunan';
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = [];
|
||||||
|
|
||||||
|
|
||||||
|
public function bangunan()
|
||||||
|
{
|
||||||
|
return $this->hasMany(SpekBangunan::class, 'spek_kategori_bangunan_id');
|
||||||
|
}
|
||||||
|
protected static function newFactory(): SpekKategoritBangunanFactory
|
||||||
|
{
|
||||||
|
//return SpekKategoritBangunanFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
22
app/Models/TingkatKeramaian.php
Normal file
22
app/Models/TingkatKeramaian.php
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Modules\Lpj\Database\Factories\TingkatKeramaianFactory;
|
||||||
|
|
||||||
|
class TingkatKeramaian extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected $fillable = ['code', 'name', 'status'];
|
||||||
|
|
||||||
|
protected static function newFactory(): TingkatKeramaianFactory
|
||||||
|
{
|
||||||
|
//return TingkatKeramaianFactory::new();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class () extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('bentuk_tanah', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('bentuk_tanah');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('kontur_tanah', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('kontur_tanah');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('ketinggian_tanah', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('ketinggian_tanah');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('kontur_jalan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('kontur_jalan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('posisi_kavling', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('posisi_kavling');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('kondisi_fisik_tanah', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('kondisi_fisik_tanah');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('jenis_bangunan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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_bangunan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('kondisi_bangunan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('kondisi_bangunan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('sifat_bangunan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('sifat_bangunan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class () extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('spek_kategori_bangunan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('spek_kategori_bangunan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('spek_bangunan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->foreignId('spek_kategori_bangunan_id')->constrained('spek_kategori_bangunan')->onDelete('cascade');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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::table('spek_bangunan', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['spek_kategori_bangunan_id']);
|
||||||
|
});
|
||||||
|
Schema::dropIfExists('spek_bangunan');
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('sarana_pelengkap', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('sarana_pelengkap');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('perkerasan_jalan', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('perkerasan_jalan');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('lalu_lintas_lokasi', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('lalu_lintas_lokasi');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('gol_mas_sekitar', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('gol_mas_sekitar');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('tingkat_keramaian', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true);
|
||||||
|
$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('tingkat_keramaian');
|
||||||
|
}
|
||||||
|
};
|
||||||
78
module.json
78
module.json
@@ -189,7 +189,7 @@
|
|||||||
"classes": "",
|
"classes": "",
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"permission": "",
|
"permission": "",
|
||||||
"roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin"],
|
"roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin", "surveyor"],
|
||||||
"sub": [
|
"sub": [
|
||||||
{
|
{
|
||||||
"title": "Cabang",
|
"title": "Cabang",
|
||||||
@@ -342,7 +342,81 @@
|
|||||||
"attributes": [],
|
"attributes": [],
|
||||||
"permission": "",
|
"permission": "",
|
||||||
"roles": ["administrator", "admin"]
|
"roles": ["administrator", "admin"]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"title": "Bentuk Tanah",
|
||||||
|
"path": "basicdata.bentuk-tanah",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Kontur Tanah",
|
||||||
|
"path": "basicdata.kontur-tanah",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Posisi Kavling",
|
||||||
|
"path": "basicdata.posisi-kavling",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Ketinggian Tanah",
|
||||||
|
"path": "basicdata.ketinggian-tanah",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Kondisi Fisik Tanah",
|
||||||
|
"path": "basicdata.kondisi-fisik-tanah",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Jenis Bangunan",
|
||||||
|
"path": "basicdata.jenis-bangunan",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Kondisi Bangunan",
|
||||||
|
"path": "basicdata.kondisi-bangunan",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Sifat Bangunan",
|
||||||
|
"path": "basicdata.sifat-bangunan",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"title": "Sarana Pelengkap",
|
||||||
|
"path": "basicdata.sarana-pelengkap",
|
||||||
|
"classes": "",
|
||||||
|
"attributes": [],
|
||||||
|
"permission": "",
|
||||||
|
"roles": ["surveyor"]
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,35 +1,3 @@
|
|||||||
@php
|
|
||||||
function formatTanggalIndonesia($date)
|
|
||||||
{
|
|
||||||
$carbonDate = \Carbon\Carbon::parse($date);
|
|
||||||
$indonesianMonths = [
|
|
||||||
'Januari',
|
|
||||||
'Februari',
|
|
||||||
'Maret',
|
|
||||||
'April',
|
|
||||||
'Mei',
|
|
||||||
'Juni',
|
|
||||||
'Juli',
|
|
||||||
'Agustus',
|
|
||||||
'September',
|
|
||||||
'Oktober',
|
|
||||||
'November',
|
|
||||||
'Desember',
|
|
||||||
];
|
|
||||||
$month = $indonesianMonths[$carbonDate->month - 1];
|
|
||||||
return $carbonDate->format('d') . ' ' . $month . ' ' . $carbonDate->format('Y');
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatRupiah($number)
|
|
||||||
{
|
|
||||||
// Convert to float if the input is a string
|
|
||||||
$number = (float) $number;
|
|
||||||
|
|
||||||
return 'Rp ' . number_format($number, 2, ',', '.');
|
|
||||||
}
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
|
|
||||||
@extends('layouts.main')
|
@extends('layouts.main')
|
||||||
|
|
||||||
@section('breadcrumbs')
|
@section('breadcrumbs')
|
||||||
@@ -199,4 +167,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|||||||
@@ -473,95 +473,6 @@
|
|||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
{{-- <script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
let teamsSelect = document.getElementById('teams_id');
|
|
||||||
let penilaiSelect = document.getElementById('penilaian_id');
|
|
||||||
let surveyorSelect = document.getElementById('surveyor_id');
|
|
||||||
let penilaiSurveyorSelect = document.getElementById('penilai_surveyor_id');
|
|
||||||
|
|
||||||
let selectedSurveyorId = @json($penilaian->surveyor_id ?? null);
|
|
||||||
let selectedPenilaiId = @json($penilaian->penilaian_id ?? null);
|
|
||||||
let selectedPenilaiSurveyorId = @json($penilaian->penilai_surveyor_id ?? null);
|
|
||||||
|
|
||||||
function fetchPenilai(teamId) {
|
|
||||||
penilaiSelect.innerHTML = '<option value="">Pilih Penilai</option>';
|
|
||||||
surveyorSelect.innerHTML = '<option value="">Pilih Surveyor</option>';
|
|
||||||
penilaiSurveyorSelect.innerHTML = '<option value="">Pilih Penilai Surveyor</option>';
|
|
||||||
|
|
||||||
if (teamId) {
|
|
||||||
fetch(`/penilaian/getUserTeams/${teamId}`)
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
if (data && data.length > 0) {
|
|
||||||
data.forEach((user) => {
|
|
||||||
let optionPenilai = document.createElement('option');
|
|
||||||
let optionSurveyor = document.createElement('option');
|
|
||||||
let optionPenilaiSurveyor = document.createElement('option');
|
|
||||||
|
|
||||||
optionPenilai.value = user.id;
|
|
||||||
optionSurveyor.value = user.id;
|
|
||||||
optionPenilaiSurveyor.value = user.id;
|
|
||||||
|
|
||||||
optionPenilai.text = user.name;
|
|
||||||
optionSurveyor.text = user.name;
|
|
||||||
optionPenilaiSurveyor.text = user.name;
|
|
||||||
|
|
||||||
// Tambahkan pengguna ke semua select
|
|
||||||
penilaiSelect.appendChild(optionPenilai);
|
|
||||||
surveyorSelect.appendChild(optionSurveyor);
|
|
||||||
penilaiSurveyorSelect.appendChild(optionPenilaiSurveyor);
|
|
||||||
|
|
||||||
if (selectedPenilaiId && selectedPenilaiId == user.id) {
|
|
||||||
optionPenilai.selected = true;
|
|
||||||
}
|
|
||||||
if (selectedSurveyorId && selectedSurveyorId == user.id) {
|
|
||||||
optionSurveyor.selected = true;
|
|
||||||
}
|
|
||||||
if (selectedPenilaiSurveyorId && selectedPenilaiSurveyorId == user
|
|
||||||
.id) {
|
|
||||||
optionPenilaiSurveyor.selected = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let noUserOption = document.createElement('option');
|
|
||||||
noUserOption.value = '';
|
|
||||||
noUserOption.text = 'Tidak ada pengguna yang sesuai.';
|
|
||||||
penilaiSelect.appendChild(noUserOption);
|
|
||||||
surveyorSelect.appendChild(noUserOption.cloneNode(true));
|
|
||||||
penilaiSurveyorSelect.appendChild(noUserOption.cloneNode(true));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error('Error fetching team members:', error);
|
|
||||||
let errorOption = document.createElement('option');
|
|
||||||
errorOption.value = '';
|
|
||||||
errorOption.text = 'Terjadi kesalahan.';
|
|
||||||
penilaiSelect.appendChild(errorOption);
|
|
||||||
surveyorSelect.appendChild(errorOption.cloneNode(true));
|
|
||||||
penilaiSurveyorSelect.appendChild(errorOption.cloneNode(true));
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let defaultOption = document.createElement('option');
|
|
||||||
defaultOption.value = '';
|
|
||||||
defaultOption.text = 'Pilih tim terlebih dahulu.';
|
|
||||||
penilaiSelect.appendChild(defaultOption);
|
|
||||||
surveyorSelect.appendChild(defaultOption.cloneNode(true));
|
|
||||||
penilaiSurveyorSelect.appendChild(defaultOption.cloneNode(true));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
teamsSelect.addEventListener('change', function() {
|
|
||||||
let teamId = this.value;
|
|
||||||
fetchPenilai(teamId);
|
|
||||||
});
|
|
||||||
|
|
||||||
let selectedTeamId = teamsSelect.value;
|
|
||||||
if (selectedTeamId) {
|
|
||||||
fetchPenilai(selectedTeamId);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script> --}}
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
@extends('layouts.main')
|
|
||||||
|
|
||||||
@section('breadcrumbs')
|
|
||||||
{{ Breadcrumbs::render('tender.proses.penawaran') }}
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
|
||||||
|
|
||||||
<div class="card pb-2.5">
|
|
||||||
<div class="card-header" id="basic_settings">
|
|
||||||
<h3 class="card-title">
|
|
||||||
Data Proses Penawaran
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
{{-- @include('lpj::debitur.form') --}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
@@ -6,7 +6,9 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="prosespenawaran-table" data-api-url="{{ route('tender.prosespenawaran.datatables') }}">
|
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5"
|
||||||
|
data-datatable-state-save="false" id="prosespenawaran-table"
|
||||||
|
data-api-url="{{ route('tender.prosespenawaran.datatables') }}">
|
||||||
<div class="card-header py-5 flex-wrap">
|
<div class="card-header py-5 flex-wrap">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
Daftar Proses Penawaran
|
Daftar Proses Penawaran
|
||||||
@@ -25,42 +27,44 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="scrollable-x-auto">
|
<div class="scrollable-x-auto">
|
||||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm" data-datatable-table="true">
|
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
||||||
|
data-datatable-table="true">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w-14">
|
<th class="w-14">
|
||||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
|
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
||||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="code">
|
<th class="min-w-[150px]" data-datatable-column="code">
|
||||||
<span class="sort"> <span class="sort-label"> Kode Penawaran </span>
|
<span class="sort"> <span class="sort-label"> Kode Penawaran </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="start_date">
|
<th class="min-w-[150px]" data-datatable-column="start_date">
|
||||||
<span class="sort"> <span class="sort-label"> Tanggal Penawaran </span>
|
<span class="sort"> <span class="sort-label"> Tanggal Penawaran </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="tujuan_penilaian_kjpp_id">
|
<th class="min-w-[150px]" data-datatable-column="tujuan_penilaian_kjpp_id">
|
||||||
<span class="sort"> <span class="sort-label"> Tujuan Penilaian </span>
|
<span class="sort"> <span class="sort-label"> Tujuan Penilaian KJPP </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="penawarandetails_count">
|
<th class="min-w-[150px]" data-datatable-column="penawarandetails_count">
|
||||||
<span class="sort"> <span class="sort-label"> Total KJPP </span>
|
<span class="sort"> <span class="sort-label"> Total KJPP </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="status">
|
<th class="min-w-[150px]" data-datatable-column="status">
|
||||||
<span class="sort"> <span class="sort-label"> Status </span>
|
<span class="sort"> <span class="sort-label"> Status </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
<div
|
||||||
|
class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
Show
|
Show
|
||||||
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
||||||
@@ -78,11 +82,32 @@
|
|||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// menampilkan detail data proses penawaran
|
function formatDate(date) {
|
||||||
function showPenawaranData(regId)
|
const day = date.getDate().toString().padStart(2, '0');
|
||||||
{
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||||
var url = "{{ url('tender/prosespenawaran') }}/"+regId;
|
// Months are 0-indexed
|
||||||
$(location).attr('href',url);
|
const year = date.getFullYear();
|
||||||
|
|
||||||
|
return `${day} ${getIndonesianMonth(month)} ${year}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getIndonesianMonth(month) {
|
||||||
|
const months = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni',
|
||||||
|
'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'
|
||||||
|
];
|
||||||
|
return months[month -
|
||||||
|
1];
|
||||||
|
}
|
||||||
|
|
||||||
|
function capitalizeWords(str) {
|
||||||
|
return str.replace(/\b\w/g, function(char) {
|
||||||
|
return char.toUpperCase();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showPenawaranData(regId) {
|
||||||
|
var url = "{{ url('tender/prosespenawaran') }}/" + regId;
|
||||||
|
$(location).attr('href', url);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
@@ -112,9 +137,15 @@
|
|||||||
},
|
},
|
||||||
start_date: {
|
start_date: {
|
||||||
title: 'Tanggal Penawaran',
|
title: 'Tanggal Penawaran',
|
||||||
|
render: (item, data) => {
|
||||||
|
return `${formatDate(new Date(data.start_date))} - ${formatDate(new Date(data.end_date))}`
|
||||||
|
}
|
||||||
},
|
},
|
||||||
tujuan_penilaian_kjpp_id: {
|
tujuan_penilaian_k_j_p_p: {
|
||||||
title: 'Tujuan Penilaian',
|
title: 'Tujuan Penilaian KJPP',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.tujuan_penilaian_k_j_p_p[0].name
|
||||||
|
}
|
||||||
},
|
},
|
||||||
penawarandetails_count: {
|
penawarandetails_count: {
|
||||||
title: 'Total KJPP',
|
title: 'Total KJPP',
|
||||||
@@ -123,7 +154,10 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
title: 'Status'
|
title: 'Status',
|
||||||
|
render: (item, data) => {
|
||||||
|
return capitalizeWords(data.status)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
@@ -143,12 +177,10 @@
|
|||||||
|
|
||||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||||
// Custom search functionality
|
// Custom search functionality
|
||||||
searchInput.addEventListener('input', function () {
|
searchInput.addEventListener('input', function() {
|
||||||
const searchValue = this.value.trim();
|
const searchValue = this.value.trim();
|
||||||
dataTable.search(searchValue, true);
|
dataTable.search(searchValue, true);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
156
resources/views/surveyor/components/apartemen-kantor.blade.php
Normal file
156
resources/views/surveyor/components/apartemen-kantor.blade.php
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<div class=""max-w-4xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
|
<div class="bg-blue-600 text-white py-4 px-6">
|
||||||
|
<h1 class="text-md font-medium text-gray-900">Analisa Unit</h1>
|
||||||
|
</div>
|
||||||
|
<div class="grid gap-5">
|
||||||
|
|
||||||
|
<!-- Luas tanah -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Luas Unit</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="sesuai">
|
||||||
|
<span class="ml-2">Sesuai</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="tidakSesuai">
|
||||||
|
<span class="ml-2">Tidak Sesuai</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Jenis Unit -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Jenis Unit</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('bentuk_tanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="bentuk_tanah">
|
||||||
|
<option value="">Select Jenis Unit</option>
|
||||||
|
@if (isset($bentukTanah))
|
||||||
|
@foreach ($bentukTanah as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kondidi Unit</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('konturTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="konturTanah">
|
||||||
|
<option value="">Select Kondidi Unit</option>
|
||||||
|
@if (isset($konturTanah))
|
||||||
|
@foreach ($konturTanah as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('konturTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Posisi Unit -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Posisi Unit</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('ketinggianTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="ketinggianTanah">
|
||||||
|
<option value="">Select Posisi Unit</option>
|
||||||
|
@if (isset($ketinggianTanah))
|
||||||
|
@foreach ($ketinggianTanah as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('ketinggianTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Lantai</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('posisiKavling') border-danger bg-danger-light @enderror"
|
||||||
|
name="posisiKavling">
|
||||||
|
<option value="">Select Lantai</option>
|
||||||
|
@if (isset($posisiKavling))
|
||||||
|
@foreach ($posisiKavling as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('posisiKavling')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Kondisi Fisik Tanah -->
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">View</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('kondisiFisikTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="kondisiFisikTanah">
|
||||||
|
<option value="">Select View</option>
|
||||||
|
@if (isset($kondisiFisikTanah))
|
||||||
|
@foreach ($kondisiFisikTanah as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kondisiFisikTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Bentuk Unit</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('kondisiFisikTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="kondisiFisikTanah">
|
||||||
|
<option value="">Select Bentuk Unit</option>
|
||||||
|
@if (isset($kondisiFisikTanah))
|
||||||
|
@foreach ($kondisiFisikTanah as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kondisiFisikTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -6,9 +6,20 @@
|
|||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<div class="bg-info border p-6 rounded-lg shadow-lg flex items-center justify-center" style="height: 300px">
|
<div class=""max-w-4xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
<iframe src="https://gistaru.atrbpn.go.id/rtronline/" frameborder="0" style="width: 100%; height: 100%;"></iframe>
|
|
||||||
|
<div class="flex flex-wrap gap-4">
|
||||||
|
<div class="flex w-full items-center justify-center gap-4">
|
||||||
|
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
<span class="form-label">Upload Denah</span>
|
||||||
|
</label>
|
||||||
|
<input type="file" name="ruteMenujuLokasi" class="file-input file-input-bordered w-full ">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
384
resources/views/surveyor/components/tanah-bangunan.blade.php
Normal file
384
resources/views/surveyor/components/tanah-bangunan.blade.php
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
<div class=""max-w-4xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
|
<div class="bg-blue-600 text-white py-4 px-6">
|
||||||
|
<h1 class="text-md font-medium text-gray-900">Analisa Tanah</h1>
|
||||||
|
</div>
|
||||||
|
<div class="grid gap-5">
|
||||||
|
|
||||||
|
<!-- Luas tanah -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Luas Tanah</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="sesuai">
|
||||||
|
<span class="ml-2">Sesuai</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="tidakSesuai">
|
||||||
|
<span class="ml-2">Tidak Sesuai</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Hadap Mata Angin</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('bentuk_tanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="bentuk_tanah">
|
||||||
|
<option value="">Select Hadap Mata Angin</option>
|
||||||
|
@if (isset($arahMataAngin))
|
||||||
|
@foreach ($arahMataAngin as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Bentuk Tanah -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Bentuk Tanah</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('bentuk_tanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="bentuk_tanah">
|
||||||
|
<option value="">Select Bentuk Tanah</option>
|
||||||
|
@if (isset($bentukTanah))
|
||||||
|
@foreach ($bentukTanah as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kontur Tanah</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('konturTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="konturTanah">
|
||||||
|
<option value="">Select Kontur Tanah</option>
|
||||||
|
@if (isset($konturTanah))
|
||||||
|
@foreach ($konturTanah as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('konturTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Beda Ketinggian Dengan Jalan -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Beda Ketinggian Dengan Jalan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('ketinggianTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="ketinggianTanah">
|
||||||
|
<option value="">Select Ketinggian Dengan Jalan</option>
|
||||||
|
@if (isset($ketinggianTanah))
|
||||||
|
@foreach ($ketinggianTanah as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('ketinggianTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Kontur Jalan Depan Objek -->
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kontur Jalan Depan Objek</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="konturJalan" value="menurun">
|
||||||
|
<span class="ml-2">Menurun</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="konturJalan" value="rata">
|
||||||
|
<span class="ml-2">Rata</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Posisi Kavling</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('posisiKavling') border-danger bg-danger-light @enderror"
|
||||||
|
name="posisiKavling">
|
||||||
|
<option value="">Select Posisi Kavling</option>
|
||||||
|
@if (isset($posisiKavling))
|
||||||
|
@foreach ($posisiKavling as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('posisiKavling')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Tusuk Sate -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Tusuk Sate</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="tusukSate" value="ya">
|
||||||
|
<span class="ml-2">Ya</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="tusukSate" value="tidak">
|
||||||
|
<span class="ml-2">Tidak</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Lockland -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Locklande</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="lockland" value="ya">
|
||||||
|
<span class="ml-2">Ya</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="lockland" value="tidak">
|
||||||
|
<span class="ml-2">Tidak</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Kondisi Fisik Tanah -->
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kondisi Fisik Tanah</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('kondisiFisikTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="kondisiFisikTanah">
|
||||||
|
<option value="">Select Posisi Kavling</option>
|
||||||
|
@if (isset($kondisiFisikTanah))
|
||||||
|
@foreach ($kondisiFisikTanah as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kondisiFisikTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=" bg-white rounded-lg shadow-md overflow-hidden">
|
||||||
|
<div class="bg-blue-600 text-white py-4 px-6">
|
||||||
|
<h1 class="text-md font-medium text-gray-900">Analisa Bangunan</h1>
|
||||||
|
</div>
|
||||||
|
<div class="grid gap-5">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Luas Tanah</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2">
|
||||||
|
<label class="form-label flex items-center gap-3 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="sesuai">
|
||||||
|
<span class="ml-2">Sesuai</span>
|
||||||
|
</label>
|
||||||
|
<label class="form-label flex items-center gap-2.5 text-nowrap">
|
||||||
|
<input type="radio" class="radio" name="luasTanah" value="tidakSesuai">
|
||||||
|
<span class="ml-2">Tidak Sesuai</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@error('bentuk_tanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Jenis Bangunan -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Jenis Bangunan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('jenisBangunan') border-danger bg-danger-light @enderror"
|
||||||
|
name="jenisBangunan">
|
||||||
|
<option value="">Select Jenis Bangunan</option>
|
||||||
|
@if (isset($jenisBangunan))
|
||||||
|
@foreach ($jenisBangunan as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('jenisBangunan')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Kondisi Bangunan -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kondisi Bangunan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('kondisiBangunan') border-danger bg-danger-light @enderror"
|
||||||
|
name="kondisiBangunan">
|
||||||
|
<option value="">Select Kondisi Bangunan</option>
|
||||||
|
@if (isset($kondisiBangunan))
|
||||||
|
@foreach ($kondisiBangunan as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kondisiBangunan')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sifat Bangunan -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56"> Sifat Bangunan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('sifatBangunan') border-danger bg-danger-light @enderror"
|
||||||
|
name="sifatBangunan">
|
||||||
|
<option value="">Select Sifat Bangunan</option>
|
||||||
|
@if (isset($sifatBangunan))
|
||||||
|
@foreach ($sifatBangunan as $item)
|
||||||
|
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('sifatBangunan')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Spek Bangunan -->
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Spek Bangunan</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 w-full">
|
||||||
|
@if (@isset($spekKategoriBagunan))
|
||||||
|
@foreach ($spekKategoriBagunan as $item)
|
||||||
|
<div>
|
||||||
|
<label
|
||||||
|
class="form-label flex items-center gap-3 text-nowrap">{{ $item->name }}</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('kondisiFisikTanah') border-danger bg-danger-light @enderror"
|
||||||
|
name="kondisiFisikTanah">
|
||||||
|
<option value="">Select {{ $item->name }}</option>
|
||||||
|
@if (isset($spekBangunan))
|
||||||
|
@foreach ($spekBangunan as $spek)
|
||||||
|
@if ($spek->spek_kategori_bagunan_id == $item->id)
|
||||||
|
<option value="{{ $spek->name }}">{{ $spek->name }}
|
||||||
|
</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kondisiFisikTanah')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Sarana pelengkap -->
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Sarana pelengkap</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('saranaPelengkap') border-danger bg-danger-light @enderror"
|
||||||
|
name="saranaPelengkap">
|
||||||
|
<option value="">Select Posisi Kavling</option>
|
||||||
|
@if (isset($saranaPelengkap))
|
||||||
|
@foreach ($saranaPelengkap as $item)
|
||||||
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('saranaPelengkap')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
63
resources/views/surveyor/data/form.blade.php
Normal file
63
resources/views/surveyor/data/form.blade.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
@extends('layouts.main')
|
||||||
|
|
||||||
|
{{-- @section('breadcrumbs')
|
||||||
|
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||||
|
@endsection --}}
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
|
@if (isset($model->id))
|
||||||
|
<form action="{{ route('basicdata.updateData', ['type' => $header[1], 'id' => $model->id]) }}" method="POST">
|
||||||
|
<input type="hidden" name="id" value="{{ $model->id ?? '' }}">
|
||||||
|
@method('PUT')
|
||||||
|
@else
|
||||||
|
<form method="POST" action="{{ route('basicdata.storeData', ['type' => $header[1]]) }}">
|
||||||
|
@endif
|
||||||
|
@csrf
|
||||||
|
<div class="card pb-2.5">
|
||||||
|
<input type="hidden" name="action" value="{{ $header[1] }}">
|
||||||
|
<div class="card-header" id="basic_settings">
|
||||||
|
<h3 class="card-title">
|
||||||
|
{{ isset($jenisAset->id) ? 'Edit' : 'Tambah' }} {{ $header[0] }}
|
||||||
|
</h3>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{{ route('basicdata.' . $header[1] . '.index') }}" class="btn btn-xs btn-info">
|
||||||
|
<i class="ki-filled ki-exit-left"></i> Back
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body grid gap-5">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Code
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="code" value="{{ $model->code ?? '' }}" >
|
||||||
|
@error('code')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Name
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="name" value="{{ $model->name ?? '' }}">
|
||||||
|
@error('name')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
153
resources/views/surveyor/data/index.blade.php
Normal file
153
resources/views/surveyor/data/index.blade.php
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
@extends('layouts.main')
|
||||||
|
|
||||||
|
{{-- @section('breadcrumbs')
|
||||||
|
{{ Breadcrumbs::render('surveyor.bentuk-tanah') }}
|
||||||
|
@endsection --}}
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="grid">
|
||||||
|
<div class="card card-grid min-w-full" data-datatable="false" data-datatable-page-size="5" data-datatable-state-save="false" id="data-table" data-api-url="{{ route('basicdata.datatablesSurveyory', ['type' => $header[0] ]) }}">
|
||||||
|
<div class="card-header py-5 flex-wrap">
|
||||||
|
<h3 class="card-title">
|
||||||
|
Daftar {{$header[0]}}
|
||||||
|
</h3>
|
||||||
|
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||||
|
<div class="flex">
|
||||||
|
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||||
|
<input placeholder="Search {{$header[0]}}" id="search" type="text" value="">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap gap-2.5">
|
||||||
|
<div class="h-[24px] border border-r-gray-200"></div>
|
||||||
|
<a class="btn btn-sm btn-light" href=""> Export to Excel </a>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$href = route('basicdata.createData', ['type' => $header[1]]);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<a class="btn btn-sm btn-primary" href="{{$href}}"> Tambah {{$header[0]}} </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="scrollable-x-auto">
|
||||||
|
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm" data-datatable-table="true">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="w-14">
|
||||||
|
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[250px]" data-datatable-column="code">
|
||||||
|
<span class="sort"> <span class="sort-label"> Code </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[250px]" data-datatable-column="name">
|
||||||
|
<span class="sort"> <span class="sort-label"> Jenis Aset </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer justify-center md:justify-between flex-col md:flex-row gap-3 text-gray-600 text-2sm font-medium">
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
Show
|
||||||
|
<select class="select select-sm w-16" data-datatable-size="true" name="perpage"> </select> per page
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center gap-4">
|
||||||
|
<span data-datatable-info="true"> </span>
|
||||||
|
<div class="pagination" data-datatable-pagination="true">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('scripts')
|
||||||
|
<script type="text/javascript">
|
||||||
|
function deleteData(data) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Are you sure?',
|
||||||
|
text: "You won't be able to revert this!",
|
||||||
|
icon: 'warning',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
cancelButtonColor: '#d33',
|
||||||
|
confirmButtonText: 'Yes, delete it!'
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$.ajaxSetup({
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax(`basic-data/deleteData/${data}/{{$header[1]}}`, {
|
||||||
|
type: 'DELETE'
|
||||||
|
}).then((response) => {
|
||||||
|
swal.fire('Deleted!', 'User has been deleted.', 'success').then(() => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
Swal.fire('Error!', 'An error occurred while deleting the file.', 'error');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="module">
|
||||||
|
const element = document.querySelector('#data-table');
|
||||||
|
const searchInput = document.getElementById('search');
|
||||||
|
|
||||||
|
const header = '{{$header[1]}}';
|
||||||
|
const apiUrl = element.getAttribute('data-api-url');
|
||||||
|
const dataTableOptions = {
|
||||||
|
apiEndpoint: apiUrl,
|
||||||
|
pageSize: 5,
|
||||||
|
columns: {
|
||||||
|
select: {
|
||||||
|
render: (item, data, context) => {
|
||||||
|
const checkbox = document.createElement('input');
|
||||||
|
checkbox.className = 'checkbox checkbox-sm';
|
||||||
|
checkbox.type = 'checkbox';
|
||||||
|
checkbox.value = data.id.toString();
|
||||||
|
checkbox.setAttribute('data-datatable-row-check', 'true');
|
||||||
|
return checkbox.outerHTML.trim();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
title: 'Code',
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
title: 'Jenis Aset',
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
title: 'Status',
|
||||||
|
render: (item, data) => {
|
||||||
|
return `<div class="flex flex-nowrap justify-center">
|
||||||
|
<a class="btn btn-sm btn-icon btn-clear btn-info" href="basic-data/${header}/${data.id}">
|
||||||
|
<i class="ki-outline ki-notepad-edit"></i>
|
||||||
|
</a>
|
||||||
|
<a onclick="deleteData(${data.id})" class="delete btn btn-sm btn-icon btn-clear btn-danger">
|
||||||
|
<i class="ki-outline ki-trash"></i>
|
||||||
|
</a>
|
||||||
|
</div>`;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||||
|
// Custom search functionality
|
||||||
|
searchInput.addEventListener('input', function () {
|
||||||
|
const searchValue = this.value.trim();
|
||||||
|
dataTable.search(searchValue, true);
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
@@ -176,14 +176,7 @@
|
|||||||
@include('lpj::surveyor.components.data-pembanding')
|
@include('lpj::surveyor.components.data-pembanding')
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end gap-2" style="margin-right: 20px; margin-top: 20px">
|
|
||||||
<button type="submit" class="btn btn-success">
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
Submit
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -416,11 +416,6 @@ Breadcrumbs::for('tender.penawaran.editPenawaran', function (BreadcrumbTrail $tr
|
|||||||
$trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg));
|
$trail->push('Penawaran Ulang', route('tender.penawaran.editPenawaran', $noreg));
|
||||||
});
|
});
|
||||||
|
|
||||||
Breadcrumbs::for('tender.proses.penawaran', function (BreadcrumbTrail $trail) {
|
|
||||||
$trail->parent('tender');
|
|
||||||
$trail->push('Data Proses Penawaran', route('tender.proses_penawaran.index'));
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
Breadcrumbs::for('tender.penawaran.ulang', function (BreadcrumbTrail $trail) {
|
Breadcrumbs::for('tender.penawaran.ulang', function (BreadcrumbTrail $trail) {
|
||||||
$trail->parent('tender');
|
$trail->parent('tender');
|
||||||
|
|||||||
@@ -357,7 +357,33 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::resource('jenis_laporan', JenisLaporanController::class);
|
Route::resource('jenis_laporan', JenisLaporanController::class);
|
||||||
// End Activity Jenis Laporan route
|
// End Activity Jenis Laporan route
|
||||||
|
|
||||||
|
// basic data surveyor
|
||||||
|
Route::get('datatablesSurveyory/{type}', [SurveyorController::class, 'dataForDatatablesData'])->name('datatablesSurveyory');
|
||||||
|
Route::get('createData/{type}', [SurveyorController::class, 'createData'])->name('createData');
|
||||||
|
Route::get('/{type}/{id}', [SurveyorController::class, 'editData'])->name('editData');
|
||||||
|
Route::post('storeData/{type}', [SurveyorController::class, 'storeData'])->name('storeData');
|
||||||
|
Route::put('updateData/{type}/{id}', [SurveyorController::class, 'updateData'])->name('updateData');
|
||||||
|
Route::delete('deleteData/{id}/{type}', [SurveyorController::class, 'destroy'])->name('deleteData');
|
||||||
|
|
||||||
|
$headers = [
|
||||||
|
'bentuk-tanah' => 'Bentuk Tanah',
|
||||||
|
'kontur-tanah' => 'Kontur Tanah',
|
||||||
|
'posisi-kavling' => 'Posisi Kavling',
|
||||||
|
'ketinggian-tanah' => 'Ketinggian Tanah',
|
||||||
|
'kondisi-fisik-tanah' => 'Kondisi Fisik Tanah',
|
||||||
|
'jenis-bangunan' => 'Jenis Bangunan',
|
||||||
|
'kondisi-bangunan' => 'Kondisi Bangunan',
|
||||||
|
'sifat-bangunan' => 'Sifat Bangunan',
|
||||||
|
// 'spek-bangunan' => 'Speksifikasi Bangunan',
|
||||||
|
// 'spek-kategori-bagunan' => 'Speksifikasi Kategori Bangunan',
|
||||||
|
'sarana-pelengkap' => 'Sarana Pelengkap',
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($headers as $type => $header) {
|
||||||
|
Route::get($type, [SurveyorController::class, 'data'])
|
||||||
|
->name($type . '.index')
|
||||||
|
->defaults('type', $type);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::name('permohonan.')->prefix('permohonan')->group(function () {
|
Route::name('permohonan.')->prefix('permohonan')->group(function () {
|
||||||
@@ -439,11 +465,6 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('penawaran/ulang/datatables', [TenderController::class, 'datatablesPenawaranUlang'])->name(
|
Route::get('penawaran/ulang/datatables', [TenderController::class, 'datatablesPenawaranUlang'])->name(
|
||||||
'penawaran.ulang.datatables',
|
'penawaran.ulang.datatables',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Proses Penawaran
|
|
||||||
Route::get('proses_penawaran', [TenderController::class, 'proses_penawaran_index'])->name(
|
|
||||||
'proses_penawaran.index',
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::name('penilaian.')->prefix('penilaian')->group(function () {
|
Route::name('penilaian.')->prefix('penilaian')->group(function () {
|
||||||
@@ -507,7 +528,6 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('foto/{id}', [SurveyorController::class, 'foto'])->name('foto');
|
Route::get('foto/{id}', [SurveyorController::class, 'foto'])->name('foto');
|
||||||
Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
Route::get('data-pembanding/{id}', [SurveyorController::class, 'dataPembanding'])->name('data-pembanding');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
require __DIR__ . '/registrasi.php';
|
require __DIR__ . '/registrasi.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user