biiii papa palop

This commit is contained in:
David Belisle 2022-10-18 12:07:54 -04:00
parent 3052493001
commit 4b70a50baf
2 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,29 @@
import { FaTimes } from 'react-icons/fa'
import { FaTools } from 'react-icons/fa'
function renderStatus(statusCode) {
if (statusCode !== undefined) {
switch (statusCode) {
case 0:
return ("Disponible");
case 1:
return ("En commande");
case 2:
return ("Indisponible");
case 3:
return ("Liquidation");
case 4:
return ("Promotion");
case 5:
return ("Discontinué");
default:
return (<></>);
}
}
}
const SimpleItem = ({ item, onDelete, onModify }) => {
return (
<div className="inventaire-item">
@ -13,7 +36,7 @@ const SimpleItem = ({ item, onDelete, onModify }) => {
onClick={() => onDelete(item.id)} />
</div>
</h3>
<p> Categoie: {item.category}, Prix: {item.price}, Promo: {item.promoPrice}, Quantité: {item.quantity}</p>
<p> Categoie: {item.category}, Prix: {item.price}, Promo: {item.promoPrice}, Quantité: {item.quantity}, Disponibilité: {renderStatus(item.status)}</p>
<p> Description: {item.description}</p>
</div>
)

View File

@ -436,6 +436,7 @@ html {
display: inline-block;
height: auto;
width: 97.5%;
padding: 1.25%;
}