Skip to content

Commit 1654485

Browse files
committed
cleanup + handle empty panel data
1 parent cd1d7a3 commit 1654485

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

resources/js/dashboard/components/widgets/Panel.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
</MaybeInertiaLink>
3636
</CardHeader>
3737
</template>
38-
<CardContent>
39-
<Content class="content-sm text-sm" :html="value.html" />
40-
</CardContent>
38+
<template v-if="value">
39+
<CardContent>
40+
<Content class="content-sm text-sm" :html="value.html" />
41+
</CardContent>
42+
</template>
4143
</Card>
4244
</template>

resources/js/dashboard/components/widgets/graph/Line.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import { useApexCharts } from "@/dashboard/components/widgets/graph/useApexCharts";
3-
import { computed, useTemplateRef } from "vue";
43
import { normalizeColor } from "@/dashboard/utils/chart";
54
import { GraphWidgetData } from "@/types";
65
import ApexChart from "vue3-apexcharts";
@@ -27,7 +26,7 @@
2726
},
2827
colors: value?.datasets?.map(dataset => normalizeColor(dataset.color)),
2928
dataLabels: {
30-
enabled: false
29+
enabled: false,
3130
},
3231
labels: value?.labels,
3332
legend: {
@@ -43,7 +42,6 @@
4342
},
4443
xaxis: {
4544
type: widget.dateLabels ? 'datetime' : 'category',
46-
4745
},
4846
yaxis: {
4947
show: !widget.minimal,

0 commit comments

Comments
 (0)