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