- améliore l'export/import (format de fichiers en paramètres, amélioration de la robustesse, )

- ajout bouton tout effacer des propositions et participants
This commit is contained in:
Yannick Le Duc
2025-09-16 15:45:28 +02:00
parent 6aead108d7
commit 2a2738f5c0
16 changed files with 1455 additions and 81 deletions

View File

@@ -121,7 +121,7 @@ export default function ImportFileModal({
Téléchargez le modèle
</span>
</div>
<Button variant="outline" size="sm" onClick={() => downloadTemplate(type)}>
<Button variant="outline" size="sm" onClick={async () => await downloadTemplate(type)}>
<Download className="w-4 h-4 mr-1" />
Modèle
</Button>
@@ -158,7 +158,7 @@ export default function ImportFileModal({
<table className="w-full text-sm table-fixed">
<thead className="bg-slate-50 dark:bg-slate-800">
<tr>
{Object.keys(preview[0] || {}).map((header) => (
{getExpectedColumns(type).map((header) => (
<th key={header} className="px-2 py-1 text-left font-medium truncate">
{header}
</th>
@@ -168,9 +168,9 @@ export default function ImportFileModal({
<tbody>
{preview.map((row, index) => (
<tr key={index} className="border-t">
{Object.values(row).map((value, cellIndex) => (
<td key={cellIndex} className="px-2 py-1 text-xs truncate">
{String(value)}
{getExpectedColumns(type).map((header) => (
<td key={header} className="px-2 py-1 text-xs truncate">
{String(row[header] || '')}
</td>
))}
</tr>