project - view pdf in dialog working. Open and close working

This commit is contained in:
isUnknown 2024-10-16 18:43:04 +02:00
parent 09eb3e1969
commit 3d8f9fc893
19 changed files with 89 additions and 119 deletions

View file

@ -3,8 +3,15 @@
<Header :title="page.content.title" />
<!-- Kanban: Status Brief Enrichi -->
<PdfViewer v-if="pdf" :src="pdf" @close="pdf = null" />
<div class="kanban">
<ProjectStep v-for="step in page.steps" :key="step" :step="step">
<ProjectStep
v-for="step in page.steps"
:key="step"
:step="step"
@update:pdf="changePdf"
>
</ProjectStep>
<!-- <section
class="flex-1"
@ -155,10 +162,14 @@ import { useUserStore } from "../stores/user";
import { storeToRefs } from "pinia";
import ProjectStep from "../components/project/ProjectStep.vue";
import Header from "../components/project/Header.vue";
import PdfViewer from "../components/project/client-brief/PdfViewer.vue";
import { ref } from "vue";
const { page } = storeToRefs(usePageStore());
const user = useUserStore().user;
const pdf = ref(null);
function setStepStatus(stepName) {
const stepIndex = steps.indexOf(stepName);
const currentIndex = steps.indexOf(currentStep.value);
@ -166,6 +177,15 @@ function setStepStatus(stepName) {
return "done";
}
}
function changePdf(src) {
pdf.value = src;
}
function hidePdf() {
console.log("test");
pdf.value = null;
}
</script>
<style scope>