fix sorting at kehadiran page
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
</button>
|
||||
|
||||
<button class="btn btn-primary" @click="downloadPDF()">
|
||||
<i class="fa fa-download"></i> Muat Turun PDF
|
||||
</button>
|
||||
<i class="fa fa-download"></i> Muat Turun PDF
|
||||
</button>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
@@ -24,35 +24,10 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Display Fizikal attendees -->
|
||||
<template v-for="(voter, i) in data.voters.data">
|
||||
<tr v-if="voter.kehadiran === 1">
|
||||
<td>{{ i + 1 }}</td> <!-- Display the serial number -->
|
||||
<td>{{ voter.name }}</td>
|
||||
<td>{{ voter.no_kp }}</td>
|
||||
<td>{{ voter.no_anggota }}</td>
|
||||
<td>{{ voter.unit }}</td>
|
||||
<td>{{ getKehadiranString(voter.kehadiran) }}</td>
|
||||
<td>{{ voter.updated_at }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<!-- Display Maya attendees -->
|
||||
<template v-for="(voter, i) in data.voters.data">
|
||||
<tr v-if="voter.kehadiran === 2">
|
||||
<td>{{ i + 1 }}</td> <!-- Display the serial number -->
|
||||
<td>{{ voter.name }}</td>
|
||||
<td>{{ voter.no_kp }}</td>
|
||||
<td>{{ voter.no_anggota }}</td>
|
||||
<td>{{ voter.unit }}</td>
|
||||
<td>{{ getKehadiranString(voter.kehadiran) }}</td>
|
||||
<td>{{ voter.updated_at }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-for="(voter, i) in data.voters.data">
|
||||
<tr v-if="voter.kehadiran === 0">
|
||||
<td>{{ i + 1 }}</td> <!-- Display the serial number -->
|
||||
<!-- Display attendees -->
|
||||
<template v-for="(voter, index) in data.voters.data">
|
||||
<tr>
|
||||
<td>{{ index + 1 }}</td> <!-- Display the serial number -->
|
||||
<td>{{ voter.name }}</td>
|
||||
<td>{{ voter.no_kp }}</td>
|
||||
<td>{{ voter.no_anggota }}</td>
|
||||
@@ -126,15 +101,15 @@ export default {
|
||||
},
|
||||
|
||||
// downloadPDF() {
|
||||
// const table = document.getElementById('voterTable');
|
||||
// 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');
|
||||
// });
|
||||
// },
|
||||
// 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');
|
||||
// });
|
||||
// },
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user