diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php index 7538cdf..ff590f2 100644 --- a/app/Http/Controllers/KhazanahController.php +++ b/app/Http/Controllers/KhazanahController.php @@ -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()); diff --git a/public/img/batal.png b/public/img/batal.png new file mode 100644 index 0000000..410ac14 Binary files /dev/null and b/public/img/batal.png differ diff --git a/resources/views/khazanah/permohonanwang.blade.php b/resources/views/khazanah/permohonanwang.blade.php index 9a0d0ef..5f9416d 100644 --- a/resources/views/khazanah/permohonanwang.blade.php +++ b/resources/views/khazanah/permohonanwang.blade.php @@ -38,7 +38,7 @@
Senarai Permohonan Masih Aktif
- + Rekod Permohonan
@@ -50,8 +50,9 @@ No Permohonan Tarikh Mohon Jumlah Mohon (RM) - Jenis Permohonan Semak + Jenis Permohonan + Tindakan @@ -61,10 +62,21 @@ {{ $mohon['nopermohonan'] }} {{ $mohon['tarikh_permohonan'] }} {{ number_format($mohon['amaun_mohon'],2) }} - {{ $mohon['jenismohon'] }} + {{ $mohon['jenismohon'] }} + + @php + if($mohon['tagdeposit'] === 1) + { + echo ''; + }else{ + echo 'DALAM PROSES'; + } + @endphp + + @endforeach @@ -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') + } + }); + }); + @endsection diff --git a/resources/views/khazanah/rekodpermohonan.blade.php b/resources/views/khazanah/rekodpermohonan.blade.php new file mode 100644 index 0000000..dc4778b --- /dev/null +++ b/resources/views/khazanah/rekodpermohonan.blade.php @@ -0,0 +1,85 @@ +@extends('layouts.app') +@section('content') + +
+
+
+
+ + + +
+ + @if(session()->has('message')) +
+ {{ session()->get('message') }} +
+ @endif + + @if(session()->has('error')) +
+ {{ session()->get('error') }} +
+ @endif + +
+
Senarai Rekod Permohonan
+
+
+
+ + + + + + + + + + + + + + @foreach($permohonan as $mohon) + + + + + + + + + + + @endforeach + +
BilNo PermohonanTarikh MohonJumlah Mohon (RM)SemakJenis PermohonanStatus
{{ $loop->iteration }}{{ $mohon['nopermohonan'] }}{{ $mohon['tarikh_permohonan'] }}{{ number_format($mohon['amaun_mohon'],2) }} + + {{ $mohon['jenismohon'] }}@php + if($mohon['tagterima'] === 1) + echo 'BERJAYA'; + else echo 'BATAL'; @endphp
+
+
+ +
+
+
+
+
+ +@endsection diff --git a/resources/views/khazanah/status.blade.php b/resources/views/khazanah/status.blade.php index db142f1..50ae962 100644 --- a/resources/views/khazanah/status.blade.php +++ b/resources/views/khazanah/status.blade.php @@ -138,44 +138,51 @@
- + {{-- {{ dd($permohonan) }} --}}
NO PERMOHONAN : {{ $permohonan['nopermohonan'] }}
-
JUMLAH MOHON : {{ $permohonan['amaun_mohon'] }}
+
JUMLAH MOHON : {{ 'RM ' . number_format($permohonan['amaun_mohon'],2) }}
-
{{ $permohonan['jenismohon'] }}
+
@php + if($permohonan['jenismohon'] == 'permohonanwang') + echo 'Permohonan Wang '; + else + echo 'Bayaran Balik '; + @endphp
+ + -
+
    -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
@@ -202,7 +209,10 @@

Pengesahan
Operasi

- + {!! ($permohonan['tagoperasi'] === 2) ? '' : '' !!} + + +
@@ -212,6 +222,7 @@

Akaun

+ {!! ($permohonan['tagakaun'] === 2) ? '' : '' !!}
@@ -222,6 +233,7 @@

Kelulusan
Pengurus Besar

+ {!! ($permohonan['tagpb'] === 2) ? '' : '' !!}
@@ -232,6 +244,7 @@

Akaun
Deposit Ke Bank
Selesai

+ {!! ($permohonan['tagdeposit'] === 2) ? '' : '' !!}
@@ -248,6 +261,7 @@
+ @@ -263,7 +277,28 @@ - + @endforeach diff --git a/routes/web.php b/routes/web.php index 0f51224..395b8bd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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');
{{ $loop->iteration }} {{ $desc[0]['tarikh'] }} {{ $desc[0]['masa'] }}{{ $desc['description'] }}@php + + switch($desc['statusid']){ + case 1: echo $desc['description'] . '
' . 'NAMA PEMOHON :' . $desc[0]['nama_pemohon']; + break; + case 2: echo $desc['description'] . '
' . 'NAMA OPERASI :' . $desc[0]['nama_operasi']; + break; + case 3: echo $desc['description'] . '
' . 'NAMA AKAUN :' . $desc[0]['nama_akaun']; + break; + case 4: echo $desc['description'] . '
' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2); + break; + case 5: echo $desc['description'] . '
' . 'JENIS BANK :' . $desc[0]['jenisbank'] . '
' . 'NO RESIT :' . $desc[0]['noresit']; + break; + case 6: echo $desc['description'] . '
' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima']; + break; + case 7: echo $desc['description']; + break; + } + + + + @endphp