feat: Complete Stage 2 frontend refactor
- Removed deprecated fields from Content and Task models, including entity_type, sync_status, and cluster_role. - Updated Content model to include new fields: content_type, content_structure, taxonomy_terms, source, external_id, and cluster_id. - Refactored Writer module components (Content, ContentView, Dashboard, Tasks) to align with new schema. - Enhanced Dashboard metrics and removed unused filters. - Implemented ClusterDetail page to display cluster information and associated content. - Updated API service interfaces to reflect changes in data structure. - Adjusted sorting and filtering logic across various components to accommodate new field names and types. - Improved user experience by providing loading states and error handling in data fetching.
This commit is contained in:
@@ -8,7 +8,6 @@ import { optimizerApi, EntryPoint } from '../../api/optimizer.api';
|
||||
import { fetchContent, Content as ContentType } from '../../services/api';
|
||||
import { useToast } from '../../components/ui/toast/ToastContainer';
|
||||
import { SourceBadge, ContentSource } from '../../components/content/SourceBadge';
|
||||
import { SyncStatusBadge, SyncStatus } from '../../components/content/SyncStatusBadge';
|
||||
import { ContentFilter, FilterState } from '../../components/content/ContentFilter';
|
||||
import { OptimizationScores } from '../../components/optimizer/OptimizationScores';
|
||||
import { BoltIcon, CheckCircleIcon, FileIcon } from '../../icons';
|
||||
@@ -28,7 +27,6 @@ export default function OptimizerContentSelector() {
|
||||
const [selectedIds, setSelectedIds] = useState<number[]>([]);
|
||||
const [filters, setFilters] = useState<FilterState>({
|
||||
source: 'all',
|
||||
syncStatus: 'all',
|
||||
search: '',
|
||||
});
|
||||
const [entryPoint, setEntryPoint] = useState<EntryPoint>('auto');
|
||||
@@ -77,11 +75,6 @@ export default function OptimizerContentSelector() {
|
||||
filtered = filtered.filter(item => item.source === filters.source);
|
||||
}
|
||||
|
||||
// Sync status filter
|
||||
if (filters.syncStatus !== 'all') {
|
||||
filtered = filtered.filter(item => item.sync_status === filters.syncStatus);
|
||||
}
|
||||
|
||||
setFilteredContent(filtered);
|
||||
}, [content, filters]);
|
||||
|
||||
@@ -223,9 +216,6 @@ export default function OptimizerContentSelector() {
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
||||
Source
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
||||
Status
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">
|
||||
Score
|
||||
</th>
|
||||
@@ -264,9 +254,6 @@ export default function OptimizerContentSelector() {
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
<SourceBadge source={(item.source as ContentSource) || 'igny8'} />
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
<SyncStatusBadge status={(item.sync_status as SyncStatus) || 'native'} />
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
{scores?.overall_score ? (
|
||||
<span className="text-sm font-medium text-gray-900 dark:text-white">
|
||||
|
||||
Reference in New Issue
Block a user