22 <UCard class =" group/list" >
33 <div class =" flex flex-col gap-2.5" >
44 <div class =" flex flex-row justify-between" >
5- <UIcon name =" i-lucide-banknote-arrow-up" class =" size-14 text-primary " />
5+ <UIcon name =" i-lucide-banknote-arrow-up" class =" size-10 text-muted/50 " />
66
77 <UButton
88 variant =" outline"
1414 />
1515 </div >
1616
17+ <div class =" text-sm/4 text-muted" >
18+ Создан {{ format(new Date(invoice.createdAt), 'd MMMM в HH:mm', { locale: ru }) }}
19+ </div >
20+
1721 <h3 class =" text-xl md:text-xl/6 font-semibold" >
1822 {{ new Intl.NumberFormat().format(invoice.total) }} ₽
1923 </h3 >
2226 {{ invoice.title }}
2327 </p >
2428
25- <p class =" text-sm/4 text-muted" >
29+ <p v-if = " invoice.description " class =" text-sm/4 text-muted" >
2630 {{ invoice.description }}
2731 </p >
2832
3640
3741 <UBadge
3842 :label =" getInfoByStatus(invoice.status)"
39- :color =" invoice.status === 'unpaid' ? 'error' : 'success '"
43+ :color =" invoice.status === 'unpaid' ? 'error' : 'neutral '"
4044 size =" md"
4145 variant =" soft"
4246 />
4852<script setup lang="ts">
4953import type { Invoice } from ' @roll-stack/database'
5054import { ModalUpdateInvoice } from ' #components'
55+ import { format } from ' date-fns'
56+ import { ru } from ' date-fns/locale/ru'
5157
5258defineProps <{
5359 invoice: Invoice
@@ -59,8 +65,16 @@ function getInfoByType(type: Invoice['type']) {
5965 return ' Пополнение'
6066 case ' royalties' :
6167 return ' Роялти'
68+ case ' lump_sum_fee' :
69+ return ' Паушальный взнос'
70+ case ' marketing_fee' :
71+ return ' Маркетинговый сбор'
72+ case ' rospatent_fee' :
73+ return ' Роспатент'
6274 case ' other' :
6375 return ' Другое'
76+ default :
77+ return ' Другое'
6478 }
6579}
6680
@@ -70,6 +84,8 @@ function getInfoByStatus(status: Invoice['status']) {
7084 return ' Не оплачен'
7185 case ' paid' :
7286 return ' Оплачен'
87+ default :
88+ return ' Неизвестно'
7389 }
7490}
7591
0 commit comments