Merge branch 'master' into UC-90

This commit is contained in:
frontgavrilin
2022-11-29 19:13:39 +03:00
committed by GitHub
8 changed files with 113 additions and 28 deletions

View File

@@ -91,6 +91,8 @@ import BaseButton from "@/components/base/BaseButton";
import BasePopup from "@/components/base/BasePopup";
import BaseModal from "@/components/base/BaseModal";
import addImageIcon from "@/assets/icons/photo.svg";
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
import { addNotification } from "@/components/Notifications/notificationContext";
export default {
name: "BaseClientFormClient",
components: {
@@ -103,6 +105,7 @@ export default {
BasePopup,
BaseModal,
addImageIcon,
TheNotificationProvider,
},
props: {
closeForm: Function,
@@ -276,6 +279,7 @@ export default {
.then((result) => {
this.createIdentityDocument(result.id);
this.createAddress(result.id);
this.addSuccessNotification();
});
this.$emit("update-client");
},
@@ -358,11 +362,29 @@ export default {
},
checkFormFullness() {
if (!this.infoClient.basic.full_name) {
alert("Не заполнено ФИО клиента");
this.addErrrorNotification();
return false;
}
return true;
},
addErrrorNotification() {
addNotification(
new Date().getTime(),
"Не заполнено ФИО клиента",
"Пожалуйста, заполните ФИО клиента",
"error",
5000
);
},
addSuccessNotification() {
addNotification(
new Date().getTime(),
"Клиент успешно создан",
"",
"success",
5000
);
},
},
watch: {
showModal: function () {