index.blade.php 20.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
@extends('layouts.app')
@section('title','Participant Data')
@section('content')
    <section class="section">
        <div class="section-header">
            <h1>Participant Data</h1>
            <div class="section-header-breadcrumb">
                <div class="breadcrumb-item">
                    <a href="">Home</a>
                </div>
Siti Aisah committed
11
                <div class="breadcrumb-item active">Data Peserta</div>
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
            </div>
        </div>

        <div class="section-body">
            <div class="row mt-4 active" id="tab-semuapeserta" data-tab-group="mygroup-tab">
                <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <a href="{{ route('admin.download_peserta') }}" class="btn btn-primary">Download Data</a>
                        <div class="clearfix mb-3"></div>
                        <div class="table-responsive">
                            <table class="display" id="table-1">
                                <thead>
                                    <tr style="text-align: center;">
                                    <th>No.</th>
Siti Aisah committed
27
                                    <th>Kode Registrasi</th>
28
                                    <th>Nama</th>
Siti Aisah committed
29
                                    {{-- <th>Email</th> --}}
30 31 32
                                    <th>Instansi</th>
                                    <th>Kegiatan</th>
                                    <th>Konferensi</th>
Siti Aisah committed
33
                                    <th>Aksi</th>
34 35 36 37 38 39 40 41 42
                                    </tr>
                                </thead>
                                <tbody>
                                    @php
                                        $no = 1;
                                    @endphp
                                    @foreach ($peserta as $p)
                                        <tr style="text-align: center;">
                                            <td>{{ $no }}</td>
Siti Aisah committed
43
                                            <td>{{ $p->kode_registrasi }}</td>
44
                                            <td>{{ $p->nama}}</td>
Siti Aisah committed
45
                                            {{-- <td>{{ $p->email}}</td> --}}
46
                                            <td>{{ $p->instansi}}</td>
Siti Aisah committed
47 48 49 50 51 52 53 54 55 56 57 58 59
                                            @php
                                                $keg = DB::table('v_kegiatan')->where('id_registrasi', $p->id)->get();
                                            @endphp
                                            <td align="left">
                                                @foreach($keg as $k)
                                                    {{ $k->kegiatan.";" }}<br>
                                                @endforeach
                                            </td>
                                            <td align="left">
                                                @foreach($keg as $k)
                                                    {{ $k->konferensi.";" }}<br>
                                                @endforeach
                                            </td>
60 61 62
                                            <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>
Siti Aisah committed
63
                                                {{-- <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> --}}
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

                                                {{-- 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-dialog">
                                                        <div class="modal-content">
                                                            <div class="modal-header">
                                                                <h4 class="modal-title bold">Validation</h4>
                                                            </div>

                                                            <form method="POST" action="{{ route('admin.validate_participant', ['id' => $p->id ]) }}" enctype="multipart/form-data">
                                                                @csrf
                                                                @method('put')
                                                                <div class="col-md-12">
                                                                    <div class="form-group @if ($errors->has('isvalid')) has-error @endif">
                                                                        <div class="col-md-12">
                                                                          <label>Valid ?</label>
                                                                          &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="isvalid" name="isvalid" value="1" required> <strong>Yes</strong>
                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                <div class="modal-footer">
                                                                    <button type="submit" class="btn btn-primary ml-1">Save</button>
                                                                    <button type="button" class="btn btn-light-secondary" data-dismiss="modal">Cancel</button>
                                                                </div>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div> --}}
                                                {{-- End of Modal Update Peserta --}}

                                                {{-- Modal Delete Peserta --}}
Siti Aisah committed
95
                                                {{-- <div class="modal fade" id="delete-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5); padding-top:15%;">
96 97 98 99 100 101
                                                    <div class="modal-dialog">
                                                        <div class="modal-content" style="padding-top : 10px">
                                                            <form method="GET" action="{{ route('admin.delete_peserta', ['id' => $p->id ]) }}" enctype="multipart/form-data">
                                                                @csrf
                                                                <div class="modal-body" @if ($errors->has('nama')) has-error @endif>
                                                                    <div class="form-group" style="text-align: center">
Siti Aisah committed
102
                                                                        <h5 class="address-title text-center mb-1" id="addNewAddressTitle">Apakah Anda yakin akan menghapus data ini?</h5>
103
                                                                    </div>
Siti Aisah committed
104 105
                                                                    <button type="submit" class="btn btn-primary ml-1">Hapus</button>
                                                                    <button type="button" class="btn btn-light-secondary" data-dismiss="modal">Batal</button>
106 107 108 109
                                                                </div>
                                                            </form>
                                                        </div>
                                                    </div>
Siti Aisah committed
110
                                                </div> --}}
111 112 113 114 115 116 117 118 119 120 121 122 123 124
                                                {{-- End of Modal Delete Peserta --}}

                                                {{-- Modal Detail Peserta --}}
                                                <div class="modal fade" id="detail-modal{{$p->id}}" data-backdrop="false" style="background-color: rgba(0, 0, 0, 0.5);" style="width: 100%">
                                                    <div class="modal-dialog">
                                                        <div class="modal-content">
                                                            <div class="modal-header">
                                                                <h6 class="modal-title bold">Detail Peserta</h6>
                                                            </div>
                                                            <form method="POST"  action="" enctype="multipart/form-data">
                                                                @csrf
                                                                {{-- @method('put') --}}
                                                                <div class="modal-body">
                                                                    <div class="form-group" style="text-align: left">
