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
48be2283
Commit
48be2283
authored
Mar 25, 2024
by
Triyah Fatmawati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data satuan pendidikan siakadu
parent
ed9c1b88
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
3 deletions
+42
-3
app/Http/Controllers/RegistrasiController.php
+8
-2
config/database.php
+12
-0
resources/views/form_registrasi.blade.php
+14
-1
resources/views/layouts/app.blade.php
+8
-0
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
48be2283
...
@@ -23,6 +23,11 @@ public function create(){
...
@@ -23,6 +23,11 @@ public function create(){
$kegiatan
=
Kegiatan
::
orderBy
(
'id'
)
->
get
();
$kegiatan
=
Kegiatan
::
orderBy
(
'id'
)
->
get
();
$konferensi
=
Konferensi
::
get
();
$konferensi
=
Konferensi
::
get
();
$date
=
Date
(
'Y-m-d'
);
$date
=
Date
(
'Y-m-d'
);
$universitas
=
DB
::
connection
(
'siakadu'
)
->
table
(
'satuan_pendidikan'
)
->
where
(
'soft_delete'
,
0
)
->
whereNotNull
(
'nm_lemb'
)
->
orderBy
(
'id_sp'
)
->
get
();
// $lastKode = Registrasi::query()->whereDate('created_at', $date)->max('kode_registrasi');
// $lastKode = Registrasi::query()->whereDate('created_at', $date)->max('kode_registrasi');
// $nourut = sprintf("%05s", ((int) substr($lastKode, -5))+1);
// $nourut = sprintf("%05s", ((int) substr($lastKode, -5))+1);
// $tgldaftar = Carbon::now()->format('d-m-Y');
// $tgldaftar = Carbon::now()->format('d-m-Y');
...
@@ -32,6 +37,7 @@ public function create(){
...
@@ -32,6 +37,7 @@ public function create(){
$data
=
[
$data
=
[
'kegiatan'
=>
$kegiatan
,
'kegiatan'
=>
$kegiatan
,
'konferensi'
=>
$konferensi
,
'konferensi'
=>
$konferensi
,
'universitas'
=>
$universitas
// 'kode_registrasi' => $kode_registrasi
// 'kode_registrasi' => $kode_registrasi
];
];
...
@@ -134,7 +140,7 @@ public function preview(Request $request){
...
@@ -134,7 +140,7 @@ public function preview(Request $request){
Log
::
error
(
$e
);
Log
::
error
(
$e
);
DB
::
rollBack
();
DB
::
rollBack
();
return
redirect
()
->
back
(
)
return
redirect
()
->
route
(
'user.create'
)
->
with
(
'error'
,
'Data failed to save'
);
->
with
(
'error'
,
'Data failed to save'
);
}
}
}
}
...
@@ -208,7 +214,7 @@ public function store(Request $request) {
...
@@ -208,7 +214,7 @@ public function store(Request $request) {
Log
::
error
(
$arrResponse
[
'BTNresponse'
]);
Log
::
error
(
$arrResponse
[
'BTNresponse'
]);
Log
::
error
(
'---'
);
Log
::
error
(
'---'
);
return
redirect
()
->
back
(
)
return
redirect
()
->
route
(
'user.create'
)
->
with
(
'error'
,
'Data failed to save'
);
->
with
(
'error'
,
'Data failed to save'
);
}
}
...
...
config/database.php
View file @
48be2283
...
@@ -93,6 +93,18 @@
...
@@ -93,6 +93,18 @@
// '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'
,
],
],
],
/*
/*
...
...
resources/views/form_registrasi.blade.php
View file @
48be2283
...
@@ -57,7 +57,13 @@
...
@@ -57,7 +57,13 @@
<div class="
form
-
group
" @if (
$errors->has
('instansi')) has-error @endif>
<div class="
form
-
group
" @if (
$errors->has
('instansi')) has-error @endif>
<label>Instansi</label>
<label>Instansi</label>
<div class="
input
-
group
">
<div class="
input
-
group
">
<input type="
text
" id="
instansi
" name="
instansi
" class="
form
-
control
number
" required="
true
" placeholder="" value="
{{
old
(
'instansi'
)}}
">
{{-- <input type="
text
" id="
instansi
" name="
instansi
" class="
form
-
control
number
" required="
true
" placeholder="" value="
{{
old
(
'instansi'
)}}
"> --}}
<select class="
form
-
control
select
" id="
instansi
" name="
instansi
"placeholder="">
<option value="" selected>- Pilih -</option>
@foreach (
$universitas
as
$univ
)
<option value="
{{
$univ
->
nm_lemb
}}
">{{
$univ->nm_lemb
}}</option>
@endforeach
</select>
</div>
</div>
@if (
$errors->has
('instansi'))
@if (
$errors->has
('instansi'))
<label id="
login
-
error
" class="
error
" for="
instansi
" style="
color
:
red
">
{
{$errors->first('instansi')}
}
</label>
<label id="
login
-
error
" class="
error
" for="
instansi
" style="
color
:
red
">
{
{$errors->first('instansi')}
}
</label>
...
@@ -150,6 +156,13 @@
...
@@ -150,6 +156,13 @@
@push('js')
@push('js')
<script>
<script>
$(document).ready(function () {
//change selectboxes to selectize mode to be searchable
$("
#instansi").select2();
});
</
script
>
<
script
>
function
cekKegiatan
(
id
){
function
cekKegiatan
(
id
){
var
value
=
document
.
getElementById
(
id
)
.
value
;
var
value
=
document
.
getElementById
(
id
)
.
value
;
if
(
value
==
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
if
(
value
==
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
...
...
resources/views/layouts/app.blade.php
View file @
48be2283
...
@@ -32,6 +32,11 @@
...
@@ -32,6 +32,11 @@
<!-- Sweet Alert -->
<!-- Sweet Alert -->
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.css"
>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.css"
>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.js"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.6.9/sweetalert2.min.js"
></script>
<!-- Load jQuery (required for Select2) -->
<script
src=
"https://code.jquery.com/jquery-3.6.0.min.js"
></script>
<!-- Load Select2 CSS -->
<link
href=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css"
rel=
"stylesheet"
/>
</head>
</head>
<body>
<body>
...
@@ -95,6 +100,9 @@
...
@@ -95,6 +100,9 @@
<script
src=
"{{asset('assets/js/page/modules-toastr.js')}}"
></script>
<script
src=
"{{asset('assets/js/page/modules-toastr.js')}}"
></script>
<script
src=
"{{asset('assets/js/page/modules-datatables.js')}}"
></script>
<script
src=
"{{asset('assets/js/page/modules-datatables.js')}}"
></script>
<!-- Load Select2 JS -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"
></script>
<script>
<script>
function
logout
()
function
logout
()
{
{
...
...
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