mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
Fix inconsistent and confusing project statistics display
Backend: - Count print job records instead of summing quantities for stats - Include "archived" status as successful (completed + archived) - Include all failure states (failed, aborted, cancelled, stopped) - Add completed_count and failed_count to ProjectListResponse Frontend ProjectsPage: - Show completed_count instead of total_items in progress displays - Progress bar now shows "X / Y completed" to match percentage - Add failed count indicator (red) when failures exist - Footer stats show completed (green checkmark) and failed (red) separately Frontend ProjectDetailPage: - Replace confusing "Total Items" card with "Print Jobs" card - Show "X successful" as main value, "Y failed" below in red - Show "Z in progress" in yellow for unfinished prints - Progress bar text changed from "items" to "completed" - Add hint prop to StatCard component for tooltips This ensures stats are consistent between: - Project list page and detail page - Stats cards and archive list counts - Progress percentages and displayed fractions Fixes #85
This commit is contained in:
@@ -412,7 +412,9 @@ export interface ProjectListItem {
|
||||
target_count: number | null;
|
||||
created_at: string;
|
||||
archive_count: number; // Number of print jobs
|
||||
total_items: number; // Sum of quantities (total items printed)
|
||||
total_items: number; // Sum of quantities (total items printed, including failed)
|
||||
completed_count: number; // Sum of quantities for completed prints only
|
||||
failed_count: number; // Sum of quantities for failed prints
|
||||
queue_count: number;
|
||||
progress_percent: number | null;
|
||||
archives: ArchivePreview[];
|
||||
|
||||
Reference in New Issue
Block a user