update-admin-ui
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right">
|
||||
<input type="submit" value="Submit" class="btn btn-info">
|
||||
<input type="submit" value="Simpan" class="btn btn-info">
|
||||
<router-link
|
||||
:to="{name:'Maklumat Calon'}"
|
||||
class="btn btn-default">
|
||||
@@ -125,7 +125,7 @@ export default{
|
||||
if (this.loading) return;
|
||||
var vm = this;
|
||||
this.loading = true;
|
||||
this.util.notify('Updating nominee', 'progress', 0);
|
||||
this.util.notify('Kemaskini undian', 'progress', 0);
|
||||
$('#edit_form').ajaxSubmit({
|
||||
success: function (response) {
|
||||
$.notifyClose();
|
||||
@@ -139,7 +139,7 @@ export default{
|
||||
vm.util.showResult(error, 'error', 'ajax');
|
||||
},
|
||||
uploadProgress: function (a, b, c, progress) {
|
||||
this.util.notify('Updating nominee', 'progress', progress);
|
||||
this.util.notify('Kemaskini undian', 'progress', progress);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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