pdf kehadiran
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
Maya
|
||||
</router-link>
|
||||
|
||||
<!-- <a class="btn btn-warning" :href="getPDFKehadiranurl()">Muat Turun PDF</a> -->
|
||||
|
||||
<!-- <button class="btn btn-primary" @click="downloadPDF()">
|
||||
<i class="fa fa-download"></i> Muat Turun PDF
|
||||
</button> -->
|
||||
@@ -108,17 +110,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
// downloadPDF() {
|
||||
// const table = document.getElementById('voterTable');
|
||||
|
||||
// html2canvas(table).then(canvas => {
|
||||
// const imgData = canvas.toDataURL('image/png');
|
||||
// const pdf = new jsPDF();
|
||||
// pdf.addImage(imgData, 'PNG', 0, 0);
|
||||
// pdf.save('kehadiran-pengundi.pdf');
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -160,6 +152,11 @@ export default {
|
||||
const totalAttendance = fizikalCount + mayaCount;
|
||||
const totalMembers = this.data.voters.data.length;
|
||||
return totalMembers === 0 ? 0 : ((totalAttendance / totalMembers) * 100).toFixed(2);
|
||||
},
|
||||
|
||||
getPDFKehadiranurl() {
|
||||
// Construct and return the URL based on the item ID
|
||||
return `/kehadiranpdf/1`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user