refactor: reorder language selector before email input

Moved the language selector to appear before the email address field for better
UX flow. Users now select the notification language first, then enter the email
address that will receive notifications in that language.

Also applied right-alignment to the "new email" status indicator for consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-31 10:53:04 +01:00
parent 08a9215128
commit 5feab991ec

View File

@@ -359,6 +359,20 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
{(formValues.billFwdEnabled || formValues.rentDueNotificationEnabled) && (
<fieldset className="fieldset bg-base-200 border-base-300 rounded-box w-xs border p-4 pb-2 mt-4">
<legend className="fieldset-legend font-semibold uppercase">{t("tenant-email-legend")}</legend>
<label className="label">
<span className="label-text">{t("notification-language-label")}</span>
</label>
<select
id="tenantEmailLanguage"
name="tenantEmailLanguage"
className="select input-bordered w-full"
value={formValues.tenantEmailLanguage}
onChange={(e) => handleInputChange("tenantEmailLanguage", e.target.value)}
>
<option value="hr">{t("notification-language-option-hr")}</option>
<option value="en">{t("notification-language-option-en")}</option>
</select>
<label className="label">
<span className="label-text">{t("tenant-email-label")}</span>
</label>
@@ -414,7 +428,7 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
)}
</div>
):(
<div className="flex items-center gap-2 mt-2 ml-2">
<div className="flex items-center justify-end gap-2 mt-2 ml-2">
<PencilSquareIcon className="h-5 w-5 text-primary" />
<span className="text-sm text-primary">{t("email-status.new")}</span>
</div>
@@ -427,19 +441,6 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
</p>
))}
</div>
<label className="label">
<span className="label-text">{t("notification-language-label")}</span>
</label>
<select
id="tenantEmailLanguage"
name="tenantEmailLanguage"
className="select input-bordered w-full"
value={formValues.tenantEmailLanguage}
onChange={(e) => handleInputChange("tenantEmailLanguage", e.target.value)}
>
<option value="hr">{t("notification-language-option-hr")}</option>
<option value="en">{t("notification-language-option-en")}</option>
</select>
</fieldset>
)}