This commit is contained in:
hafifierahman
2022-05-09 11:04:21 +08:00
parent a99fe41fc2
commit 0b59734109
4 changed files with 189 additions and 3 deletions
@@ -2,6 +2,7 @@
@section('content')
@include('modal.permohonanwang')
@include('modal.CITModal')
@include('modal.denominasimodalpendahuluanserahan')
<div class="container">
<div class="row justify-content-center">
@@ -71,7 +72,7 @@
@php
if($mohon['tagdeposit'] === 1)
{
echo '<button data-mohonid="' . $mohon["nopermohonan"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
echo '<button data-amaun="' . $mohon["amaun_mohon"] . '" data-mohonid="' . $mohon["nopermohonan"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
}else if(($mohon['tagcit'] === 0 && $mohon['jenismohon'] === 'bayaranbalik'))
{
echo '<button data-mohonid="' . $mohon["nopermohonan"] . '" id="btncit" class="btn btn-secondary" data-toggle="modal" data-backdrop="static" data-keyboard="false" data-target="#CITModal">CIT</button>';
@@ -94,6 +95,7 @@
</div>
</div>
</div>
<script src="{{ asset('js/main.js') }}"></script>
<script type="text/javascript">
var tablemohon = $('#permohonantable').DataTable({
@@ -124,6 +126,28 @@
});
function funcbatal()
{
$('#denominasiHQModal').modal('hide');
// $('#pendahuluanserahanModal').modal('show');
$("#terima_transaksi").prop('disabled', false);
$('#bundle1').val('');
$('#totalb1').val(0.00);
$('#bundle5').val('');
$('#totalb5').val(0.00);
$('#bundle10').val('');
$('#totalb10').val(0.00);
$('#bundle20').val('');
$('#totalb20').val(0.00);
$('#bundle50').val('');
$('#totalb50').val(0.00);
$('#bundle100').val('');
$('#totalb100').val(0.00);
$('#amaunkiraan').val('');
}
function funcpermohonan(){
let amaun = $('#jumlahmohon').val();
@@ -174,6 +198,7 @@
$(document).on('click', '#btnterima', function(e) {
let nama = "{{ Auth::user()->name }}";
let mid = $(this).data("mohonid");
let amaun = $(this).data("amaun");
Swal.fire({
title: 'Adakah Wang sudah diterima?',
@@ -185,6 +210,11 @@
}).then((result) => {
/* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) {
$('#denominasiHQModal').modal('show');
$('#amaundiminta').val(amaun);
return;
$.ajax({
method:"put",
url: api_url + '/admin/permohonan/tagterima',