WIP Наладила таймер
This commit is contained in:
@@ -392,7 +392,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.infoClient.basic.full_name.split(" ").length < 3) {
|
if (this.infoClient.basic.full_name.split(" ").length < 3) {
|
||||||
this.addErrrorNotification(
|
this.addErrrorNotification(
|
||||||
"Не корректное ФИО клиента",
|
"Некорректное ФИО клиента",
|
||||||
"Пожалуйста, введите ФИО клиента правильно"
|
"Пожалуйста, введите ФИО клиента правильно"
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -93,8 +93,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateDataClient() {
|
updateDataClient() {
|
||||||
|
if (this.dataClients.find(({ id }) => id === this.deletedRowId)) {
|
||||||
if (this.dataClients.length === 1) this.currentTablePage -= 1;
|
if (this.dataClients.length === 1) this.currentTablePage -= 1;
|
||||||
else this.fetchDataClients();
|
else this.fetchDataClients();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
saveDataClients(data) {
|
saveDataClients(data) {
|
||||||
this.dataClients = data.results;
|
this.dataClients = data.results;
|
||||||
|
|||||||
@@ -189,8 +189,10 @@ export default {
|
|||||||
},
|
},
|
||||||
changeCountdown() {
|
changeCountdown() {
|
||||||
if (this.countdown === 0) {
|
if (this.countdown === 0) {
|
||||||
|
this.deleteClient().then(() => {
|
||||||
|
this.updateDataClient();
|
||||||
this.stopTimer();
|
this.stopTimer();
|
||||||
this.deleteClient().then(() => this.updateDataClient());
|
});
|
||||||
} else {
|
} else {
|
||||||
this.countdown -= 1;
|
this.countdown -= 1;
|
||||||
}
|
}
|
||||||
@@ -483,9 +485,12 @@ export default {
|
|||||||
photo: this.client.photo,
|
photo: this.client.photo,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/*beforeUnmount() {
|
beforeUnmount() {
|
||||||
|
if (this.timer) {
|
||||||
|
this.deleteClient().then(() => this.updateDataClient());
|
||||||
this.stopTimer();
|
this.stopTimer();
|
||||||
},*/
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user