* поправил поле выбора даты * добавил индикатор в контроле * окно выбора пользователя для сводной * привязка окна для ввода причины контроля * добавил привязку историй пациентов для просмотра статистики по дням * поправил фиксацию фио ответственного, убрал при диапазоне * отключение ролей адм и зав от реплики
80 lines
1.4 KiB
Vue
80 lines
1.4 KiB
Vue
<script setup>
|
|
import {NButton, NP, NFlex, NIcon} from "naive-ui";
|
|
import {Link} from "@inertiajs/vue3";
|
|
import {computed, h} from "vue";
|
|
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
description: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
href: {
|
|
type: String,
|
|
default: '/'
|
|
},
|
|
icon: {
|
|
type: [Object, Function],
|
|
default: null
|
|
},
|
|
tag: {
|
|
type: [Object, Function, String],
|
|
default: Link
|
|
},
|
|
click: {
|
|
type: [Function, Object],
|
|
}
|
|
})
|
|
const emits = defineEmits(['click'])
|
|
|
|
const buttonThemeOverride = {
|
|
heightLarge: '64px',
|
|
borderRadiusLarge: '8px'
|
|
}
|
|
|
|
const pThemeOverride = {
|
|
pMargin: '',
|
|
pLineHeight: '1.4'
|
|
}
|
|
|
|
const hasIcon = computed(() => props.icon !== null)
|
|
|
|
const isLink = computed(() => props.tag === 'link')
|
|
|
|
const onClick = () => {
|
|
if (isLink.value) return
|
|
|
|
emits('click')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<NButton :tag="tag"
|
|
:href="href"
|
|
:theme-overrides="buttonThemeOverride"
|
|
@click="onClick"
|
|
size="large"
|
|
block
|
|
class="justify-start! text-left!"
|
|
>
|
|
<template v-if="hasIcon" #icon>
|
|
<component :is="icon" v-if="icon" />
|
|
</template>
|
|
<NFlex vertical :size="2" :class="hasIcon ? 'ml-2' : ''">
|
|
{{ title }}
|
|
<NP :theme-overrides="pThemeOverride" depth="3">
|
|
{{ description }}
|
|
</NP>
|
|
</NFlex>
|
|
</NButton>
|
|
</template>
|
|
|
|
<style scoped>
|
|
:deep(.n-button) {
|
|
@apply justify-start!;
|
|
}
|
|
</style>
|