Files
sidata/resources/views/realisasi_belanja/create.blade.php
T

110 lines
6.5 KiB
PHP

@php
$siteBreadcumb = [
["url"=>"/realisasi-belanja","label"=>$siteTitle],
["url"=>"/realisasi-belanja/create","label"=>$sitesubTitle]
];
@endphp
@extends('layouts.empty')
@section('styles')
<!-- DataTables -->
<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-fixedcolumns/css/fixedColumns.bootstrap4.min.css">
@endsection
@section('content')
<div class="card card-secondary">
<div class="card-header">
<h2 class="card-title"><i class="fa fa-th-list mr-2"></i> TAMBAH {{ strtoupper($sitesubTitle) }}</h2>
<div class="card-tools">
{{-- @if(auth()->user()->can('Tambah SKPP')) --}}
<button class="btn btn-tool" onclick="location.href='{{ url('/realisasi-belanja') }}'"><i class="fa fa-arrow-left"></i> Kembali</button>
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
<i class="fas fa-minus"></i>
</button>
{{-- @endif --}}
</div>
</div>
<div class="card-body">
<form id="frmRealBelanja" action="{{ url('/realisasi-belanja') }}" method="POST" autocomplete="off">
@csrf
@include('realisasi_belanja.form')
<button id="btnSubmit" class="btn btn-sm btn-success" type="submit"><i class='fa fa-save'></i> SIMPAN</i></button>
<a class="modalButton btn btn-sm btn-warning" size="modal-xl" title="Ubah RSK" href="{{ URL::to("/realisasi-belanja/create-from-rsk") }}"><i class='fa fa-edit'></i> UBAH RSK</a>
</form>
</div>
</div>
@endsection
@section('scripts2')
<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 type="text/javascript">
$(document).ready(function(){
var srcDate1 = null, srcDate2 = null;
let $newOptionProgram = $("<option selected='selected'></option>").val("{{ $VwDpaRsk->c_program }}").text("{{ $VwDpaRsk->c_program." | ".$VwDpaRsk->n_program }}")
$("select[name=prog]").val("{{ $VwDpaRsk->c_program }}");
$("select[name=prog]").append($newOptionProgram).trigger('change');
$("select[name=prog]").attr("disabled", true);
let $newOptionSkpd = $("<option selected='selected'></option>").val("{{ $VwDpaRsk->c_opd }}").text("{{ $VwDpaRsk->c_opd." | ".$VwDpaRsk->n_opd }}")
$("select[name=skpd]").val("{{ $VwDpaRsk->c_opd }}");
$("select[name=skpd]").append($newOptionSkpd).trigger('change');
$("select[name=skpd]").attr("disabled", true);
let $newOptionKegiatan = $("<option selected='selected'></option>").val("{{ $VwDpaRsk->c_giat }}").text("{{ $VwDpaRsk->c_giat." | ".$VwDpaRsk->n_giat }}")
$("select[name=keg]").val("{{ $VwDpaRsk->c_giat }}");
$("select[name=keg]").append($newOptionKegiatan).trigger('change');
$("select[name=keg]").attr("disabled", true);
let $newOptionSubKegiatan = $("<option selected='selected'></option>").val("{{ $VwDpaRsk->c_subgiat }}").text("{{ $VwDpaRsk->c_subgiat." | ".$VwDpaRsk->n_subgiat }}")
$("select[name=sk]").val("{{ $VwDpaRsk->c_subgiat }}");
$("select[name=sk]").append($newOptionSubKegiatan).trigger('change');
$("select[name=sk]").attr("disabled", true);
let $newOptionRSK = $("<option selected='selected'></option>").val("{{ $VwDpaRsk->i_id }}").text("{{ $VwDpaRsk->i_id." | ".$VwDpaRsk->n_rsk }}")
$("select[name=rsk]").val("{{ $VwDpaRsk->i_id }}");
$("select[name=rsk]").append($newOptionRSK).trigger('change');
$("select[name=rsk]").attr("disabled", true);
$("input[name=anggaran]").val("{{ separateNumberIndo($VwDpaRsk->v_angg_tapd) }}");
$("input[name=anggaran]").attr("readonly", true);
$("input[name=alokasi_anggaran]").val("{{ separateNumberIndo($VwDpaRsk->v_angg_tapd) }}");
$('select[name=jenis_dana]').change();
$(document).on("submit","#frmRealBelanja",function (e){
e.preventDefault();
Swal.fire({
title: 'Data akan disimpan?',
showDenyButton: true,
showCancelButton: false,
confirmButtonText: 'Ya',
denyButtonText: "Tidak",
icon: "warning",
}).then((result) => {
if (result.isConfirmed) {
$("select[name=rsk]").attr("disabled", false);
e.currentTarget.submit();
}
})
});
});
</script>
@endsection