Merged in izzati-ujrah (pull request #9)
update blast sms dan wasap by sag
This commit is contained in:
@@ -4322,7 +4322,8 @@ class KhazanahController extends Controller
|
||||
|
||||
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'));
|
||||
}
|
||||
}
|
||||
@@ -4350,7 +4351,7 @@ class KhazanahController extends Controller
|
||||
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();
|
||||
if($blastwhatsapp == 'success'){
|
||||
return redirect()->route('laporan.stokauditkhas')
|
||||
|
||||
@@ -244,6 +244,7 @@
|
||||
<div class="card-body text-center">
|
||||
|
||||
<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
|
||||
<input type="hidden" name="type" id="typedonwload" value="">
|
||||
<input type="hidden" name="daritempoh" value="{{ $daritempoh}}">
|
||||
@@ -404,9 +405,14 @@
|
||||
titleAttr: 'Blast Whatsapp',
|
||||
text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$('#typedonwload').val('whatsapp');
|
||||
$("#exportpdf").submit();
|
||||
// window.open("_blank");
|
||||
// $('#typedonwload').val('whatsapp');
|
||||
// $("#exportpdf").submit();
|
||||
$("#exportpdf").click(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
alert("ADAKAH ANDA PASTI?");
|
||||
$('#typedonwload').val('whatsapp');
|
||||
$("#exportpdf").submit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user