diff --git a/app/Http/Controllers/SurveyorController.php b/app/Http/Controllers/SurveyorController.php index 5a19d19..1e707dc 100644 --- a/app/Http/Controllers/SurveyorController.php +++ b/app/Http/Controllers/SurveyorController.php @@ -8,7 +8,21 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Modules\Lpj\Models\Permohonan; 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\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; + class SurveyorController extends Controller { @@ -51,16 +65,46 @@ class SurveyorController extends Controller 'debiture.village', 'branch', 'tujuanPenilaian', - 'penilaian' + 'penilaian', + 'documents', ], )->findOrFail($id); $surveyor = $id; $branches = Branch::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', + )); } /** @@ -241,4 +285,6 @@ class SurveyorController extends Controller + + } diff --git a/app/Models/BentukTanah.php b/app/Models/BentukTanah.php new file mode 100644 index 0000000..91c8611 --- /dev/null +++ b/app/Models/BentukTanah.php @@ -0,0 +1,23 @@ +belongsTo(SpekKategoriBangunan::class, 'spek_kategori_bangunan_id'); + } + + protected static function newFactory(): SpekBangunanFactory + { + //return SpekBangunanFactory::new(); + } + +} diff --git a/app/Models/SpekKategoritBangunan.php b/app/Models/SpekKategoritBangunan.php new file mode 100644 index 0000000..78b91e1 --- /dev/null +++ b/app/Models/SpekKategoritBangunan.php @@ -0,0 +1,28 @@ +hasMany(SpekBangunan::class, 'spek_kategori_bangunan_id'); + } + protected static function newFactory(): SpekKategoritBangunanFactory + { + //return SpekKategoritBangunanFactory::new(); + } +} diff --git a/app/Models/TingkatKeramaian.php b/app/Models/TingkatKeramaian.php new file mode 100644 index 0000000..e84ff10 --- /dev/null +++ b/app/Models/TingkatKeramaian.php @@ -0,0 +1,22 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073319_create_kontur_tanah_table.php b/database/migrations/2024_10_14_073319_create_kontur_tanah_table.php new file mode 100644 index 0000000..8cb2a13 --- /dev/null +++ b/database/migrations/2024_10_14_073319_create_kontur_tanah_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073412_create_ketinggian_tanah_table.php b/database/migrations/2024_10_14_073412_create_ketinggian_tanah_table.php new file mode 100644 index 0000000..5054b87 --- /dev/null +++ b/database/migrations/2024_10_14_073412_create_ketinggian_tanah_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073508_create_kontur_jalan_table.php b/database/migrations/2024_10_14_073508_create_kontur_jalan_table.php new file mode 100644 index 0000000..cdffe4d --- /dev/null +++ b/database/migrations/2024_10_14_073508_create_kontur_jalan_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073527_create_posisi_kavling_table.php b/database/migrations/2024_10_14_073527_create_posisi_kavling_table.php new file mode 100644 index 0000000..0a7ca0e --- /dev/null +++ b/database/migrations/2024_10_14_073527_create_posisi_kavling_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073550_create_kondisi_fisik_tanah_table.php b/database/migrations/2024_10_14_073550_create_kondisi_fisik_tanah_table.php new file mode 100644 index 0000000..32c021e --- /dev/null +++ b/database/migrations/2024_10_14_073550_create_kondisi_fisik_tanah_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073631_create_jenis_bangunan_table.php b/database/migrations/2024_10_14_073631_create_jenis_bangunan_table.php new file mode 100644 index 0000000..8411dae --- /dev/null +++ b/database/migrations/2024_10_14_073631_create_jenis_bangunan_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073643_create_kondisi_bangunan_table.php b/database/migrations/2024_10_14_073643_create_kondisi_bangunan_table.php new file mode 100644 index 0000000..f7000b3 --- /dev/null +++ b/database/migrations/2024_10_14_073643_create_kondisi_bangunan_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_073701_create_sifat_bangunan_table.php b/database/migrations/2024_10_14_073701_create_sifat_bangunan_table.php new file mode 100644 index 0000000..e3ecf76 --- /dev/null +++ b/database/migrations/2024_10_14_073701_create_sifat_bangunan_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074216_create_spek_kategori_bangunan_table.php b/database/migrations/2024_10_14_074216_create_spek_kategori_bangunan_table.php new file mode 100644 index 0000000..1280a00 --- /dev/null +++ b/database/migrations/2024_10_14_074216_create_spek_kategori_bangunan_table.php @@ -0,0 +1,36 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074227_create_spek_bangunan_table.php b/database/migrations/2024_10_14_074227_create_spek_bangunan_table.php new file mode 100644 index 0000000..1cb8557 --- /dev/null +++ b/database/migrations/2024_10_14_074227_create_spek_bangunan_table.php @@ -0,0 +1,42 @@ +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'); + + } +}; diff --git a/database/migrations/2024_10_14_074246_create_spek_sarana_table.php b/database/migrations/2024_10_14_074246_create_spek_sarana_table.php new file mode 100644 index 0000000..1ba0692 --- /dev/null +++ b/database/migrations/2024_10_14_074246_create_spek_sarana_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074326_create_perkerasan_jalan_table.php b/database/migrations/2024_10_14_074326_create_perkerasan_jalan_table.php new file mode 100644 index 0000000..c064c5d --- /dev/null +++ b/database/migrations/2024_10_14_074326_create_perkerasan_jalan_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074403_create_lalu_lintas_lokasi_table.php b/database/migrations/2024_10_14_074403_create_lalu_lintas_lokasi_table.php new file mode 100644 index 0000000..4937eee --- /dev/null +++ b/database/migrations/2024_10_14_074403_create_lalu_lintas_lokasi_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074432_create_gol_mas_sekitar_table.php b/database/migrations/2024_10_14_074432_create_gol_mas_sekitar_table.php new file mode 100644 index 0000000..d55bf01 --- /dev/null +++ b/database/migrations/2024_10_14_074432_create_gol_mas_sekitar_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/database/migrations/2024_10_14_074528_create_tingkat_keramaian_table.php b/database/migrations/2024_10_14_074528_create_tingkat_keramaian_table.php new file mode 100644 index 0000000..fccbaa6 --- /dev/null +++ b/database/migrations/2024_10_14_074528_create_tingkat_keramaian_table.php @@ -0,0 +1,37 @@ +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'); + } +}; diff --git a/module.json b/module.json index dbc64eb..a631146 100644 --- a/module.json +++ b/module.json @@ -187,7 +187,7 @@ "classes": "", "attributes": [], "permission": "", - "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin"], + "roles": ["administrator", "pemohon-ao", "pemohon-eo", "admin", "surveyor"], "sub": [ { "title": "Cabang", @@ -332,6 +332,14 @@ "attributes": [], "permission": "", "roles": ["administrator", "admin"] + }, + { + "title": "Jenis Bangunan", + "path": "basicdata.ijin_usaha", + "classes": "", + "attributes": [], + "permission": "", + "roles": ["surveyor"] } ] } diff --git a/resources/views/surveyor/components/apartemen-kantor.blade.php b/resources/views/surveyor/components/apartemen-kantor.blade.php new file mode 100644 index 0000000..b9c021a --- /dev/null +++ b/resources/views/surveyor/components/apartemen-kantor.blade.php @@ -0,0 +1,156 @@ +