Skip to content

Commit

Permalink
WIP: Remove Not Used (#981)
Browse files Browse the repository at this point in the history
Co-authored-by: ahmad afandi <[email protected]>
  • Loading branch information
arifpriadi and pandigresik authored Aug 21, 2024
1 parent 88c5574 commit 920ac37
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 48 deletions.
5 changes: 0 additions & 5 deletions app/Models/Profil.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,10 @@ class Profil extends Model
'file_struktur_organisasi',
'file_logo',
'sambutan',
'socialmedia',
'visi',
'misi',
];

protected $cast = [
'socialmedia' => 'array',
];

public static function getProfilTanpaDataUmum()
{
$data_umums = DataUmum::get();
Expand Down
4 changes: 2 additions & 2 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Terima kasih pada @uddinmtm telah ikut berkontribusi.
#### BUG

1. [#932](https://github.com/OpenSID/OpenDK/issues/932) Sesuaikan tombol batal dan kembali.

2. [#980](https://github.com/OpenSID/OpenDK/issues/980) Hapus media sosial pada profile

#### TEKNIS

1. [#982](https://github.com/OpenSID/OpenDK/issues/982) Perbaikan celah di API list penduduk dan kk.
2. [#1006](https://github.com/OpenSID/OpenDK/issues/1006) Template Issue Label Fitur
2. [#1006](https://github.com/OpenSID/OpenDK/issues/1006) Template Issue Label Fitur
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('das_profil', function (Blueprint $table) {
$table->dropColumn('socialmedia');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('das_profil', function (Blueprint $table) {
$table->json('socialmedia')->nullable();
});
}
};
1 change: 0 additions & 1 deletion database/seeders/DasProfilTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function run()
'file_logo' => null,
'visi' => null,
'misi' => null,
'socialmedia' => json_encode($socialmedia),
'created_at' => now(),
'updated_at' => now(),
]);
Expand Down
40 changes: 0 additions & 40 deletions resources/views/data/profil/form_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,46 +144,6 @@
<img src="{{ is_logo($profil->file_logo) }}" id="showgambar3" style="max-width:200px;max-height:200px;float:left;" />
</div>
</div>
<div class="form-group">
<label class="control-label col-md-4 col-sm-3 col-xs-12">Media Sosial</label>
<div class="col-md-7 col-sm-6 col-xs-12">
@if (is_null($profil->socialmedia))
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-facebook"></i></span>
<input type="text" name="socialmedia[0][link]" class="form-control" placeholder="facebook">
<input type="hidden" name="socialmedia[0][icon]" value="fa fa-facebook" class="form-control" placeholder="facebook">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-twitter"></i></span>
<input type="text" name="socialmedia[1][link]" class="form-control" placeholder="twitter">
<input type="hidden" name="socialmedia[1][icon]" value="fa fa-twitter" class="form-control" placeholder="twitter">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-instagram"></i></span>
<input type="text" name="socialmedia[2][link]" class="form-control" placeholder="instagram">
<input type="hidden" name="socialmedia[2][icon]" value="fa fa-instagram" class="form-control" placeholder="instagram">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-youtube"></i></span>
<input type="text" name="socialmedia[3][link]" class="form-control" placeholder="youtube">
<input type="hidden" name="socialmedia[3][icon]" value="fa fa-youtube" class="form-control" placeholder="youtube">
</div>
<br>
@else
@foreach (json_decode($profil->socialmedia, true) as $sosmed)
<div class="input-group">
<span class="input-group-addon"><i class="{{ $sosmed['icon'] }}"></i></span>
<input type="text" name="socialmedia[{{ $loop->iteration - 1 }}][link]" value="{{ $sosmed['link'] }}" class="form-control" placeholder="">
<input type="hidden" name="socialmedia[{{ $loop->iteration - 1 }}][icon]" value="{{ $sosmed['icon'] }}" class="form-control" placeholder="">
</div>
<br>
@endforeach
@endif
</div>
</div>
<div class="form-group">
<label class="control-label col-md-4 col-sm-3 col-xs-12">Sambutan {{ $sebutan_kepala_wilayah }}</label>
<div class="col-md-8 col-sm-6 col-xs-12">
Expand Down

0 comments on commit 920ac37

Please sign in to comment.