dialog wrapper > prepare corresponding DTL panel
This commit is contained in:
parent
f4a5e53140
commit
af0c259525
1 changed files with 15 additions and 0 deletions
|
|
@ -8,12 +8,27 @@
|
||||||
/>
|
/>
|
||||||
<VirtualSample v-if="dialog.content.slug === 'virtual-sample'" />
|
<VirtualSample v-if="dialog.content.slug === 'virtual-sample'" />
|
||||||
<PhysicalSample v-if="dialog.content.slug === 'physical-sample'" />
|
<PhysicalSample v-if="dialog.content.slug === 'physical-sample'" />
|
||||||
|
<DTLPanel v-if="correspondingDTLProposal" />
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import TitledPdfWrapper from "./TitledPdfWrapper.vue";
|
import TitledPdfWrapper from "./TitledPdfWrapper.vue";
|
||||||
import { useDialogStore } from "../../stores/dialog";
|
import { useDialogStore } from "../../stores/dialog";
|
||||||
import VirtualSample from "./virtual-sample/VirtualSample.vue";
|
import VirtualSample from "./virtual-sample/VirtualSample.vue";
|
||||||
import PhysicalSample from "./PhysicalSample.vue";
|
import PhysicalSample from "./PhysicalSample.vue";
|
||||||
|
import { storeToRefs } from "pinia";
|
||||||
|
import { usePageStore } from "../../stores/page";
|
||||||
|
import { computed } from "vue";
|
||||||
|
import DTLPanel from "../design-to-light/DTLPanel.vue";
|
||||||
|
|
||||||
const dialog = useDialogStore();
|
const dialog = useDialogStore();
|
||||||
|
const { page } = storeToRefs(usePageStore());
|
||||||
|
|
||||||
|
const correspondingDTLProposal = computed(() => {
|
||||||
|
if (!page.value?.designToLight) return false;
|
||||||
|
const correspondingDTLProposal = page.value.designToLight.find((proposal) =>
|
||||||
|
window.location.href.includes(proposal.path)
|
||||||
|
);
|
||||||
|
if (!correspondingDTLProposal) return false;
|
||||||
|
return correspondingDTLProposal;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue