Loading...
+
+ const statusBadgeClass = (s: string) => {
+ if (s === 'open') return 'status-open'
+ if (s === 'accepted') return 'status-completed'
+ if (s === 'rejected') return 'status-closed'
+ return ''
+ }
+
+ return (
+
+
+
+
+
+ 💡 {propose.title}
+ {propose.propose_code && {propose.propose_code}}
+
+
+ {propose.status}
+
+
+
+ {error &&
{error}
}
+
+
+
Details
+
+
Propose Code: {propose.propose_code || '—'}
+
Status: {propose.status}
+
Created By: User #{propose.created_by_id || '—'}
+
Created: {dayjs(propose.created_at).format('YYYY-MM-DD HH:mm')}
+
Updated: {propose.updated_at ? dayjs(propose.updated_at).format('YYYY-MM-DD HH:mm') : '—'}
+
Feature Task: {propose.feat_task_id || '—'}
+
+
+
+
+
Description
+
{propose.description || 'No description'}
+
+
+ {/* Action buttons */}
+
+ {propose.status === 'open' && (
+ <>
+
+
+ >
+ )}
+ {propose.status === 'accepted' && propose.feat_task_id && (
+
+ )}
+ {propose.status === 'rejected' && (
+
+ )}
+
+
+ {/* Accept modal with milestone selector */}
+ {showAccept && (
+
setShowAccept(false)}>
+
e.stopPropagation()}>
+
Accept Propose
+
Select an open milestone to create a feature story task in:
+
+ {milestones.length === 0 && (
+
No open milestones available.
+ )}
+
+
+
+
+
+
+ )}
+
+ )
+}
diff --git a/src/pages/ProposesPage.tsx b/src/pages/ProposesPage.tsx
new file mode 100644
index 0000000..c9f16ea
--- /dev/null
+++ b/src/pages/ProposesPage.tsx
@@ -0,0 +1,110 @@
+import { useState, useEffect } from 'react'
+import { useNavigate } from 'react-router-dom'
+import api from '@/services/api'
+import type { Propose, Project } from '@/types'
+import dayjs from 'dayjs'
+
+export default function ProposesPage() {
+ const [proposes, setProposes] = useState