mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 16:50:27 +00:00
Fixed Missing links and missed named template
This commit is contained in:
parent
c78f10ba5d
commit
72768d4e50
1 changed files with 24 additions and 19 deletions
|
@ -1,27 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { statCardData } from "./statistics";
|
import { statCardData } from "./statistics";
|
||||||
import { itemsTable } from "./table";
|
import { itemsTable } from "./table";
|
||||||
import { useLabelStore } from "~~/stores/labels";
|
import { useLabelStore } from "~~/stores/labels";
|
||||||
import { useLocationStore } from "~~/stores/locations";
|
import { useLocationStore } from "~~/stores/locations";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: ["auth"],
|
middleware: ["auth"],
|
||||||
});
|
});
|
||||||
useHead({
|
useHead({
|
||||||
title: "Homebox | Home",
|
title: "Homebox | Home",
|
||||||
});
|
});
|
||||||
|
|
||||||
const api = useUserApi();
|
const api = useUserApi();
|
||||||
const breakpoints = useBreakpoints();
|
const breakpoints = useBreakpoints();
|
||||||
|
|
||||||
const locationStore = useLocationStore();
|
const locationStore = useLocationStore();
|
||||||
const locations = computed(() => locationStore.parentLocations);
|
const locations = computed(() => locationStore.parentLocations);
|
||||||
|
|
||||||
const labelsStore = useLabelStore();
|
const labelsStore = useLabelStore();
|
||||||
const labels = computed(() => labelsStore.labels);
|
const labels = computed(() => labelsStore.labels);
|
||||||
|
|
||||||
const itemTable = itemsTable(api);
|
const itemTable = itemsTable(api);
|
||||||
const stats = statCardData(api);
|
const stats = statCardData(api);
|
||||||
|
|
||||||
// const purchasePriceOverTime = purchasePriceOverTimeChart(api);
|
// const purchasePriceOverTime = purchasePriceOverTimeChart(api);
|
||||||
|
|
||||||
|
@ -83,6 +83,11 @@
|
||||||
|
|
||||||
<BaseCard v-if="breakpoints.lg">
|
<BaseCard v-if="breakpoints.lg">
|
||||||
<Table :headers="itemTable.headers" :data="itemTable.items">
|
<Table :headers="itemTable.headers" :data="itemTable.items">
|
||||||
|
<template #cell-name="{ item }">
|
||||||
|
<NuxtLink :to="`/item/${item.id}`">
|
||||||
|
{{ item.name }}
|
||||||
|
</NuxtLink>
|
||||||
|
</template>
|
||||||
<template #cell-warranty="{ item }">
|
<template #cell-warranty="{ item }">
|
||||||
<Icon v-if="item.warranty" name="mdi-check" class="text-green-500 h-5 w-5" />
|
<Icon v-if="item.warranty" name="mdi-check" class="text-green-500 h-5 w-5" />
|
||||||
<Icon v-else name="mdi-close" class="text-red-500 h-5 w-5" />
|
<Icon v-else name="mdi-close" class="text-red-500 h-5 w-5" />
|
||||||
|
@ -90,7 +95,7 @@
|
||||||
<template #cell-purchasePrice="{ item }">
|
<template #cell-purchasePrice="{ item }">
|
||||||
<Currency :amount="item.purchasePrice" />
|
<Currency :amount="item.purchasePrice" />
|
||||||
</template>
|
</template>
|
||||||
<template #cell-location_Name="{ item }">
|
<template #cell-location_name="{ item }">
|
||||||
<NuxtLink class="badge badge-sm badge-primary p-3" :to="`/location/${item.location.id}`">
|
<NuxtLink class="badge badge-sm badge-primary p-3" :to="`/location/${item.location.id}`">
|
||||||
{{ item.location?.name }}
|
{{ item.location?.name }}
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue