dynamize brief steps

This commit is contained in:
isUnknown 2024-09-25 17:33:28 +02:00
parent 13592a5869
commit 0df79ba8a8
8 changed files with 298 additions and 130 deletions

View file

@ -1,3 +1,11 @@
Alt:
----
Favoriteforusers:
----
Description:
----

View file

@ -2,7 +2,7 @@ Alt:
----
Favoriteforusers: - user://WWjXgPWk
Favoriteforusers:
----

View file

@ -2,10 +2,7 @@ Alt:
----
Favoriteforusers:
- user://WWjXgPWk
- user://HfuumN8s
Favoriteforusers: - user://HfuumN8s
----

View file

@ -0,0 +1,117 @@
<template>
<section class="h-full | flex flex-col" style="--row-gap: var(--space-32)">
<header
class="project-details | flex items-baseline | bg-white | rounded-2xl | p-16 | w-full"
>
<div class="project-details__description | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Description du projet</h2>
<textarea
name="description"
id="description"
placeholder="Ajoutez une description générale de votre projet…"
rows="3"
class="border border-grey-200 | rounded-xl | p-16 | w-full"
></textarea>
</div>
<div class="project-details__filters | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Filtrer par tags</h2>
<div class="flex" style="gap: var(--space-8)">
<button class="btn btn--sm btn--grey" id="all">Voir tout</button>
<button class="btn btn--sm btn--primary">Bouchon</button>
<button class="btn btn--sm btn--primary">Bouton Poussoir</button>
<button class="btn btn--sm btn--primary">Coloris & Nuances</button>
<button class="btn btn--sm btn--primary">DA Globale</button>
<button class="btn btn--sm btn--primary">Forme & Design</button>
<button class="btn btn--sm btn--primary">Matériaux & Textures</button>
<button class="btn btn--sm btn--primary">Parachèvements</button>
</div>
</div>
</header>
<!-- <div class="h-full | masonry">
<button
data-icon="upload"
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
>
Ajouter une ou plusieurs images
</button>
</div> -->
<div class="h-full | masonry">
<button
class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl"
>
<FileUpload
name="demo[]"
url="/api/upload"
@upload="onAdvancedUpload($event)"
:multiple="true"
accept="image/*"
:maxFileSize="1000000"
>
<template #empty>
<span>Drag and drop files to here to upload.</span>
</template>
</FileUpload>
</button>
<Toast />
</div>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
</section>
</template>
<script setup>
import Toast from "primevue/toast";
import FileUpload from "primevue/fileupload";
import { useToast } from "primevue/usetoast";
const toast = useToast();
const onAdvancedUpload = () => {
toast.add({
severity: "info",
summary: "Success",
detail: "File Uploaded",
life: 3000,
});
};
</script>

View file

@ -0,0 +1,23 @@
<template>
<section class="h-full | grid-center">
<div
class="card | items-center | text-center | w-full max-w"
style="--row-gap: var(--space-32); --max-w: 27.5rem"
>
<h2 class="font-serif text-lg">Créez votre premier brief de projet !</h2>
<p class="text-grey-700">
Bienvenu à votre nouvel espace de projet. <br />Commencez par consulter
les inspirations <br />et partagez vos intentions !
</p>
<button
class="btn | w-full"
@click="emit('update:step', 'ModeSelection')"
>
Commencer
</button>
</div>
</section>
</template>
<script setup>
const emit = defineEmits(["update:step"]);
</script>

View file

