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>
7 lines
219 B
TypeScript
7 lines
219 B
TypeScript
import { capitalize } from 'src/utils/capitalize';
|
|
|
|
export const camelToTitleCase = (camelCaseText: string) =>
|
|
capitalize(camelCaseText)
|
|
.replace(/([A-Z])/g, ' $1')
|
|
.replace(/^./, (str) => str.toUpperCase());
|