project - view pdf in dialog working. Open and close working
This commit is contained in:
parent
09eb3e1969
commit
3d8f9fc893
19 changed files with 89 additions and 119 deletions
|
|
@ -44,7 +44,6 @@ function setInitialStep() {
|
|||
page.value.content.description.length !== 0;
|
||||
const isEmpty = !hasPDF && !hasImages;
|
||||
if (isEmpty) return "Intro";
|
||||
if (hasPDF) return "PdfViewer";
|
||||
if (hasImages) return "Images";
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue