feat(dashboard): add price overview UI
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import moment from 'moment';
|
||||
|
||||
defineProps<{
|
||||
label: string;
|
||||
price: number | null | undefined;
|
||||
time: moment.Moment | string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-4 rounded-xl bg-primary/10 p-4 shadow-md">
|
||||
<div class="font-bold text-primary uppercase">{{ label }}</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="text-4xl font-black">
|
||||
€{{ price?.toPrecision(2).toString().replace('.', ',') }}
|
||||
</div>
|
||||
<div class="text-sm text-black/50">
|
||||
{{ moment.isMoment(time) ? time.format('DD-MM-YYYY HH:mm') : time }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user