refactor: move language selector into tenant email fieldset

Improved UI organization by moving the language selector into the same fieldset
as the tenant email input, since both are related to email notifications. The
language selector now only appears when email notifications are enabled.

Changes:
- Move language selector inside tenant email fieldset (no separate fieldset)
- Add label for tenant email input field
- Simplify notification language label text
- Remove unused notification-language-legend translation key
- Language selector shares visibility condition with email field

This provides a more logical grouping of related settings and reduces visual
clutter when email notifications are disabled.

🤖 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:48:38 +01:00
parent 69f891210e
commit 532ad4c0e0
3 changed files with 9 additions and 10 deletions

View File

@@ -359,6 +359,9 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
{(formValues.billFwdEnabled || formValues.rentDueNotificationEnabled) && ( {(formValues.billFwdEnabled || formValues.rentDueNotificationEnabled) && (
<fieldset className="fieldset bg-base-200 border-base-300 rounded-box w-xs border p-4 pb-2 mt-4"> <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> <legend className="fieldset-legend font-semibold uppercase">{t("tenant-email-legend")}</legend>
<label className="label">
<span className="label-text">{t("tenant-email-label")}</span>
</label>
<input <input
id="tenantEmail" id="tenantEmail"
name="tenantEmail" name="tenantEmail"
@@ -424,11 +427,6 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
</p> </p>
))} ))}
</div> </div>
</fieldset>
)}
<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("notification-language-legend")}</legend>
<label className="label"> <label className="label">
<span className="label-text">{t("notification-language-label")}</span> <span className="label-text">{t("notification-language-label")}</span>
</label> </label>
@@ -442,7 +440,8 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
<option value="hr">{t("notification-language-option-hr")}</option> <option value="hr">{t("notification-language-option-hr")}</option>
<option value="en">{t("notification-language-option-en")}</option> <option value="en">{t("notification-language-option-en")}</option>
</select> </select>
</fieldset> </fieldset>
)}
<fieldset className="fieldset bg-base-200 border-base-300 rounded-box w-xs border p-4 pb-2 mt-4"> <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 text-base">{t("scope-legend")}</legend> <legend className="fieldset-legend font-semibold uppercase text-base">{t("scope-legend")}</legend>

View File

@@ -195,6 +195,7 @@
"rent-amount-label": "Monthly rent amount", "rent-amount-label": "Monthly rent amount",
"rent-amount-placeholder": "enter rent amount", "rent-amount-placeholder": "enter rent amount",
"tenant-email-legend": "TENANT EMAIL", "tenant-email-legend": "TENANT EMAIL",
"tenant-email-label": "Send tenant notifications to e-mail address:",
"tenant-email-placeholder": "enter tenant's email", "tenant-email-placeholder": "enter tenant's email",
"email-status": { "email-status": {
"reset-button-label": "Reset", "reset-button-label": "Reset",
@@ -205,8 +206,7 @@
"verified": "this e-mail address has been verified", "verified": "this e-mail address has been verified",
"unsubscribed": "tenant unsubscribed this address from receiving emails" "unsubscribed": "tenant unsubscribed this address from receiving emails"
}, },
"notification-language-legend": "NOTIFICATION EMAIL LANGUAGE", "notification-language-label": "Send tenant notifications in language:",
"notification-language-label": "Language for automatic notification emails",
"notification-language-option-hr": "Croatian (Hrvatski)", "notification-language-option-hr": "Croatian (Hrvatski)",
"notification-language-option-en": "English", "notification-language-option-en": "English",
"warning-missing-tenant-names": "Warning: Tenant first and last name are missing. The 2D barcode will not be displayed to the tenant when they open the shared link until both fields are filled in.", "warning-missing-tenant-names": "Warning: Tenant first and last name are missing. The 2D barcode will not be displayed to the tenant when they open the shared link until both fields are filled in.",

View File

@@ -194,6 +194,7 @@
"rent-amount-label": "Iznos najamnine", "rent-amount-label": "Iznos najamnine",
"rent-amount-placeholder": "unesite iznos najamnine", "rent-amount-placeholder": "unesite iznos najamnine",
"tenant-email-legend": "EMAIL PODSTANARA", "tenant-email-legend": "EMAIL PODSTANARA",
"tenant-email-label": "Obavijesti podstanara šalji na e-mail adresu:",
"tenant-email-placeholder": "unesite email podstanara", "tenant-email-placeholder": "unesite email podstanara",
"email-status": { "email-status": {
"reset-button-label": "Reset", "reset-button-label": "Reset",
@@ -204,8 +205,7 @@
"verified": "podstanar je potvrdio ovu e-mail adresu", "verified": "podstanar je potvrdio ovu e-mail adresu",
"unsubscribed": "podstanar je odjavio ovu e-mail adresu" "unsubscribed": "podstanar je odjavio ovu e-mail adresu"
}, },
"notification-language-legend": "JEZIK ZA OBAVIJESTI", "notification-language-label": "Obavijesti za podstanara šalji na jeziku:",
"notification-language-label": "Jezik za automatske obavijesti putem e-maila",
"notification-language-option-hr": "Hrvatski", "notification-language-option-hr": "Hrvatski",
"notification-language-option-en": "Engleski (English)", "notification-language-option-en": "Engleski (English)",
"warning-missing-tenant-names": "Upozorenje: Ime i prezime podstanara nedostaju. 2D barkod neće biti prikazan podstanaru kada otvori podijeljenu poveznicu dok oba polja ne budu popunjena.", "warning-missing-tenant-names": "Upozorenje: Ime i prezime podstanara nedostaju. 2D barkod neće biti prikazan podstanaru kada otvori podijeljenu poveznicu dok oba polja ne budu popunjena.",