fix skit2
This commit is contained in:
@@ -3514,10 +3514,23 @@ class KhazanahController extends Controller
|
||||
|
||||
$permohonan = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url').'/admin/permohonan/get/'.$auth_user['cawangan'])->json();
|
||||
|
||||
|
||||
return view('khazanah.permohonanwang', compact('cawangan_info','api_url','getVault','tarikhsemasa','dashboard','permohonan'));
|
||||
}
|
||||
|
||||
public function RekodPermohonan()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$permohonan = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url').'/admin/permohonan/rekod/'.$auth_user['cawangan'])->json();
|
||||
|
||||
return view('khazanah.rekodpermohonan', compact('cawangan_info','api_url','permohonan'));
|
||||
}
|
||||
|
||||
|
||||
public function SimpanPermohonan(Request $request){
|
||||
|
||||
// dd($request->all());
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 911 KiB |
@@ -38,7 +38,7 @@
|
||||
<h5 class="mt-2">Senarai Permohonan Masih Aktif</h5>
|
||||
<div>
|
||||
<button class="btn btn-info" data-toggle="modal" data-target="#PermohonanWang">Mohon</button>
|
||||
<button class="btn btn-info">Rekod Permohonan</button>
|
||||
<a class="btn btn-info" href="{{ route('permohonan.rekod') }}">Rekod Permohonan</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -50,8 +50,9 @@
|
||||
<th>No Permohonan</th>
|
||||
<th>Tarikh Mohon</th>
|
||||
<th>Jumlah Mohon (RM)</th>
|
||||
<th>Jenis Permohonan</th>
|
||||
<th>Semak</th>
|
||||
<th>Jenis Permohonan</th>
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -61,10 +62,21 @@
|
||||
<td>{{ $mohon['nopermohonan'] }}</td>
|
||||
<td>{{ $mohon['tarikh_permohonan'] }}</td>
|
||||
<td>{{ number_format($mohon['amaun_mohon'],2) }}</td>
|
||||
<td>{{ $mohon['jenismohon'] }}</td>
|
||||
<td>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['mohonid']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
</td>
|
||||
<td>{{ $mohon['jenismohon'] }}</td>
|
||||
<td>
|
||||
@php
|
||||
if($mohon['tagdeposit'] === 1)
|
||||
{
|
||||
echo '<button data-mohonid="' . $mohon["mohonid"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
|
||||
}else{
|
||||
echo '<span class="p-2 badge badge-info">DALAM PROSES</span>';
|
||||
}
|
||||
@endphp
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -83,6 +95,8 @@
|
||||
"ordering": false
|
||||
});
|
||||
|
||||
var api_url = '{{ $api_url }}';
|
||||
|
||||
$('#PermohonanWang').on('hidden.bs.modal', function (e) {
|
||||
$(this)
|
||||
.find("input[name='jumlahmohon']")
|
||||
@@ -97,5 +111,38 @@
|
||||
$('#permohonanform').submit();
|
||||
}
|
||||
|
||||
$(document).on('click', '#btnterima', function(e) {
|
||||
let nama = "{{ Auth::user()->name }}";
|
||||
let mid = $(this).data("mohonid");
|
||||
|
||||
Swal.fire({
|
||||
title: 'Adakah Wang sudah diterima?',
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: 'Terima',
|
||||
denyButtonText: `Belum`,
|
||||
allowOutsideClick: false
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
method:"put",
|
||||
url: api_url + '/admin/permohonan/tagterima',
|
||||
data: {
|
||||
"mohonid" : mid,
|
||||
"namapenerima" : nama
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
if(data === 1)
|
||||
Swal.fire('Diterima!', '', 'success')
|
||||
}
|
||||
});
|
||||
} else if (result.isDenied) {
|
||||
// Swal.fire('Belum Diterima!', '', 'info')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb pb-3">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ route('permohonan.index') }}">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Rekod</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="card-body mx-auto col-12">
|
||||
|
||||
@if(session()->has('message'))
|
||||
<div class="alert alert-success">
|
||||
{{ session()->get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(session()->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session()->get('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h5 class="mt-2">Senarai Rekod Permohonan</h5>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-hover" id="permohonantable">
|
||||
<thead class="thead-dark text-center">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Permohonan</th>
|
||||
<th>Tarikh Mohon</th>
|
||||
<th>Jumlah Mohon (RM)</th>
|
||||
<th>Semak</th>
|
||||
<th>Jenis Permohonan</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($permohonan as $mohon)
|
||||
<tr class="text-center">
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $mohon['nopermohonan'] }}</td>
|
||||
<td>{{ $mohon['tarikh_permohonan'] }}</td>
|
||||
<td>{{ number_format($mohon['amaun_mohon'],2) }}</td>
|
||||
<td>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['mohonid']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
</td>
|
||||
<td>{{ $mohon['jenismohon'] }}</td>
|
||||
<td>@php
|
||||
if($mohon['tagterima'] === 1)
|
||||
echo '<span class="p-2 badge badge-success">BERJAYA</span>';
|
||||
else echo '<span class="p-2 badge badge-danger">BATAL</span>'; @endphp</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var tablemohon = $('#permohonantable').DataTable({
|
||||
"ordering": false
|
||||
});
|
||||
|
||||
var api_url = '{{ $api_url }}';
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -138,44 +138,51 @@
|
||||
</nav>
|
||||
|
||||
<div class="card-body mx-auto col-12">
|
||||
|
||||
{{-- {{ dd($permohonan) }} --}}
|
||||
|
||||
<div class="row d-flex justify-content-between px-3 top">
|
||||
|
||||
<div class="ml-4">
|
||||
|
||||
<h5>NO PERMOHONAN : <span class="text-primary font-weight-bold">{{ $permohonan['nopermohonan'] }}</span></h5>
|
||||
<h5>JUMLAH MOHON : <span class="text-primary font-weight-bold">{{ $permohonan['amaun_mohon'] }}</span></h5>
|
||||
<h5>JUMLAH MOHON : <span class="text-primary font-weight-bold">{{ 'RM ' . number_format($permohonan['amaun_mohon'],2) }}</span></h5>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mr-4">
|
||||
|
||||
<h5><span class="bg-success rounded p-2">{{ $permohonan['jenismohon'] }}</span></h5>
|
||||
<h5>@php
|
||||
if($permohonan['jenismohon'] == 'permohonanwang')
|
||||
echo '<span class="bg-warning rounded p-2">Permohonan Wang </span>';
|
||||
else
|
||||
echo '<span class="bg-info rounded p-2">Bayaran Balik </span>';
|
||||
@endphp</h5>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Add class 'active' to progress -->
|
||||
|
||||
<div class="row d-flex justify-center mt-4">
|
||||
<div class="row d-flex justify-center">
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<ul id="progressbar" class="text-center flex">
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tarikh_permohonan'] !== null) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 2) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tagoperasi'] === 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 3) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tagakaun'] === 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 4) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tagpb'] === 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 5) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tagdeposit'] === 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
<li class="{{ (sizeof($permohonan[0]['status']) >= 6) ? 'active' : '' }} step0 col-2"></li>
|
||||
<li class="{{ ($permohonan['tagterima'] === 1) ? 'active' : '' }} step0 col-2"></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -202,7 +209,10 @@
|
||||
<div class="flex flex-column">
|
||||
|
||||
<p class="font-weight-bold text-center">Pengesahan<br>Operasi</p>
|
||||
|
||||
{!! ($permohonan['tagoperasi'] === 2) ? '<img class="icon position-absolute" style="top:0;left:20;" src=' . asset('img/batal.png') .'>' : '' !!}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -212,6 +222,7 @@
|
||||
<div class="d-flex flex-column">
|
||||
|
||||
<p class="font-weight-bold text-center">Akaun</p>
|
||||
{!! ($permohonan['tagakaun'] === 2) ? '<img class="icon position-absolute" style="top:0;left:20;" src=' . asset('img/batal.png') .'>' : '' !!}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -222,6 +233,7 @@
|
||||
<div class="d-flex flex-column">
|
||||
|
||||
<p class="font-weight-bold text-center">Kelulusan <br>Pengurus Besar</p>
|
||||
{!! ($permohonan['tagpb'] === 2) ? '<img class="icon position-absolute" style="top:0;left:20;" src=' . asset('img/batal.png') .'>' : '' !!}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -232,6 +244,7 @@
|
||||
<div class="d-flex flex-column">
|
||||
|
||||
<p class="font-weight-bold text-center">Akaun <br> Deposit Ke Bank <br>Selesai</p>
|
||||
{!! ($permohonan['tagdeposit'] === 2) ? '<img class="icon position-absolute" style="top:0;left:20;" src=' . asset('img/batal.png') .'>' : '' !!}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -248,6 +261,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@@ -263,7 +277,28 @@
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $desc[0]['tarikh'] }}</td>
|
||||
<td>{{ $desc[0]['masa'] }}</td>
|
||||
<td>{{ $desc['description'] }}</td>
|
||||
<td>@php
|
||||
|
||||
switch($desc['statusid']){
|
||||
case 1: echo $desc['description'] . '<br>' . 'NAMA PEMOHON :' . $desc[0]['nama_pemohon'];
|
||||
break;
|
||||
case 2: echo $desc['description'] . '<br>' . 'NAMA OPERASI :' . $desc[0]['nama_operasi'];
|
||||
break;
|
||||
case 3: echo $desc['description'] . '<br>' . 'NAMA AKAUN :' . $desc[0]['nama_akaun'];
|
||||
break;
|
||||
case 4: echo $desc['description'] . '<br>' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2);
|
||||
break;
|
||||
case 5: echo $desc['description'] . '<br>' . 'JENIS BANK :' . $desc[0]['jenisbank'] . '<br>' . 'NO RESIT :' . $desc[0]['noresit'];
|
||||
break;
|
||||
case 6: echo $desc['description'] . '<br>' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima'];
|
||||
break;
|
||||
case 7: echo $desc['description'];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@endphp</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -138,6 +138,7 @@ Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahan
|
||||
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
|
||||
Route::get('/lelongankhazanah/{norujukan}',['as'=>'lelongan.khazanah','uses' => 'KhazanahController@lelongan'])->middleware('auth','khazanah');
|
||||
Route::get('/permohonan',['as'=>'permohonan.index','uses' => 'KhazanahController@PaparanPermohonan'])->middleware('auth','khazanah');
|
||||
Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah');
|
||||
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah');
|
||||
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user