v_absensiDashboard.php
unknown
html
4 years ago
5.5 kB
11
Indexable
<!DOCTYPE html>
<html>
<head>
<?php $this->load->view("../../_partials/head.php") ?>
<style>
.dot {
height: 100px;
width: 100px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
}
</style>
</head>
<body>
<div id="app">
<div id="sidebar" class="active">
<div class="">
<?php $this->load->view("../../_partials/sidebar.php") ?>
</div>
</div>
<div id="main">
<header class="mb-3">
<a href="#" class="burger-btn d-inline-block d-xl-none">
<i class="bi bi-justify fs-3"></i>
</a>
</header>
<div class="page-content">
<section class="content">
<?php
if ($this->session->flashdata('AbsenMasuk_selesai')) echo '<script> swal("Berhasil!", "Berhasil Absen Masuk Hari ini!!", "success") </script>';
if ($this->session->flashdata('AbsenPulang_selesai')) echo '<script> swal("Berhasil!", "Berhasil Absen Pulang Hari ini, Sampai Jumpa Esok Hari!!", "success") </script>';
if($profile->foto == null) {
?>
<div class="alert alert-danger" role="alert">
Mohon Foto Dahulu di Setting agar kamu punya acuan untuk Absen!!
</div>
<?php
} else if($cekIzin >= 1) {
?>
<div class="alert alert-danger" role="alert">
Kamu Masih Dalam Status Izin Absen!!
</div>
<?php
if($statusIzin != null) {
if($statusIzin->status == 3) {
?>
<div class="alert alert-warning alert-dismissable">
<a href="#" class="close" style="float : right;" data-bs-dismiss="alert" aria-label="close">×</a>
<strong class="text-dark">Izin Kamu Ditolak!</strong>
</div>
<?php
}
}
}
?>
<div class="row">
<div class="col-6">
<div class="card shadow">
<div class="card-body">
<h1 class='text-center' id='timerRun'> </h1>
<b><hr></b>
<div class="text-center" >
<h2><b><?php echo $profile->nama_karyawan ?></b></h2>
<br>
<h3><b>Unit Kerja :</b></h3>
<h3><?php echo $profile->nm_unit ?></h3>
<h3><b>Jabatan :</b></h3>
<h3><?php echo $profile->departemen ?></h3>
<br>
<?php
if ($profile->foto == null || $cekIzin >= 1) {
?>
<input type="submit" value="Absen Masuk" class="btn btn-primary btn-lg" style="font-size: 25px;" disabled onclick="window.location='cameraAbsenMasuk';" />
<input type="submit" value="Absen Pulang" class="btn btn-danger btn-lg" style="font-size: 25px;" disabled onclick="window.location='cameraAbsenPulang';" />
<br>
<input type="submit" value="Izin" class="btn btn-success btn-lg mt-2" style="font-size: 25px;" disabled onclick="window.location='izinAbsen';" />
<?php
}
else if($sudahAbsen == 1) {
?>
<input type="submit" value="Absen Masuk" class="btn btn-primary btn-lg" style="font-size: 25px;" disabled onclick="window.location='cameraAbsenMasuk';" />
<input type="submit" value="Absen Pulang" class="btn btn-danger btn-lg" style="font-size: 25px;" onclick="window.location='cameraAbsenPulang';" />
<br>
<input type="submit" value="Izin" class="btn btn-success btn-lg mt-2" style="font-size: 25px;" disabled onclick="window.location='izinAbsen';" />
<?php
} else if($sudahAbsen == 0) {
?>
<input type="submit" value="Absen Masuk" class="btn btn-primary btn-lg" style="font-size: 25px;" onclick="window.location='cameraAbsenMasuk';" />
<input type="submit" value="Absen Pulang" class="btn btn-danger btn-lg" style="font-size: 25px;" disabled onclick="window.location='cameraAbsenPulang';" />
<br>
<input type="submit" value="Izin" class="btn btn-success btn-lg mt-2" style="font-size: 25px;" onclick="window.location='izinAbsen';" />
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="col-6">
<div class="card shadow">
<div class="card-body">
<a href="<?php echo site_url('absen/Absen/listAbsenUser') ?>"><h1 class="text-center"><b>Absen 7 Hari Terakhir</b></h1></a>
<hr>
<div class="table-wrap" style="width: 100%; overflow: auto;">
<table class="table-active text-dark text-center table table-bordered table-hover" style="overflow: auto; min-width: 350px;" id="last7days">
<thead>
<tr>
<th>Tanggal</th>
<th>Absen Masuk</th>
<th>Absen Pulang</th>
</tr>
</thead>
<tbody>
<?php
foreach ($svdays as $v) {
$v->jam_pulang == null ? $jp = "-" : $jp = $v->jam_pulang;
?>
<tr>
<td><?php echo date('d M y', strtotime($v->tgl_kerja)) ?></td>
<td><?php echo $v->jam_masuk ?></td>
<td><?php echo $jp ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<?php $this->load->view("../../_partials/js.php") ?>
</body>
</html>
<script>
$(document).ready(function () {
setInterval(timestamp, 1000);
});
</script>Editor is loading...