refactor: replace payment dropdown with independent toggles
- Replace showPaymentInstructionsInMonthlyStatement dropdown with enableIbanPayment and enableRevolutPayment boolean toggles - Update UserSettingsForm to use separate fieldsets for IBAN and Revolut with independent toggle switches - Add hidden inputs to preserve values when toggles are disabled - Update validation logic to check enableIbanPayment instead of show2dCodeInMonthlyStatement - Reorganize translation keys to match new structure (iban-* and revolut-* prefixes) - Update ViewLocationCard to use enableIbanPayment field This provides better UX by allowing users to enable both payment methods simultaneously if needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,8 @@ export interface YearMonth {
|
||||
export interface UserSettings {
|
||||
/** user's ID */
|
||||
userId: string;
|
||||
/** whether enableshow IBAN payment instructions in monthly statement */
|
||||
enableIbanPayment?: boolean | null;
|
||||
/** owner name */
|
||||
ownerName?: string | null;
|
||||
/** owner street */
|
||||
@@ -28,18 +30,10 @@ export interface UserSettings {
|
||||
ownerIBAN?: string | null;
|
||||
/** currency (ISO 4217) */
|
||||
currency?: string | null;
|
||||
/** whether to enable Revolut payment instructions in monthly statement */
|
||||
enableRevolutPayment?: boolean | null;
|
||||
/** owner Revolut payment link */
|
||||
ownerRevolutProfileName?: string | null;
|
||||
/** whether to show 2D code in monthly statement */
|
||||
show2dCodeInMonthlyStatement?: boolean | null;
|
||||
/** whether to show payment instructions in monthly statement */
|
||||
showPaymentInstructionsInMonthlyStatement?: "disabled" | "iban" | "revolut" | null;
|
||||
|
||||
// /** whether enableshow IBAN payment instructions in monthly statement */
|
||||
// enableIbanPaymentInstructionsInMonthlyStatement?: boolean | null;
|
||||
// /** whether to enable Revolut payment instructions in monthly statement */
|
||||
// enableRevolutPaymentInstructionsInMonthlyStatement?: boolean | null;
|
||||
|
||||
};
|
||||
|
||||
/** bill object in the form returned by MongoDB */
|
||||
|
||||
Reference in New Issue
Block a user