diff --git a/components/dashboard/product-list.tsx b/components/dashboard/product-list.tsx
index d01f8ce..c8e5fdd 100644
--- a/components/dashboard/product-list.tsx
+++ b/components/dashboard/product-list.tsx
@@ -10,6 +10,7 @@ import { CodeBadge } from '@/components/shared/code-badge'
import { DemoTooltip } from '@/components/shared/demo-tooltip'
import { restoreProductAction } from '@/actions/products'
import { setActiveProductAction } from '@/actions/active-product'
+import { EditProductButton } from '@/components/products/edit-product-button'
interface Product {
id: string
@@ -17,6 +18,8 @@ interface Product {
code: string | null
description: string | null
repo_url: string | null
+ definition_of_done: string | null
+ auto_pr: boolean
}
interface ProductListProps {
@@ -100,19 +103,23 @@ export function ProductList({ products, isDemo, showArchived = false, activeProd
)}
{!showArchived && (
- product.id === activeProductId
- ? Actief
- : (
-
-
-
- )
+ <>
+
+ {product.id === activeProductId
+ ? Actief
+ : (
+
+
+
+ )
+ }
+ >
)}
{showArchived && (
diff --git a/components/products/edit-product-button.tsx b/components/products/edit-product-button.tsx
index e574f59..958eb1c 100644
--- a/components/products/edit-product-button.tsx
+++ b/components/products/edit-product-button.tsx
@@ -2,25 +2,37 @@
import { useState } from 'react'
import { Button } from '@/components/ui/button'
+import { DemoTooltip } from '@/components/shared/demo-tooltip'
import { ProductDialog, type ProductDialogProduct } from '@/components/dialogs/product-dialog'
interface Props {
product: ProductDialogProduct
+ isDemo?: boolean
+ size?: 'sm' | 'default'
+ variant?: 'outline' | 'ghost'
}
-export function EditProductButton({ product }: Props) {
+export function EditProductButton({ product, isDemo = false, size = 'sm', variant = 'outline' }: Props) {
const [open, setOpen] = useState(false)
return (
<>
-
+
+
+
>
)
diff --git a/components/shared/nav-bar.tsx b/components/shared/nav-bar.tsx
index 2a7e97e..d0e0f6f 100644
--- a/components/shared/nav-bar.tsx
+++ b/components/shared/nav-bar.tsx
@@ -51,9 +51,11 @@ export function NavBar({
const result = await setActiveProductAction(productId)
if (result?.error) {
toast.error(typeof result.error === 'string' ? result.error : 'Wisselen mislukt')
- } else {
- router.push(`/products/${productId}`)
+ return
}
+ const next = products.find(p => p.id === productId)
+ toast.success(`Actief product: ${next?.name ?? 'gewijzigd'}`)
+ router.refresh()
})
}