Make shit EDITABLE DAMN IT

This commit is contained in:
2025-07-08 19:20:53 +02:00
parent fe4eb80ed5
commit 7644ea5c6b

View File

@@ -92,10 +92,9 @@ const JobCardDetails: React.FC<JobCardDetailsProps> = ({ job }) => {
const handleClick = (fieldName: string, value: string | null, e: React.MouseEvent) => { const handleClick = (fieldName: string, value: string | null, e: React.MouseEvent) => {
e.stopPropagation(); e.stopPropagation();
if (value) { // Allow editing regardless of whether value exists or not
setEditingField(fieldName); setEditingField(fieldName);
setTempValues({ ...tempValues, [fieldName]: formatDateForInput(value) }); setTempValues({ ...tempValues, [fieldName]: formatDateForInput(value) });
}
}; };
const DateField = ({ label, value, fieldName, icon }: { label: string; value: string | null; fieldName: string; icon: React.ReactNode }) => ( const DateField = ({ label, value, fieldName, icon }: { label: string; value: string | null; fieldName: string; icon: React.ReactNode }) => (