Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perbaiki format tanggal #560

Merged
merged 9 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/Http/Controllers/Data/DataPembangunanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public function getrinciandata($id, $desa_id)
$pembangunanDokumentasi = PembangunanDokumentasi::where('desa_id', $desa_id)->where('id_pembangunan', $id)->get();
return DataTables::of($pembangunanDokumentasi)
->addIndexColumn()
->editColumn('created_at', function ($row) {
return format_datetime($row->created_at);
})
->make();
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Data/KeluargaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function getKeluarga()
})
->addColumn('foto', function ($row) {
return '<img src="' . is_user($row->kepala_kk->foto, $row->kepala_kk->sex) . '" class="img-rounded" alt="Foto Penduduk" height="50"/>';
})->editColumn('tgl_cetak_kk', function ($row) {
return format_datetime($row->tgl_cetak_kk);
})
->rawColumns(['foto'])
->make();
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Data/ProgramBantuanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getaProgramBantuan(Request $request)
return view('forms.aksi', $data);
})
->addColumn('masa_berlaku', function ($row) {
return $row->start_date . ' - ' . $row->end_date;
return format_date($row->start_date) . ' - ' . format_date($row->end_date);
})
->editColumn('sasaran', function ($row) {
$sasaran = [1 => 'Penduduk/Perorangan', 2 => 'Keluarga-KK'];
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Informasi/ArtikelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function getDataArtikel(Request $request)
} else {
return '<span class="label label-success">Aktif</span>';
}
})->editColumn('created_at', function ($row) {
return format_datetime($row->created_at);
})
->rawColumns(['status'])
->make(true);
Expand Down
10 changes: 10 additions & 0 deletions catatan_rilis.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ Terima kasih pada [] yang baru mulai berkontribusi.
1. [#529](https://github.com/OpenSID/OpenDK/issues/529) Perbaikan foto pelapor di sikema tidak menampilkan foto penduduk.
2. [#544](https://github.com/OpenSID/OpenDK/issues/544) Perbaikan form no telepon pengguna tidak bisa dikosongkan.
3. [#536](https://github.com/OpenSID/OpenDK/pull/536) Perbaikan Foto artikel tidak terhapus ketika hapus atau ganti foto.
4. [#553](https://github.com/OpenSID/OpenDK/issues/553) Perbaikan Format tanggal rekam dokumentasi pembangunan.
5. [#554](https://github.com/OpenSID/OpenDK/issues/554) Perbaikan Format tanggal masa berlaku program bantuan.
6. [#555](https://github.com/OpenSID/OpenDK/issues/555) Perbaikan Format tanggal lahir peserta program bantuan.
7. [#556](https://github.com/OpenSID/OpenDK/issues/556) Perbaikan Format tanggal di modul detail penduduk.
8. [#557](https://github.com/OpenSID/OpenDK/issues/557) Perbaikan Format tanggal di modul keluarga.
9. [#558](https://github.com/OpenSID/OpenDK/issues/558) Perbaikan Format tanggal daftar dan cetak kk di detail keluarga.
10. [#559](https://github.com/OpenSID/OpenDK/issues/559) Perbaikan Format tanggal lapor di sistem keluhan.
11. [#561](https://github.com/OpenSID/OpenDK/issues/561) Perbaikan Format tanggal terbit artikel.



#### Perubahan Teknis

Expand Down
2 changes: 1 addition & 1 deletion helpers/general_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function diff_for_humans($date)

function format_datetime($date)
{
return Carbon::parse($date)->toDayDateTimeString();
return Carbon::parse($date)->translatedFormat('d F Y H:i:s');
}

function format_date($date)
Expand Down
12 changes: 6 additions & 6 deletions resources/views/data/keluarga/form_show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
</div>

<div class="form-group">

<label for="nik_kepala" class="control-label col-md-4 col-sm-3 col-xs-12">Kepala Keluarga</label>

<div class="col-md-6 col-sm-6 col-xs-12">
<select class="form-control" id="nik_kepala" disabled name="nik_kepala">
@foreach($penduduk as $kk)
@if($kk->nik == $keluarga->nik_kepala)
<option value="{{ $kk->nik }}" selected="true">{{ $kk->nama }}</option>
<option value="{{ $kk->nik }}" selected="true">{{ $kk->nama }}</option>
@else
<option value="{{ $kk->nik }}" >{{ $kk->nama }}</option>
@endif
Expand All @@ -26,7 +26,7 @@
<label for="tgl_daftar" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Daftar</label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tgl_daftar', null, ['class' => 'form-control', 'disabled', 'id' => 'tgl_daftar']) !!}
{!! Form::text('tgl_daftar', format_date($keluarga->tgl_daftar), ['class' => 'form-control', 'disabled', 'id' => 'tgl_daftar']) !!}
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -61,7 +61,7 @@
<label for="tgl_cetak_kk" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Cetak KK </label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tgl_cetak_kk', null, ['class' => 'form-control', 'disabled', 'id' => 'tgl_cetak_kk']) !!}
{!! Form::text('tgl_cetak_kk', format_datetime($keluarga->tgl_cetak_kk), ['class' => 'form-control', 'disabled', 'id' => 'tgl_cetak_kk']) !!}
</div>
</div>

Expand All @@ -73,7 +73,7 @@

// Select 2 Kecamatan
$('#nik_kepala').select2();

});
</script>
@endpush
@endpush
10 changes: 5 additions & 5 deletions resources/views/data/penduduk/form_show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<label for="tanggal_lahir" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Lahir</label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tanggal_lahir', null, ['class' => 'form-control', 'disabled'=>true, 'id' => 'tanggal_lahir']) !!}
{!! Form::text('tanggal_lahir', format_date($penduduk->tanggal_lahir), ['class' => 'form-control', 'disabled'=>true, 'id' => 'tanggal_lahir']) !!}
</div>
</div>

Expand Down Expand Up @@ -199,7 +199,7 @@
<label for="tanggal_akhir_pasport" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Akhir Paspor</label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tanggal_akhir_pasport', null, ['class' => 'form-control', 'disabled', 'id' => 'tanggal_akhir_pasport']) !!}
{!! Form::text('tanggal_akhir_pasport', format_date($penduduk->tanggal_akhir_pasport), ['class' => 'form-control', 'disabled', 'id' => 'tanggal_akhir_pasport']) !!}
</div>
</div>

Expand Down Expand Up @@ -296,7 +296,7 @@
<label for="tanggal_perkawinan" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Nikah</label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tanggal_perkawinan', null, ['class' => 'form-control', 'disabled', 'id' => 'tanggal_perkawinan']) !!}
{!! Form::text('tanggal_perkawinan', format_date($penduduk->tanggal_perkawinan), ['class' => 'form-control', 'disabled', 'id' => 'tanggal_perkawinan']) !!}
</div>
</div>

Expand All @@ -312,7 +312,7 @@
<label for="tanggal_perceraian" class="control-label col-md-4 col-sm-3 col-xs-12">Tanggal Perceraian</label>

<div class="col-md-6 col-sm-6 col-xs-12">
{!! Form::text('tanggal_perceraian', null, ['class' => 'form-control', 'disabled', 'id' => 'tanggal_perceraian']) !!}
{!! Form::text('tanggal_perceraian', format_date($penduduk->tanggal_perceraian), ['class' => 'form-control', 'disabled', 'id' => 'tanggal_perceraian']) !!}
</div>
</div>

Expand Down Expand Up @@ -353,4 +353,4 @@
</div>
</div>

<div class="ln_solid"></div>
<div class="ln_solid"></div>
2 changes: 1 addition & 1 deletion resources/views/data/program_bantuan/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<td>{!! $row->kartu_nik !!}</td>
<td>{!! $row->kartu_nama !!}</td>
<td>{!! $row->kartu_tempat_lahir !!}</td>
<td>{!! $row->kartu_tanggal_lahir !!}</td>
<td>{!! format_date($row->kartu_tanggal_lahir) !!}</td>
<td>{!! $row->kartu_alamat !!}</td>
</tr>
@endforeach
Expand Down
4 changes: 2 additions & 2 deletions resources/views/pages/berita/detail.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="isi-artikel">
<h3 style="margin-top: 5px; text-align: justify;"><b>{{ $artikel->judul }}</b></h3>
<p><i class="fa fa-calendar"></i>&ensp;{{ $artikel->created_at->format('d M Y') }}&ensp;|&ensp;<i class="fa fa-user"></i>&ensp;Administrator</p>
<p><i class="fa fa-calendar"></i>&ensp;{{ format_date($artikel->created_at) }}&ensp;|&ensp;<i class="fa fa-user"></i>&ensp;Administrator</p>
<p>{!! $artikel->isi !!}</p>
<hr/>
<div style="margin-top:-10px" class="sharethis-inline-share-buttons"></div>
Expand All @@ -23,4 +23,4 @@
@endsection
@push('scripts')
<script type="text/javascript" src="https://platform-api.sharethis.com/js/sharethis.js#property=61eeb3e9e14521001ac13912&product=inline-share-buttons" async="async"></script>
@endpush
@endpush
4 changes: 2 additions & 2 deletions resources/views/pages/berita/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="col-sm-8">
<h5 style="margin-top: 5px; text-align: justify;"><b><a href="berita/{{ $item->slug }}">{{ $item->judul }}</a></b></h5>
<p style="font-size:11px;"><i class="fa fa-calendar"></i>&ensp;{{ $item->created_at->format('d M Y') }}&ensp;|&ensp;<i class="fa fa-user"></i>&ensp;Administrator</p>
<p style="font-size:11px;"><i class="fa fa-calendar"></i>&ensp;{{ format_date($item->created_at) }}&ensp;|&ensp;<i class="fa fa-user"></i>&ensp;Administrator</p>
<p style="text-align: justify;">{{ strip_tags(substr($item->isi, 0, 250)) }}...</p>
<a href="berita/{{ $item->slug }}" class="btn btn-sm btn-primary" target="_blank">Selengkapnya</a>
</div>
Expand All @@ -23,4 +23,4 @@
{{ $artikel->links() }}
</div>
</div>
</div>
</div>