[MEC id=”2210″]
No. | Hari, Tgl | Uraian | Waktu | Tempat | Yang Menghadiri/Ditugaskan | Keterangan | Arsip File |
<script>
document.addEventListener('DOMContentLoaded', function() {
const postId = document.body.getAttribute("data-post-id"); // atur di theme
const key = 'hadir_' + postId;
const hadir = localStorage.getItem(key);
if (!document.querySelector('#btnHadir')) return;
if (hadir) {
document.querySelector('#btnHadir').innerText = '✔ Sudah Dihadiri';
document.querySelector('#btnHadir').disabled = true;
}
document.querySelector('#btnHadir').addEventListener('click', function() {
localStorage.setItem(key, true);
this.innerText = '✔ Sudah Dihadiri';
this.disabled = true;
});
});
</script>