feat: migrar tablero, páginas y configuración a estados dinámicos (Fase 1)
This commit is contained in:
1 parent
bf6686f9b0
commit
e15dc3926e
11 files changed
+408
-21
No files matched your search
@@ -6,7 +6,7 @@ import { api } from "@/lib/api";
|
||||
import type { Issue, Project } from "@/lib/types";
|
||||
import { PROJECT_STATUS_META } from "@/lib/meta";
|
||||
import { formatShortDate, percent } from "@/lib/format";
|
||||
import { useReferenceLookups } from "@/lib/store";
|
||||
import { useReferenceLookups, useWorkflowStates } from "@/lib/store";
|
||||
import { AppShell } from "@/components/layout/AppShell";
|
||||
import { Avatar } from "@/components/ui/Avatar";
|
||||
import { EmptyState } from "@/components/ui/EmptyState";
|
||||
@@ -21,6 +21,7 @@ export default function ProjectsPage() {
|
||||
const [issues, setIssues] = useState<Issue[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const { userById } = useReferenceLookups();
|
||||
const { doneKeys } = useWorkflowStates();
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
@@ -45,7 +46,7 @@ export default function ProjectsPage() {
|
||||
if (!issue.projectId) continue;
|
||||
const entry = map.get(issue.projectId) ?? { total: 0, done: 0 };
|
||||
entry.total += 1;
|
||||
if (issue.status === "done") entry.done += 1;
|
||||
if (doneKeys.has(issue.status)) entry.done += 1;
|
||||
map.set(issue.projectId, entry);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user