This commit is contained in:
isUnknown 2024-10-16 15:32:24 +02:00
parent 9d6ee634fb
commit 698fc0965e
9 changed files with 43 additions and 30 deletions

View file

@ -2,7 +2,7 @@
<section
class="flex-1"
aria-labelledby="votre-brief-label"
data-status="done"
:data-status="status"
>
<h2 id="votre-brief-label">
<span data-icon="votre-brief">{{ step.text }}</span>
@ -41,10 +41,36 @@
<script setup>
import dayjs from "dayjs";
import "dayjs/locale/fr";
dayjs.locale("fr");
import { usePageStore } from "../../stores/page";
const { step } = defineProps({
step: Object,
});
dayjs.locale("fr");
const { page } = usePageStore();
const steps = [
"clientBrief",
"proposal",
"extended-brief",
"industrialIdeation",
"virtualSample",
"physicalSample",
];
const status = setStatus();
function setStatus() {
if (page.content.currentstep === step.value) {
return "in-progress";
}
if (steps.indexOf(step.value) < steps.indexOf(page.content.currentstep)) {
return "completed";
}
if (steps.indexOf(step.value) > steps.indexOf(page.content.currentstep)) {
return "uncompleted";
}
}
</script>