refactor: rename Issue → Task throughout frontend
- Rename files: IssuesPage → TasksPage, IssueDetailPage → TaskDetailPage, CreateIssuePage → CreateTaskPage - Rename TypeScript interface: Issue → Task (keep backend field names) - Update routes: /issues → /tasks, /issues/new → /tasks/new, /issues/:id → /tasks/:id - Update CSS class names: issue-* → task-*, create-issue → create-task - Update UI text: 'Issues' → 'Tasks', 'Create Issue' → 'Create Task' - Keep 'issue' as a task subtype value in TASK_TYPES dropdown - Keep all backend API endpoint paths unchanged (/issues, /comments, etc.) - Rename local Task interface in MilestoneDetailPage to MilestoneTask to avoid conflict with the global Task type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import api from '@/services/api'
|
||||
import type { DashboardStats } from '@/types'
|
||||
import type { DashboardStats, Task } from '@/types'
|
||||
|
||||
export default function DashboardPage() {
|
||||
const [stats, setStats] = useState<DashboardStats | null>(null)
|
||||
@@ -26,7 +26,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-label">Total Issues</span>
|
||||
<span className="stat-label">Total Tasks</span>
|
||||
</div>
|
||||
{Object.entries(stats.by_status || {}).map(([k, v]) => (
|
||||
<div className="stat-card" key={k} style={{ borderLeftColor: statusColors[k] || '#ccc' }}>
|
||||
@@ -52,7 +52,7 @@ export default function DashboardPage() {
|
||||
</div>
|
||||
|
||||
<div className="section">
|
||||
<h3>Recent Issues</h3>
|
||||
<h3>Recent Tasks</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>ID</th><th>Title</th><th>Status</th><th>Priority</th><th>Type</th><th>Subtype</th></tr>
|
||||
@@ -61,7 +61,7 @@ export default function DashboardPage() {
|
||||
{(stats.recent_issues || []).map((i) => (
|
||||
<tr key={i.id}>
|
||||
<td>#{i.id}</td>
|
||||
<td><a href={`/issues/${i.id}`}>{i.title}</a></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>
|
||||
|
||||
Reference in New Issue
Block a user