Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 1x | import {Offre} from "@/types/offre/offre";
interface Props {
offre: Offre;
onDelete: (id: number) => void;
onEdit: (offre: Offre) => void;
}
export default function OffresTableRow({ offre, onDelete, onEdit }: Props) {
return (
<tr className="hover:bg-gray-50">
<td className="px-6 py-4 whitespace-nowrap">
<div className="text-sm font-medium text-gray-900">{offre.libelle}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div className="text-sm font-medium text-gray-900">{offre.nb_personne}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div className="text-sm font-medium text-gray-900">{offre.montant}</div>
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button
onClick={() => onEdit(offre)}
className="text-blue-600 hover:text-blue-900 mr-3"
>
Modifier
</button>
<button
onClick={() => onDelete(offre.id)}
className="text-red-600 hover:text-red-900"
>
Supprimer
</button>
</td>
</tr>
);
}
|