Support for multiple values in the Phone field (#6882)
### Description - This is the first PR on Phones field; - We are introducing new field type(Phones) - We are Forbidding creation of Phone field - We Added support for filtering and sorting on Phones field - We are using the same display mode as used on the Links field type (chips), check the Domain field of the Company object - We are also using the same logic of the link when editing the field **How to Test** 1. Checkout to TWNTY-6260 branch 2. Reset database using "npx nx database:reset twenty-server" command 3. Add custom field of type Phones in settings/data-model **Loom Video:**\ <https://www.loom.com/share/3c981260be254dcf851256d020a20ab0?sid=58507361-3a3b-452c-9de8-b5b1abda70ac> ### Refs #6260 Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
91187dcf82
commit
846953b0f4
@ -33,6 +33,20 @@ describe('computeSchemaComponents', () => {
|
||||
fieldPhone: {
|
||||
type: 'string',
|
||||
},
|
||||
fieldPhones: {
|
||||
properties: {
|
||||
additionalPhones: {
|
||||
type: 'object',
|
||||
},
|
||||
primaryPhoneCountryCode: {
|
||||
type: 'string',
|
||||
},
|
||||
primaryPhoneNumber: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
type: 'object',
|
||||
},
|
||||
fieldEmail: {
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
@ -195,6 +209,20 @@ describe('computeSchemaComponents', () => {
|
||||
fieldPhone: {
|
||||
type: 'string',
|
||||
},
|
||||
fieldPhones: {
|
||||
properties: {
|
||||
additionalPhones: {
|
||||
type: 'object',
|
||||
},
|
||||
primaryPhoneCountryCode: {
|
||||
type: 'string',
|
||||
},
|
||||
primaryPhoneNumber: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
type: 'object',
|
||||
},
|
||||
fieldEmail: {
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
@ -356,6 +384,20 @@ describe('computeSchemaComponents', () => {
|
||||
fieldPhone: {
|
||||
type: 'string',
|
||||
},
|
||||
fieldPhones: {
|
||||
properties: {
|
||||
additionalPhones: {
|
||||
type: 'object',
|
||||
},
|
||||
primaryPhoneCountryCode: {
|
||||
type: 'string',
|
||||
},
|
||||
primaryPhoneNumber: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
type: 'object',
|
||||
},
|
||||
fieldEmail: {
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
|
||||
@ -137,6 +137,7 @@ const getSchemaComponentsProperties = ({
|
||||
case FieldMetadataType.ADDRESS:
|
||||
case FieldMetadataType.ACTOR:
|
||||
case FieldMetadataType.EMAILS:
|
||||
case FieldMetadataType.PHONES:
|
||||
itemProperty = {
|
||||
type: 'object',
|
||||
properties: compositeTypeDefinitions
|
||||
|
||||
Reference in New Issue
Block a user