@ -0,0 +1,99 @@
<template>
<section
class="h-full | flex flex-col justify-center items-center | mx-auto | max-w"
style="--max-w: 42rem; --row-gap: var(--space-32)"
>
<div class="flex">
<div
@click="emit('update:step', 'AddImages')"
class="card card--cta | flex-1 | h-full"
style="--padding: var(--space-32); --row-gap: var(--space-32)"
>
<svg
aria-hidden="true"
width="100"
height="100"
viewBox="0 0 100 100"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M92.8571 46.4292H64.2857C62.3133 46.4292 60.7143 48.0282 60.7143 50.0006V92.8577C60.7143 94.8302 62.3133 96.4292 64.2857 96.4292H92.8571C94.8296 96.4292 96.4286 94.8302 96.4286 92.8577V50.0006C96.4286 48.0282 94.8296 46.4292 92.8571 46.4292Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M92.8571 3.57202H64.2857C62.3133 3.57202 60.7143 5.171 60.7143 7.14345V21.5006C60.7143 23.473 62.3133 25.072 64.2857 25.072H92.8571C94.8296 25.072 96.4286 23.473 96.4286 21.5006V7.14345C96.4286 5.171 94.8296 3.57202 92.8571 3.57202Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M35.7143 3.57202H7.14284C5.17039 3.57202 3.57141 5.171 3.57141 7.14345V50.0006C3.57141 51.973 5.17039 53.572 7.14284 53.572H35.7143C37.6867 53.572 39.2857 51.973 39.2857 50.0006V7.14345C39.2857 5.171 37.6867 3.57202 35.7143 3.57202Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M35.7143 74.9291H7.14284C5.17039 74.9291 3.57141 76.5281 3.57141 78.5005V92.8577C3.57141 94.8301 5.17039 96.4291 7.14284 96.4291H35.7143C37.6867 96.4291 39.2857 94.8301 39.2857 92.8577V78.5005C39.2857 76.5281 37.6867 74.9291 35.7143 74.9291Z"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<h2 class="font-serif text-lg">Créer via la plateforme</h2>
<p class="text-sm text-grey-700">
Ajouter différents éléments tels que des images et du texte sur la
plateforme afin de créer votre brief.
</p>
</div>
<div
class="card card--cta | flex-1 | h-full"
style="--padding: var(--space-32); --row-gap: var(--space-32)"
>
<svg
aria-hidden="true"
width="100"
height="100"
viewBox="0 0 100 100"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.57153 75.0001V82.143C3.57153 85.9318 5.07663 89.5654 7.75572 92.2445C10.4348 94.9236 14.0684 96.4287 17.8572 96.4287H82.143C85.9318 96.4287 89.5654 94.9236 92.2445 92.2445C94.9236 89.5654 96.4287 85.9318 96.4287 82.143V75.0001M28.5715 28.5715L50.0001 3.57153M50.0001 3.57153L71.4287 28.5715M50.0001 3.57153V67.8573"
stroke="currentColor"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<h2 class="font-serif text-lg">Ajouter un pdf</h2>
<p class="text-sm text-grey-700">
Vous avez déjà constitué votre brief en amont et souhaitez directement
limporter.
</p>
</div>
</div>
<div
class="card | bg-grey-200 | items-center | text-center | w-full"
style="--padding: var(--space-32); --row-gap: var(--space-16)"
>
<h2 class="font-serif text-lg">Quest ce que le brief ?</h2>
<p class="text-sm text-grey-700">
Le brief est un outil créatif qui permet de définir les perspectives
esthétiques de votre projet. Il sagit dune planche dinspiration qui
aide à affirmer lambiance et les influences que vous souhaitez apporter
à votre projet.
</p>
</div>
</section>
</template>
<script setup>
const emit = defineEmits("update:step");
</script>

View file

@ -3,6 +3,7 @@ import "./assets/css/index.css";
import App from "./App.vue";
import { createPinia } from "pinia";
import PrimeVue from "primevue/config";
import ToastService from "primevue/toastservice";
import Select from "primevue/select";
import { router } from "./router/router.js";
@ -13,6 +14,7 @@ app.use(pinia);
app.use(PrimeVue, {
unstyled: true,
});
app.use(ToastService);
app.use(router);
app.component("Select", Select);
app.mount("#app");

View file

