WIP Переключение на клиента после создания

This commit is contained in:
Daria Golova
2022-12-14 17:46:24 +03:00
parent 1666e7f806
commit 86d64bc771
8 changed files with 56 additions and 13 deletions

View File

@@ -188,6 +188,8 @@ export default {
url: String,
fetchDataClients: Function,
createMedicalCard: Function,
fetchCreatedClientData: Function,
createdClientName: String,
},
computed: {
rowOverlay() {
@@ -207,7 +209,7 @@ export default {
this.timer = null;
},
startTimer() {
this.countdown = 30;
this.countdown = 600;
this.timer = setInterval(() => {
this.changeCountdown();
}, 1000);
@@ -260,7 +262,10 @@ export default {
.post(`general/person/${this.client.id}/update/`, {
...data,
})
.then(() => this.fetchDataClients());
.then(() => {
if (this.createdClientName) this.fetchCreatedClientData;
else this.fetchDataClients();
});
},
postContactsClient() {
let contacts = [...this.dataClient.contacts];