Siti Aisah committed
125 126 127 128 129 130 131 132 133 134 135 136
                                                                        <div class="row">
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="nomor_registrasi">Nomor Registrasi</label>
                                                                                <input type="text" class="form-control" id="nomor_registrasi" name="nomor_registrasi" value="{{ $p->kode_registrasi }}">
                                                                        
                                                                            </div>
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="nik">NIK</label>
                                                                                <input type="number" class="form-control" id="nik" name="nik" value="{{ $p->nik }}">
                                                                        
                                                                            </div>
                                                                        </div>
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
                                                                        <div class="row">
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="nama">Nama</label>
                                                                                <input type="text" class="form-control" id="nama" name="nama" value="{{$p->nama}}">
                                                                            </div>
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="telepon">Telepon</label>
                                                                                <input type="number" class="form-control" id="telepon" name="telepon" value="{{$p->telepon}}">
                                                                            </div>
                                                                        </div>
                                                                        <label for="email">Email</label>
                                                                        <input type="email" class="form-control" id="email" name="email" value="{{ $p->email }}">
                                                                        <div class="row">
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="instansi">Instansi</label>
                                                                                <input type="text" class="form-control" id="instansi" name="instansi" value="{{$p->instansi}}">
                                                                            </div>
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="jabatan">Jabatan</label>
                                                                                <input type="text" class="form-control" id="jabatan" name="jabatan" value="{{$p->jabatan}}">
                                                                            </div>
                                                                        </div>
                                                                        <label for="alamat">Alamat</label>
                                                                        <input type="text" class="form-control" id="alamat" name="alamat" value="{{ $p->alamat }}">
                                                                        <div class="row">
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="kodepos">Kode Pos</label>
                                                                                <input type="text" class="form-control" id="kodepos" name="kodepos" value="{{$p->kode_pos}}">
                                                                            </div>
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="kota">Kota</label>
                                                                                <input type="text" class="form-control" id="kota" name="kota" value="{{$p->kota}}">
                                                                            </div>
                                                                        </div>
Siti Aisah committed
171 172
                                                                        <label for="kegiatan">Virtual Account</label>
                                                                        <input type="text" class="form-control" id="kegiatan" name="kegiatan" value="{{ $p->nomor_va }}">
173

Siti Aisah committed
174 175
                                                                        <label for="konferensi">Tagihan</label>
                                                                        <input type="text" class="form-control" id="konferensi" name="konferensi" value="{{ $p->tagihan }}">
176

Siti Aisah committed
177 178 179 180 181 182 183 184 185 186 187 188 189 190
                                                                        <div class="row">
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="tglregistasi">Tanggal Registrasi</label>
                                                                                <input type="text" class="form-control" id="tglregistasi" name="tglregistasi" value="{{ $p->created_at }}">
                                                                            </div>
                                                                            <div class="col-6 mt-2 form-group">
                                                                                <label for="tglregistasi">Tanggal Bayar</label>
                                                                                @if($p->tanggal_bayar)
                                                                                    <input type="text" class="form-control" id="tglregistasi" name="tglregistasi" value="{{ $p->tanggal_bayar }}">
                                                                                @else
                                                                                    <input type="text" class="form-control" id="tglregistasi" name="tglregistasi" value="Belum Terbayar">
                                                                                @endif
                                                                            </div>
                                                                        </div>
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
                                                                    </div>
                                                                    {{-- <div class="table-responsive form-group" style="text-align: left">
                                                                        <label for="">Daftar Dokumen</label>
                                                                        <table class="table table-striped">
                                                                            <thead>
                                                                                <th>No.</th>
                                                                                <th>Nama Dokumen</th>
                                                                                <th>Aksi</th>
                                                                            </thead>
                                                                            @php
                                                                                $no3 = 1;
                                                                            @endphp
                                                                            <tbody>
                                                                                @foreach ($tr->rUpload as $dok)
                                                                                    <tr>
                                                                                        <td>{{$no3}}</td>
                                                                                        <td>{{App\Models\FileUpload::JENIS[$dok->jenis_file]}}</td>
                                                                                        <td>
                                                                                            <a href="#" class="btn btn-primary">Lihat File</a>
                                                                                        </td>
                                                                                    </tr>
                                                                                    @php
                                                                                        $no2++;
                                                                                    @endphp
                                                                                @endforeach
                                                                            </tbody>
                                                                        </table>
                                                                    </div> --}}
                                                                </div>
                                                                <div class="modal-footer">
                                                                    {{-- <button type="submit" class="btn btn-primary ml-1">Ubah</button> --}}
                                                                    <button type="button" class="btn btn-primary" data-dismiss="modal">Tutup</button>
                                                                </div>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        @php
                                            $no++;
                                        @endphp
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
@endsection