WIP Наладила таймер

This commit is contained in:
Daria Golova
2022-12-02 15:15:56 +03:00
parent 469961a05b
commit 1db2ca2113
3 changed files with 15 additions and 8 deletions

View File

@@ -392,7 +392,7 @@ export default {
}
if (this.infoClient.basic.full_name.split(" ").length < 3) {
this.addErrrorNotification(
"Не корректное ФИО клиента",
"Некорректное ФИО клиента",
"Пожалуйста, введите ФИО клиента правильно"
);
return false;

View File

@@ -93,8 +93,10 @@ export default {
},
methods: {
updateDataClient() {
if (this.dataClients.find(({ id }) => id === this.deletedRowId)) {
if (this.dataClients.length === 1) this.currentTablePage -= 1;
else this.fetchDataClients();
}
},
saveDataClients(data) {
this.dataClients = data.results;

View File

@@ -189,8 +189,10 @@ export default {
},
changeCountdown() {
if (this.countdown === 0) {
this.deleteClient().then(() => {
this.updateDataClient();
this.stopTimer();
this.deleteClient().then(() => this.updateDataClient());
});
} else {
this.countdown -= 1;
}
@@ -483,9 +485,12 @@ export default {
photo: this.client.photo,
};
},
/*beforeUnmount() {
beforeUnmount() {
if (this.timer) {
this.deleteClient().then(() => this.updateDataClient());
this.stopTimer();
},*/
}
},
};
</script>