biiii papa palop
This commit is contained in:
		| @@ -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> | ||||
|     ) | ||||
|   | ||||
| @@ -436,6 +436,7 @@ html { | ||||
|     display: inline-block; | ||||
|     height: auto; | ||||
|     width: 97.5%; | ||||
|     padding: 1.25%; | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user