diff --git a/dev.db b/dev.db index 580e910..44e532a 100644 Binary files a/dev.db and b/dev.db differ diff --git a/src/actions/swot.ts b/src/actions/swot.ts index a075cbf..997348d 100644 --- a/src/actions/swot.ts +++ b/src/actions/swot.ts @@ -64,6 +64,22 @@ export async function deleteSwotItem(itemId: string, sessionId: string) { } } +export async function duplicateSwotItem(itemId: string, sessionId: string) { + const session = await auth(); + if (!session?.user?.id) { + return { success: false, error: 'Non autorisé' }; + } + + try { + const item = await sessionsService.duplicateSwotItem(itemId); + revalidatePath(`/sessions/${sessionId}`); + return { success: true, data: item }; + } catch (error) { + console.error('Error duplicating SWOT item:', error); + return { success: false, error: 'Erreur lors de la duplication' }; + } +} + export async function moveSwotItem( itemId: string, sessionId: string, diff --git a/src/components/swot/ActionPanel.tsx b/src/components/swot/ActionPanel.tsx index 95d7e55..417abc9 100644 --- a/src/components/swot/ActionPanel.tsx +++ b/src/components/swot/ActionPanel.tsx @@ -172,64 +172,24 @@ export function ActionPanel({ Créez des actions en sélectionnant plusieurs items SWOT.
) : ( -{action.description}
- )} -{action.description}
+ )} + + {/* Linked Items */} +