Files
astra-frontend/src/pages/clients/components/ClientsActionPopup.vue

79 lines
2.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template lang="pug">
.flex.flex-col.absolute.left-2.top-6
.corner
.popup-wrapper.flex.flex-col.gap-y-3.w-10.h-10.p-4
.button.keep-redaction.flex.gap-x-3(@click="openChangeData")
.icon-edit.icon
span Редактировать
.button.keep-redaction.flex.gap-x-3
.icon-star-off.icon
span На ведение
.button.keep-redaction.flex.gap-x-3(@click="createMedicalCard(clientId)")
.icon-star-off.icon
span Мед. карта
.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,
createMedicalCard: Function,
clientId: String,
},
methods: {
transmitDeleteClient() {
if (!this.disabledDelete) this.$emit("delete-client");
else this.addWarningNotification();
},
addWarningNotification() {
addNotification(
new Date().getTime(),
"Сейчас нельзя удалить клиента",
"Для удаления дождитесь текущего удаления клиента или переключите страницу",
"warning",
5000
);
},
},
};
</script>
<style lang="sass" scoped>
.popup-wrapper
width: 180px
height: 164px
border-radius: 0 4px 4px 4px
background-color: var(--default-white)
box-shadow: var(--default-shadow)
z-index: 11
.keep-redaction
color: var(--font-dark-blue-color)
.icon
color: var(--btn-blue-color)
.delete
color: var(--btn-red-color)
.button
&:hover
opacity: 0.7
.corner
width: 8px
height: 8px
background: url("@/assets/icons/exclude.svg") right no-repeat
transform: scale(-1, 1)
z-index: 12
overflow: hidden
.icon-delete
color: var(--btn-red-color)
</style>