Restore component catalog with requirement-based instantiation

This commit is contained in:
MatthieuTD
2025-10-06 16:55:45 +02:00
parent c5f2c568b6
commit 384c3f0680
5 changed files with 626 additions and 90 deletions

View File

@@ -62,7 +62,11 @@ export function useComposants () {
const result = await post('/composants', composantData)
if (result.success) {
composants.value.push(result.data)
showSuccess(`Composant "${composantData.name}" créé avec succès`)
const displayName = result.data?.name
|| composantData?.definition?.name
|| composantData?.name
|| 'Composant'
showSuccess(`Composant "${displayName}" créé avec succès`)
}
return result
} catch (error) {