Ajout de Promotion et de Commande

This commit is contained in:
Aubert Marvin
2026-04-25 15:40:55 +02:00
parent eddb103755
commit f8e06ac126
14 changed files with 842 additions and 6 deletions
+17
View File
@@ -5,6 +5,7 @@ const emptyForm = () => ({
author: '',
year: new Date().getFullYear(),
genre: '',
price: 10,
read: false,
})
@@ -71,6 +72,22 @@ export function BookForm({ onSubmit }) {
placeholder="Roman, essai…"
/>
</label>
<label>
Prix ()
<input
type="number"
min={0}
step="0.5"
value={form.price}
onChange={(e) =>
setForm((f) => ({
...f,
price: Number(e.target.value),
}))
}
placeholder="Ex. 12.5"
/>
</label>
</div>
<label className="checkbox-row">
<input
+3 -1
View File
@@ -76,7 +76,9 @@ export function BookList({
</Link>
</h3>
<p className="author">{book.author}</p>
<p className="year">{book.year}</p>
<p className="year">
{book.year} · {Number(book.price ?? 10).toFixed(2)}
</p>
<div className="card-actions">
<button
type="button"