diff --git a/frontend/src/components/DataStoreCanvas.vue b/frontend/src/components/DataStoreCanvas.vue index b12a127f1..229037a54 100644 --- a/frontend/src/components/DataStoreCanvas.vue +++ b/frontend/src/components/DataStoreCanvas.vue @@ -7,31 +7,29 @@ import DataStoreCard from "@/components/DataStoreCard.vue"; import HtmlSnippetWidget from "@/components/HtmlSnippetWidget.vue"; import ImageWidget from "@/components/ImageWidget.vue"; import MarkdownWidget from "@/components/MarkdownWidget.vue"; -import VegaWidget from "@/components/VegaWidget.vue"; -import type { KeyLayoutSize, KeyMoveDirection, ReportItem } from "@/models"; -import { useReportsStore } from "@/stores/reports"; -import { formatDistance } from "date-fns"; +import type { KeyLayoutSize, KeyMoveDirection } from "@/models"; +import { useReportStore } from "@/stores/reports"; -const reportsStore = useReportsStore(); -const items = computed(() => { - const report = reportsStore.report; - const layout = reportsStore.layout; +const reportStore = useReportStore(); +// const items = computed(() => { +// const report = reportsStore.report; +// const layout = reportsStore.layout; - return layout.map(({ key, size }) => { - const now = new Date(); - const item: ReportItem = report?.[key]; - const r: any = { - key, - size, - data: item?.serialized, - type: item?.item_type, - }; - if (item?.metadata?.created_at) { - r.updatedAt = formatDistance(item?.metadata?.updated_at, now, { addSuffix: true }); - } - return r; - }); -}); +// return layout.map(({ key, size }) => { +// const now = new Date(); +// const item: ReportItem = report?.[key]; +// const r: any = { +// key, +// size, +// data: item?.serialized, +// type: item?.item_type, +// }; +// if (item?.metadata?.created_at) { +// r.updatedAt = formatDistance(item?.metadata?.updated_at, now, { addSuffix: true }); +// } +// return r; +// }); +// }); function onLayoutChange(key: string, size: KeyLayoutSize) { reportsStore.setKeyLayoutSize(key, size); @@ -56,23 +54,29 @@ const props = defineProps({