Commit 3fa50be4 by Triyah Fatmawati

Merge branch 'master' of http://git.unesa.ac.id/aisah/konaspi2024

parents bc9656cc 0dca5ada
...@@ -300,25 +300,25 @@ public function index_peserta(){ ...@@ -300,25 +300,25 @@ public function index_peserta(){
return view('admin.peserta.index', $data); return view('admin.peserta.index', $data);
} }
public function delete_peserta($id) { // public function delete_peserta($id) {
DB::beginTransaction(); // DB::beginTransaction();
try{ // try{
KegiatanPeserta::where('id_registrasi',$id)->delete(); // KegiatanPeserta::where('id_registrasi',$id)->delete();
Registrasi::where('id',$id)->delete(); // Registrasi::where('id',$id)->delete();
DB::commit(); // DB::commit();
return redirect()->back() // return redirect()->back()
->with('success', 'Data deleted successfully'); // ->with('success', 'Data deleted successfully');
} // }
catch(Exception $e){ // catch(Exception $e){
Log::error($e); // Log::error($e);
DB::rollBack(); // DB::rollBack();
return redirect()->back() // return redirect()->back()
->with('error', 'Data failed to delete'); // ->with('error', 'Data failed to delete');
} // }
} // }
public function download_peserta() public function download_peserta()
{ {
......
...@@ -212,25 +212,25 @@ public function store(Request $request) { ...@@ -212,25 +212,25 @@ public function store(Request $request) {
$registrasi->save(); $registrasi->save();
$generatedVa = $this->generateVa($multipartData); // $generatedVa = $this->generateVa($multipartData);
$arrResponse = json_decode($generatedVa, true); // $arrResponse = json_decode($generatedVa, true);
$registrasi->status_va = $arrResponse['BTNresponse']; // $registrasi->status_va = $arrResponse['BTNresponse'];
$registrasi->tagihan = $totalHarga; // $registrasi->tagihan = $totalHarga;
$registrasi->nomor_va = $arrResponse['BTNVirtualAccount']; // $registrasi->nomor_va = $arrResponse['BTNVirtualAccount'];
$registrasi->save(); // $registrasi->save();
if($arrResponse['BTNresponse'] != 'Request has been processed successfully'){ // if($arrResponse['BTNresponse'] != 'Request has been processed successfully'){
DB::rollBack(); // DB::rollBack();
Log::error('---'); // Log::error('---');
Log::error($multipartData); // Log::error($multipartData);
Log::error($arrResponse['BTNresponse']); // Log::error($arrResponse['BTNresponse']);
Log::error('---'); // Log::error('---');
return redirect()->route('user.create') // return redirect()->route('user.create')
->with('error', 'Data failed to save'); // ->with('error', 'Data failed to save');
} // }
DB::commit(); DB::commit();
......
...@@ -92,19 +92,6 @@ ...@@ -92,19 +92,6 @@
// 'encrypt' => env('DB_ENCRYPT', 'yes'), // 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
], ],
'siakadu' => [
'driver' => 'pgsql',
'host' => '192.168.0.204',
'port' => '5432',
'database' => 'siakadu3',
'username' => 'postgres',
'password' => 'dB5i@kADUunes@@@!!',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
], ],
/* /*
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<td> <td>
{{-- <button type="button" class="btn btn-info" data-toggle="modal" data-target="#update-modal{{$p->id}}"><i class="fa fa-check" aria-hidden="true"></i></button> --}} {{-- <button type="button" class="btn btn-info" data-toggle="modal" data-target="#update-modal{{$p->id}}"><i class="fa fa-check" aria-hidden="true"></i></button> --}}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#detail-modal{{$p->id}}"><i class="fa fa-search" aria-hidden="true"></i></button> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#detail-modal{{$p->id}}"><i class="fa fa-search" aria-hidden="true"></i></button>
<button type="button" class="btn btn-danger" data-toggle="modal" data-target="#delete-modal{{$p->id}}"><i class="fa fa-trash" aria-hidden="true"></i></button> {{-- <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#delete-modal{{$p->id}}"><i class="fa fa-trash" aria-hidden="true"></i></button> --}}
{{-- Modal Update Peserta --}} {{-- Modal Update Peserta --}}
{{-- <div class="modal fade" id="update-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5);"> {{-- <div class="modal fade" id="update-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5);">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
{{-- End of Modal Update Peserta --}} {{-- End of Modal Update Peserta --}}
{{-- Modal Delete Peserta --}} {{-- Modal Delete Peserta --}}
<div class="modal fade" id="delete-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5); padding-top:15%;"> {{-- <div class="modal fade" id="delete-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5); padding-top:15%;">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content" style="padding-top : 10px"> <div class="modal-content" style="padding-top : 10px">
<form method="GET" action="{{ route('admin.delete_peserta', ['id' => $p->id ]) }}" enctype="multipart/form-data"> <form method="GET" action="{{ route('admin.delete_peserta', ['id' => $p->id ]) }}" enctype="multipart/form-data">
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</form> </form>
</div> </div>
</div> </div>
</div> </div> --}}
{{-- End of Modal Delete Peserta --}} {{-- End of Modal Delete Peserta --}}
{{-- Modal Detail Peserta --}} {{-- Modal Detail Peserta --}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment