feat: add short number formatting option to number field (#12613)

resolve #11927
Add a new 'Short Number' option that disables decimals and resets the
value to 0 when selected.


https://github.com/user-attachments/assets/d3524115-e3ec-4a07-9dbf-e19d03cf65dd



https://github.com/user-attachments/assets/2f2b46d1-06d9-4a92-8f37-0291d46accab

---------

Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
Naifer
2025-06-16 10:48:18 +01:00
committed by GitHub
parent 929586e4a9
commit a44ba2065d
8 changed files with 67 additions and 26 deletions

View File

@ -25,6 +25,7 @@ import {
enum ValueType {
PERCENTAGE = 'percentage',
NUMBER = 'number',
SHORT_NUMBER = 'shortNumber',
}
class NumberSettingsValidation {
@ -35,7 +36,7 @@ class NumberSettingsValidation {
@IsOptional()
@IsEnum(ValueType)
type?: 'percentage' | 'number';
type?: 'percentage' | 'number' | 'shortNumber';
}
class TextSettingsValidation {