2024-09-04 11:28:12 +02:00
|
|
|
<template>
|
2024-11-05 14:14:40 +01:00
|
|
|
<router-link :to="project.uri">
|
|
|
|
|
<article class="project-item | flex | rounded-2xl | px-32 py-32">
|
|
|
|
|
<hgroup>
|
|
|
|
|
<h3>{{ project.title }}</h3>
|
|
|
|
|
<p>
|
|
|
|
|
Dernière mise à jour le
|
|
|
|
|
<time :datetime="project.modified">{{
|
|
|
|
|
frenchFormattedModified
|
|
|
|
|
}}</time>
|
|
|
|
|
</p>
|
|
|
|
|
</hgroup>
|
|
|
|
|
<img :src="project.logo" alt="Logo" class="project-logo | rounded-sm" />
|
2024-11-21 17:53:00 +01:00
|
|
|
<ol class="project-steps" :data-steps="project.steps.length" :style="'--steps:'+project.steps.length">
|
2024-11-21 11:27:14 +01:00
|
|
|
<li
|
|
|
|
|
v-for="step in project.steps"
|
|
|
|
|
class="project-step"
|
2024-11-21 11:47:36 +01:00
|
|
|
:data-status="setStatus(project.steps, project.currentStep, step)"
|
2024-11-21 11:27:14 +01:00
|
|
|
>
|
2024-11-21 17:53:00 +01:00
|
|
|
<span class="pill" :data-icon="step.id">
|
|
|
|
|
<span>{{ step.label }}</span>
|
|
|
|
|
</span>
|
2024-11-05 14:14:40 +01:00
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</article>
|
|
|
|
|
</router-link>
|
2024-09-04 11:28:12 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
import "dayjs/locale/fr";
|
2024-11-05 14:26:23 +01:00
|
|
|
import { useProjectStore } from "../../stores/project";
|
2024-09-04 11:28:12 +02:00
|
|
|
|
|
|
|
|
dayjs.locale("fr");
|
|
|
|
|
|
2024-11-05 14:26:23 +01:00
|
|
|
const { project } = defineProps({ project: Array });
|
|
|
|
|
|
2024-09-04 11:28:12 +02:00
|
|
|
const frenchFormattedModified = dayjs(project.modified).format(
|
|
|
|
|
"dddd D MMMM YYYY"
|
|
|
|
|
);
|
2024-11-05 14:26:23 +01:00
|
|
|
|
2024-11-21 11:27:14 +01:00
|
|
|
const { stepsLabels, setStatus } = useProjectStore();
|
2024-09-04 11:28:12 +02:00
|
|
|
</script>
|