Make shit EDITABLE DAMN IT
This commit is contained in:
@@ -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 }) => (
|
||||||
|
Reference in New Issue
Block a user