close DTL panel exactly at the same time as the dialog

This commit is contained in:
isUnknown 2025-01-28 07:26:20 +01:00
parent bada0df7a6
commit 8bb4f552cd
3 changed files with 6 additions and 8 deletions

View file

@ -63,8 +63,10 @@ const api = useApiStore();
const { page } = storeToRefs(usePageStore());
const isOpen = ref(true);
watch(isOpen, (newValue) => {
router.push({ name: route.name });
openedFile.value = null;
});
openedFile.value = route.query.fileIndex
@ -73,7 +75,7 @@ openedFile.value = route.query.fileIndex
const correspondingDTLProposal = computed(() => {
const hasDTLProposal = page.value?.designToLight;
if (!hasDTLProposal) return false;
if (!hasDTLProposal || !isOpen.value || !openedFile.value) return false;
const correspondingDTLProposal = page.value.designToLight.find((proposal) => {
return openedFile.value.source === proposal.location.source;