Merge branch 'master' into UC-90
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template lang="pug">
|
||||
.notification-container.flex.justify-between(:style="{ backgroundColor: bgColor }")
|
||||
.notification-content.flex.mr-16
|
||||
.grid.grid-rows-2
|
||||
.grid(:class="{'grid-rows': message}")
|
||||
.text-white.text-xs.icon.row-span-full.flex.justify-center.items-center(:class="iconClass")
|
||||
.text-white.text-base(v-if="title") {{ title }}
|
||||
.text-white.text-base.font-bold(v-if="title") {{ title }}
|
||||
.text-white.text-base(v-if="message") {{ message }}
|
||||
.icon-cancel.cursor-pointer.text-white.opacity-50.text-sm(class="hover:opacity-100 active:opacity-75", @click="delNotification")
|
||||
</template>
|
||||
@@ -83,4 +83,7 @@ export default {
|
||||
.grid
|
||||
grid-template-columns: 24px 1fr
|
||||
grid-column-gap: 8px
|
||||
.grid-rows
|
||||
grid-template-rows: repeat(2, auto)
|
||||
grid-row-gap: 8px
|
||||
</style>
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user