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