dynamize project
This commit is contained in:
parent
4d1811830c
commit
801db754d2
3 changed files with 23 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ $children = $page->children()->map(function ($child) {
|
||||||
'uri' => $child->uri(),
|
'uri' => $child->uri(),
|
||||||
'uri' => '/' . $child->uri(),
|
'uri' => '/' . $child->uri(),
|
||||||
'modified' => $child->modified('Y-MM-d'),
|
'modified' => $child->modified('Y-MM-d'),
|
||||||
|
'currentStep' => $child->currentStep()->value(),
|
||||||
'status' => $child->status(),
|
'status' => $child->status(),
|
||||||
'logo' => $child->client()->toPage()->logo()->toFile()->url(),
|
'logo' => $child->client()->toPage()->logo()->toFile()->url(),
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
||||||
<ol class="project-steps" data-steps="1">
|
<ol class="project-steps" data-steps="1">
|
||||||
<li class="project-step" data-status="in-progress">
|
<li class="project-step" data-status="in-progress">
|
||||||
<span class="pill" data-icon="search">Votre Brief</span>
|
<span class="pill" data-icon="search">{{
|
||||||
|
stepsLabels[project.currentStep]
|
||||||
|
}}</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</article>
|
</article>
|
||||||
|
|
@ -23,13 +25,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import "dayjs/locale/fr";
|
import "dayjs/locale/fr";
|
||||||
const { project } = defineProps({ project: Array });
|
import { useProjectStore } from "../../stores/project";
|
||||||
|
|
||||||
dayjs.locale("fr");
|
dayjs.locale("fr");
|
||||||
|
|
||||||
|
const { project } = defineProps({ project: Array });
|
||||||
|
|
||||||
const frenchFormattedModified = dayjs(project.modified).format(
|
const frenchFormattedModified = dayjs(project.modified).format(
|
||||||
"dddd D MMMM YYYY"
|
"dddd D MMMM YYYY"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const { stepsLabels } = useProjectStore();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
14
src/stores/project.js
Normal file
14
src/stores/project.js
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { defineStore } from "pinia";
|
||||||
|
|
||||||
|
export const useProjectStore = defineStore("project", () => {
|
||||||
|
const stepsLabels = {
|
||||||
|
clientBrief: "Votre brief",
|
||||||
|
proposal: "Proposition commerciale",
|
||||||
|
extendedBrief: "Brief enrichi",
|
||||||
|
industrialIdeation: "Idéation industrielle",
|
||||||
|
virtualSample: "Échantillon virtuel",
|
||||||
|
physicalSample: "Échantillon physique",
|
||||||
|
};
|
||||||
|
|
||||||
|
return { stepsLabels };
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue