chore: UX design audit cleanup and receipt flow improvements #186

Merged
egullickson merged 25 commits from issue-162-ux-design-audit-cleanup into main 2026-02-14 03:50:23 +00:00
Showing only changes of commit daa0cd072e - Show all commits

View File

@@ -31,8 +31,8 @@ export const DocumentForm: React.FC<DocumentFormProps> = ({
onSuccess,
onCancel
}) => {
const [documentType, setDocumentType] = React.useState<DocumentType>(
initialValues?.documentType || 'insurance'
const [documentType, setDocumentType] = React.useState<DocumentType | ''>(
initialValues?.documentType || ''
);
const [vehicleID, setVehicleID] = React.useState<string>(initialValues?.vehicleId || '');
const [title, setTitle] = React.useState<string>(initialValues?.title || '');
@@ -152,6 +152,10 @@ export const DocumentForm: React.FC<DocumentFormProps> = ({
setError('Please select a vehicle.');
return;
}
if (!documentType) {
setError('Please select a document type.');
return;
}
if (!title.trim()) {
setError('Please enter a title.');
return;
@@ -337,7 +341,9 @@ export const DocumentForm: React.FC<DocumentFormProps> = ({
value={documentType}
onChange={(e) => setDocumentType(e.target.value as DocumentType)}
disabled={mode === 'edit'}
required
>
<option value="" disabled>Select a document type...</option>
<option value="insurance">Insurance</option>
<option value="registration">Registration</option>
<option value="manual">Manual</option>