update-admin-ui
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
|
||||
<router-link :to="{ name: 'Edit Nominee', params: { id: nominee.id } }"
|
||||
class="btn btn-primary">
|
||||
<i class="fa fa-edit"></i> Edit
|
||||
<i class="fa fa-edit"></i> Set semula
|
||||
</router-link>
|
||||
<button class="btn btn-danger" @click="util.showModal(nominee.id)" id=nominee.id>
|
||||
<i class="fa fa-trash"></i> Padam
|
||||
@@ -72,7 +72,7 @@
|
||||
<h3>Are you sure to delete this nominee?</h3>
|
||||
</modal-body>
|
||||
<modal-footer>
|
||||
<button class="btn btn-danger" @click="deleteNominee()">Delete</button>
|
||||
<button class="btn btn-danger" @click="deleteNominee()">Padam</button>
|
||||
<button class="btn btn-default" @click="util.hideModal('#delete-nominee-modal')">
|
||||
Kembali
|
||||
</button>
|
||||
@@ -105,8 +105,16 @@ export default {
|
||||
axios.delete(config.API + 'nominee/' + nomineeId) // Make DELETE request
|
||||
.then(response => {
|
||||
$.notifyClose(); // Close notification
|
||||
if (this.util.showResult(response, 'success')) { // Show success notification
|
||||
// if (this.util.showResult(response, '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
|
||||
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user