Работа над журналом для ст. мед сестер
This commit is contained in:
24
resources/js/Components/UrgencyBadge.vue
Normal file
24
resources/js/Components/UrgencyBadge.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup>
|
||||
import {computed} from "vue";
|
||||
import {NTag} from 'naive-ui'
|
||||
|
||||
const props = defineProps({
|
||||
urgencyId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
|
||||
const typeForUrgency = computed(() => props.urgencyId === 1 ? 'success' : 'error')
|
||||
const textForUrgency = computed(() => props.urgencyId === 1 ? 'Планово' : 'Экстренно')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NTag :type="typeForUrgency" round :bordered="false" size="small">
|
||||
{{ textForUrgency }}
|
||||
</NTag>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user