From a2ccde16e5afb683b6ea06d018c0916fdb03989e Mon Sep 17 00:00:00 2001 From: Knee Cola Date: Mon, 24 Nov 2025 21:04:21 +0100 Subject: [PATCH] style: improve LocationEditForm fieldset styling and formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Wrap location name input in styled fieldset matching other sections - Add consistent bg-base-200 border styling to location name fieldset - Fix indentation and whitespace for better code consistency - Remove trailing whitespace throughout the file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/ui/LocationEditForm.tsx | 140 ++++++++++++++++++------------------ 1 file changed, 71 insertions(+), 69 deletions(-) diff --git a/app/ui/LocationEditForm.tsx b/app/ui/LocationEditForm.tsx index 781812c..b2b8eb0 100644 --- a/app/ui/LocationEditForm.tsx +++ b/app/ui/LocationEditForm.tsx @@ -27,7 +27,7 @@ export type LocationEditFormProps = { export const LocationEditForm: FC = ({ location, yearMonth, userSettings }) => { const initialState = { message: null, errors: {} }; - + const handleAction = updateOrAddLocation.bind(null, location?._id, location?.yearMonth ?? yearMonth); const [state, dispatch] = useFormState(handleAction, initialState); @@ -65,24 +65,26 @@ export const LocationEditForm: FC = ({ location, yearMont } -
- {t("location-name-legend")} - handleInputChange("locationName", e.target.value)} +
+ {t("location-name-legend")} +
+ handleInputChange("locationName", e.target.value)} /> -
- {state.errors?.locationName && - state.errors.locationName.map((error: string) => ( -

- {error} -

- ))} -
+
+ {state.errors?.locationName && + state.errors.locationName.map((error: string) => ( +

+ {error} +

+ ))} +
+
@@ -105,7 +107,7 @@ export const LocationEditForm: FC = ({ location, yearMont t("tenant-payment-instructions-method--iban") : t("tenant-payment-instructions-method--iban-disabled") } - +
- { formValues.tenantPaymentMethod === "iban" && userSettings?.enableIbanPayment ? ( + {formValues.tenantPaymentMethod === "iban" && userSettings?.enableIbanPayment ? ( <>
{t("iban-payment--form-title")}
@@ -192,30 +194,30 @@ export const LocationEditForm: FC = ({ location, yearMont
) : // ELSE include hidden inputs to preserve existing values - <> - - - - + <> + + + + } -
+
{t("auto-utility-bill-forwarding-legend")} {t("auto-utility-bill-forwarding-info")} @@ -270,7 +272,7 @@ export const LocationEditForm: FC = ({ location, yearMont - {t("add-to-subsequent-months")} - -
+ {!location ? ( +
+ +
- ) : ( - <> - {t("update-scope-info")} -
- {t("update-scope-legend")} - -
- - )} + ) : ( + <> + {t("update-scope-info")} +
+ {t("update-scope-legend")} + +
+ + )}
@@ -378,7 +380,7 @@ export const LocationEditFormSkeleton: FC = () => { return (
- +
{t("location-name-legend")}