(refactor) renames autoBillFwd > billFwdEnabled

This commit is contained in:
Knee Cola
2025-12-30 11:09:21 +01:00
parent 4906cc1990
commit e9012ed231
4 changed files with 23 additions and 19 deletions

View File

@@ -44,7 +44,7 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
tenantEmailStatus: location?.tenantEmailStatus ?? EmailStatus.Unverified,
tenantPaymentMethod: location?.tenantPaymentMethod ?? "none",
proofOfPaymentType: location?.proofOfPaymentType ?? "none",
autoBillFwd: location?.autoBillFwd ?? false,
billFwdEnabled: location?.billFwdEnabled ?? false,
billFwdStrategy: location?.billFwdStrategy ?? "when-payed",
rentDueNotificationEnabled: location?.rentDueNotificationEnabled ?? false,
rentAmount: location?.rentAmount ?? "",
@@ -278,16 +278,16 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
<label className="label cursor-pointer justify-start gap-3">
<input
type="checkbox"
name="autoBillFwd"
name="billFwdEnabled"
className="toggle toggle-primary"
checked={formValues.autoBillFwd}
onChange={(e) => handleInputChange("autoBillFwd", e.target.checked)}
checked={formValues.billFwdEnabled}
onChange={(e) => handleInputChange("billFwdEnabled", e.target.checked)}
/>
<legend className="fieldset-legend">{t("auto-utility-bill-forwarding-toggle-label")}</legend>
</label>
</fieldset>
{formValues.autoBillFwd && (
{formValues.billFwdEnabled && (
<fieldset className="fieldset mt-2 p-2">
<legend className="fieldset-legend">{t("utility-bill-forwarding-strategy-label")}</legend>
<select defaultValue={formValues.billFwdStrategy} className="select input-bordered w-full" name="billFwdStrategy">
@@ -355,7 +355,7 @@ export const LocationEditForm: FC<LocationEditFormProps> = ({ location, yearMont
)}
</fieldset>
{(formValues.autoBillFwd || 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">
<legend className="fieldset-legend font-semibold uppercase">{t("tenant-email-legend")}</legend>
<input