WIP Сделала запрет на удаление более 1го клиента

This commit is contained in:
Daria Golova
2022-12-02 19:45:54 +03:00
parent 1db2ca2113
commit d52f3064e3
3 changed files with 46 additions and 11 deletions

View File

@@ -8,20 +8,37 @@
.button.keep-redaction.flex.gap-x-3
.icon-star-off.icon
span На ведение
.button.delete.flex.gap-x-3(@click="transmitDeleteClient")
.button.delete.flex.gap-x-3(
@click="transmitDeleteClient",
:style="{'opacity': disabledDelete && '0.7'}"
)
.icon-basket.icon-delete
span Удалить
</template>
<script>
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
import { addNotification } from "@/components/Notifications/notificationContext";
export default {
name: "ClientsActionPopup",
components: { TheNotificationProvider },
props: {
openChangeData: Function,
disabledDelete: Boolean,
},
methods: {
transmitDeleteClient() {
this.$emit("delete-client");
if (!this.disabledDelete) this.$emit("delete-client");
else this.addWarningNotification();
},
addWarningNotification() {
addNotification(
new Date().getTime(),
"Сейчас нельзя удалить клиента",
"Для удаления дождитесь текущего удаления клиента или переключите страницу",
"warning",
5000
);
},
},
};
@@ -34,7 +51,7 @@ export default {
border-radius: 4px 0 4px 4px
background-color: var(--default-white)
box-shadow: var(--default-shadow)
z-index: 1
z-index: 11
.keep-redaction
color: var(--font-dark-blue-color)
.icon
@@ -49,7 +66,7 @@ export default {
height: 8px
border-top-left-radius: 100%
background-color: var(--default-white)
z-index: 2
z-index: 12
overflow: hidden
.icon-delete
color: var(--btn-red-color)