Code format

This commit is contained in:
2025-07-08 13:18:04 +02:00
parent 1dc07159c1
commit 335bbc3bab
3 changed files with 37 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
import { useState, useEffect } from 'react';
import { useState } from 'react';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';

View File

@@ -109,11 +109,10 @@ const JobCardMetrics: React.FC<JobCardMetricsProps> = ({ job }) => {
</span>
)}</div>
<div
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${
totalExpenditure <= job.projectedCost
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${totalExpenditure <= job.projectedCost
? 'bg-green-900/50 text-green-400'
: 'bg-red-900/50 text-red-400'
}`}
}`}
title={`Cost efficiency: ${((totalExpenditure / job.projectedCost) * 100).toFixed(1)}% of projected cost`}
>
{totalExpenditure <= job.projectedCost ? '✅' : '⚠️'} {((totalExpenditure / job.projectedCost) * 100).toFixed(0)}%
@@ -152,24 +151,22 @@ const JobCardMetrics: React.FC<JobCardMetricsProps> = ({ job }) => {
)}</div>
<div className="flex justify-center gap-2">
<div
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${
totalIncome >= job.projectedRevenue
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${totalIncome >= job.projectedRevenue
? 'bg-green-900/50 text-green-400'
: 'bg-yellow-900/50 text-yellow-400'
}`}
}`}
title={`Revenue progress: ${((totalIncome / job.projectedRevenue) * 100).toFixed(1)}% of projected revenue`}
>
{totalIncome >= job.projectedRevenue ? '🎯' : '📊'} {((totalIncome / job.projectedRevenue) * 100).toFixed(0)}%
</div>
{showPerformanceIndicator && (
<div
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${
performancePercentage >= 100
className={`text-xs font-medium px-2 py-0.5 rounded-full inline-block ${performancePercentage >= 100
? 'bg-green-900/50 text-green-400'
: performancePercentage >= 90
? 'bg-yellow-900/50 text-yellow-400'
: 'bg-red-900/50 text-red-400'
}`}
}`}
title={`Price performance: ${formatISK(totalIncome / itemsSold)}/unit vs ${formatISK(job.projectedRevenue / produced)}/unit expected (${performancePercentage.toFixed(1)}%)`}
>
{performancePercentage >= 100 ? '📈' : performancePercentage >= 90 ? '⚠️' : '📉'} {performancePercentage.toFixed(0)}%