feat(ST-1369): NewSprintTrigger achter isActiveProduct-gate (G6)
De "Nieuwe sprint"-knop rendert niet langer op een niet-actief product — een sprint-draft starten daar was verwarrend. page.tsx geeft de bestaande isActiveProduct-flag door. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
32410d41a2
commit
ec3d72577b
2 changed files with 16 additions and 3 deletions
|
|
@ -131,7 +131,13 @@ export default async function ProductBacklogPage({ params, searchParams }: Props
|
|||
{activeSprintItem && !isDemo && (
|
||||
<SaveSprintButton activeSprintId={activeSprintItem.id} />
|
||||
)}
|
||||
{!isDemo && <NewSprintTrigger productId={id} isDemo={isDemo} />}
|
||||
{!isDemo && (
|
||||
<NewSprintTrigger
|
||||
productId={id}
|
||||
isDemo={isDemo}
|
||||
isActiveProduct={isActiveProduct}
|
||||
/>
|
||||
)}
|
||||
{!isDemo && product.user_id === session.userId && (
|
||||
<EditProductButton
|
||||
product={{
|
||||
|
|
|
|||
|
|
@ -9,20 +9,27 @@ import { NewSprintMetadataDialog } from './new-sprint-metadata-dialog'
|
|||
interface NewSprintTriggerProps {
|
||||
productId: string
|
||||
isDemo: boolean
|
||||
isActiveProduct: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* PBI-79 / ST-1337: trigger-knop voor de nieuwe sprint-flow.
|
||||
* Verbergt zichzelf wanneer er al een pendingSprintDraft loopt — dan
|
||||
* staat de SprintDefinitionBanner zelf de afronding te regelen.
|
||||
* staat de SprintDefinitionBanner zelf de afronding te regelen — en
|
||||
* wanneer het product niet het actieve product is (ST-1369 / G6).
|
||||
*/
|
||||
export function NewSprintTrigger({ productId, isDemo }: NewSprintTriggerProps) {
|
||||
export function NewSprintTrigger({
|
||||
productId,
|
||||
isDemo,
|
||||
isActiveProduct,
|
||||
}: NewSprintTriggerProps) {
|
||||
const [open, setOpen] = useState(false)
|
||||
const hasDraft = useUserSettingsStore(
|
||||
(s) => !!s.entities.settings.workflow?.pendingSprintDraft?.[productId],
|
||||
)
|
||||
|
||||
if (hasDraft) return null
|
||||
if (!isActiveProduct) return null
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue