Merge branch 'front_foundation' of https://gitea.piair.dev/piair/MyINPulse into front_foundation

This commit is contained in:
Mohamed Maoulainine Maoulainine 2025-03-26 11:24:28 +01:00
commit 550a51523f

View File

@ -2,7 +2,7 @@
<div :class="['cell', { expanded }]" @click="handleClick"> <div :class="['cell', { expanded }]" @click="handleClick">
<h3>{{ title_text }}</h3> <h3>{{ title_text }}</h3>
<div v-for="(desc, index) in currentDescriptions" :key="index"> <div class="section-bloc" v-for="(desc, index) in currentDescriptions" :key="index">
<!-- Mode affichage --> <!-- Mode affichage -->
<template v-if="!isEditing[index]"> <template v-if="!isEditing[index]">
<div class="description"> <div class="description">
@ -21,7 +21,7 @@
<button @click.stop="cancelEdit(index)" class="cancel-button">Annuler</button> <button @click.stop="cancelEdit(index)" class="cancel-button">Annuler</button>
</div> </div>
</template> </template>
</div> </div>
</div> </div>
</template> </template>
@ -87,7 +87,7 @@ const fetchData = async (projectId: number, title: number, date: string, useMock
if (responseData.length > 0) { if (responseData.length > 0) {
currentDescriptions.value = responseData.map((item) => item.txt); currentDescriptions.value = responseData.map((item) => item.txt);
editedDescriptions.value = [...currentDescriptions.value]; // Copie initiale editedDescriptions.value = [...currentDescriptions.value];
isEditing.value = Array(responseData.length).fill(false); isEditing.value = Array(responseData.length).fill(false);
} else { } else {
console.warn("Aucune donnée reçue."); console.warn("Aucune donnée reçue.");
@ -211,8 +211,8 @@ const cancelEdit = (index: number) => {
color: #666; color: #666;
} }
.cell .description { .cell {
width: 800px; width: 100%;
height: 100px; height: 100px;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
@ -236,32 +236,71 @@ const cancelEdit = (index: number) => {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
} }
.description {
width: 100%;
height: 100%;
font-size: 16px;
margin-top: 10px;
/*box-sizing: border-box;*/
align-items: center;
justify-content: center;
text-align: center;
margin-left: 2%;
}
.description + .p {
align-items: center;
justify-content: center;
text-align: center;
}
.edit-input { .edit-input {
width: 800px; width: 100%;
height: 100px; height: 100%;
font-size: 16px; font-size: 16px;
padding: 10px; padding: 10px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 5px; border-radius: 5px;
margin-top: 10px; margin-top: 10px;
box-sizing: border-box; box-sizing: border-box;
margin-left: 2%;
} }
.button-container { .button-container {
display: flex; display: block;
gap: 10px; margin-top: 20px;
margin-top: 10px; justify-content: center;
align-items: center;
} }
.edit-button, .save-button, .cancel-button { .section-bloc ,.editing-section-bloc {
padding: 10px 15px; width: 100%;
justify-content: center;
align-items: center;
display: flex;
margin-right: 10%;
margin: 10px;
}
.edit-button {
width: 100px;
height: 40px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background 0.3s ease;
font-size: 12px;
margin-right: 20px;
}
.save-button, .cancel-button {
width: 100px;
height: 40px;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
transition: background 0.3s ease; transition: background 0.3s ease;
font-size: 12px; font-size: 12px;
margin-right: 5px;
} }
.edit-button { .edit-button {