feat: disable payment method select when no payment methods configured

- Add userSettings prop to LocationEditForm to check payment configuration
- Disable payment method dropdown when neither IBAN nor Revolut is enabled
- Force select value to "none" when both methods are disabled
- Disable individual IBAN/Revolut options when not configured
- Display NoteBox warning explaining why payment options are unavailable
- Update LocationEditPage and LocationAddPage to fetch and pass userSettings
- Add English and Croatian translations for disabled state message

This prevents users from configuring location payment methods before setting up their own payment info.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 16:48:23 +01:00
parent 88b6b32c3e
commit 600e31e7b1
5 changed files with 39 additions and 16 deletions

View File

@@ -146,11 +146,12 @@
"tenant-payment-instructions-legend": "PAYMENT INSTRUCTIONS",
"tenant-payment-instructions-code-info": "When the tenant opens the link to the statement for the given month, the application can show payment instructions for utility costs to your IBAN, as well as a 2D code they can scan.",
"tenant-payment-instructions-method--legend": "Podstanaru prikaži upute za uplatu:",
"tenant-payment-instructions-method--none": "ne prikazuj upute za uplatu",
"tenant-payment-instructions-method--iban": "uplata na IBAN",
"tenant-payment-instructions-method--revolut": "uplata na Revolut",
"tenant-payment-instructions-method--legend": "Show payment instructions to tenant:",
"tenant-payment-instructions-method--none": "do not show payment instructions",
"tenant-payment-instructions-method--iban": "payment via IBAN",
"tenant-payment-instructions-method--revolut": "payment via Revolut",
"tenant-payment-instructions-method--disabled-message": "IMPORTANT: Payment instructions are not available because neither IBAN nor Revolut payment methods are configured in your user settings. Please go to Settings and enable at least one payment method.",
"tenant--payment-instructions-note": "IMPORTANT: for this to work you will also need to go into app settings and enter your name and IBAN.",
"iban-payment--tenant-name-label": "Tenant First and Last Name",