Update Mapping DBH SKPD
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
@php
|
||||
$siteBreadcumb = [
|
||||
["url"=>"/admin/users","label"=>$siteTitle],
|
||||
["url"=>"/admin/users","label"=>$sitesubTitle]
|
||||
];
|
||||
@endphp
|
||||
|
||||
@extends('layouts.empty')
|
||||
|
||||
@section('styles')
|
||||
<link rel="stylesheet" href="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-rowgroup/css/rowGroup.bootstrap4.min.css">
|
||||
<link rel="stylesheet" href="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-fixedcolumns/css/fixedColumns.bootstrap4.min.css">
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><i class="fa fa-th-list"></i> @php echo $sitesubTitle; @endphp</h5>
|
||||
<div class="card-tools">
|
||||
<a class="btn btn-tool btn-default" href="{{ route('users.create') }}"><i class="fa fa-edit"></i> Tambah Data</a>
|
||||
<button id="btn_lock_all" type="button" class="btn btn-tool btn-default"><i class="fa fa-lock"></i> Lock Upload Data</button>
|
||||
<button id="btn_reset_lock_all" type="button" class="btn btn-tool btn-default"><i class="fa fa-unlock"></i> unLock Upload Data</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<div class="form-group">
|
||||
<label>Periode</label>
|
||||
<select class="form-control form-control-sm" id="srcTA" name="ta">
|
||||
@php
|
||||
$listTA = Session::get('listTA');
|
||||
foreach($listTA as $rowTA){
|
||||
echo "<option>$rowTA</option>";
|
||||
}
|
||||
@endphp
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="dtTableUser" class="table table-striped jambo_table">
|
||||
<tr>
|
||||
<thead>
|
||||
<th width="50">No</th>
|
||||
<th>Kode Rekening</th>
|
||||
<th>Nama Rekening</th>
|
||||
<th width="150px" class="text-center">Action</th>
|
||||
</thead>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('scripts')
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/jszip/jszip.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/pdfmake/pdfmake.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/pdfmake/vfs_fonts.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.print.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-fixedcolumns/js/dataTables.fixedColumns.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-fixedcolumns/js/fixedColumns.bootstrap4.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-rowgroup/js/dataTables.rowGroup.min.js"></script>
|
||||
<script src="{{ $baseUrl }}/AdminLTE-3.2.0/plugins/datatables-rowgroup/js/rowGroup.bootstrap4.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
var dtTable = $('#dtTableUser').DataTable( {
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ordering": false,
|
||||
"autoWidth": true,
|
||||
"ajax": {
|
||||
url: "{{ $baseUrl }}/admin/MappingDbhSkpd/datatable",
|
||||
type: "POST",
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: function (d) {
|
||||
d.srcTA = $("#srcTA").val()
|
||||
}
|
||||
},
|
||||
"dom": "<\"top\" <\"row\"<\"col-md-6\"l><\"col-md-6 text-right\"f>>>rt<\"bottom\" <\"row\"<\"col-md-6\"i><\"col-md-6\"p>> ><\"clear\">",
|
||||
"lengthMenu": [
|
||||
[ 10, 25, 50 ],
|
||||
[ "10", "25", "50" ]
|
||||
],
|
||||
"paging": true, // Table pagination
|
||||
"columns": [
|
||||
{ "data": null},
|
||||
{ "data": "kode_rekening", "className":"text-center" },
|
||||
{ "data": "nama_rekening", "className":"text-left" },
|
||||
{ "data": null, "className":"text-center" },
|
||||
],
|
||||
"rowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull, oSettings) {
|
||||
let info = dtTable.page.info();
|
||||
let numStart = info.page;
|
||||
let index = (numStart * dtTable.page.len()) + iDisplayIndex + 1;
|
||||
let checked = aData["is_lock_upload"] == 1 ? "checked":"";
|
||||
|
||||
$("td:eq(0)", nRow).html(index);
|
||||
$("td:eq(3)", nRow).html(`<a class="btn btn-default btn-sm" href="{{ URL::to("/admin/MappingDbhSkpd") }}/`+ aData["id"] +`" title="Lihat"><i class="fa fa-bullseye"></i></a>`);
|
||||
|
||||
return nRow;
|
||||
},
|
||||
"language": {
|
||||
"lengthMenu": "Tampilkan _MENU_ Data per Halaman",
|
||||
"zeroRecords": "Data tidak ditemukan!",
|
||||
"info": "Halaman _PAGE_ dari _PAGES_ Halaman",
|
||||
"infoEmpty": "Data tidak tersedia",
|
||||
"infoFiltered": "(Disaring dari _MAX_ Data)",
|
||||
"paginate": {
|
||||
"previous": "<i class='fas fa-angle-double-left'></i>",
|
||||
"next": "<i class='fas fa-angle-double-right'></i>",
|
||||
},
|
||||
"processing": "<div class='loading'></div>",
|
||||
},
|
||||
});
|
||||
|
||||
$(document).on("click",".chk-upload", function(){
|
||||
let val = $(this).val();
|
||||
let reset = $(this).prop("checked") == 1 ?0:1;
|
||||
location.href = "{{ URL::to("/admin/users") }}/"+val+"/lock-upload/"+reset;
|
||||
});
|
||||
|
||||
$("#btn_lock_all").on("click", function(){
|
||||
let test = Swal.fire({
|
||||
title: 'Fitur upload data akan dikunci untuk semua user!?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Ya',
|
||||
denyButtonText: "Tidak",
|
||||
icon: "warning",
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
location.href = "{{ URL::to("/admin/users") }}/lock-upload-all/0/0";
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$("#btn_reset_lock_all").on("click", function(){
|
||||
let test = Swal.fire({
|
||||
title: 'Fitur upload data akan direset untuk semua user!?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Ya',
|
||||
denyButtonText: "Tidak",
|
||||
icon: "warning",
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
location.href = "{{ URL::to("/admin/users") }}/lock-upload-all/0/1";
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@stop
|
||||
@@ -0,0 +1,76 @@
|
||||
@php
|
||||
$siteBreadcumb = [
|
||||
["url"=>"/admin/users","label"=>$siteTitle],
|
||||
["url"=>"/admin/users","label"=>$sitesubTitle]
|
||||
];
|
||||
@endphp
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-12 margin-tb">
|
||||
<div class="pull-left">
|
||||
<h5><i class="fa fa-bullseye"></i> @php echo $sitesubTitle; @endphp</h5>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-sm btn-secondary" href="{{ route('MappingDbhSkpd.index') }}"><i class="fa fa-arrow-left"></i> Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="frmSKPDMap" action="{{ $baseUrl."/admin/MappingDbhSkpd/".$sps->id }}" method="POST">
|
||||
@csrf
|
||||
<div class="row mt-4">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<div class="form-group">
|
||||
<strong>Tahun:</strong>
|
||||
<input type="text" class="form-control-plaintext" value="{{ $sps->tahun }}" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<strong>Kode Rekening:</strong>
|
||||
<input type="text" class="form-control-plaintext" value="{{ $sps->kode_rekening }}" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<strong>Nama Rekening</strong>
|
||||
<input type="text" class="form-control-plaintext" value="{{ $sps->nama_rekening }}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="txt_id_skpd">SKPD</label>
|
||||
<select id="txt_id_skpd" name="txt_id_skpd" class="form-control" required multiple></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<input class="btn btn-sm btn-success" type="submit" value="Simpan">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#txt_id_skpd').select2({
|
||||
placeholder: 'Pilih SKPD',
|
||||
allowClear: true,
|
||||
ajax: {
|
||||
url: '{{ $baseUrl }}/skpd-search',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
text: item.name,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user