diff --git a/apps/web/app/versions/page.tsx b/apps/web/app/versions/page.tsx index d4320e1..066ea38 100644 --- a/apps/web/app/versions/page.tsx +++ b/apps/web/app/versions/page.tsx @@ -373,7 +373,7 @@ export default function VersionsPage() { - {showModal && setShowModal(false)} onCreate={createVersion} />} + {showModal && setShowModal(false)} onCreate={createVersion} currentUserName={currentUserName} />} ); } @@ -547,7 +547,8 @@ type IterationType = 'major' | 'minor' | 'patch'; interface NewVersionModalProps { overview: any[]; onClose: () => void; - onCreate: (productId: string, data: { name: string; status: VersionStatus; priority?: Priority; expectedReleaseDate?: string }) => void; + onCreate: (productId: string, data: { name: string; status: VersionStatus; priority?: Priority; expectedReleaseDate?: string; members?: any[] }) => void; + currentUserName: string; } function getNextVersion(existingVersions: any[], projectName: string, type: IterationType): string { @@ -588,7 +589,7 @@ function getNextVersion(existingVersions: any[], projectName: string, type: Iter } } -function NewVersionModal({ overview, onClose, onCreate }: NewVersionModalProps) { +function NewVersionModal({ overview, onClose, onCreate, currentUserName }: NewVersionModalProps) { const [productId, setProductId] = useState(''); const [projectId, setProjectId] = useState(''); const [projectName, setProjectName] = useState(''); @@ -647,6 +648,7 @@ function NewVersionModal({ overview, onClose, onCreate }: NewVersionModalProps) status, priority, ...(expectedReleaseDate ? { expectedReleaseDate } : {}), + members: currentUserName ? [{ role: 'product', name: currentUserName }] : [], }); onClose(); } catch (e) {