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
8c72dafd
Commit
8c72dafd
authored
Jul 01, 2024
by
Muhammad Iskandar Java
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add anggota
parent
7a5e1c7e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
259 additions
and
53 deletions
+259
-53
app/Http/Controllers/RegistrasiController.php
+76
-17
app/Models/Anggota.php
+24
-0
app/Models/KegiatanPeserta.php
+2
-1
resources/views/form_kegiatan.blade.php
+20
-3
resources/views/form_kegiatan_kelompok.blade.php
+97
-27
resources/views/preview.blade.php
+12
-5
resources/views/row_anggota.blade.php
+28
-0
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
8c72dafd
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
use
App\Http\Support\ValidationRule
;
use
App\Http\Support\ValidationRule
;
use
App\Jobs\SendMail
;
use
App\Jobs\SendMail
;
use
App\Models\Anggota
;
use
App\Models\Kegiatan
;
use
App\Models\Kegiatan
;
use
App\Models\KegiatanPeserta
;
use
App\Models\KegiatanPeserta
;
use
App\Models\Konferensi
;
use
App\Models\Konferensi
;
...
@@ -17,6 +18,7 @@
...
@@ -17,6 +18,7 @@
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Log
;
use
Illuminate\Support\Facades\Log
;
use
RealRashid\SweetAlert\Facades\Alert
;
use
RealRashid\SweetAlert\Facades\Alert
;
use
Str
;
class
RegistrasiController
extends
Controller
class
RegistrasiController
extends
Controller
{
{
...
@@ -70,18 +72,36 @@ public function group_create(){
...
@@ -70,18 +72,36 @@ public function group_create(){
}
}
public
function
group_kegiatan
(
Request
$request
){
public
function
group_kegiatan
(
Request
$request
){
$rules
=
[
'nama'
=>
'required|string'
,
'email'
=>
'required|email:rfc,dns'
,
'telepon'
=>
'required|numeric'
,
'instansi'
=>
'required|string'
,
'jabatan'
=>
'required|string'
,
'alamat'
=>
'required|string'
,
'kodepos'
=>
'required|string'
,
'kota'
=>
'required|string'
,
'nik'
=>
'required|unique:registrasi,nik'
];
$request
->
validate
(
$rules
,
ValidationRule
::
getErrorMessage
(
$rules
));
$kegiatan
=
Kegiatan
::
orderBy
(
'id'
)
->
get
();
$kegiatan
=
Kegiatan
::
orderBy
(
'id'
)
->
get
();
$konferensi
=
Konferensi
::
get
();
$konferensi
=
Konferensi
::
get
();
$data
=
[
$data
=
[
'kegiatan'
=>
$kegiatan
,
'kegiatan'
=>
$kegiatan
,
'konferensi'
=>
$konferensi
'konferensi'
=>
$konferensi
,
'data_registrasi'
=>
$request
->
except
(
'_token'
),
];
];
return
view
(
'form_kegiatan_kelompok'
,
$data
);
return
view
(
'form_kegiatan_kelompok'
,
$data
);
}
}
public
function
preview
(
Request
$request
){
public
function
preview
(
Request
$request
){
//cek jika kelompok atau tidak
if
(
is_null
(
$request
->
data_registrasi
)){
$rules
=
[
$rules
=
[
'nama'
=>
'required|string'
,
'nama'
=>
'required|string'
,
'email'
=>
'required|email:rfc,dns'
,
'email'
=>
'required|email:rfc,dns'
,
...
@@ -92,8 +112,8 @@ public function preview(Request $request){
...
@@ -92,8 +112,8 @@ public function preview(Request $request){
'kodepos'
=>
'required|string'
,
'kodepos'
=>
'required|string'
,
'kota'
=>
'required|string'
,
'kota'
=>
'required|string'
,
];
];
$request
->
validate
(
$rules
,
ValidationRule
::
getErrorMessage
(
$rules
));
$request
->
validate
(
$rules
,
ValidationRule
::
getErrorMessage
(
$rules
));
}
DB
::
beginTransaction
();
DB
::
beginTransaction
();
...
@@ -110,6 +130,10 @@ public function preview(Request $request){
...
@@ -110,6 +130,10 @@ public function preview(Request $request){
$nourut
=
sprintf
(
"%05s"
,
$urutan
);
$nourut
=
sprintf
(
"%05s"
,
$urutan
);
$kode_registrasi
=
$nourut
;
$kode_registrasi
=
$nourut
;
if
(
!
is_null
(
$request
->
data_registrasi
)){
$registrasi
=
json_decode
(
decrypt
(
$request
->
data_registrasi
),
true
);
}
else
{
$registrasi
=
[
$registrasi
=
[
'nama'
=>
strip_tags
(
$request
->
nama
),
'nama'
=>
strip_tags
(
$request
->
nama
),
'email'
=>
strip_tags
(
$request
->
email
),
'email'
=>
strip_tags
(
$request
->
email
),
...
@@ -123,6 +147,7 @@ public function preview(Request $request){
...
@@ -123,6 +147,7 @@ public function preview(Request $request){
'urutan'
=>
$urutan
,
'urutan'
=>
$urutan
,
'nik'
=>
strip_tags
(
$request
->
nik
)
'nik'
=>
strip_tags
(
$request
->
nik
)
];
];
}
$tglRegistrasi
=
Carbon
::
now
()
->
format
(
'Y-m-d h:i:s'
);
$tglRegistrasi
=
Carbon
::
now
()
->
format
(
'Y-m-d h:i:s'
);
$konaspi
=
Kegiatan
::
query
()
->
where
(
'id'
,
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
)
->
first
();
$konaspi
=
Kegiatan
::
query
()
->
where
(
'id'
,
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
)
->
first
();
...
@@ -130,15 +155,19 @@ public function preview(Request $request){
...
@@ -130,15 +155,19 @@ public function preview(Request $request){
//inisial harga
//inisial harga
$totalHarga
=
(
int
)
$konaspi
->
harga
;
$totalHarga
=
(
int
)
$konaspi
->
harga
;
if
(
$request
->
konferensi
[
0
]
!=
null
||
$request
->
kegiatan
0
[
0
]
!=
"498633a9-082c-4a4a-9dbd-e20b678ec15e"
){
if
(
$request
->
konferensi
[
0
]
!=
null
||
$request
->
kegiatan
[
0
]
!=
"498633a9-082c-4a4a-9dbd-e20b678ec15e"
){
$i
=
0
;
$i
=
0
;
foreach
(
$request
->
konferensi
as
$kon
){
foreach
(
$request
->
konferensi
as
$kon
){
$daftarKonferensi
[]
=
$kon
;
$daftarKonferensi
[]
=
$kon
;
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$kon
)
->
first
();
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$kon
)
->
first
();
foreach
(
$request
->
input
(
'kegiatan'
.
$i
)
as
$keg
){
$daftarKegiatan
[]
=
$request
->
kegiatan
[
$i
];
$daftarKegiatan
[]
=
$keg
;
$kegiatan
[]
=
Kegiatan
::
select
(
'id'
,
'nama'
,
'harga'
)
->
where
(
'id'
,
$request
->
kegiatan
[
$i
])
->
first
();
$kegiatan
[]
=
Kegiatan
::
select
(
'id'
,
'nama'
,
'harga'
)
->
where
(
'id'
,
$keg
)
->
first
();
$indexAnggota
=
isset
(
$request
->
kegiatan_anggota
[
$i
])
?
$request
->
kegiatan_anggota
[
$i
]
:
null
;
$kegiatanAnggota
=
!
is_null
(
$indexAnggota
)
?
$request
->
anggota
[
$indexAnggota
]
:
[];
if
(
!
empty
(
$kegiatanAnggota
)){
$kegiatanAnggota
[
'key'
]
=
$request
->
kegiatan_anggota
[
$i
];
}
}
$kegiatanpeserta
[]
=
[
$kegiatanpeserta
[]
=
[
...
@@ -146,14 +175,16 @@ public function preview(Request $request){
...
@@ -146,14 +175,16 @@ public function preview(Request $request){
'id_konferensi'
=>
$daftarKonferensi
[
$i
],
'id_konferensi'
=>
$daftarKonferensi
[
$i
],
'nama_kegiatan'
=>
$kegiatan
[
$i
][
'nama'
],
'nama_kegiatan'
=>
$kegiatan
[
$i
][
'nama'
],
'nama_konferensi'
=>
$konferensi
->
nama
,
'nama_konferensi'
=>
$konferensi
->
nama
,
'harga'
=>
$kegiatan
[
$i
][
'harga'
]
'harga'
=>
$kegiatan
[
$i
][
'harga'
],
'anggota'
=>
$kegiatanAnggota
];
];
$hargaKonferensi
[]
=
[
$hargaKonferensi
[]
=
[
'idkon'
=>
$konferensi
->
id
,
'idkon'
=>
$konferensi
->
id
,
'namakon'
=>
$konferensi
->
nama
,
'namakon'
=>
$konferensi
->
nama
,
'hargakon'
=>
$konferensi
->
harga
,
'hargakon'
=>
$konferensi
->
harga
,
'namakeg'
=>
$kegiatan
[
$i
][
'nama'
]
'namakeg'
=>
$kegiatan
[
$i
][
'nama'
],
'anggota'
=>
$kegiatanAnggota
];
];
// $totalHarga += (int) $konferensi->harga;
// $totalHarga += (int) $konferensi->harga;
...
@@ -174,7 +205,8 @@ public function preview(Request $request){
...
@@ -174,7 +205,8 @@ public function preview(Request $request){
'tglRegistrasi'
=>
$tglRegistrasi
,
'tglRegistrasi'
=>
$tglRegistrasi
,
'konaspi'
=>
$konaspi
,
'konaspi'
=>
$konaspi
,
'hargaKonferensi'
=>
$hargaKonferensi
,
'hargaKonferensi'
=>
$hargaKonferensi
,
'totalHarga'
=>
$totalHarga
'totalHarga'
=>
$totalHarga
,
'anggota'
=>
$request
->
anggota
??
[],
];
];
return
view
(
'preview'
,
$data
)
->
with
(
'success'
,
'Data saved successfully'
);
return
view
(
'preview'
,
$data
)
->
with
(
'success'
,
'Data saved successfully'
);
...
@@ -183,8 +215,8 @@ public function preview(Request $request){
...
@@ -183,8 +215,8 @@ public function preview(Request $request){
catch
(
Exception
$e
){
catch
(
Exception
$e
){
Log
::
error
(
$e
);
Log
::
error
(
$e
);
DB
::
rollBack
();
DB
::
rollBack
();
dd
(
$e
);
return
redirect
()
->
route
(
'user.create'
)
return
redirect
()
->
back
(
)
->
with
(
'error'
,
'Data failed to save'
);
->
with
(
'error'
,
'Data failed to save'
);
}
}
}
}
...
@@ -197,11 +229,17 @@ public function store(Request $request) {
...
@@ -197,11 +229,17 @@ public function store(Request $request) {
$kegiatanpeserta
=
json_decode
(
$request
->
kegiatanpeserta
,
true
);
$kegiatanpeserta
=
json_decode
(
$request
->
kegiatanpeserta
,
true
);
$konaspi
=
json_decode
(
$request
->
konaspi
,
true
);
$konaspi
=
json_decode
(
$request
->
konaspi
,
true
);
$hargaKonferensi
=
json_decode
(
$request
->
hargaKonferensi
,
true
);
$hargaKonferensi
=
json_decode
(
$request
->
hargaKonferensi
,
true
);
$anggota
=
json_decode
(
$request
->
anggota
,
true
);
$tglRegistrasi
=
$request
->
tglRegistrasi
;
$tglRegistrasi
=
$request
->
tglRegistrasi
;
// $totalHargas = $request->totalHarga;
// $totalHargas = $request->totalHarga;
foreach
(
$anggota
as
$key
=>
$item
){
$anggota
[
$key
][
'id'
]
=
Str
::
uuid
()
->
toString
();
}
// Anggota::query()->insert($anggota);
$registrasi
=
Registrasi
::
query
()
->
create
(
$registrasi
);
// $registrasi = Registrasi::query()->create($registrasi);
$id_registrasi
=
$registrasi
->
id
;
// $id_registrasi = $registrasi->id;
$id_registrasi
=
'$registrasi->id'
;
$jumlahKeg
=
count
(
$kegiatanpeserta
);
$jumlahKeg
=
count
(
$kegiatanpeserta
);
//inisial harga
//inisial harga
...
@@ -210,12 +248,24 @@ public function store(Request $request) {
...
@@ -210,12 +248,24 @@ public function store(Request $request) {
$totalHarga
=
(
int
)
$konvensi
->
harga
;
$totalHarga
=
(
int
)
$konvensi
->
harga
;
foreach
(
$kegiatanpeserta
as
$keg
){
foreach
(
$kegiatanpeserta
as
$keg
){
$arrayKeg
=
$keg
;
if
(
isset
(
$arrayKeg
[
'anggota'
][
'key'
])){
$idPeserta
=
isset
(
$anggota
[
$arrayKeg
[
'anggota'
][
'key'
]][
'id'
])
?
$anggota
[
$keg
[
'anggota'
][
'key'
]][
'id'
]
:
null
;
}
else
{
$idPeserta
=
null
;
}
$kegpeserta
=
[
$kegpeserta
=
[
'id_registrasi'
=>
$id_registrasi
,
'id_registrasi'
=>
$id_registrasi
,
'id_kegiatan'
=>
$keg
[
'id_kegiatan'
],
'id_kegiatan'
=>
$keg
[
'id_kegiatan'
],
'id_konferensi'
=>
$keg
[
'id_konferensi'
],
'id_konferensi'
=>
$keg
[
'id_konferensi'
],
'id_anggota'
=>
$idPeserta
// 'id_anggota' =>
];
];
KegiatanPeserta
::
query
()
->
create
(
$kegpeserta
);
dd
(
$kegpeserta
);
// KegiatanPeserta::query()->create($kegpeserta);
if
(
$keg
[
'id_kegiatan'
]
!=
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
if
(
$keg
[
'id_kegiatan'
]
!=
'498633a9-082c-4a4a-9dbd-e20b678ec15e'
){
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$keg
[
'id_konferensi'
])
->
first
();
$konferensi
=
Konferensi
::
query
()
->
where
(
'id'
,
$keg
[
'id_konferensi'
])
->
first
();
...
@@ -233,7 +283,7 @@ public function store(Request $request) {
...
@@ -233,7 +283,7 @@ public function store(Request $request) {
$kegPeserta
=
null
;
$kegPeserta
=
null
;
}
}
}
}
dd
(
''
);
$multipartData
=
[
$multipartData
=
[
'noid'
=>
$registrasi
[
'kode_registrasi'
],
'noid'
=>
$registrasi
[
'kode_registrasi'
],
'nama'
=>
$registrasi
[
'nama'
],
'nama'
=>
$registrasi
[
'nama'
],
...
@@ -281,6 +331,8 @@ public function store(Request $request) {
...
@@ -281,6 +331,8 @@ public function store(Request $request) {
Log
::
error
(
$e
);
Log
::
error
(
$e
);
DB
::
rollBack
();
DB
::
rollBack
();
dd
(
$e
);
return
redirect
()
->
route
(
'user.create'
)
return
redirect
()
->
route
(
'user.create'
)
->
with
(
'error'
,
'Data failed to save'
);
->
with
(
'error'
,
'Data failed to save'
);
}
}
...
@@ -319,16 +371,23 @@ public function addFormKegiatan(Request $request)
...
@@ -319,16 +371,23 @@ public function addFormKegiatan(Request $request)
$data
[
'kegiatan'
]
=
Kegiatan
::
get
();
$data
[
'kegiatan'
]
=
Kegiatan
::
get
();
$data
[
'konferensi'
]
=
Konferensi
::
get
();
$data
[
'konferensi'
]
=
Konferensi
::
get
();
$data
[
'i'
]
=
$request
->
i
;
$data
[
'i'
]
=
$request
->
i
;
$data
[
'anggota'
]
=
$request
->
anggota
;
$data
[
'list_anggota'
]
=
$request
->
list_anggota
;
return
view
(
'form_kegiatan'
,
$data
);
return
view
(
'form_kegiatan'
,
$data
);
}
}
public
function
addFormAnggota
(
Request
$request
)
public
function
addFormAnggota
(
Request
$request
)
{
{
$data
[
'i'
]
=
$request
->
i
;
$data
[
'i'
]
=
$request
->
i
;
$data
[
'item'
]
=
[
'nama'
=>
$request
->
nama
,
'email'
=>
$request
->
email
,
'nik'
=>
$request
->
nik
,
'telepon'
=>
$request
->
telepon
,
];
return
view
(
'
form_anggota_kelompok
'
,
$data
);
return
view
(
'
row_anggota
'
,
$data
);
}
}
public
function
getDataRegis
(
$va
)
public
function
getDataRegis
(
$va
)
...
...
app/Models/Anggota.php
0 → 100644
View file @
8c72dafd
<?php
namespace
App\Models
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\Model
;
class
Anggota
extends
Model
{
use
HasFactory
;
public
$incrementing
=
false
;
protected
$table
=
'anggota'
;
protected
$keyType
=
'string'
;
protected
$fillable
=
[
'id'
,
'id_registrasi'
,
'nama'
,
'email'
,
'telepon'
,
'nik'
];
}
app/Models/KegiatanPeserta.php
View file @
8c72dafd
...
@@ -19,7 +19,8 @@ class KegiatanPeserta extends Model
...
@@ -19,7 +19,8 @@ class KegiatanPeserta extends Model
'id'
,
'id'
,
'id_registrasi'
,
'id_registrasi'
,
'id_kegiatan'
,
'id_kegiatan'
,
'id_konferensi'
'id_konferensi'
,
'id_anggota'
];
];
public
function
rRegistrasi
()
{
public
function
rRegistrasi
()
{
...
...
resources/views/form_kegiatan.blade.php
View file @
8c72dafd
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
@if ($i != 0)
@if ($i != 0)
@if ($keg->id != "498633a9-082c-4a4a-9dbd-e20b678ec15e")
@if ($keg->id != "498633a9-082c-4a4a-9dbd-e20b678ec15e")
<div
class=
"form-check"
>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"radio"
id=
"nama-kegiatan-{{ $i }}-{{ $j }}"
name=
"kegiatan
{{ $i }}[
]"
value=
"{{ $keg->id }}"
onChange=
"cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')"
required
>
<input
class=
"form-check-input"
type=
"radio"
id=
"nama-kegiatan-{{ $i }}-{{ $j }}"
name=
"kegiatan
[{{ $i }}
]"
value=
"{{ $keg->id }}"
onChange=
"cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')"
required
>
<label
class=
"form-check-label"
for=
"nama-kegiatan-{{ $i }}-{{ $j }}"
>
{{ $keg->nama }}
</label>
<label
class=
"form-check-label"
for=
"nama-kegiatan-{{ $i }}-{{ $j }}"
>
{{ $keg->nama }}
</label>
</div>
</div>
@endif
@endif
@else
@else
<div
class=
"form-check"
>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"radio"
id=
"nama-kegiatan-{{ $i }}-{{ $j }}"
name=
"kegiatan
{{ $i }}[
]"
value=
"{{ $keg->id }}"
onChange=
"cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')"
required
>
<input
class=
"form-check-input"
type=
"radio"
id=
"nama-kegiatan-{{ $i }}-{{ $j }}"
name=
"kegiatan
[{{ $i }}
]"
value=
"{{ $keg->id }}"
onChange=
"cekKegiatan('nama-kegiatan-{{ $i }}-{{ $j }}')"
required
>
<label
class=
"form-check-label"
for=
"nama-kegiatan-{{ $i }}-{{ $j }}"
>
{{ $keg->nama }}
</label>
<label
class=
"form-check-label"
for=
"nama-kegiatan-{{ $i }}-{{ $j }}"
>
{{ $keg->nama }}
</label>
</div>
</div>
@endif
@endif
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</div>
</div>
<div
class=
"form-group"
id=
"grup-konferensi"
@
if
($
errors-
>
has('konferensi')) has-error @endif>
<div
class=
"form-group"
id=
"grup-konferensi"
@
if
($
errors-
>
has('konferensi')) has-error @endif>
<label>
Konferensi
</label>
<label>
Konferensi
</label>
<select
class=
"form-control"
id=
"konferensi"
name=
"konferensi[]"
placeholder=
""
>
<select
class=
"form-control"
id=
"konferensi"
name=
"konferensi[
{{ $i }}
]"
placeholder=
""
>
<option
value=
""
selected
>
- Pilih -
</option>
<option
value=
""
selected
>
- Pilih -
</option>
@foreach ($konferensi as $kon)
@foreach ($konferensi as $kon)
<option
onchange=
"cek(this.value)"
value=
"{{ $kon->id }}"
>
{{ $kon->nama }}
</option>
<option
onchange=
"cek(this.value)"
value=
"{{ $kon->id }}"
>
{{ $kon->nama }}
</option>
...
@@ -35,6 +35,23 @@
...
@@ -35,6 +35,23 @@
<label
id=
"login-error"
class=
"error"
for=
"konferensi"
style=
"color: red"
>
{{$errors->first('konferensi')}}
</label>
<label
id=
"login-error"
class=
"error"
for=
"konferensi"
style=
"color: red"
>
{{$errors->first('konferensi')}}
</label>
@endif
@endif
</div>
</div>
@if (isset($anggota))
<label>
Anggota
</label>
<select
class=
"form-control anggota-select"
id=
""
name=
"kegiatan_anggota[{{ $i }}]"
placeholder=
""
>
<option
value=
""
selected
>
- Pilih -
</option>
@foreach (json_decode($list_anggota, true) as $key => $item)
<option
value=
"{{ $key }}"
>
{{ $item['nama'] }}
:
{{ $item['email'] }}
</option>
@endforeach
</select>
@if ($errors->has('anggota'))
<label
id=
"login-error"
class=
"error"
for=
"konferensi"
style=
"color: red"
>
{{$errors->first('konferensi')}}
</label>
@endif
@endif
<br>
@if ($i != 0)
@if ($i != 0)
<div
class=
"col-md-4 float-right"
>
<div
class=
"col-md-4 float-right"
>
<button
class=
"btn btn-danger"
type=
"button"
onclick=
"hapusKegiatan('kegiatan-{{ $i }}')"
>
Hapus
</button>
<button
class=
"btn btn-danger"
type=
"button"
onclick=
"hapusKegiatan('kegiatan-{{ $i }}')"
>
Hapus
</button>
...
...
resources/views/form_kegiatan_kelompok.blade.php
View file @
8c72dafd
This diff is collapsed.
Click to expand it.
resources/views/preview.blade.php
View file @
8c72dafd
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
$initialharga
=
$konaspi->harga
;
$initialharga
=
$konaspi->harga
;
$subtotal
=
$initialharga
;
$subtotal
=
$initialharga
;
$i
= 0;
$i
= 0;
$jumlahAnggota
= count(
$anggota
) > 0 ? count(
$anggota
) : 1;
@endphp
@endphp
<tr>
<tr>
<td>1</td>
<td>1</td>
...
@@ -80,8 +81,8 @@
...
@@ -80,8 +81,8 @@
Convention
Convention
</td>
</td>
<td class="
text
-
center
">Rp
{
{$konaspi->harga}
}
</td>
<td class="
text
-
center
">Rp
{
{$konaspi->harga}
}
</td>
<td class="
text
-
center
">
1
</td>
<td class="
text
-
center
">
{{
$jumlahAnggota
}}
</td>
<td class="
text
-
right
">Rp
{
{$konaspi->harga}
}
</td>
<td class="
text
-
right
">Rp {{$konaspi->harga
*
$jumlahAnggota
}}</td>
</tr>
</tr>
@if (isset(
$hargaKonferensi
))
@if (isset(
$hargaKonferensi
))
@foreach (
$hargaKonferensi
as
$kon
)
@foreach (
$hargaKonferensi
as
$kon
)
...
@@ -91,7 +92,12 @@
...
@@ -91,7 +92,12 @@
<tr>
<tr>
<td>
{
{$no}
}
</td>
<td>
{
{$no}
}
</td>
<td>
<td>
{
{$kon['namakeg']}
}
<br> Konferensi : <b>
{
{$kon['namakon']}
}
</b>
{
{$kon['namakeg']}
}
<br>Konferensi : <b>
{
{$kon['namakon']}
}
</b>
@isset(
$kon['anggota']['nama']
)
<br>Anggota : <b>{{
$kon['anggota']['nama']
}}</b>
@endisset
</td>
</td>
{{-- <td class="
text
-
center
">Rp
{
{$kon['hargakon']}
}
</td> --}}
{{-- <td class="
text
-
center
">Rp
{
{$kon['hargakon']}
}
</td> --}}
<td class="
text
-
center
">-</td>
<td class="
text
-
center
">-</td>
...
@@ -122,13 +128,13 @@
...
@@ -122,13 +128,13 @@
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
name
">Subtotal</div>
<div class="
invoice
-
detail
-
name
">Subtotal</div>
{{-- <div class="
invoice
-
detail
-
value
">Rp
{
{$subtotal}
}
</div> --}}
{{-- <div class="
invoice
-
detail
-
value
">Rp
{
{$subtotal}
}
</div> --}}
<div class="
invoice
-
detail
-
value
">Rp
{
{$konaspi->harga}
}
</div>
<div class="
invoice
-
detail
-
value
">Rp {{$konaspi->harga
*
$jumlahAnggota
}}</div>
</div>
</div>
<hr class="
mt
-
2
mb
-
2
">
<hr class="
mt
-
2
mb
-
2
">
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
item
">
<div class="
invoice
-
detail
-
name
">Total</div>
<div class="
invoice
-
detail
-
name
">Total</div>
{{-- <div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$subtotal}
}
</div> --}}
{{-- <div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$subtotal}
}
</div> --}}
<div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp
{
{$konaspi->harga}
}
</div>
<div class="
invoice
-
detail
-
value
invoice
-
detail
-
value
-
lg
">Rp {{$konaspi->harga
*
$jumlahAnggota
}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -148,6 +154,7 @@
...
@@ -148,6 +154,7 @@
<input type="
hidden
" id="
konaspi
" name="
konaspi
" value="
{{
json_encode
(
$konaspi
)
}}
">
<input type="
hidden
" id="
konaspi
" name="
konaspi
" value="
{{
json_encode
(
$konaspi
)
}}
">
<input type="
hidden
" id="
hargaKonferensi
" name="
hargaKonferensi
" value="
{{
json_encode
(
$hargaKonferensi
)
}}
">
<input type="
hidden
" id="
hargaKonferensi
" name="
hargaKonferensi
" value="
{{
json_encode
(
$hargaKonferensi
)
}}
">
<input type="
hidden
" id="
totalHarga
" name="
totalHarga
" value="
{{
json_encode
(
$totalHarga
)
}}
">
<input type="
hidden
" id="
totalHarga
" name="
totalHarga
" value="
{{
json_encode
(
$totalHarga
)
}}
">
<input type="
hidden
" id="
totalHarga
" name="
anggota
" value="
{{
json_encode
(
$anggota
)
}}
">
<button type="
submit
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Daftar</button>
<button type="
submit
" class="
btn
btn
-
primary
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
credit
-
card
"></i> Daftar</button>
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> Cancel</button>
<button class="
btn
btn
-
danger
btn
-
icon
icon
-
left
"><i class="
fas
fa
-
times
"></i> Cancel</button>
</div>
</div>
...
...
resources/views/row_anggota.blade.php
0 → 100644
View file @
8c72dafd
<tr
id=
"anggota-{{ $i }}"
>
<td>
{{ $i }}
</td>
<td>
{{ $item['nama'] }}
<input
type=
"hidden"
name=
"anggota[{{ $i }}][nama]"
value=
"{{ $item['nama'] }}"
required
/>
</td>
<td>
{{ $item['email'] }}
<input
type=
"hidden"
name=
"anggota[{{ $i }}][email]"
value=
"{{ $item['email'] }}"
required
/>
</td>
<td>
{{ $item['nik'] }}
<input
type=
"hidden"
name=
"anggota[{{ $i }}][nik]"
value=
"{{ $item['nik'] }}"
required
/>
</td>
<td>
{{ $item['telepon'] }}
<input
type=
"hidden"
name=
"anggota[{{ $i }}][telepon]"
value=
"{{ $item['telepon'] }}"
required
/>
</td>
<td>
@if ($i > 1)
<div
class=
"col-md-4 float-right"
>
<button
class=
"btn btn-danger"
type=
"button"
onclick=
"hapusAnggota('{{ $i }}')"
>
Hapus
</button>
</div>
@endif
</td>
</tr>
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