Fix phone cell display (#4924)

Closes #4796 

## What has been done
- fix phone number value detection
- Update formatting from International format to National format

## Before
phone were formatted as text field type

![image](https://github.com/twentyhq/twenty/assets/29927851/27d87522-5b02-4131-8b83-6bce7501fb1b)

## After
phone are properly formatted in National format

![image](https://github.com/twentyhq/twenty/assets/29927851/72f71b0f-4fd7-4060-afe3-feb87bddab0d)

## FYI
Phones in International format look like

![image](https://github.com/twentyhq/twenty/assets/29927851/6bd47dc1-6350-46b9-b5fd-94f4344bffac)
This commit is contained in:
martmull
2024-04-11 16:30:49 +02:00
committed by GitHub
parent a7fcc5d47e
commit ee64576e5f
15 changed files with 57 additions and 18 deletions

View File

@ -18,7 +18,7 @@ export const PhoneDisplay = ({ value }: PhoneDisplayProps) => (
event.stopPropagation();
}}
>
{parsePhoneNumber(value, 'FR')?.formatInternational() || value}
{parsePhoneNumber(value, 'FR')?.formatNational() || value}
</ContactLink>
) : (
<ContactLink href="#">{value}</ContactLink>