fix: align task pages with backend task api
This commit is contained in:
@@ -25,7 +25,7 @@ export default function DashboardPage() {
|
||||
|
||||
<div className="stats-grid">
|
||||
<div className="stat-card total">
|
||||
<span className="stat-number">{stats.total_issues}</span>
|
||||
<span className="stat-number">{stats.total_tasks}</span>
|
||||
<span className="stat-label">Total Tasks</span>
|
||||
</div>
|
||||
{Object.entries(stats.by_status || {}).map(([k, v]) => (
|
||||
@@ -43,7 +43,7 @@ export default function DashboardPage() {
|
||||
<div className="bar-row" key={k}>
|
||||
<span className="bar-label">{k}</span>
|
||||
<div className="bar" style={{
|
||||
width: `${Math.max((v / stats.total_issues) * 100, 5)}%`,
|
||||
width: `${Math.max((v / stats.total_tasks) * 100, 5)}%`,
|
||||
backgroundColor: priorityColors[k] || '#ccc',
|
||||
}}>{v}</div>
|
||||
</div>
|
||||
@@ -58,13 +58,13 @@ export default function DashboardPage() {
|
||||
<tr><th>ID</th><th>Title</th><th>Status</th><th>Priority</th><th>Type</th><th>Subtype</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{(stats.recent_issues || []).map((i) => (
|
||||
{(stats.recent_tasks || []).map((i) => (
|
||||
<tr key={i.id}>
|
||||
<td>#{i.id}</td>
|
||||
<td><a href={`/tasks/${i.id}`}>{i.title}</a></td>
|
||||
<td><span className={`badge status-${i.status}`}>{i.status}</span></td>
|
||||
<td><span className={`badge priority-${i.priority}`}>{i.priority}</span></td>
|
||||
<td>{i.issue_type}</td><td>{i.issue_subtype || "-"}</td>
|
||||
<td>{i.task_type}</td><td>{i.task_subtype || "-"}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user