Refactor : renommage ClientBrief en Brief (plus générique)

- Brief.vue masque les boutons d'ajout pour extended-brief
- Éditable uniquement en back-office pour cette étape
- ClientBrief → Brief dans ProjectStep.vue

Ref #3

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-02-02 17:04:09 +01:00
parent 0fb933326f
commit 3af95b1d20
2 changed files with 5 additions and 5 deletions

View file

@ -1,54 +0,0 @@
<template>
<Images
v-if="images.length > 0"
:step="step"
:images="images"
:uri="'/' + step.uri"
/>
<Document v-if="pdf" :step="step" :pdf="pdf" />
<button
v-if="images.length === 0"
class="btn | w-full"
@click="goToImagesBrief()"
>
Ajouter un brief via la plateforme
</button>
<div class="btn | w-full" v-if="!pdf">
<label for="upload-pdf">
Ajouter un brief PDF
<input
id="upload-pdf"
type="file"
@change="addPdf($event, step.uri)"
accept="application/pdf"
ref="pdfInput"
hidden
/>
</label>
</div>
</template>
<script setup>
import { computed } from "vue";
import Images from "./Images.vue";
import Document from "./Document.vue";
import { useBriefStore } from "../../../stores/brief";
import { useRouter } from "vue-router";
const { step } = defineProps({ step: Object });
const { addPdf } = useBriefStore();
const router = useRouter();
const images = computed(() => {
return step.files.filter((file) => file.type === "image");
});
const pdf = computed(() => {
return step.files.find((file) => file.type === "document");
});
function goToImagesBrief() {
router.push(location.pathname + "/" + step.slug);
}
</script>