<?php include_once __DIR__ . '/../layouts/head.php'; ?>
<div class="container py-4" style="max-width: 1350px; width: 100%;">
  <div class="row">
    <div class="col-lg-12">
      <div class="shadow-sm bg-white rounded overflow-hidden border">
        <div class="row px-0 m-0">
          <?php include_once __DIR__ . '/../layouts/menu_body.php'; ?>

			<div class="col-12 col-md-9 px-0">
				<div class="tab-content" id="v-pills-tabContent">
					<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
						<div class="p-4">
							<div class="mb-4">
								<h5 class="mb-0 fw-bold">Input Nilai</h5>
							</div>

							<div class="bg-white rounded shadow-sm p-4">
								<form method="POST" action="/dashboard/dosen-dosen-view-nilaikelas">
									<div class="row g-4">
										<!-- Container Pilih Matakuliah -->
										<div class="col-md-6">
											<div class="border rounded p-3 d-flex gap-2 align-items-center">
													<!-- Pilih Matakuliah -->
													<select name="id_dmk" class="form-control" required>
														<option value="">Pilih Matakuliah</option>
														<?php foreach ($mataKuliah as $mk): ?>
															<option value="<?= $mk['id_dmk'] ?>">
																<?= htmlspecialchars($mk['singkatan']) ?> / <?= htmlspecialchars($mk['kode_kelas']) ?>
															</option>
														<?php endforeach; ?>
													</select>
												<button type="submit" class="btn btn-info" name="cari">Cari</button>
											</div>
										</div>

										<!-- Container Nilai UTS -->
										<div class="col-md-3">
											<div class="border rounded p-3 text-center">
												<a href="/dashboard/dosen-view-utsuas?id_j_soal=1" class="btn btn-warning w-100">Nilai UTS</a>
											</div>
										</div>

										<!-- Container Nilai UAS -->
										<div class="col-md-3">
											<div class="border rounded p-3 text-center">
												<a href="/dashboard/dosen-view-utsuas?id_j_soal=2" class="btn btn-danger w-100">Nilai UAS</a>
											</div>
										</div>
									</div>
								</form>

								<table class="table table-bordered" id="data-table">
									<thead>
										<tr style="font-size: 13px;">
											<th><center>No</center></th>
											<th><center>NIM</center></th>
											<th><center>Nama</center></th>
											<th><center>UTS</center></th>
											<th><center>UAS</center></th>
											<th><center>Tugas</center></th>
											<th><center>Absensi</center></th>
											<th><center>Nilai Akhir</center></th>
										</tr>
									</thead>
									<tbody>
										<!-- Data akan dimuat di sini -->
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>


        </div>
      </div>
    </div>
  </div>
</div>
<?php include_once __DIR__ . '/../layouts/footer.php'; ?>
