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:
4
modules/cabana/testdata/payments/controllers/invoices/config_form.yaml
vendored
Normal file
4
modules/cabana/testdata/payments/controllers/invoices/config_form.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
name: New invoice
|
||||
form: ~/plugins/acme/payments/models/invoice/fields.yaml
|
||||
modelClass: Invoice
|
||||
defaultRedirect: acme/payments/invoices
|
||||
7
modules/cabana/testdata/payments/controllers/invoices/config_list.yaml
vendored
Normal file
7
modules/cabana/testdata/payments/controllers/invoices/config_list.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
list: ~/plugins/acme/payments/models/invoice/columns.yaml
|
||||
modelClass: Invoice
|
||||
title: Invoices
|
||||
recordUrl: acme/payments/invoices/update/:id
|
||||
recordsPerPage: 20
|
||||
toolbar:
|
||||
buttons: [create]
|
||||
Reference in New Issue
Block a user