Start PhysicalSample

This commit is contained in:
Timothée Goguely 2024-12-11 15:05:40 +01:00
parent 30876abff3
commit 3f57b195bc
9 changed files with 63 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View file

@ -0,0 +1,5 @@
Uuid: 6vTPqTeP4VX0i1dY
----
Template: pdf-cover

View file

@ -10,6 +10,10 @@ Cover: - file://0XaNKWTOhgkS3CJj
----
Headline: Titre échantillon physique
----
Date: 2024-12-11
----

View file

@ -2,7 +2,7 @@ Title: Projet test2
----
Currentstep: clientBrief
Currentstep: physicalSample
----

View file

@ -27,6 +27,11 @@ tabs:
image:
ratio: 6/1
cover: true
headline:
label: Titre
type: text
required: true
width: 3/12
date:
type: date
display: DD/MM/YY
@ -36,7 +41,7 @@ tabs:
description:
type: text
required: true
width: 10/12
width: 7/12
media:
type: files
layout: cards

View file

@ -41,6 +41,8 @@ class ProjectPage extends Page {
'modified' => $child->modified('Y-MM-dd'),
'isValidated' => $child->isValidated() == 'true' ? true : false,
'description' => $child->description()->isNotempty() ? $child->description()->value() : null,
'title' => $child->headline()->isNotempty() ? $child->headline()->value() : null,
'date' => $child->date()->isNotempty() ? $child->date()->value() : null,
'cover' => $child->cover()->isNotempty() ? $child->cover()->toFile()->url() : null,
'uri' => $uri,
'files' => $files,

View file

@ -6,10 +6,8 @@
dialog.content.slug === 'industrial-ideation'
"
/>
<VirtualSample v-if="dialog.content.slug === 'virtual-sample'" />
<PhysicalSample v-if="dialog.content.slug === 'physical-content'" />
<PhysicalSample v-if="dialog.content.slug === 'physical-sample'" />
</template>
<script setup>
import TitledPdfWrapper from "./TitledPdfWrapper.vue";

View file

@ -1,3 +1,35 @@
<template></template>
<script setup></script>
<template>
<Dialog
id="physical-sample"
v-model:visible="isOpen"
modal
:draggable="false"
dismissableMask="true"
class="dialog"
:closeOnEscape="true"
>
<header>
<h2>Titre de la modal</h2>
</header>
</Dialog>
</template>
<script setup>
import Dialog from "primevue/dialog";
import { ref, watch } from "vue";
import { useDialogStore } from "../../stores/dialog";
import { useRoute, useRouter } from "vue-router";
import { usePageStore } from "../../stores/page.js";
// Variables
const router = useRouter();
const route = useRoute();
const isOpen = ref(true);
watch(isOpen, (newValue) => {
router.push({ name: route.name });
});
const { page } = usePageStore();
const step = page.steps[page.step.length - 1];
</script>
<style></style>

View file

@ -154,8 +154,16 @@
</template>
</template>
<template v-if="step.id === 'physicalSample'"></template>
<!-- Empty state -->
<template v-if="step.id === 'physicalSample'">
<header>
<h3>
<router-link :to="'/' + step.uri">{{ step.title }}</router-link>
</h3>
<time :datetime="step.date">{{ step.date }}</time>
<p>{{ step.description }}</p>
</header>
<img :src="step.files[0].url" alt="" loading="lazy">
</template>
<template v-else></template>
</div>
</section>