Remote objects: Fix comment override - id typing - label (#4784)

Several fixes for remote objects:
- labels are now displayed in title case. Added an util for this.
- Ids are often integers but the foreign keys on the relations were
uuid. Sending the id type to the object metadata service so it can
creates the foreign key accordingly
- Graphql comments are override when several remote objects are
imported. Building a function that fetch the existing comment and update
it

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-04-04 15:35:49 +02:00
committed by GitHub
parent f8ec40dbfb
commit 41960f3593
6 changed files with 102 additions and 43 deletions

View File

@ -0,0 +1,6 @@
import { capitalize } from 'src/utils/capitalize';
export const camelToTitleCase = (camelCaseText: string) =>
capitalize(camelCaseText)
.replace(/([A-Z])/g, ' $1')
.replace(/^./, (str) => str.toUpperCase());