-
- {etape.title}
-
- {etape.description && (
-
- {etape.description}
-
+
+
+
+
+
+ {index + 1}
+
+
+
+
+ {isEditing ? (
+
setEditingEtapeTitle(event.target.value)}
+ onClick={(event) => event.stopPropagation()}
+ onKeyDown={(event) => {
+ if (event.key === "Enter") {
+ event.preventDefault();
+ void handleUpdateEtape(etape.id);
+ }
+
+ if (event.key === "Escape") {
+ event.preventDefault();
+ cancelEditingEtape();
+ }
+ }}
+ placeholder="Nom de l'étape"
+ aria-label="Nom de l'étape"
+ autoFocus
+ className="h-9"
+ />
+ ) : (
+ <>
+
+ {etape.title}
+
+ {etape.description && (
+
+ {etape.description}
+
+ )}
+ >
+ )}
+
+
{etape.due_date && (
@@ -237,8 +319,59 @@ export function EtapesSection({
)}
+
+ {isAdmin && (
+
+ {isEditing ? (
+ <>
+
+
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
+
+ )}
-