Skip to content

Commit

Permalink
Perbaikan ubah profil saat data desa sudah ada (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
arifpriadi authored Jun 14, 2024
1 parent a1e173d commit d8bb66b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Data/ProfilController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ public function index()
$page_title = 'Profil';
$page_description = 'Data Profil';
$status_pantau = checkWebsiteAccessibility(config('app.server_pantau')) ? 1 : 0;
$adaDesa = DataUmum::where('profil_id', $profil->id)->exists();

return view('data.profil.edit', compact('page_title', 'page_description', 'profil', 'status_pantau'));
return view('data.profil.edit', compact('page_title', 'page_description', 'profil', 'status_pantau', 'adaDesa'));
}

/**
Expand Down
3 changes: 2 additions & 1 deletion catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Di rilis versi v2406.1.0 di versi ini terdapat [untuk diisi] dan perbaikan lain
1. [#930](https://github.com/OpenSID/OpenDK/issues/930) Perbaikan link email pada halaman website.
2. [#934](https://github.com/OpenSID/OpenDK/issues/934) Perbaikan tampilan widget pegawai kecamatan.
3. [#927](https://github.com/OpenSID/OpenDK/issues/927) Perbaikan keterangan gagal impor jika desa tidak terdaftar.
4. [#963](https://github.com/OpenSID/OpenDK/issues/963) Perbaikan slug pada menu.
4. [#963](https://github.com/OpenSID/OpenDK/issues/963) Perbaikan slug pada menu.
5. [#961](https://github.com/OpenSID/OpenDK/issues/961) Perbaikan ubah profil saat data desa sudah ada.


#### TEKNIS
Expand Down
25 changes: 19 additions & 6 deletions resources/views/data/profil/form_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
<div class="form-group">
<label class="control-label col-md-4 col-sm-3 col-xs-12">Provinsi <span class="required">*</span></label>
<div class="col-md-2 col-sm-3 col-xs-12">
@if ($status_pantau)

@if ($adaDesa)
<input name="provinsi_id" class="form-control" placeholder="00" type="text" value="{{ $profil->provinsi_id }}" readonly />
@elseif ($status_pantau)
<input id="provinsi_id" class="form-control" placeholder="00" type="text" readonly value="{{ $profil->provinsi_id }}" />
<input id="nama_provinsi" type="hidden" name="nama_provinsi" value="{{ $profil->nama_provinsi }}" />
@else
<input id="provinsi_offline" name="provinsi_id" class="form-control" placeholder="00" type="text" value="{{ $profil->provinsi_id }}" />
@endif
</div>
<div class="col-md-5 col-sm-6 col-xs-12">
@if ($status_pantau)
@if ($adaDesa)
<input name="nama_provinsi" class="form-control" type="text" value="{{ $profil->nama_provinsi }}" readonly />
@elseif ($status_pantau)
<select class="form-control" id="list_provinsi" name="provinsi_id" style="width: 100%;">
<option selected value="" disabled>Pilih Provinsi</option>
@if ($profil->provinsi_id || $profil->nama_provinsi)
Expand All @@ -27,15 +32,19 @@
<div class="form-group">
<label class="control-label col-md-4 col-sm-3 col-xs-12">Kabupaten <span class="required">*</span></label>
<div class="col-md-2 col-sm-3 col-xs-12">
@if ($status_pantau)
@if ($adaDesa)
<input name="kabupaten_id" class="form-control" placeholder="00.00" type="text" value="{{ $profil->kabupaten_id }}" readonly />
@elseif ($status_pantau)
<input id="kabupaten_id" class="form-control" placeholder="00.00" type="text" readonly value="{{ $profil->kabupaten_id }}" />
<input id="nama_kabupaten" type="hidden" name="nama_kabupaten" value="{{ $profil->nama_kabupaten }}" />
@else
<input id="kabupaten_offline" name="kabupaten_id" class="form-control" placeholder="00.00" type="text" value="{{ $profil->kabupaten_id }}" />
@endif
</div>
<div class="col-md-5 col-sm-6 col-xs-12">
@if ($status_pantau)
@if ($adaDesa)
<input name="nama_kabupaten" class="form-control" type="text" value="{{ $profil->nama_kabupaten }}" readonly />
@elseif ($status_pantau)
<select class="form-control" id="list_kabupaten" name="kabupaten_id" style="width: 100%;">
<option selected value="" disabled>Pilih Kabupaten</option>
@if ($profil->kabupaten_id || $profil->nama_kabupaten)
Expand All @@ -51,15 +60,19 @@
<div class="form-group">
<label class="control-label col-md-4 col-sm-3 col-xs-12">Kecamatan <span class="required">*</span></label>
<div class="col-md-2 col-sm-3 col-xs-12">
@if ($status_pantau)
@if ($adaDesa)
<input name="kecamatan_id" class="form-control" placeholder="00.00.00" type="text" value="{{ $profil->kecamatan_id }}" readonly />
@elseif ($status_pantau)
<input id="kecamatan_id" class="form-control" placeholder="00.00.00" type="text" readonly value="{{ $profil->kecamatan_id }}" />
<input id="nama_kecamatan" type="hidden" name="nama_kecamatan" value="{{ $profil->nama_kecamatan }}" />
@else
<input id="kecamatan_offline" name="kecamatan_id" class="form-control" placeholder="00.00.00" type="text" value="{{ $profil->kecamatan_id }}" />
@endif
</div>
<div class="col-md-5 col-sm-6 col-xs-12">
@if ($status_pantau)
@if ($adaDesa)
<input name="nama_kecamatan" class="form-control" type="text" value="{{ $profil->nama_kecamatan }}" readonly />
@elseif ($status_pantau)
<select class="form-control" id="list_kecamatan" name="kecamatan_id" data-placeholder="Pilih kecamatan" style="width: 100%;">
<option selected value="" disabled>Pilih Kecamatan</option>
@if ($profil->kecamatan_id || $profil->nama_kecamatan)
Expand Down

0 comments on commit d8bb66b

Please sign in to comment.