2024-09-04 11:28:12 +02:00
|
|
|
<template>
|
2025-01-09 14:13:21 +01:00
|
|
|
<article class="project-item | flex | rounded-2xl | px-32 py-32">
|
|
|
|
|
<hgroup>
|
|
|
|
|
<h3>
|
|
|
|
|
<router-link
|
|
|
|
|
:to="isEmptyBrief(project) ? project.uri + '/client-brief' : project.uri"
|
|
|
|
|
class="link-full"
|
2024-11-21 11:27:14 +01:00
|
|
|
>
|
2025-01-09 14:13:21 +01:00
|
|
|
{{ project.title }}
|
|
|
|
|
</router-link>
|
|
|
|
|
</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" />
|
|
|
|
|
<ol
|
|
|
|
|
class="project-steps"
|
|
|
|
|
:data-steps="project.steps.length"
|
|
|
|
|
:style="'--steps:' + project.steps.length"
|
|
|
|
|
>
|
|
|
|
|
<li
|
|
|
|
|
v-for="step in project.steps"
|
|
|
|
|
class="project-step"
|
|
|
|
|
:data-status="setStatus(project.steps, project.currentStep, step)"
|
|
|
|
|
>
|
|
|
|
|
<span class="pill" :data-icon="step.id">
|
|
|
|
|
<span>{{ step.label }}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ol>
|
|
|
|
|
</article>
|
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-12-19 19:27:38 +01:00
|
|
|
const { stepsLabels, setStatus, isEmptyBrief } = useProjectStore();
|
2024-09-04 11:28:12 +02:00
|
|
|
</script>
|