diff --git a/src/components/project/TitledPdfWrapper.vue b/src/components/project/TitledPdfWrapper.vue index e7d1e4e..6be7f05 100644 --- a/src/components/project/TitledPdfWrapper.vue +++ b/src/components/project/TitledPdfWrapper.vue @@ -63,6 +63,9 @@ const api = useApiStore(); const { page } = storeToRefs(usePageStore()); const isOpen = ref(true); +const hasDTLProposal = computed(() => { + return page.value?.designToLight; +}); watch(isOpen, (newValue) => { router.push({ name: route.name }); @@ -74,11 +77,10 @@ openedFile.value = route.query.fileIndex : dialog.content.files.find((file) => file.type === "document"); const correspondingDTLProposal = computed(() => { - const hasDTLProposal = page.value?.designToLight; - if (!hasDTLProposal || !isOpen.value || !openedFile.value) return false; + if (!hasDTLProposal.value || !isOpen.value || !openedFile.value) return false; const correspondingDTLProposal = page.value.designToLight.find((proposal) => { - return openedFile.value.source === proposal.location.source; + return openedFile.value.source === proposal.location?.source; }); if (!correspondingDTLProposal) return false; diff --git a/src/components/project/virtual-sample/Interactive360.vue b/src/components/project/virtual-sample/Interactive360.vue index a590c92..7acbe8b 100644 --- a/src/components/project/virtual-sample/Interactive360.vue +++ b/src/components/project/virtual-sample/Interactive360.vue @@ -50,7 +50,7 @@ localStorage.setItem("isHelperHidden", true); // Grab interaction const yMax = computed(() => { return parseInt( - activeTrack.files[activeTrack.files.length - 1].name.charAt(0) + activeTrack.files[activeTrack.files.length - 1].name.split("_")[0] ); }); const xMax = computed(() => {