complete absensi page with absensi json, and created a new page so boss can see attendance

This commit is contained in:
Naufalakram
2023-11-08 04:10:15 +08:00
parent 170b46e718
commit 13cbb8ce02
6 changed files with 389 additions and 7 deletions

View File

@ -24,6 +24,8 @@
<!-- Color Picker -->
<link rel="stylesheet" href="assets/color-switcher/color-switcher.min.css">
<link rel="stylesheet" href="assets/plugin/datatables/media/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="assets/plugin/datatables/extensions/Responsive/css/responsive.bootstrap.min.css">
</head>
<body>
@ -51,15 +53,17 @@
<div class="main-content container">
<div class="row small-spacing">
<div class="col-lg-4 col-md-4 col-xs-6">
<div class="box-content bg-success text-white" style="background :grey;cursor: pointer;" onclick="goto('home')">
<div class="box-content bg-success text-white" style="background :grey;cursor: pointer;"
onclick="goto('home')">
<h4 class="box-title">Halaman Utama</h4>
</div>
<!-- /.box-content -->
</div>
<div class="col-lg-4 col-md-4 col-xs-6">
<div class="box-content bg-info text-white" style="background :grey;cursor: pointer" onclick="goto('tambah_karyawan')"">
<h4 class="box-title">Tambah Data Karyawan</h4>
<div class="box-content bg-info text-white" style="background :grey;cursor: pointer"
onclick="goto('tambah_karyawan')"">
<h4 class=" box-title">Tambah Data Karyawan</h4>
</div>
<!-- /.box-content -->
@ -67,7 +71,57 @@
</div>
<!-- create a button on center of this -->
<div class="row small-spacing text-center">
<a href="{{url_for('scan_face')}}" class="btn btn-primary btn-bordered waves-effect waves-light">Lakukan Absensi</a>
<a href="{{url_for('scan_face')}}" class="btn btn-primary btn-bordered waves-effect waves-light">Lakukan
Absensi</a>
</div>
<br><br>
<div class="row small-spacing">
<div class="col-xs-2 col-md-2"></div>
<div class="col-xs-8 col-md-8">
<div class="box-content card">
<h4 class="box-title">Tanggal : {{today_date}}</h4>
<div class="card-content">
<table id="example" class="table table-striped table-bordered display" style="width:100%">
<thead>
<tr>
<td><b>Nama</b></td>
<td><b>Jam Masuk</b></td>
<td><b>Jam Keluar</b></td>
</tr>
</thead>
<tbody>
{%if data %}
{% for i in range(0, length) %}
<tr>
<td>{{data[i]['name']}}</td>
<!-- if jam keluar doesn't exist , then show "-" -->
{% if data[i]['jam_keluar'] %}
<td>{{data[i]['jam_masuk']}}</td>
<td>{{data[i]['jam_keluar']}}</td>
{% else %}
<td>{{data[i]['jam_masuk']}}</td>
<td>-</td>
{% endif %}
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3" class="text-center">Tidak ada data</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-2 col-md-2"></div>
</div>
@ -100,6 +154,10 @@
<!-- Full Screen Plugin -->
<script src="assets/plugin/fullscreen/jquery.fullscreen-min.js"></script>
<!-- Data Tables -->
<script src="assets/plugin/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="assets/plugin/datatables/media/js/dataTables.bootstrap.min.js"></script>
<script src="assets/scripts/main.min.js"></script>
<script>
function goto(stat) {