-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathabsen.html
72 lines (68 loc) · 2.36 KB
/
absen.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sekretaris</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>
<div id="app">
<div class="jumbotron d-flex">
<img src="logostransparent.png" style="height:5em;width:5em">
<h1 style="position:relative;top:10px;margin-left:1em">Sekretaris</h1>
</div>
<div class="container">
<h2>{{katanya}}</h2>
<hr>
<h4>{{date}}</h4>
<p>centang kotak siswa jika hadir<br>klik tombol ini jika semua hadir</p>
<button @click='centangSemua' class="btn btn-primary" id="btn-hadir">Semua hadir!</button>
<br>
<br>
<div class="table-responsive">
<table class="table table-striped" id="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Nama</th>
<th scope="col">Absen</th>
<th scope="col">Keterangan</th>
</tr>
</thead>
<tbody>
<tr v-for="(murid,i) in siswa">
<th scope="row">{{i+1}}</th>
<td>{{murid.nama[0].toUpperCase()+murid.nama.slice(1)}}</td>
<td><input type="checkbox" v-model="murid.absen"></td>
<td v-if="!murid.absen"><input type="text" v-model="murid.ket" placeholder="Keterangan" class="form-control"></td>
<td v-else><p>Hadir!</p></td>
</tr>
</tbody>
</table>
</div>
<div class="mt-5 mb-5">
<button class="btn btn-info" @click="saveAbsen">Kirim Ke Whatsapp</button>
<button class="btn btn-primary" onclick="copythe()">Copy to Clipboard</button>
</div>
<div class="mb-5">
<textarea class="form-control" style="height:500px" v-model='pesanAbsen' id="myInput" placeholder="Kalau tombol Whatsapp error, salin ini yak atau teken copy to clipboard ">
</textarea>
</div>
</div>
</div>
</body>
<script>
function copythe() {
var copyText = document.getElementById("myInput");
copyText.select();
copyText.setSelectionRange(0, 99999);
document.execCommand("copy");
alert('Copied!')
}
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script type="text/javascript" src="https://momentjs.com/downloads/moment-with-locales.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</html>