Merged in izzati-ujrah (pull request #9)

update blast sms dan wasap by sag
This commit is contained in:
izzati zulkifli
2023-12-03 01:30:16 +00:00
2 changed files with 12 additions and 5 deletions
+3 -2
View File
@@ -4322,7 +4322,8 @@ class KhazanahController extends Controller
if($request->radaktif === 'aktif') if($request->radaktif === 'aktif')
{ {
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json(); $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],
['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info')); return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
} }
} }
@@ -4350,7 +4351,7 @@ class KhazanahController extends Controller
elseif($request->type == 'whatsapp') elseif($request->type == 'whatsapp')
{ {
$blastwhatsapp = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/blastwasap/'.$auth_user['cawangan'], $blastwhatsapp = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/blastwasapbysag/'.$auth_user['cawangan'],
['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh, 'namapengguna' => $auth_user['name'],])->json(); ['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh, 'namapengguna' => $auth_user['name'],])->json();
if($blastwhatsapp == 'success'){ if($blastwhatsapp == 'success'){
return redirect()->route('laporan.stokauditkhas') return redirect()->route('laporan.stokauditkhas')
@@ -244,6 +244,7 @@
<div class="card-body text-center"> <div class="card-body text-center">
<form id="exportpdf" action="{{route('stokaudit.exportlaporancetakkhas')}}" target="_blank" method="POST"> <form id="exportpdf" action="{{route('stokaudit.exportlaporancetakkhas')}}" target="_blank" method="POST">
{{-- <a class="btn m-1 btn-success confirmdel" href="{{route('stokaudit.exportlaporancetakkhas')}}" data-toggle="tooltip" data-placement="top" title="Blast"><i class="far fa-mail-alt"></i>Blast Whatsapp & SMS</a> --}}
@csrf @csrf
<input type="hidden" name="type" id="typedonwload" value=""> <input type="hidden" name="type" id="typedonwload" value="">
<input type="hidden" name="daritempoh" value="{{ $daritempoh}}"> <input type="hidden" name="daritempoh" value="{{ $daritempoh}}">
@@ -404,9 +405,14 @@
titleAttr: 'Blast Whatsapp', titleAttr: 'Blast Whatsapp',
text: '<h8><b>WHATSAPP & SMS</b></h8>', text: '<h8><b>WHATSAPP & SMS</b></h8>',
action: function ( e, dt, node, config ) { action: function ( e, dt, node, config ) {
$('#typedonwload').val('whatsapp'); // $('#typedonwload').val('whatsapp');
$("#exportpdf").submit(); // $("#exportpdf").submit();
// window.open("_blank"); $("#exportpdf").click(function() {
$('[data-toggle="tooltip"]').tooltip()
alert("ADAKAH ANDA PASTI?");
$('#typedonwload').val('whatsapp');
$("#exportpdf").submit();
});
} }
} }