Skip to content

Commit

Permalink
Sesuaikan tampilan tabel data pembangunan
Browse files Browse the repository at this point in the history
  • Loading branch information
andifahruddinakas committed May 31, 2022
1 parent d8bde83 commit 45ad233
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 148 deletions.
180 changes: 109 additions & 71 deletions resources/views/data/pembangunan/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,94 +1,132 @@
@extends('layouts.dashboard_template')

@section('content')
<section class="content-header">
<h1>
{{ $page_title ?? "Page Title" }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">{{ $page_title }}</li>
</ol>
</section>
<section class="content-header">
<h1>
{{ $page_title ?? 'Page Title' }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">{{ $page_title }}</li>
</ol>
</section>

<section class="content container-fluid">
<section class="content container-fluid">

@include('partials.flash_message')
@include('partials.flash_message')

<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<label>Desa</label>
<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<label>Desa</label>
<select class="form-control" id="list_desa">
<option value="Semua">Semua Desa</option>
@foreach($list_desa as $desa)
<option value="{{ $desa->desa_id}}">{{$desa->nama}}</option>
@foreach ($list_desa as $desa)
<option value="{{ $desa->desa_id }}">{{ $desa->nama }}</option>
@endforeach
</select>
</div>
</div>
</div>
</div>
<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered" id="pembangunan-table">
<thead>
<tr>
<th width="80px">Aksi</th>
<th>Nama Kegiatan</th>
<th>Sumber Dana</th>
<th>Anggaran</th>
<th>Volume</th>
<th>Tahun</th>
<th>Pelaksana</th>
<th>Lokasi</th>
</tr>
</thead>
</table>
<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered" id="pembangunan-table">
<thead>
<tr>
<th width="80px">Aksi</th>
<th>Nama Kegiatan</th>
<th>Sumber Dana</th>
<th>Anggaran</th>
<th>Volume</th>
<th>Tahun</th>
<th>Pelaksana</th>
<th>Lokasi</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</section>
</section>
@endsection
@include('partials.asset_select2')
@include('partials.asset_datatables')

@push('scripts')
<script type="text/javascript">
$(document).ready(function () {
$('#list_desa').select2();
<script type="text/javascript">
$(document).ready(function() {
$('#list_desa').select2();
var data = $('#pembangunan-table').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: "{!! route( 'data.pembangunan.getdata' ) !!}",
data: function (d) {
d.desa = $('#list_desa').val();
}
},
columns: [
{data: 'aksi', name: 'aksi', class: 'text-center', searchable: false, orderable: false},
{data: 'judul', name: 'judul', class: 'text-center', searchable: false, orderable: true},
{data: 'sumber_dana', name: 'sumber_dana', class: 'text-center', searchable: false, orderable: true},
{data: 'anggaran', name: 'anggaran', class: 'text-center', searchable: false, orderable: false},
{data: 'volume', name: 'volume', class: 'text-center', searchable: false, orderable: false},
{data: 'tahun_anggaran', name: 'tahun_anggaran', class: 'text-center', searchable: false, orderable: false},
{data: 'pelaksana_kegiatan', name: 'pelaksana_kegiatan', class: 'text-center', searchable: false, orderable: false},
{data: 'lokasi', name: 'lokasi', class: 'text-center', searchable: false, orderable: false},
],
});
var data = $('#pembangunan-table').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: "{!! route('data.pembangunan.getdata') !!}",
data: function(d) {
d.desa = $('#list_desa').val();
}
},
columns: [{
data: 'aksi',
name: 'aksi',
class: 'text-center',
searchable: false,
orderable: false
},
{
data: 'judul',
name: 'judul',
searchable: false,
orderable: true
},
{
data: 'sumber_dana',
name: 'sumber_dana',
searchable: false,
orderable: true
},
{
data: 'anggaran',
name: 'anggaran',
searchable: false,
orderable: false
},
{
data: 'volume',
name: 'volume',
searchable: false,
orderable: false
},
{
data: 'tahun_anggaran',
name: 'tahun_anggaran',
searchable: false,
orderable: false
},
{
data: 'pelaksana_kegiatan',
name: 'pelaksana_kegiatan',
searchable: false,
orderable: false
},
{
data: 'lokasi',
name: 'lokasi',
searchable: false,
orderable: false
},
],
$('#list_desa').on('select2:select', function (e) {
data.ajax.reload();
});
});
</script>
@include('forms.datatable-vertical')
@include('forms.delete-modal')
});
$('#list_desa').on('select2:select', function(e) {
data.ajax.reload();
});
});
</script>
@include('forms.datatable-vertical')
@endpush
175 changes: 98 additions & 77 deletions resources/views/data/pembangunan/rincian.blade.php
Original file line number Diff line number Diff line change
@@ -1,91 +1,112 @@
@extends('layouts.dashboard_template')

