Skip to content

Commit 0a470eb

Browse files
Copilothotlong
andcommitted
Refactor: Apply multi-currency support to standard currency field type
- Remove 'money' field type from enum (use existing 'currency' instead) - Rename MoneyConfig to CurrencyConfig - Rename MoneyValue to CurrencyValue - Change moneyConfig to currencyConfig in FieldSchema - Update all tests to use currency type instead of money type - Remove Field.money() helper (use Field.currency() instead) - Delete MoneyConfig/MoneyValue schemas and docs - Generate new CurrencyConfig/CurrencyValue schemas and docs - All 1638 tests passing Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 71261ec commit 0a470eb

File tree

15 files changed

+125
-135
lines changed

15 files changed

+125
-135
lines changed

content/docs/references/data/field/MoneyConfig.mdx renamed to content/docs/references/data/field/CurrencyConfig.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: MoneyConfig
3-
description: MoneyConfig Schema Reference
2+
title: CurrencyConfig
3+
description: CurrencyConfig Schema Reference
44
---
55

66
## Properties

content/docs/references/data/field/MoneyValue.mdx renamed to content/docs/references/data/field/CurrencyValue.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: MoneyValue
3-
description: MoneyValue Schema Reference
2+
title: CurrencyValue
3+
description: CurrencyValue Schema Reference
44
---
55

66
## Properties

content/docs/references/data/field/Field.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Field Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` | optional | Machine name (snake_case) |
1111
| **label** | `string` | optional | Human readable label |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'money' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'geolocation' \| 'address' \| 'code' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode'>` || Field Data Type |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'geolocation' \| 'address' \| 'code' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode'>` || Field Data Type |
1313
| **description** | `string` | optional | Tooltip/Help text |
1414
| **format** | `string` | optional | Format string (e.g. email, phone) |
1515
| **required** | `boolean` | optional | Is required |
@@ -49,7 +49,7 @@ description: Field Schema Reference
4949
| **qrErrorCorrection** | `Enum<'L' \| 'M' \| 'Q' \| 'H'>` | optional | QR code error correction level (L=7%, M=15%, Q=25%, H=30%). Only applicable when barcodeFormat is "qr" |
5050
| **displayValue** | `boolean` | optional | Display human-readable value below barcode/QR code |
5151
| **allowScanning** | `boolean` | optional | Enable camera scanning for barcode/QR code input |
52-
| **moneyConfig** | `object` | optional | Configuration for money field type |
52+
| **currencyConfig** | `object` | optional | Configuration for currency field type |
5353
| **hidden** | `boolean` | optional | Hidden from default UI |
5454
| **readonly** | `boolean` | optional | Read-only in UI |
5555
| **encryption** | `boolean` | optional | Encrypt at rest |

content/docs/references/data/field/FieldType.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ description: FieldType Schema Reference
1717
* `number`
1818
* `currency`
1919
* `percent`
20-
* `money`
2120
* `date`
2221
* `datetime`
2322
* `time`

content/docs/references/ui/action/ActionParam.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ description: ActionParam Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` || |
1111
| **label** | `string` || |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'money' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'geolocation' \| 'address' \| 'code' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode'>` || |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'richtext' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber' \| 'location' \| 'geolocation' \| 'address' \| 'code' \| 'color' \| 'rating' \| 'slider' \| 'signature' \| 'qrcode'>` || |
1313
| **required** | `boolean` | optional | |
1414
| **options** | `object[]` | optional | |

packages/spec/json-schema/data/MoneyConfig.json renamed to packages/spec/json-schema/data/CurrencyConfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$ref": "#/definitions/MoneyConfig",
2+
"$ref": "#/definitions/CurrencyConfig",
33
"definitions": {
4-
"MoneyConfig": {
4+
"CurrencyConfig": {
55
"type": "object",
66
"properties": {
77
"precision": {

packages/spec/json-schema/data/MoneyValue.json renamed to packages/spec/json-schema/data/CurrencyValue.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$ref": "#/definitions/MoneyValue",
2+
"$ref": "#/definitions/CurrencyValue",
33
"definitions": {
4-
"MoneyValue": {
4+
"CurrencyValue": {
55
"type": "object",
66
"properties": {
77
"value": {

packages/spec/json-schema/data/Field.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"number",
2929
"currency",
3030
"percent",
31-
"money",
3231
"date",
3332
"datetime",
3433
"time",
@@ -304,7 +303,7 @@
304303
"type": "boolean",
305304
"description": "Enable camera scanning for barcode/QR code input"
306305
},
307-
"moneyConfig": {
306+
"currencyConfig": {
308307
"type": "object",
309308
"properties": {
310309
"precision": {
@@ -332,7 +331,7 @@
332331
}
333332
},
334333
"additionalProperties": false,
335-
"description": "Configuration for money field type"
334+
"description": "Configuration for currency field type"
336335
},
337336
"hidden": {
338337
"type": "boolean",

packages/spec/json-schema/data/FieldType.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"number",
1717
"currency",
1818
"percent",
19-
"money",
2019
"date",
2120
"datetime",
2221
"time",

packages/spec/json-schema/data/Object.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
"number",
6969
"currency",
7070
"percent",
71-
"money",
7271
"date",
7372
"datetime",
7473
"time",
@@ -344,7 +343,7 @@
344343
"type": "boolean",
345344
"description": "Enable camera scanning for barcode/QR code input"
346345
},
347-
"moneyConfig": {
346+
"currencyConfig": {
348347
"type": "object",
349348
"properties": {
350349
"precision": {
@@ -372,7 +371,7 @@
372371
}
373372
},
374373
"additionalProperties": false,
375-
"description": "Configuration for money field type"
374+
"description": "Configuration for currency field type"
376375
},
377376
"hidden": {
378377
"type": "boolean",

0 commit comments

Comments
 (0)