Move the fucking chart button left of the import button

WAS IT SO HARD!?
This commit is contained in:
2025-07-09 03:15:46 +02:00
parent 6f7f777eab
commit 86a9fc4382

View File

@@ -61,45 +61,10 @@ const JobCardHeader: React.FC<JobCardHeaderProps> = ({
<span className="ml-4"> <span className="ml-4">
Produced: <EditableProduced job={job} onUpdateProduced={onUpdateProduced} /> Produced: <EditableProduced job={job} onUpdateProduced={onUpdateProduced} />
</span> </span>
<span className="ml-4 flex items-center gap-1"> <span className="ml-4 items-center gap-1">
Sold: <span className="text-green-400">{itemsSold.toLocaleString()}</span> Sold: <span className="text-green-400">{itemsSold.toLocaleString()}</span>
<button
className="text-gray-400 hover:text-blue-300 transition-colors"
onClick={(e) => {
e.stopPropagation();
setOverviewChartOpen(true);
}}
data-no-navigate
title="View transaction charts"
>
<BarChart3 className="w-3 h-3" />
</button>
</span> </span>
</div> </div>
<div className="flex items-center gap-2 text-xs">
<span className="text-gray-400">Total Revenue</span>
<button
className="text-gray-400 hover:text-blue-300 transition-colors"
onClick={(e) => {
e.stopPropagation();
setTotalRevenueChartOpen(true);
}}
data-no-navigate
>
<BarChart3 className="w-3 h-3" />
</button>
<span className="text-gray-400 ml-2">Total Profit</span>
<button
className="text-gray-400 hover:text-blue-300 transition-colors"
onClick={(e) => {
e.stopPropagation();
setTotalProfitChartOpen(true);
}}
data-no-navigate
>
<BarChart3 className="w-3 h-3" />
</button>
</div>
</div> </div>
</div> </div>
<div className="flex flex-col gap-2 flex-shrink-0 items-end"> <div className="flex flex-col gap-2 flex-shrink-0 items-end">
@@ -123,23 +88,36 @@ const JobCardHeader: React.FC<JobCardHeaderProps> = ({
Delete Delete
</Button> </Button>
</div> </div>
<BOMActions job={job} onImportBOM={onImportBOM} /> <div className="flex">
<button
className="text-gray-400 hover:text-blue-300 transition-colors px-2"
onClick={(e) => {
e.stopPropagation();
setOverviewChartOpen(true);
}}
data-no-navigate
title="View transaction charts"
>
<BarChart3 className="w-3 h-3" />
</button>
<BOMActions job={job} onImportBOM={onImportBOM} />
</div>
</div> </div>
<TransactionChart <TransactionChart
job={job} job={job}
type="profit" type="profit"
isOpen={overviewChartOpen} isOpen={overviewChartOpen}
onClose={() => setOverviewChartOpen(false)} onClose={() => setOverviewChartOpen(false)}
/> />
<TransactionChart <TransactionChart
jobs={jobs} jobs={jobs}
type="total-revenue" type="total-revenue"
isOpen={totalRevenueChartOpen} isOpen={totalRevenueChartOpen}
onClose={() => setTotalRevenueChartOpen(false)} onClose={() => setTotalRevenueChartOpen(false)}
/> />
<TransactionChart <TransactionChart
jobs={jobs} jobs={jobs}
type="total-profit" type="total-profit"