@section('content')
<section class="content-header">
<h1>
{{ $page_title ?? "Page Title" }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">{{ $page_title }}</li>
</ol>
</section>
<section class="content-header">
<h1>
{{ $page_title ?? 'Page Title' }}
<small>{{ $page_description ?? '' }}</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ route('dashboard') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">{{ $page_title }}</li>
</ol>
</section>

<section class="content container-fluid">
<section class="content container-fluid">

@include('partials.flash_message')
@include('partials.flash_message')

<div class="box box-primary">
<div class="box-body">
<h5 class="text-bold">Rincian Dokumentasi Pembangunan</h5>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover tabel-rincian">
<tbody>
<tr>
<td width="20%">Nama Kegiatan</td>
<td width="1">:</td>
<td>{{ $pembangunan->judul }}</td>
</tr>
<tr>
<td>Sumber Dana</td>
<td> : </td>
<td>{{ $pembangunan->sumber_dana }}</td>
</tr>
<tr>
<td>Lokasi Pembangunan</td>
<td> : </td>
<td>{{ $pembangunan->lokasi }}</td>
</tr>
<tr>
<td>Keterangan</td>
<td> : </td>
<td>{{ $pembangunan->keterangan }}</td>
</tr>
</tbody>
</table>
</div>

<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered" id="pembangunan-table">
<thead>
<tr>
<th>Nomor</th>
<th>Presentase</th>
<th>Keterangan</th>
<th>Tanggal Rekam</th>
</tr>
</thead>
</table>
<div class="box box-primary">
<div class="box-body">
<h5 class="text-bold">Rincian Dokumentasi Pembangunan</h5>
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover tabel-rincian">
<tbody>
<tr>
<td width="20%">Nama Kegiatan</td>
<td width="1">:</td>
<td>{{ $pembangunan->judul }}</td>
</tr>
<tr>
<td>Sumber Dana</td>
<td> : </td>
<td>{{ $pembangunan->sumber_dana }}</td>
</tr>
<tr>
<td>Lokasi Pembangunan</td>
<td> : </td>
<td>{{ $pembangunan->lokasi }}</td>
</tr>
<tr>
<td>Keterangan</td>
<td> : </td>
<td>{{ $pembangunan->keterangan }}</td>
</tr>
</tbody>
</table>
</div>

<hr>
<div class="table-responsive">
<table class="table table-striped table-bordered" id="pembangunan-table">
<thead>
<tr>
<th>Nomor</th>
<th>Presentase</th>
<th>Keterangan</th>
<th>Tanggal Rekam</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</section>
</section>
@endsection
@include('partials.asset_datatables')

@push('scripts')
<script type="text/javascript">
$(document).ready(function () {
var data = $('#pembangunan-table').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: "{!! route( 'data.pembangunan.getrinciandata', ['id' => $pembangunan->id, 'desa_id' => $pembangunan->desa_id ] ) !!}"
},
columns: [
{data: 'DT_RowIndex', name: 'DT_RowIndex', class: 'text-center', searchable: false, orderable: true},
{data: 'persentase', name: 'persentase', class: 'text-center', searchable: false, orderable: true},
{data: 'keterangan', name: 'keterangan', class: 'text-center', searchable: false, orderable: false},
{data: 'created_at', name: 'created_at', class: 'text-center', searchable: false, orderable: true},
],
});
});
</script>
@include('forms.datatable-vertical')
@include('forms.delete-modal')
<script type="text/javascript">
$(document).ready(function() {
var data = $('#pembangunan-table').DataTable({
autoWidth: false,
processing: true,
serverSide: true,
ajax: {
url: "{!! route('data.pembangunan.getrinciandata', ['id' => $pembangunan->id, 'desa_id' => $pembangunan->desa_id]) !!}"
},
columns: [{
data: 'DT_RowIndex',
name: 'DT_RowIndex',
class: 'text-center',
searchable: false,
orderable: true
},
{
data: 'persentase',
name: 'persentase',
class: 'text-center',
searchable: false,
orderable: true
},
{
data: 'keterangan',
name: 'keterangan',
class: 'text-center',
searchable: false,
orderable: false
},
{
data: 'created_at',
name: 'created_at',
class: 'text-center',
searchable: false,
orderable: true
},
],
});
});
</script>
@include('forms.datatable-vertical')
@endpush

0 comments on commit 45ad233

Please sign in to comment.