Remove tenantLastName field from LocationEditForm and database
- Removed tenantLastName from BillingLocation interface - Updated LocationEditForm to remove tenantLastName input field - Removed tenantLastName from all database operations (insert and update) - Updated form validation schema to remove tenantLastName validation - Updated ViewLocationCard to use only tenantFirstName for payer name - Removed tenantLastName from tenant field state tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,6 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
|
||||
// Track tenant field values for real-time validation
|
||||
const [tenantFields, setTenantFields] = useState({
|
||||
tenantFirstName: location?.tenantFirstName ?? "",
|
||||
tenantLastName: location?.tenantLastName ?? "",
|
||||
tenantStreet: location?.tenantStreet ?? "",
|
||||
tenantTown: location?.tenantTown ?? "",
|
||||
tenantEmail: location?.tenantEmail ?? "",
|
||||
@@ -123,29 +122,6 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="form-control w-full">
|
||||
<label className="label">
|
||||
<span className="label-text">{t("tenant-last-name-label")}</span>
|
||||
</label>
|
||||
<input
|
||||
id="tenantLastName"
|
||||
name="tenantLastName"
|
||||
type="text"
|
||||
placeholder={t("tenant-last-name-placeholder")}
|
||||
className="input input-bordered w-full placeholder:text-gray-600"
|
||||
defaultValue={location?.tenantLastName ?? ""}
|
||||
onChange={(e) => handleTenantFieldChange("tenantLastName", e.target.value)}
|
||||
/>
|
||||
<div id="tenantLastName-error" aria-live="polite" aria-atomic="true">
|
||||
{state.errors?.tenantLastName &&
|
||||
state.errors.tenantLastName.map((error: string) => (
|
||||
<p className="mt-2 text-sm text-red-500" key={error}>
|
||||
{error}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="form-control w-full">
|
||||
<label className="label">
|
||||
<span className="label-text">{t("tenant-street-label")}</span>
|
||||
|
||||
Reference in New Issue
Block a user