Correction des redirections

This commit is contained in:
2026-06-17 22:45:08 +02:00
parent a8781a9f62
commit eb961cbed4
7 changed files with 80 additions and 26 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ const STATUT_FG = {
cloture: 'var(--text-muted)',
};
export default function InvMensuelTable({ rows, allRembs, allReinvests, year }) {
export default function InvMensuelTable({ rows, allRembs, allReinvests, year, originFrom }) {
const navigate = useNavigate();
const currentYear = new Date().getFullYear();
const currentMonth = new Date().getMonth() + 1;
@@ -142,7 +142,7 @@ export default function InvMensuelTable({ rows, allRembs, allReinvests, year })
{grid.map(({ inv, months }) => (
<tr key={inv.id} className="tip-row-plat"
style={{ cursor: 'pointer' }}
onClick={() => navigate(`/investissements/${inv.id}`)}>
onClick={() => navigate(`/investissements/${inv.id}`, originFrom ? { state: { from: originFrom } } : undefined)}>
<td className="tip-td-name" style={{ whiteSpace: 'normal', maxWidth: '40ch', wordBreak: 'break-word' }}>
{inv.nom_projet || '—'}