Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
konaspi2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
konaspi2024
Commits
3fa50be4
Commit
3fa50be4
authored
Mar 27, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.unesa.ac.id/aisah/konaspi2024
parents
bc9656cc
0dca5ada
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
50 deletions
+37
-50
app/Http/Controllers/Admin/AdminController.php
+19
-19
app/Http/Controllers/RegistrasiController.php
+15
-15
config/database.php
+0
-13
resources/views/admin/peserta/index.blade.php
+3
-3
No files found.
app/Http/Controllers/Admin/AdminController.php
View file @
3fa50be4
...
...
@@ -300,25 +300,25 @@ public function index_peserta(){
return
view
(
'admin.peserta.index'
,
$data
);
}
public
function
delete_peserta
(
$id
)
{
DB
::
beginTransaction
();
try
{
KegiatanPeserta
::
where
(
'id_registrasi'
,
$id
)
->
delete
();
Registrasi
::
where
(
'id'
,
$id
)
->
delete
();
DB
::
commit
();
return
redirect
()
->
back
()
->
with
(
'success'
,
'Data deleted successfully'
);
}
catch
(
Exception
$e
){
Log
::
error
(
$e
);
DB
::
rollBack
();
return
redirect
()
->
back
()
->
with
(
'error'
,
'Data failed to delete'
);
}
}
//
public function delete_peserta($id) {
//
DB::beginTransaction();
//
try{
//
KegiatanPeserta::where('id_registrasi',$id)->delete();
//
Registrasi::where('id',$id)->delete();
//
DB::commit();
//
return redirect()->back()
//
->with('success', 'Data deleted successfully');
//
}
//
catch(Exception $e){
//
Log::error($e);
//
DB::rollBack();
//
return redirect()->back()
//
->with('error', 'Data failed to delete');
//
}
//
}
public
function
download_peserta
()
{
...
...
app/Http/Controllers/RegistrasiController.php
View file @
3fa50be4
...
...
@@ -212,25 +212,25 @@ public function store(Request $request) {
$registrasi
->
save
();
$generatedVa
=
$this
->
generateVa
(
$multipartData
);
$arrResponse
=
json_decode
(
$generatedVa
,
true
);
$registrasi
->
status_va
=
$arrResponse
[
'BTNresponse'
];
$registrasi
->
tagihan
=
$totalHarga
;
$registrasi
->
nomor_va
=
$arrResponse
[
'BTNVirtualAccount'
];
//
$generatedVa = $this->generateVa($multipartData);
//
$arrResponse = json_decode($generatedVa, true);
//
$registrasi->status_va = $arrResponse['BTNresponse'];
//
$registrasi->tagihan = $totalHarga;
//
$registrasi->nomor_va = $arrResponse['BTNVirtualAccount'];
$registrasi
->
save
();
//
$registrasi->save();
if
(
$arrResponse
[
'BTNresponse'
]
!=
'Request has been processed successfully'
){
DB
::
rollBack
();
Log
::
error
(
'---'
);
Log
::
error
(
$multipartData
);
Log
::
error
(
$arrResponse
[
'BTNresponse'
]);
Log
::
error
(
'---'
);
//
if($arrResponse['BTNresponse'] != 'Request has been processed successfully'){
//
DB::rollBack();
//
Log::error('---');
//
Log::error($multipartData);
//
Log::error($arrResponse['BTNresponse']);
//
Log::error('---');
return
redirect
()
->
route
(
'user.create'
)
->
with
(
'error'
,
'Data failed to save'
);
}
//
return redirect()->route('user.create')
//
->with('error', 'Data failed to save');
//
}
DB
::
commit
();
...
...
config/database.php
View file @
3fa50be4
...
...
@@ -92,19 +92,6 @@
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// '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'
,
],
],
/*
...
...
resources/views/admin/peserta/index.blade.php
View file @
3fa50be4
...
...
@@ -60,7 +60,7 @@
<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
-
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
--
}}
{{
--
<
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 @@
{{-- End of Modal Update 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
-
content
" style="
padding
-
top
:
10
px
">
<form method="
GET
" action="
{{
route
(
'admin.delete_peserta'
,
[
'id'
=>
$p
->
id
])
}}
" enctype="
multipart
/
form
-
data
">
...
...
@@ -107,7 +107,7 @@
</form>
</div>
</div>
</div>
</div>
--}}
{{-- End of Modal Delete Peserta --}}
{{-- Modal Detail Peserta --}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment