Merge pull request #96 from madhura68/fix/idea-pbi-link-route
fix(m12): broken /backlog route on PBI-link after materialize
This commit is contained in:
commit
d2601b6e9b
2 changed files with 7 additions and 5 deletions
|
|
@ -35,7 +35,7 @@ export function IdeaPbiLinkCard({ idea, isDemo }: Props) {
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
Gematerialiseerd als{' '}
|
Gematerialiseerd als{' '}
|
||||||
<Link
|
<Link
|
||||||
href={`/products/${idea.product_id}/backlog#pbi-${idea.pbi.code}`}
|
href={`/products/${idea.product_id}`}
|
||||||
className="font-medium text-status-done hover:underline inline-flex items-center gap-1"
|
className="font-medium text-status-done hover:underline inline-flex items-center gap-1"
|
||||||
>
|
>
|
||||||
{idea.pbi.code} — {idea.pbi.title}
|
{idea.pbi.code} — {idea.pbi.title}
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,11 @@ export function IdeaRowActions({ idea, isDemo, onArchive }: IdeaRowActionsProps)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
toast.success(`Gematerialiseerd als ${r.data?.pbi_code}`)
|
toast.success(`Gematerialiseerd als ${r.data?.pbi_code}`)
|
||||||
// Navigeer naar de nieuwe PBI in de product-backlog
|
// Navigeer naar de product-backlog. Anchor-scrolling per-PBI bestaat
|
||||||
if (r.data?.pbi_id && idea.product_id) {
|
// (nog) niet in pbi-list, dus gewoon naar de overview-pagina; de nieuwe
|
||||||
router.push(`/products/${idea.product_id}/backlog#pbi-${r.data.pbi_code}`)
|
// PBI is de meest recente.
|
||||||
|
if (idea.product_id) {
|
||||||
|
router.push(`/products/${idea.product_id}`)
|
||||||
} else {
|
} else {
|
||||||
router.refresh()
|
router.refresh()
|
||||||
}
|
}
|
||||||
|
|
@ -131,7 +133,7 @@ export function IdeaRowActions({ idea, isDemo, onArchive }: IdeaRowActionsProps)
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
router.push(`/products/${idea.product_id}/backlog#pbi-${idea.pbi!.code}`)
|
router.push(`/products/${idea.product_id}`)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
Bekijk {idea.pbi.code}
|
Bekijk {idea.pbi.code}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue