feat(18-01): add the cabana money field (task 1)

- type: money on fields.yaml with currency or currencyFrom, scale (2..4,
  default 4) and max; boot fails naming the field on two sources, none,
  a bad scale or max, a column that is not a string or a Scanner/Valuer,
  or a currencyFrom that is not a string column
- a save answers 422 money.invalid, money.too_precise or money.too_large
  on the field and fills the accepted decimal string unchanged; the same
  check runs on controller, settings and relation child saves
- backend::lang money.* phrases in en and pl
- admin SPA: money.ts (parseMoneyInput, trimMoneyDisplay, formatMoney over
  Intl with the string itself), MoneyField.vue with the currency suffix,
  blur validation and the read-only box, preview through the control,
  the field scope on PreviewView; regenerated OpenAPI and TS types,
  rebuilt modules/boardwalk/dist
- acme.payments fixture with TestMoneyFieldCompile and the Docker
  TestMoneyFieldSmoke; forms.md Money section and cabana README
This commit is contained in:
Jakub Zych
2026-10-13 11:15:05 +02:00
parent 99ccae232c
commit 20385e53ee
33 changed files with 1388 additions and 26 deletions

View File

@@ -139,6 +139,11 @@ datepicker:
clear: Clear value
prev_month: Previous month
next_month: Next month
money:
invalid: "This is not an amount. Enter digits with one decimal separator, for example 1234.56."
too_precise: "Use at most :scale decimal places. Amounts are never rounded."
too_large: "This amount is larger than the field can store (at most :max)."
currency: "Currency: :code"
fileupload:
attachment: Attachment details
help: Add a title and description for this attachment.

View File

@@ -149,6 +149,11 @@ datepicker:
clear: Wyczyść wartość
prev_month: Poprzedni miesiąc
next_month: Następny miesiąc
money:
invalid: "To nie jest kwota. Wpisz cyfry z jednym separatorem dziesiętnym, np. 1234,56."
too_precise: "Użyj najwyżej :scale miejsc po przecinku. Kwoty nie są zaokrąglane."
too_large: "Ta kwota jest większa, niż pole może zapisać (najwyżej :max)."
currency: "Waluta: :code"
fileupload:
attachment: Szczegóły załącznika
help: Dodaj tytuł oraz opis załącznika.