+ {/* Section header */}
+
+
Phases
+
+
+
+ {/* Phase loading */}
+ {phasesQuery.isLoading && (
+
+ Loading phases...
+
+ )}
+
+ {/* Phases list */}
+ {phasesQuery.isSuccess && phases.length === 0 && (
+
+ No phases yet
+
+ )}
+
+ {phasesQuery.isSuccess &&
+ phases.map((phase, idx) => {
+ // tRPC serializes Date to string over JSON — cast to wire format
+ const serializedPhase = {
+ id: phase.id,
+ initiativeId: phase.initiativeId,
+ number: phase.number,
+ name: phase.name,
+ description: phase.description,
+ status: phase.status,
+ createdAt: String(phase.createdAt),
+ updatedAt: String(phase.updatedAt),
+ };
+
+ return (
+
+ );
+ })}
+