Профиль хирургии
This commit is contained in:
@@ -3,7 +3,7 @@ import {NModal, NList, NListItem, NThing, NAvatar, NIcon, NDrawer, NDrawerConten
|
||||
NText, NDivider, NForm, NFormItem, NInput, NFlex, NButton, NScrollbar, NEmpty
|
||||
} from 'naive-ui'
|
||||
import {useReportStore} from "../../../Stores/report.js";
|
||||
import {ref} from "vue";
|
||||
import {computed, ref} from "vue";
|
||||
const open = defineModel('open')
|
||||
import { TbAlertCircle, TbPencil, TbTrashX, TbCirclePlus, TbCheck, TbX } from 'vue-icons-plus/tb'
|
||||
import {format, isValid} from "date-fns";
|
||||
@@ -43,6 +43,10 @@ const onEditEvent = (event) => {
|
||||
createDrawerShow.value = true
|
||||
}
|
||||
|
||||
const hasDisableAddButton = computed(() => {
|
||||
return reportStore.reportInfo.report.isActiveSendButton === false
|
||||
})
|
||||
|
||||
const onDeleteEvent = (event) => {
|
||||
const indexOfDelete = reportStore.unwantedEvents.findIndex(itm => itm === event)
|
||||
|
||||
@@ -115,14 +119,14 @@ const onBeforeLeaveModal = () => {
|
||||
</NText>
|
||||
<template #action>
|
||||
<NFlex align="center">
|
||||
<NButton secondary size="small" @click="onEditEvent(event)">
|
||||
<NButton secondary size="small" @click="onEditEvent(event)" :disabled="hasDisableAddButton">
|
||||
<template #icon>
|
||||
<TbPencil />
|
||||
</template>
|
||||
Редактировать
|
||||
</NButton>
|
||||
<NDivider vertical />
|
||||
<NButton type="error" secondary size="small" @click="onDeleteEvent(event)">
|
||||
<NButton type="error" secondary size="small" @click="onDeleteEvent(event)" :disabled="hasDisableAddButton">
|
||||
<template #icon>
|
||||
<TbTrashX />
|
||||
</template>
|
||||
@@ -139,7 +143,7 @@ const onBeforeLeaveModal = () => {
|
||||
<div class="h-full flex items-center justify-center">
|
||||
<NEmpty description="Нежелательных событий не найдено!">
|
||||
<template #extra>
|
||||
<NButton type="primary" secondary @click="onCreateEvent()" size="small">
|
||||
<NButton type="primary" secondary @click="onCreateEvent()" size="small" :disabled="hasDisableAddButton">
|
||||
<template #icon>
|
||||
<TbCirclePlus />
|
||||
</template>
|
||||
@@ -152,7 +156,7 @@ const onBeforeLeaveModal = () => {
|
||||
|
||||
<template #action>
|
||||
<NFlex id="modal-action" align="center" justify="space-between">
|
||||
<NButton type="primary" secondary @click="onCreateEvent()">
|
||||
<NButton type="primary" secondary @click="onCreateEvent()" :disabled="hasDisableAddButton">
|
||||
<template #icon>
|
||||
<TbCirclePlus />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user