@ -5,118 +5,13 @@
<button class="btn | ml-auto">Demander un RDV</button>
</header>
<!-- 1. Créez votre premier brief de projet ! -->
<!--
<section class="h-full | grid-center">
<div class="card | items-center | text-center | w-full max-w" style="--row-gap:var(--space-32); --max-w:27.5rem">
<h2 class="font-serif text-lg">Créez votre premier brief de projet !</h2>
<p class="text-grey-700">Bienvenu à votre nouvel espace de projet. <br>Commencez par consulter les inspirations <br>et partagez vos intentions !</p>
<button class="btn | w-full">Commencer</button>
</div>
</section>
-->
<!-- 2. Créez via la plateforme / Ajouter un PDF -->
<!--
<section class="h-full | flex flex-col justify-center items-center | mx-auto | max-w" style="--max-w:42rem; --row-gap: var(--space-32)">
<div class="flex">
<div class="card card--cta | flex-1 | h-full" style="--padding:var(--space-32);--row-gap:var(--space-32)">
<svg aria-hidden="true" width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M92.8571 46.4292H64.2857C62.3133 46.4292 60.7143 48.0282 60.7143 50.0006V92.8577C60.7143 94.8302 62.3133 96.4292 64.2857 96.4292H92.8571C94.8296 96.4292 96.4286 94.8302 96.4286 92.8577V50.0006C96.4286 48.0282 94.8296 46.4292 92.8571 46.4292Z" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M92.8571 3.57202H64.2857C62.3133 3.57202 60.7143 5.171 60.7143 7.14345V21.5006C60.7143 23.473 62.3133 25.072 64.2857 25.072H92.8571C94.8296 25.072 96.4286 23.473 96.4286 21.5006V7.14345C96.4286 5.171 94.8296 3.57202 92.8571 3.57202Z" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M35.7143 3.57202H7.14284C5.17039 3.57202 3.57141 5.171 3.57141 7.14345V50.0006C3.57141 51.973 5.17039 53.572 7.14284 53.572H35.7143C37.6867 53.572 39.2857 51.973 39.2857 50.0006V7.14345C39.2857 5.171 37.6867 3.57202 35.7143 3.57202Z" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M35.7143 74.9291H7.14284C5.17039 74.9291 3.57141 76.5281 3.57141 78.5005V92.8577C3.57141 94.8301 5.17039 96.4291 7.14284 96.4291H35.7143C37.6867 96.4291 39.2857 94.8301 39.2857 92.8577V78.5005C39.2857 76.5281 37.6867 74.9291 35.7143 74.9291Z" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<h2 class="font-serif text-lg">Créer via la plateforme</h2>
<p class="text-sm text-grey-700">Ajouter différents éléments tels que des images et du texte sur la plateforme afin de créer votre brief.</p>
</div>
<div class="card card--cta | flex-1 | h-full" style="--padding:var(--space-32);--row-gap:var(--space-32)">
<svg aria-hidden="true" width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.57153 75.0001V82.143C3.57153 85.9318 5.07663 89.5654 7.75572 92.2445C10.4348 94.9236 14.0684 96.4287 17.8572 96.4287H82.143C85.9318 96.4287 89.5654 94.9236 92.2445 92.2445C94.9236 89.5654 96.4287 85.9318 96.4287 82.143V75.0001M28.5715 28.5715L50.0001 3.57153M50.0001 3.57153L71.4287 28.5715M50.0001 3.57153V67.8573" stroke="currentColor" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<h2 class="font-serif text-lg">Ajouter un pdf</h2>
<p class="text-sm text-grey-700">Vous avez déjà constitué votre brief en amont et souhaitez directement limporter.</p>
</div>
</div>
<div class="card | bg-grey-200 | items-center | text-center | w-full" style="--padding:var(--space-32);--row-gap:var(--space-16)">
<h2 class="font-serif text-lg">Quest ce que le brief ?</h2>
<p class="text-sm text-grey-700">Le brief est un outil créatif qui permet de définir les perspectives esthétiques de votre projet. Il sagit dune planche dinspiration qui aide à affirmer lambiance et les influences que vous souhaitez apporter à votre projet.</p>
</div>
</section>
-->
<!-- 3. Ajouter une ou plusieurs images -->
<section class="h-full | flex flex-col" style="--row-gap: var(--space-32)">
<header class="project-details | flex items-baseline | bg-white | rounded-2xl | p-16 | w-full">
<div class="project-details__description | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Description du projet</h2>
<textarea name="description" id="description" placeholder="Ajoutez une description générale de votre projet…" rows="3" class="border border-grey-200 | rounded-xl | p-16 | w-full"></textarea>
</div>
<div class="project-details__filters | flex-1">
<h2 class="text-sm text-grey-700 | mb-8">Filtrer par tags</h2>
<div class="flex" style="gap:var(--space-8)">
<button class="btn btn--sm btn--grey" id="all">Voir tout</button>
<button class="btn btn--sm btn--primary">Bouchon</button>
<button class="btn btn--sm btn--primary">Bouton Poussoir</button>
<button class="btn btn--sm btn--primary">Coloris & Nuances</button>
<button class="btn btn--sm btn--primary">DA Globale</button>
<button class="btn btn--sm btn--primary">Forme & Design</button>
<button class="btn btn--sm btn--primary">Matériaux & Textures</button>
<button class="btn btn--sm btn--primary">Parachèvements</button>
</div>
</div>
</header>
<div class="h-full | masonry">
<button data-icon="upload" class="flex flex-col | bg-white | border border-grey-200 | text-grey-800 | font-medium | rounded-2xl">Ajouter une ou plusieurs images</button>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/6ed93d6950-1725442486/d82f18573c439d6edd434ffca62471a7.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/7b0fcc5012-1725442486/37a038883c87973036232aa0e43f6da2.png"
alt=""
/>
</figure>
<figure class="image">
<span class="tag | btn btn--sm">Tag</span>
<img
src="http://localhost:8888/media/pages/inspirations/shape-of-the-nature/1bbe051c5a-1725442486/0c41d3266e9ce2872f30608cceb28239.png"
alt=""
/>
</figure>
</div>
</section>
<!-- <component :is="stepsComponents[currentStep]" @update:step="changeStep" /> -->
<!-- <VirtualSample /> -->
<!-- Kanban: Status Brief Enrichi -->
<!--
<div class="kanban">
<section
<section
class="flex-1"
aria-labelledby="votre-brief-label"
data-status="done"
@ -130,7 +25,9 @@
<h3 class="card__title | font-serif | text-lg">Votre Brief</h3>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12">12 juin 2024</time>
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
</div>
<figure class="card__images" data-count="13">
<img
@ -149,7 +46,7 @@
</article>
</div>
</section>
<section
<section
class="flex-1"
aria-labelledby="offre-commerciale-label"
data-status="done"
@ -164,7 +61,9 @@
<p class="text-primary | font-medium">4 commentaires</p>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12">12 juin 2024</time>
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
<span class="text-primary | font-medium | ml-auto">Validé</span>
</div>
<figure class="card__images">
@ -180,7 +79,9 @@
<p class="text-primary | font-medium">4 commentaires</p>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12">12 juin 2024</time>
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
</div>
</article>
<article class="card">
@ -189,16 +90,18 @@
<p class="text-primary | font-medium">4 commentaires</p>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12">12 juin 2024</time>
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
</div>
</article>
</div>
</section>
<section
<section
class="flex-1"
aria-labelledby="brief-enrichi-label"
data-status="in-progress"
>
>
<h2 id="brief-enrichi-label">
<span data-icon="brief-enrichi">Brief Enrichi</span>
</h2>
@ -209,7 +112,9 @@
<p class="text-primary | font-medium">4 commentaires</p>
</hgroup>
<div class="card__meta | flex">
<time class="card__date | text-grey-700" datetime="2024-06-12">12 juin 2024</time>
<time class="card__date | text-grey-700" datetime="2024-06-12"
>12 juin 2024</time
>
<span class="text-primary | font-medium | ml-auto">Validé</span>
</div>
<figure class="card__images" data-count="15">
@ -238,13 +143,14 @@
<span data-icon="echantillon-virtuel">Échantillon Virtuel</span>
</h2>
<div class="cards | flow">
<div class="flex flex-col justify-center | rounded-2xl | bg-grey-200 text-grey-700">
<div
class="flex flex-col justify-center | rounded-2xl | bg-grey-200 text-grey-700"
>
<p>Prochainement disponible</p>
</div>
</div>
</section>
</div>
-->
</main>
</template>
@ -253,13 +159,29 @@ import { usePageStore } from "../stores/page";
import { useUserStore } from "../stores/user";
import { ref, computed } from "vue";
import { storeToRefs } from "pinia";
import Intro from "../components/brief/Intro.vue";
import ModeSelection from "../components/brief/ModeSelection.vue";
import AddImages from "../components/brief/AddImages.vue";
import VirtualSampleVue from "../components/VirtualSample.vue";
import VirtualSample from "../components/VirtualSample.vue";
const { page } = storeToRefs(usePageStore());
const user = useUserStore().user;
const stepsComponents = {
Intro,
ModeSelection,
AddImages,
};
const currentStep = ref("Intro");
function changeStep(stepName) {
currentStep.value = stepName;
}
</script>
<style scope>
/* Porject details */
.project-details textarea {
resize: none;
@ -269,12 +191,12 @@ const user = useUserStore().user;
margin-right: calc(var(--space-12) + 1px);
}
.project-details__filters button:first-of-type::after {
content: '';
content: "";
width: 1px;
height: 1.7rem;
background-color: var(--color-black-20);
position: absolute;
right: calc(-.75rem);
right: calc(-0.75rem);
}
button[data-icon="upload"] {
@ -317,7 +239,7 @@ button[data-icon="upload"] {
left: var(--space-12);
}
.image::after {
content: '';
content: "";
display: inline-block;
width: 1rem;
height: 1rem;
@ -355,7 +277,7 @@ button[data-icon="upload"] {
background-color: var(--header-bg-color);
border-radius: var(--rounded-md);
font-size: var(--text-sm);
height: var(--header-height);
height: var(--header-height);
}
.kanban > section h2 > span {
display: flex;
@ -438,7 +360,7 @@ button[data-icon="upload"] {
background-repeat: repeat-x;
background-position: left center;
background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50%' cy='50%' r='2' opacity='0.15' fill='black'/%3E%3C/svg%3E%0A");
background-size: .5rem;
background-size: 0.5rem;
right: calc(-1 * var(--gap));
left: calc(-1 * var(--gap));
width: auto;