fixes
This commit is contained in:
@@ -119,12 +119,18 @@ export default function WorkflowPipeline({
|
|||||||
{step.title}
|
{step.title}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-xs text-gray-500 dark:text-gray-400 mt-1">
|
<p className="text-xs text-gray-500 dark:text-gray-400 mt-1">
|
||||||
{step.count} {step.title.toLowerCase().includes('keyword') ? 'keywords' :
|
{step.count > 0 ? (
|
||||||
step.title.toLowerCase().includes('cluster') ? 'clusters' :
|
<>
|
||||||
step.title.toLowerCase().includes('idea') ? 'ideas' :
|
{step.count} {step.title.toLowerCase().includes('keyword') ? 'keywords' :
|
||||||
step.title.toLowerCase().includes('task') ? 'tasks' : 'items'}
|
step.title.toLowerCase().includes('cluster') ? 'clusters' :
|
||||||
|
step.title.toLowerCase().includes('idea') ? 'ideas' :
|
||||||
|
step.title.toLowerCase().includes('task') ? 'tasks' : 'items'}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<span className="text-gray-400 dark:text-gray-500">No items</span>
|
||||||
|
)}
|
||||||
</p>
|
</p>
|
||||||
{step.status === "pending" && (
|
{step.status === "pending" && step.count === 0 && (
|
||||||
<Link
|
<Link
|
||||||
to={step.path}
|
to={step.path}
|
||||||
className="inline-flex items-center gap-1 mt-2 text-xs font-medium text-brand-500 hover:text-brand-600 group-hover:translate-x-1 transition-transform"
|
className="inline-flex items-center gap-1 mt-2 text-xs font-medium text-brand-500 hover:text-brand-600 group-hover:translate-x-1 transition-transform"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router";
|
||||||
import { ArrowRightIcon } from "../../icons";
|
import { ArrowRightIcon } from "../../icons";
|
||||||
|
|
||||||
export interface RelationshipData {
|
export interface RelationshipData {
|
||||||
|
|||||||
@@ -220,15 +220,25 @@ export default function PlannerDashboard() {
|
|||||||
fontFamily: 'Outfit, sans-serif',
|
fontFamily: 'Outfit, sans-serif',
|
||||||
toolbar: { show: false }
|
toolbar: { show: false }
|
||||||
},
|
},
|
||||||
labels: Object.keys(stats.keywords.byStatus),
|
labels: Object.keys(stats.keywords.byStatus).filter(key => stats.keywords.byStatus[key] > 0),
|
||||||
colors: ['#465FFF', '#10B981', '#F59E0B', '#EF4444', '#8B5CF6'],
|
colors: ['#465FFF', '#10B981', '#F59E0B', '#EF4444', '#8B5CF6'],
|
||||||
legend: {
|
legend: {
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
fontFamily: 'Outfit'
|
fontFamily: 'Outfit',
|
||||||
|
show: true
|
||||||
},
|
},
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
enabled: false // Disable labels on pie slices
|
enabled: false // Disable labels on pie slices
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
y: {
|
||||||
|
formatter: (val: number, { seriesIndex, w }: any) => {
|
||||||
|
const label = w.globals.labels[seriesIndex] || '';
|
||||||
|
return `${label}: ${val}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
pie: {
|
pie: {
|
||||||
donut: {
|
donut: {
|
||||||
@@ -236,34 +246,21 @@ export default function PlannerDashboard() {
|
|||||||
labels: {
|
labels: {
|
||||||
show: true,
|
show: true,
|
||||||
name: {
|
name: {
|
||||||
show: true,
|
show: false // Hide "Total" label
|
||||||
fontSize: '14px',
|
|
||||||
fontWeight: 600,
|
|
||||||
color: '#374151',
|
|
||||||
fontFamily: 'Outfit'
|
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
show: true,
|
show: true,
|
||||||
fontSize: '20px',
|
fontSize: '24px',
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
color: '#465FFF',
|
color: '#465FFF',
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
formatter: (val: string) => {
|
formatter: () => {
|
||||||
const total = Object.values(stats.keywords.byStatus).reduce((a, b) => a + b, 0);
|
const total = Object.values(stats.keywords.byStatus).reduce((a, b) => a + b, 0);
|
||||||
return total > 0 ? total.toString() : '0';
|
return total > 0 ? total.toString() : '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
total: {
|
total: {
|
||||||
show: true,
|
show: false // Hide total label
|
||||||
label: 'Total',
|
|
||||||
fontSize: '12px',
|
|
||||||
fontWeight: 500,
|
|
||||||
color: '#6B7280',
|
|
||||||
fontFamily: 'Outfit',
|
|
||||||
formatter: () => {
|
|
||||||
const total = Object.values(stats.keywords.byStatus).reduce((a, b) => a + b, 0);
|
|
||||||
return total.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,7 +268,9 @@ export default function PlannerDashboard() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const series = Object.values(stats.keywords.byStatus);
|
const series = Object.keys(stats.keywords.byStatus)
|
||||||
|
.filter(key => stats.keywords.byStatus[key] > 0)
|
||||||
|
.map(key => stats.keywords.byStatus[key]);
|
||||||
|
|
||||||
return { options, series };
|
return { options, series };
|
||||||
}, [stats]);
|
}, [stats]);
|
||||||
|
|||||||
@@ -246,15 +246,25 @@ export default function WriterDashboard() {
|
|||||||
fontFamily: 'Outfit, sans-serif',
|
fontFamily: 'Outfit, sans-serif',
|
||||||
toolbar: { show: false }
|
toolbar: { show: false }
|
||||||
},
|
},
|
||||||
labels: Object.keys(stats.tasks.byStatus),
|
labels: Object.keys(stats.tasks.byStatus).filter(key => stats.tasks.byStatus[key] > 0),
|
||||||
colors: ['#465FFF', '#F59E0B', '#10B981', '#EF4444', '#8B5CF6'],
|
colors: ['#465FFF', '#F59E0B', '#10B981', '#EF4444', '#8B5CF6'],
|
||||||
legend: {
|
legend: {
|
||||||
position: 'bottom',
|
position: 'bottom',
|
||||||
fontFamily: 'Outfit'
|
fontFamily: 'Outfit',
|
||||||
|
show: true
|
||||||
},
|
},
|
||||||
dataLabels: {
|
dataLabels: {
|
||||||
enabled: false // Disable labels on pie slices
|
enabled: false // Disable labels on pie slices
|
||||||
},
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
y: {
|
||||||
|
formatter: (val: number, { seriesIndex, w }: any) => {
|
||||||
|
const label = w.globals.labels[seriesIndex] || '';
|
||||||
|
return `${label}: ${val}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
plotOptions: {
|
plotOptions: {
|
||||||
pie: {
|
pie: {
|
||||||
donut: {
|
donut: {
|
||||||
@@ -262,34 +272,21 @@ export default function WriterDashboard() {
|
|||||||
labels: {
|
labels: {
|
||||||
show: true,
|
show: true,
|
||||||
name: {
|
name: {
|
||||||
show: true,
|
show: false // Hide "Total" label
|
||||||
fontSize: '14px',
|
|
||||||
fontWeight: 600,
|
|
||||||
color: '#374151',
|
|
||||||
fontFamily: 'Outfit'
|
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
show: true,
|
show: true,
|
||||||
fontSize: '20px',
|
fontSize: '24px',
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
color: '#465FFF',
|
color: '#465FFF',
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
formatter: (val: string) => {
|
formatter: () => {
|
||||||
const total = Object.values(stats.tasks.byStatus).reduce((a, b) => a + b, 0);
|
const total = Object.values(stats.tasks.byStatus).reduce((a, b) => a + b, 0);
|
||||||
return total > 0 ? total.toString() : '0';
|
return total > 0 ? total.toString() : '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
total: {
|
total: {
|
||||||
show: true,
|
show: false // Hide total label
|
||||||
label: 'Total',
|
|
||||||
fontSize: '12px',
|
|
||||||
fontWeight: 500,
|
|
||||||
color: '#6B7280',
|
|
||||||
fontFamily: 'Outfit',
|
|
||||||
formatter: () => {
|
|
||||||
const total = Object.values(stats.tasks.byStatus).reduce((a, b) => a + b, 0);
|
|
||||||
return total.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,7 +294,9 @@ export default function WriterDashboard() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const series = Object.values(stats.tasks.byStatus);
|
const series = Object.keys(stats.tasks.byStatus)
|
||||||
|
.filter(key => stats.tasks.byStatus[key] > 0)
|
||||||
|
.map(key => stats.tasks.byStatus[key]);
|
||||||
|
|
||||||
return { options, series };
|
return { options, series };
|
||||||
}, [stats]);
|
}, [stats]);
|
||||||
|
|||||||
Reference in New Issue
Block a user