Enhance job card with status colors and editability
- Added background colors to job cards based on status. - Implemented editable date fields and projected costs/profit. - Added a dropdown for status selection.
This commit is contained in:
@@ -29,9 +29,22 @@ const JobCard: React.FC<JobCardProps> = ({
|
||||
navigate(`/${job.id}`);
|
||||
};
|
||||
|
||||
const getStatusBackgroundColor = (status: string) => {
|
||||
switch (status) {
|
||||
case 'Planned': return 'bg-gray-600/20';
|
||||
case 'Acquisition': return 'bg-yellow-600/20';
|
||||
case 'Running': return 'bg-blue-600/20';
|
||||
case 'Done': return 'bg-purple-600/20';
|
||||
case 'Selling': return 'bg-orange-600/20';
|
||||
case 'Closed': return 'bg-green-600/20';
|
||||
case 'Tracked': return 'bg-cyan-600/20';
|
||||
default: return 'bg-gray-600/20';
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Card
|
||||
className={`bg-gray-900 border-gray-700 text-white h-full flex flex-col cursor-pointer hover:bg-gray-800/50 transition-colors ${job.status === 'Tracked' ? 'border-l-4 border-l-cyan-600' : ''}`}
|
||||
className={`bg-gray-900 border-gray-700 text-white h-full flex flex-col cursor-pointer hover:bg-gray-800/50 transition-colors ${job.status === 'Tracked' ? 'border-l-4 border-l-cyan-600' : ''} ${getStatusBackgroundColor(job.status)}`}
|
||||
onClick={handleCardClick}
|
||||
>
|
||||
<CardHeader className="flex-shrink-0">
|
||||
|
||||
Reference in New Issue
Block a user