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

@ -129,6 +129,7 @@ const route = useRoute();
const isOpen = ref(true);
watch(isOpen, (newValue) => {
router.push({ name: route.name });
openedFile.value = null;
});
const downloadText = computed(() => {
@ -145,7 +146,7 @@ const downloadText = computed(() => {
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) => {
if (activeTab.value === "dynamic") {
@ -158,7 +159,7 @@ const correspondingDTLProposal = computed(() => {
} else {
return (
proposal.location.type === "static" &&
openedFile.value.source === proposal.location.source
openedFile.value?.source === proposal.location.source
);
}
});