0
0
Fork 0

refs #6980 feat: enable List, disable summary

This commit is contained in:
Javier Segarra 2024-02-28 11:52:36 +01:00
parent 478f0e17b1
commit e708e0cd6d
1 changed files with 14 additions and 2 deletions

View File

@ -3,10 +3,16 @@ import { onMounted, ref, watch } from 'vue';
import axios from 'axios';
import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import { useRoute } from 'vue-router';
onMounted(() => fetch());
const route = useRoute();
const entity = ref();
const isSummary = ref(true);
onMounted(() => {
isSummary.value = !String(route.path).endsWith('/summary');
fetch();
});
const props = defineProps({
url: {
type: String,
@ -48,7 +54,13 @@ watch(props, async () => {
<template v-if="entity">
<div class="summaryHeader bg-primary q-pa-md text-weight-bolder">
<slot name="header-left">
<span></span>
<span
><QIcon
v-if="isSummary"
name="open_in_new"
color="white"
size="sm"
/></span>
</slot>
<slot name="header" :entity="entity">
<VnLv :label="`${entity.id} -`" :value="entity.name" />