Section 1 & 2 - #Migration Run
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* IMPORTANT: Content table structure
|
||||
* - Tasks is separate table (has status: queued, processing, completed, failed)
|
||||
* - Content table has status field: 'draft', 'review', 'published' (approved)
|
||||
* - Content table has status field: 'draft', 'review', 'approved', 'published'
|
||||
* - Images is separate table linked to content
|
||||
*
|
||||
* Credits data comes from /v1/billing/credits/usage/summary/ endpoint
|
||||
@@ -43,7 +43,7 @@ export interface WriterModuleStats {
|
||||
tasksCompleted: number; // Tasks with status='completed'
|
||||
contentDrafts: number; // Content with status='draft'
|
||||
contentReview: number; // Content with status='review'
|
||||
contentPublished: number; // Content with status='published' (approved)
|
||||
contentPublished: number; // Content with status='approved' or 'published' (ready for publishing or on site)
|
||||
totalContent: number; // All content regardless of status
|
||||
totalImages: number;
|
||||
}
|
||||
@@ -158,8 +158,8 @@ export function useModuleStats() {
|
||||
fetchContent({ ...baseFilters, status: 'draft' }),
|
||||
// Content with status='review'
|
||||
fetchContent({ ...baseFilters, status: 'review' }),
|
||||
// Content with status='published' (approved)
|
||||
fetchContent({ ...baseFilters, status: 'published' }),
|
||||
// Content with status='approved' or 'published' (ready for publishing or on site)
|
||||
fetchContent({ ...baseFilters, status__in: 'approved,published' }),
|
||||
// Total content (all statuses)
|
||||
fetchContent({ ...baseFilters }),
|
||||
// Total images
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* IMPORTANT: Content table structure
|
||||
* - Tasks is separate table
|
||||
* - Content table has status field: 'draft', 'review', 'published' (approved)
|
||||
* - Content table has status field: 'draft', 'review', 'approved', 'published'
|
||||
* - Images is separate table linked to content
|
||||
*
|
||||
* Credits data comes from /v1/billing/credits/usage/summary/ endpoint
|
||||
@@ -57,7 +57,7 @@ export interface WorkflowStats {
|
||||
tasksTotal: number;
|
||||
contentDrafts: number; // Content with status='draft'
|
||||
contentReview: number; // Content with status='review'
|
||||
contentPublished: number; // Content with status='published' (approved)
|
||||
contentPublished: number; // Content with status='approved' or 'published' (ready for publishing or on site)
|
||||
imagesCreated: number;
|
||||
};
|
||||
// Credit consumption stats - detailed breakdown by operation
|
||||
@@ -208,10 +208,10 @@ export function useWorkflowStats(timeFilter: TimeFilter = 'all') {
|
||||
dateFilter
|
||||
? fetchAPI(`/v1/writer/content/?page_size=1&status=review${baseParams}${dateParam}`)
|
||||
: fetchContent({ ...baseFilters, status: 'review' }),
|
||||
// Content with status='published' (approved)
|
||||
// Content with status='approved' or 'published' (ready for publishing or on site)
|
||||
dateFilter
|
||||
? fetchAPI(`/v1/writer/content/?page_size=1&status=published${baseParams}${dateParam}`)
|
||||
: fetchContent({ ...baseFilters, status: 'published' }),
|
||||
? fetchAPI(`/v1/writer/content/?page_size=1&status__in=approved,published${baseParams}${dateParam}`)
|
||||
: fetchContent({ ...baseFilters, status__in: 'approved,published' }),
|
||||
// Total images
|
||||
dateFilter
|
||||
? fetchAPI(`/v1/writer/images/?page_size=1${baseParams}${dateParam}`)
|
||||
|
||||
Reference in New Issue
Block a user