feat(ui): add loading indicator and error handling

This commit is contained in:
2026-08-05 08:29:08 +02:00
parent a63682ced0
commit a0387126de
4 changed files with 22 additions and 15 deletions
@@ -3,6 +3,8 @@ import { computed, onMounted, ref, watch } from 'vue';
import useHistoryViewModel from '../viewmodels/HistoryViewModel';
import moment from 'moment';
import Chart from '../components/Chart.vue';
import Loading from '@/components/Loading.vue';
import Error from '@/components/Error.vue';
const model = useHistoryViewModel();
@@ -29,5 +31,7 @@ const chartData = computed(
<template>
<input type="date" v-model="date" />
<Chart :data="chartData" />
<Loading v-if="model.isLoading.value" />
<Chart :data="chartData" v-if="chartData" />
<Error v-if="model.error.value" :message="model.error.value" />
</template>