Progression vue brief client
- l'étape courante est déterminée en fonction des données de la page - les images sont ajoutées au champ - les images déjà ajoutées sont affichées directement - changement donnée briefClient -> clientBrief (cohérence avec le nommage front)
This commit is contained in:
parent
3d93905983
commit
13b6b371d7
18 changed files with 245 additions and 66 deletions
|
|
@ -9,17 +9,29 @@ import { ref } from "vue";
|
|||
import Header from "../components/project/Header.vue";
|
||||
import Intro from "../components/project/ClientBrief/Intro.vue";
|
||||
import ModeSelection from "../components/project/ClientBrief/ModeSelection.vue";
|
||||
import AddImages from "../components/project/ClientBrief/AddImages.vue";
|
||||
import Images from "../components/project/ClientBrief/Images.vue";
|
||||
import { usePageStore } from "../stores/page";
|
||||
|
||||
const stepsComponents = {
|
||||
Intro,
|
||||
ModeSelection,
|
||||
AddImages,
|
||||
Images,
|
||||
};
|
||||
|
||||
const currentStep = ref("AddImages");
|
||||
const { page } = usePageStore();
|
||||
|
||||
const currentStep = ref(setInitialStep());
|
||||
|
||||
function changeStep(stepName) {
|
||||
currentStep.value = stepName;
|
||||
}
|
||||
|
||||
function setInitialStep() {
|
||||
const hasPDF = page.content.clientbriefpdf.length !== 0;
|
||||
const hasImages = page.content.clientbriefimages.length !== 0;
|
||||
const isEmpty = !hasPDF && !hasImages;
|
||||
if (isEmpty) return "Intro";
|
||||
if (hasPDF) return "PDF";
|
||||
if (hasImages) return "Images";
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
<!-- Kanban: Status Brief Enrichi -->
|
||||
|
||||
<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">
|
||||
</ProjectStep>
|
||||
<!-- <section
|
||||
class="flex-1"
|
||||
aria-labelledby="votre-brief-label"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue