fix reload submit at pendaftaran kehadiran
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="no_anggota">No. Anggota : </label>
|
<label for="no_anggota">No. Anggota : </label>
|
||||||
<input type="text" name="no_anggota" class="form-control" readonly :value="data.user.no_anggota" required />
|
<input type="text" name="no_anggota" class="form-control" readonly :value="data.user.no_anggota"
|
||||||
|
required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -37,7 +38,8 @@
|
|||||||
<p> <i>*Pendaftaran online sehingga jam 10 pagi</i></p>
|
<p> <i>*Pendaftaran online sehingga jam 10 pagi</i></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<center><input type="submit" value="SAYA TERIMA" class="btn btn-primary" v-if="data.election.status==1"/></center>
|
<center><input type="submit" value="SAYA TERIMA" class="btn btn-primary"
|
||||||
|
v-if="data.election.status == 1 && data.user.kehadiran == 0" /></center>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,19 +51,24 @@
|
|||||||
export default {
|
export default {
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
loading: false
|
loading: false,
|
||||||
|
userSubmitted: false // Add a flag to track if the user has already submitted
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// refreshUser: function () {
|
// refreshUser: function () {
|
||||||
|
|
||||||
// var vm = this;
|
// var vm = this;
|
||||||
// axios.get(config.API + 'voter/' + this.data.user.id)
|
// axios.get(config.API + 'voter/' + this.data.user.id)
|
||||||
// .then(response => {
|
// .then(response => {
|
||||||
// vm.data.user = response.data;
|
// vm.data.user = response.data;
|
||||||
|
// console.log(response.data)
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
edit: function () {
|
edit: function () {
|
||||||
if (this.loading) return;
|
if (this.loading) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@@ -72,8 +79,10 @@ export default {
|
|||||||
$.notifyClose();
|
$.notifyClose();
|
||||||
vm.loading = false;
|
vm.loading = false;
|
||||||
if (vm.util.showResult(response, 'success')) {
|
if (vm.util.showResult(response, 'success')) {
|
||||||
vm.refreshUser();
|
// vm.refreshUser();
|
||||||
vm.$router.push({ name: 'Voter Home' });
|
location.reload();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|||||||
Reference in New Issue
Block a user