Fix modal appearing when voter done voting

- add code to close the bootstrap modal after the page render
This commit is contained in:
Afiq Hamzah
2024-04-07 10:17:43 +08:00
parent 8747ffcccc
commit 558e6993a3
@@ -7,7 +7,7 @@
<li class="list-group-item" v-for="position in data.positions">
<b>{{ position.name }} : </b>{{ getName(position.id) }}
</li>
<!-- <ul class="list-group">
<li class="list-group-item" v-for="result in data.result">
<b>{{ getPosition(result.position_id) }} : </b>{{ getNominee(result.nominee_id) }}
@@ -127,6 +127,7 @@ export default {
if (vm.util.showResult(response, 'success')) {
vm.data.result = response.data.result;
vm.$router.push({ name: 'Voter Home' });
$('.modal').modal('hide');
}
})
.catch(error => {
@@ -205,4 +206,4 @@ export default {
// }
}
}
</script>
</script>