{state.errors?.tenantEmail &&
diff --git a/app/ui/NoteBox.tsx b/app/ui/NoteBox.tsx
new file mode 100644
index 0000000..ce60aa8
--- /dev/null
+++ b/app/ui/NoteBox.tsx
@@ -0,0 +1,7 @@
+import { FC, ReactNode } from "react";
+
+export const NoteBox: FC<{ children: ReactNode, className?: string }> = ({ children, className }) =>
+
+ ⚠️
+ {children}
+
\ No newline at end of file
diff --git a/app/ui/UserSettingsForm.tsx b/app/ui/UserSettingsForm.tsx
index 95a12fa..42f310a 100644
--- a/app/ui/UserSettingsForm.tsx
+++ b/app/ui/UserSettingsForm.tsx
@@ -9,6 +9,8 @@ import Link from "next/link";
import SettingsIcon from "@mui/icons-material/Settings";
import { formatIban } from "../lib/formatStrings";
import { InfoBox } from "./InfoBox";
+import { NoteBox } from "./NoteBox";
+import { LinkIcon } from "@heroicons/react/24/outline";
export type UserSettingsFormProps = {
userSettings: UserSettings | null;
@@ -27,26 +29,23 @@ const FormFields: FC
= ({ userSettings, errors, message }) => {
// Track current form values for real-time validation
const [formValues, setFormValues] = useState({
+ enableIbanPayment: userSettings?.enableIbanPayment ?? false,
ownerName: userSettings?.ownerName ?? "",
ownerStreet: userSettings?.ownerStreet ?? "",
ownerTown: userSettings?.ownerTown ?? "",
ownerIBAN: formatIban(userSettings?.ownerIBAN) ?? "",
currency: userSettings?.currency ?? "EUR",
+
+ enableRevolutPayment: userSettings?.enableRevolutPayment ?? false,
+ ownerRevolutProfileName: userSettings?.ownerRevolutProfileName ?? "",
});
- const handleInputChange = (field: keyof typeof formValues, value: string) => {
+ // https://revolut.me/aderezic?currency=EUR&amount=70000
+
+ const handleInputChange = (field: keyof typeof formValues, value: string | boolean) => {
setFormValues(prev => ({ ...prev, [field]: value }));
};
- // Check if any required field is missing (clean IBAN of spaces for validation)
- const cleanedOwnerIBAN = formValues.ownerIBAN.replace(/\s/g, '');
- const hasMissingData = !formValues.ownerName || !formValues.ownerStreet || !formValues.ownerTown || !cleanedOwnerIBAN || !formValues.currency;
-
- // Track whether to generate 2D code for tenant (use persisted value from database)
- const [show2dCodeInMonthlyStatement, setShow2dCodeInMonthlyStatement] = useState(
- userSettings?.show2dCodeInMonthlyStatement ?? false
- );
-
return (
<>