merge
This commit is contained in:
parent
9d6ee634fb
commit
698fc0965e
9 changed files with 43 additions and 30 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ async function addPdf(event) {
|
|||
if (response.ok) {
|
||||
console.log("File uploaded successfully.");
|
||||
page.value = result;
|
||||
emit("update:step", "PdfViewer");
|
||||
location.href = location.origin + "/" + page.value.parent;
|
||||
} else {
|
||||
console.error("Error uploading file:", result.error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue