style: format import success message and drop zone JSX
Apply consistent string concatenation in ImportNotes and UploadStudents. Format JSX drop zone for better readability.
This commit is contained in:
@@ -73,10 +73,9 @@ export default function ImportNotes() {
|
||||
}
|
||||
}
|
||||
|
||||
success.value =
|
||||
`Import terminé — ${imported} ajouté${imported !== 1 ? "s" : ""}${
|
||||
failed > 0 ? `, ${failed} erreur${failed !== 1 ? "s" : ""}` : ""
|
||||
}`;
|
||||
success.value = `Import terminé — ${imported} ajouté${
|
||||
imported !== 1 ? "s" : ""
|
||||
}${failed > 0 ? `, ${failed} erreur${failed !== 1 ? "s" : ""}` : ""}`;
|
||||
} catch {
|
||||
error.value = "Erreur lors de la lecture du fichier.";
|
||||
} finally {
|
||||
@@ -109,9 +108,7 @@ export default function ImportNotes() {
|
||||
onClick={() => inputRef.current?.click()}
|
||||
>
|
||||
<span class="drop-zone-icon">⬇</span>
|
||||
{file.value
|
||||
? <span class="drop-zone-file">{file.value.name}</span>
|
||||
: (
|
||||
{file.value ? <span class="drop-zone-file">{file.value.name}</span> : (
|
||||
<>
|
||||
<span class="drop-zone-text">Glisser le fichier .xlsx ici</span>
|
||||
<span class="drop-zone-hint">ou cliquer pour parcourir</span>
|
||||
|
||||
@@ -73,10 +73,9 @@ export default function UploadStudents() {
|
||||
}
|
||||
}
|
||||
|
||||
success.value =
|
||||
`Import terminé — ${imported} ajouté${imported !== 1 ? "s" : ""}${
|
||||
failed > 0 ? `, ${failed} erreur${failed !== 1 ? "s" : ""}` : ""
|
||||
}`;
|
||||
success.value = `Import terminé — ${imported} ajouté${
|
||||
imported !== 1 ? "s" : ""
|
||||
}${failed > 0 ? `, ${failed} erreur${failed !== 1 ? "s" : ""}` : ""}`;
|
||||
} catch {
|
||||
error.value = "Erreur lors de la lecture du fichier.";
|
||||
} finally {
|
||||
@@ -109,9 +108,7 @@ export default function UploadStudents() {
|
||||
onClick={() => inputRef.current?.click()}
|
||||
>
|
||||
<span class="drop-zone-icon">⬇</span>
|
||||
{file.value
|
||||
? <span class="drop-zone-file">{file.value.name}</span>
|
||||
: (
|
||||
{file.value ? <span class="drop-zone-file">{file.value.name}</span> : (
|
||||
<>
|
||||
<span class="drop-zone-text">Glisser le fichier .xlsx ici</span>
|
||||
<span class="drop-zone-hint">ou cliquer pour parcourir</span>
|
||||
|
||||
Reference in New Issue
Block a user