fix array view for nominee at admin page

This commit is contained in:
nurafrinaalimi16
2024-04-29 21:56:53 +08:00
parent 4c603bc8e4
commit 5ed5a34282
@@ -44,19 +44,28 @@
<td>{{ nominee.no_anggota }}</td>
<td>{{ nominee.unit }}</td>
<td>{{ nominee.position }}</td>
<td>{{ nominee.education }}</td>
<td>{{ nominee.experience }}</td>
<td>
<ol>
<li v-for="(item, index) in nominee.education" :key="index">{{ item }}</li>
</ol>
</td>
<td>
<ol>
<li v-for="(item, index) in nominee.experience" :key="index">{{ item }}</li>
</ol>
</td>
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
class="btn btn-primary">
<i class="fa fa-edit"></i> Set semula
<i class="fa fa-edit"></i>Kemaskini
</router-link>
<button class="btn btn-danger" @click="util.showModal(nominee.id)" id=nominee.id>
<i class="fa fa-trash"></i> Padam
<i class="fa fa-trash"></i>Padam
</button>
</tr>
<tr v-if="nominees.length < 1">
<td colspan="7">No Calon</td>
@@ -106,15 +115,15 @@ export default {
.then(response => {
$.notifyClose(); // Close notification
// if (this.util.showResult(response, 'success')) {
if (response.data && response.data.status === 'success') {
if (response.data && response.data.status === 'success') {
this.util.notify('Nominee deleted successfully', 'success');
// Show success notification
this.refreshNominee(); // Refresh the list of nominees
} else {
this.util.notify('Failed to delete nominee', 'error'); // Show error notification
this.util.notify('Failed to delete nominee', 'error'); // Show error notification
}
})
.catch(error => {