Move capitalize into twenty-shared (#9414)
capitalize had been moved into twenty-shared. Let's remove the duplicates in server and front !
This commit is contained in:
@ -3,7 +3,7 @@ import gql from 'graphql-tag';
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { RecordGqlFields } from '@/object-record/graphql/types/RecordGqlFields';
|
||||
import { getAggregateQueryName } from '@/object-record/utils/getAggregateQueryName';
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const generateAggregateQuery = ({
|
||||
objectMetadataItem,
|
||||
|
||||
@ -3,7 +3,7 @@ import gql from 'graphql-tag';
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { mapObjectMetadataToGraphQLQuery } from '@/object-metadata/utils/mapObjectMetadataToGraphQLQuery';
|
||||
import { RecordGqlOperationGqlRecordFields } from '@/object-record/graphql/types/RecordGqlOperationGqlRecordFields';
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export type QueryCursorDirection = 'before' | 'after';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { mapObjectMetadataToGraphQLQuery } from '@/object-metadata/utils/mapObjectMetadataToGraphQLQuery';
|
||||
import { RecordGqlOperationGqlRecordFields } from '@/object-record/graphql/types/RecordGqlOperationGqlRecordFields';
|
||||
import { getSearchRecordsQueryResponseField } from '@/object-record/utils/getSearchRecordsQueryResponseField';
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export type QueryCursorDirection = 'before' | 'after';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { capitalize } from 'twenty-shared';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
|
||||
export const getAggregateQueryName = (
|
||||
objectMetadataNamePlural: string,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||
import { AGGREGATE_OPERATIONS } from '@/object-record/record-table/constants/AggregateOperations';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
|
||||
type NameForAggregation = {
|
||||
[T in AGGREGATE_OPERATIONS]?: string;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getCreateManyRecordsMutationResponseField = (
|
||||
objectNamePlural: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getCreateOneRecordMutationResponseField = (
|
||||
objectNameSingular: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getDeleteManyRecordsMutationResponseField = (
|
||||
objectNamePlural: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getDeleteOneRecordMutationResponseField = (
|
||||
objectNameSingular: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getDestroyManyRecordsMutationResponseField = (
|
||||
objectNamePlural: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getDestroyOneRecordMutationResponseField = (
|
||||
objectNameSingular: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getRestoreManyRecordsMutationResponseField = (
|
||||
objectNamePlural: string,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getSearchRecordsQueryResponseField = (objectNamePlural: string) =>
|
||||
`search${capitalize(objectNamePlural)}`;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { capitalize } from '~/utils/string/capitalize';
|
||||
import { capitalize } from 'twenty-shared';
|
||||
|
||||
export const getUpdateOneRecordMutationResponseField = (
|
||||
objectNameSingular: string,
|
||||
|
||||
Reference in New Issue
Block a user