- 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user