+ {/* Subcontractor select */}
+
+
+
+ {/* Preview of selected sub */}
+ {form.subcontractorId && (() => {
+ const sub = activeSubs.find(s => s.id === form.subcontractorId);
+ if (!sub) return null;
+ return (
+
+
+
+ {sub.name.charAt(0)}
+
+
+
{sub.name}
+
{sub.email} · {sub.phone}
+
+
+
+
+ {sub.rating?.toFixed?.(1) ?? '—'}
+
+
+ );
+ })()}
+ {errors.subcontractorId &&
}
+
+
+ {/* Title */}
+
+
+ setField('title', e.target.value)}
+ className={inputBase}
+ placeholder="e.g. Replace damaged ridge cap"
+ maxLength={120}
+ aria-invalid={Boolean(errors.title)}
+ />
+ {errors.title && }
+
+
+ {/* Location */}
+
+
+ setField('location', e.target.value)}
+ className={inputBase}
+ placeholder="2612 Dunwick Dr, Plano, TX 75023"
+ aria-invalid={Boolean(errors.location)}
+ />
+ {errors.location && }
+
+
+ {/* Description */}
+
+
+
+
+ {/* Due date + Priority */}
+
+
+
+ setField('dueDate', e.target.value)}
+ className={inputBase}
+ aria-invalid={Boolean(errors.dueDate)}
+ />
+ {errors.dueDate && }
+
+
+
+
+ Priority *
+
+
+ {taskPriorities.map(p => {
+ const style = PRIORITY_STYLES[p.value] || PRIORITY_STYLES.medium;
+ const active = form.priority === p.value;
+ return (
+
+ );
+ })}
+
+
+
+
+ {/* Photos */}
+
+
+
+
+ Photos & Annotations
+
+
+
+
+
+ {form.photos.length === 0 ? (
+
+ ) : (
+
+ {form.photos.map((p, idx) => (
+
+
+

+
+
+
+ {p.name}
+
+
+
updatePhotoAnnotation(p.id, e.target.value)}
+ placeholder='Annotation (e.g. "Paint here", "Repair this corner")'
+ className="w-full bg-white dark:bg-[#18181b] border border-zinc-200 dark:border-white/10 rounded-lg px-2.5 py-1.5 text-xs text-zinc-900 dark:text-white placeholder-zinc-400 focus:outline-none focus:border-blue-500"
+ maxLength={140}
+ />
+
+
+ ))}
+
+ )}
+
+
+ {/* Status indicator (informational) */}
+ {!isEdit && (
+
+
+ Task will be created with status
Assigned and the subcontractor will be notified.
+
+ )}
+
+
+ {/* Footer */}
+