project blueprint - optional steps working
This commit is contained in:
parent
595c275100
commit
8da0fb0e36
30 changed files with 296 additions and 127 deletions
|
|
@ -5,13 +5,13 @@
|
|||
<button class="btn | ml-auto">Demander un RDV</button>
|
||||
</header>
|
||||
|
||||
<component :is="stepsComponents[currentStep]" @update:step="changeStep" />
|
||||
<!-- <VirtualSample /> -->
|
||||
<!-- <component :is="stepsComponents[currentStep]" @update:step="changeStep" /> -->
|
||||
|
||||
<!-- Kanban: Status Brief Enrichi -->
|
||||
|
||||
<!-- <div class="kanban">
|
||||
<section
|
||||
<div class="kanban">
|
||||
<ProjectStep v-for="step in steps" :key="step" :step="step" />
|
||||
<!-- <section
|
||||
class="flex-1"
|
||||
aria-labelledby="votre-brief-label"
|
||||
data-status="done"
|
||||
|
|
@ -149,8 +149,8 @@
|
|||
<p>Prochainement disponible</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div> -->
|
||||
</section> -->
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
|
|
@ -159,25 +159,35 @@ 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";
|
||||
import ProjectStep from "../components/project/ProjectStep.vue";
|
||||
import Intro from "../components/project/brief/Intro.vue";
|
||||
import ModeSelection from "../components/project/brief/ModeSelection.vue";
|
||||
import AddImages from "../components/project/brief/AddImages.vue";
|
||||
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
const user = useUserStore().user;
|
||||
|
||||
const stepsComponents = {
|
||||
Intro,
|
||||
ModeSelection,
|
||||
AddImages,
|
||||
};
|
||||
const currentStep = page.value.currentStep;
|
||||
const steps = page.value.steps.map((step) => step.value);
|
||||
|
||||
const currentStep = ref("Intro");
|
||||
// const stepsComponents = {
|
||||
// Intro,
|
||||
// ModeSelection,
|
||||
// AddImages,
|
||||
// };
|
||||
|
||||
function changeStep(stepName) {
|
||||
currentStep.value = stepName;
|
||||
// const currentStep = ref("Intro");
|
||||
|
||||
// function changeStep(stepName) {
|
||||
// currentStep.value = stepName;
|
||||
// }
|
||||
|
||||
function setStepStatus(stepName) {
|
||||
const stepIndex = steps.indexOf(stepName);
|
||||
const currentIndex = steps.indexOf(currentStep.value);
|
||||
if (stepIndex < currentIndex) {
|
||||
return "done";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue