Init download file (not working yet)
This commit is contained in:
@@ -35,6 +35,7 @@ export default function ConsultMobility() {
|
|||||||
destinationCountry: existingMobility?.destinationCountry || null,
|
destinationCountry: existingMobility?.destinationCountry || null,
|
||||||
destinationName: existingMobility?.destinationName || null,
|
destinationName: existingMobility?.destinationName || null,
|
||||||
mobilityStatus: existingMobility?.mobilityStatus || "N/A",
|
mobilityStatus: existingMobility?.mobilityStatus || "N/A",
|
||||||
|
attestationFile: existingMobility?.attestationFile || null, // Ajouter le fichier
|
||||||
promotionId: student.promotionId,
|
promotionId: student.promotionId,
|
||||||
promotionName: student.promotionName,
|
promotionName: student.promotionName,
|
||||||
};
|
};
|
||||||
@@ -97,6 +98,7 @@ export default function ConsultMobility() {
|
|||||||
<th>Destination Country</th>
|
<th>Destination Country</th>
|
||||||
<th>Destination Name</th>
|
<th>Destination Name</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
<th>Attestation File</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -113,6 +115,19 @@ export default function ConsultMobility() {
|
|||||||
<td>{entry.destinationCountry || "N/A"}</td>
|
<td>{entry.destinationCountry || "N/A"}</td>
|
||||||
<td>{entry.destinationName || "N/A"}</td>
|
<td>{entry.destinationName || "N/A"}</td>
|
||||||
<td>{entry.mobilityStatus}</td>
|
<td>{entry.mobilityStatus}</td>
|
||||||
|
<td>
|
||||||
|
{entry.attestationFile ? (
|
||||||
|
<a
|
||||||
|
href={`/api/download/${entry.id}`}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Download
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
"N/A"
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ export const handler: Handlers = {
|
|||||||
mobility.weeksCount,
|
mobility.weeksCount,
|
||||||
mobility.destinationCountry,
|
mobility.destinationCountry,
|
||||||
mobility.destinationName,
|
mobility.destinationName,
|
||||||
mobility.mobilityStatus
|
mobility.mobilityStatus,
|
||||||
|
mobility.attestationFile -- Inclure le fichier
|
||||||
FROM mobility`
|
FROM mobility`
|
||||||
).all();
|
).all();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user