fix(templates): real scene count on template pages (was always 0)
The card + detail read template.sceneCount, but the API never sent one — so the frontend mapper hardcoded sceneCount:0 for every DB-backed template. - content-svc: ContainerSummaryResponse + ContainerDetailResponse now carry SceneCount. The list computes it with one grouped query (scenes per aspect project, max across aspects); the detail loads scenes and counts them. - frontend: V2ContainerSummary.scene_count → AdminProject.sceneCount → the catalog card/detail (adminProjectToCatalogTemplate no longer hardcodes 0). Verified on the live local API: fr-instagram-promo → 5, single-scene templates → 1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,8 @@ public record ContainerSummaryResponse(
|
||||
int Sort,
|
||||
DateTime SortDate,
|
||||
List<string> CategorySlugs,
|
||||
List<string> Tags
|
||||
List<string> Tags,
|
||||
int SceneCount
|
||||
);
|
||||
|
||||
public record ContainerDetailResponse(
|
||||
@@ -109,7 +110,8 @@ public record ContainerDetailResponse(
|
||||
DateTime SortDate,
|
||||
List<ProjectResponse> Projects,
|
||||
List<CategoryResponse> Categories,
|
||||
List<TagResponse> Tags
|
||||
List<TagResponse> Tags,
|
||||
int SceneCount
|
||||
);
|
||||
|
||||
public record ProjectResponse(
|
||||
|
||||
Reference in New Issue
Block a user