(refactor) rename: rentDueNotification > rentDueNotificationEnabled

This commit is contained in:
Knee Cola
2025-12-30 10:45:48 +01:00
parent 3e4d8fb95c
commit 4906cc1990
4 changed files with 22 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
proofOfPaymentType: location?.proofOfPaymentType ?? "none",
autoBillFwd: location?.autoBillFwd ?? false,
billFwdStrategy: location?.billFwdStrategy ?? "when-payed",
rentDueNotification: location?.rentDueNotification ?? false,
rentDueNotificationEnabled: location?.rentDueNotificationEnabled ?? false,
rentAmount: location?.rentAmount ?? "",
rentDueDay: location?.rentDueDay ?? 1,
});
@@ -306,16 +306,16 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
<label className="label cursor-pointer justify-start gap-3">
<input
type="checkbox"
name="rentDueNotification"
name="rentDueNotificationEnabled"
className="toggle toggle-primary"
checked={formValues.rentDueNotification}
onChange={(e) => handleInputChange("rentDueNotification", e.target.checked)}
checked={formValues.rentDueNotificationEnabled}
onChange={(e) => handleInputChange("rentDueNotificationEnabled", e.target.checked)}
/>
<legend className="fieldset-legend">{t("auto-rent-notification-toggle-label")}</legend>
</label>
</fieldset>
{formValues.rentDueNotification && (
{formValues.rentDueNotificationEnabled && (
<div className="animate-expand-fade-in origin-top">
<fieldset className="fieldset mt-2 p-2">
<legend className="fieldset-legend">{t("rent-due-day-label")}</legend>
@@ -355,7 +355,7 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
)}
</fieldset>
{(formValues.autoBillFwd || formValues.rentDueNotification) && (
{(formValues.autoBillFwd || 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>
<input