mirror of
https://github.com/twentyhq/twenty.git
synced 2024-09-11 23:37:21 +03:00
refactor: merge FieldType and FieldMetadataType (#4504)
* refactor: merge FieldType and FieldMetadataType * fix: fix args passed to assertFieldMetadata * fix: omit RawJson from supported types in settings
This commit is contained in:
parent
9e70f5b650
commit
b77d589497
@ -1,11 +1,10 @@
|
||||
import { ApolloClient, useMutation } from '@apollo/client';
|
||||
import { getOperationName } from '@apollo/client/utilities';
|
||||
|
||||
import { FieldType } from '@/object-record/record-field/types/FieldType';
|
||||
import {
|
||||
CreateFieldInput,
|
||||
CreateOneFieldMetadataItemMutation,
|
||||
CreateOneFieldMetadataItemMutationVariables,
|
||||
FieldMetadataType,
|
||||
} from '~/generated-metadata/graphql';
|
||||
|
||||
import { CREATE_ONE_FIELD_METADATA_ITEM } from '../graphql/mutations';
|
||||
@ -13,13 +12,6 @@ import { FIND_MANY_OBJECT_METADATA_ITEMS } from '../graphql/queries';
|
||||
|
||||
import { useApolloMetadataClient } from './useApolloMetadataClient';
|
||||
|
||||
type CreateOneFieldMetadataItemArgs = Omit<
|
||||
CreateOneFieldMetadataItemMutationVariables['input']['field'],
|
||||
'type'
|
||||
> & {
|
||||
type: FieldType;
|
||||
};
|
||||
|
||||
export const useCreateOneFieldMetadataItem = () => {
|
||||
const apolloMetadataClient = useApolloMetadataClient();
|
||||
|
||||
@ -30,16 +22,11 @@ export const useCreateOneFieldMetadataItem = () => {
|
||||
client: apolloMetadataClient ?? ({} as ApolloClient<any>),
|
||||
});
|
||||
|
||||
const createOneFieldMetadataItem = async (
|
||||
input: CreateOneFieldMetadataItemArgs,
|
||||
) => {
|
||||
const createOneFieldMetadataItem = async (input: CreateFieldInput) => {
|
||||
return await mutate({
|
||||
variables: {
|
||||
input: {
|
||||
field: {
|
||||
...input,
|
||||
type: input.type as FieldMetadataType, // Todo improve typing once we have aligned backend and frontend
|
||||
},
|
||||
field: input,
|
||||
},
|
||||
},
|
||||
awaitRefetchQueries: true,
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { FieldType } from '@/object-record/record-field/types/FieldType';
|
||||
import { Field } from '~/generated/graphql';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
@ -29,7 +28,7 @@ export const useFieldMetadataItem = () => {
|
||||
...formatFieldMetadataItemInput(input),
|
||||
defaultValue: input.defaultValue,
|
||||
objectMetadataId: input.objectMetadataId,
|
||||
type: input.type as FieldType,
|
||||
type: input.type,
|
||||
});
|
||||
|
||||
const editMetadataField = (
|
||||
|
@ -3,8 +3,6 @@ import { parseFieldRelationType } from '@/object-metadata/utils/parseFieldRelati
|
||||
|
||||
import { FieldMetadataItem } from '../types/FieldMetadataItem';
|
||||
|
||||
import { parseFieldType } from './parseFieldType';
|
||||
|
||||
export type FieldMetadataItemAsFieldDefinitionProps = {
|
||||
field: FieldMetadataItem;
|
||||
objectMetadataItem: ObjectMetadataItem;
|
||||
@ -31,7 +29,7 @@ export const formatFieldMetadataItemAsFieldDefinition = ({
|
||||
label: field.label,
|
||||
showLabel,
|
||||
labelWidth,
|
||||
type: parseFieldType(field.type),
|
||||
type: field.type,
|
||||
metadata: {
|
||||
fieldName: field.name,
|
||||
placeHolder: field.label,
|
||||
|
@ -1,14 +0,0 @@
|
||||
import { FieldType } from '@/object-record/record-field/types/FieldType';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const parseFieldType = (fieldType: FieldMetadataType): FieldType => {
|
||||
if (fieldType === FieldMetadataType.Link) {
|
||||
return 'LINK';
|
||||
}
|
||||
|
||||
if (fieldType === FieldMetadataType.Currency) {
|
||||
return 'CURRENCY';
|
||||
}
|
||||
|
||||
return fieldType as FieldType;
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
import { isUndefined } from '@sniptt/guards';
|
||||
|
||||
import { FieldType } from '@/object-record/record-field/types/FieldType';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldMetadataItem } from '../types/FieldMetadataItem';
|
||||
|
||||
@ -13,18 +13,20 @@ export const shouldFieldBeQueried = ({
|
||||
depth?: number;
|
||||
eagerLoadedRelations?: Record<string, boolean>;
|
||||
}): any => {
|
||||
const fieldType = field.type as FieldType;
|
||||
|
||||
if (!isUndefined(depth) && depth < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isUndefined(depth) && depth < 1 && fieldType === 'RELATION') {
|
||||
if (
|
||||
!isUndefined(depth) &&
|
||||
depth < 1 &&
|
||||
field.type === FieldMetadataType.Relation
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
fieldType === 'RELATION' &&
|
||||
field.type === FieldMetadataType.Relation &&
|
||||
!isUndefined(eagerLoadedRelations) &&
|
||||
(isUndefined(eagerLoadedRelations[field.name]) ||
|
||||
!eagerLoadedRelations[field.name])
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
FieldSelectMetadata,
|
||||
FieldTextMetadata,
|
||||
} from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import {
|
||||
mockedCompaniesMetadata,
|
||||
mockedCustomMetadata,
|
||||
@ -34,7 +35,7 @@ export const textfieldDefinition: FieldDefinition<FieldTextMetadata> = {
|
||||
fieldMetadataId,
|
||||
label: 'User Name',
|
||||
iconName: 'User',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
metadata: { placeHolder: 'John Doe', fieldName: 'userName' },
|
||||
};
|
||||
|
||||
@ -52,7 +53,7 @@ export const selectFieldDefinition: FieldDefinition<FieldSelectMetadata> = {
|
||||
fieldMetadataId,
|
||||
label: 'Account Owner',
|
||||
iconName: 'iconName',
|
||||
type: 'SELECT',
|
||||
type: FieldMetadataType.Select,
|
||||
metadata: {
|
||||
fieldName: 'accountOwner',
|
||||
options: [{ label: 'Elon Musk', color: 'blue', value: 'userId' }],
|
||||
@ -63,7 +64,7 @@ export const fullNameFieldDefinition: FieldDefinition<FieldFullNameMetadata> = {
|
||||
fieldMetadataId,
|
||||
label: 'Display Name',
|
||||
iconName: 'profile',
|
||||
type: 'FULL_NAME',
|
||||
type: FieldMetadataType.FullName,
|
||||
metadata: {
|
||||
fieldName: 'displayName',
|
||||
placeHolder: 'Mr Miagi',
|
||||
@ -74,7 +75,7 @@ export const linkFieldDefinition: FieldDefinition<FieldLinkMetadata> = {
|
||||
fieldMetadataId,
|
||||
label: 'LinkedIn URL',
|
||||
iconName: 'url',
|
||||
type: 'LINK',
|
||||
type: FieldMetadataType.Link,
|
||||
metadata: {
|
||||
fieldName: 'linkedInURL',
|
||||
placeHolder: 'https://linkedin.com/user',
|
||||
@ -93,7 +94,7 @@ export const ratingfieldDefinition: FieldDefinition<FieldRatingMetadata> = {
|
||||
fieldMetadataId,
|
||||
label: 'Rating',
|
||||
iconName: 'iconName',
|
||||
type: 'RATING',
|
||||
type: FieldMetadataType.Rating,
|
||||
metadata: {
|
||||
fieldName: 'rating',
|
||||
},
|
||||
|
@ -5,6 +5,7 @@ import { useSetRecoilState } from 'recoil';
|
||||
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
|
||||
import { ChipFieldDisplay } from '@/object-record/record-field/meta-types/display/components/ChipFieldDisplay';
|
||||
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
|
||||
@ -37,7 +38,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'full name',
|
||||
label: 'Henry Cavill',
|
||||
type: 'FULL_NAME',
|
||||
type: FieldMetadataType.FullName,
|
||||
iconName: 'IconCalendarEvent',
|
||||
metadata: {
|
||||
fieldName: 'full name',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { FieldContext } from '../../../../contexts/FieldContext';
|
||||
@ -30,7 +31,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'date',
|
||||
label: 'Date',
|
||||
type: 'DATE_TIME',
|
||||
type: FieldMetadataType.DateTime,
|
||||
iconName: 'IconCalendarEvent',
|
||||
metadata: {
|
||||
fieldName: 'Date',
|
||||
|
@ -3,6 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
|
||||
import { useEmailField } from '@/object-record/record-field/meta-types/hooks/useEmailField';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
|
||||
@ -30,7 +31,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'email',
|
||||
label: 'Email',
|
||||
type: 'EMAIL',
|
||||
type: FieldMetadataType.Email,
|
||||
iconName: 'IconLink',
|
||||
metadata: {
|
||||
fieldName: 'Email',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { FieldContext } from '../../../../contexts/FieldContext';
|
||||
@ -28,7 +29,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'number',
|
||||
label: 'Number',
|
||||
type: 'NUMBER',
|
||||
type: FieldMetadataType.Number,
|
||||
iconName: 'Icon123',
|
||||
metadata: {
|
||||
fieldName: 'Number',
|
||||
|
@ -3,6 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
|
||||
import { usePhoneField } from '@/object-record/record-field/meta-types/hooks/usePhoneField';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
|
||||
@ -30,7 +31,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'phone',
|
||||
label: 'Phone',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
iconName: 'IconPhone',
|
||||
metadata: {
|
||||
fieldName: 'phone',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { FieldContext } from '../../../../contexts/FieldContext';
|
||||
@ -28,7 +29,7 @@ const meta: Meta = {
|
||||
fieldDefinition: {
|
||||
fieldMetadataId: 'text',
|
||||
label: 'Text',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
iconName: 'IconLink',
|
||||
metadata: {
|
||||
fieldName: 'Text',
|
||||
|
@ -2,6 +2,7 @@ import { useContext } from 'react';
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -10,7 +11,11 @@ import { isFieldBoolean } from '../../types/guards/isFieldBoolean';
|
||||
export const useBooleanField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('BOOLEAN', isFieldBoolean, fieldDefinition);
|
||||
assertFieldMetadata(
|
||||
FieldMetadataType.Boolean,
|
||||
isFieldBoolean,
|
||||
fieldDefinition,
|
||||
);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { canBeCastAsIntegerOrNull } from '~/utils/cast-as-integer-or-null';
|
||||
import { convertCurrencyToCurrencyMicros } from '~/utils/convert-currency-amount';
|
||||
|
||||
@ -16,7 +17,11 @@ import { isFieldCurrencyValue } from '../../types/guards/isFieldCurrencyValue';
|
||||
export const useCurrencyField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('CURRENCY', isFieldCurrency, fieldDefinition);
|
||||
assertFieldMetadata(
|
||||
FieldMetadataType.Currency,
|
||||
isFieldCurrency,
|
||||
fieldDefinition,
|
||||
);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { useRecoilState } from 'recoil';
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldDateTimeValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -13,7 +14,11 @@ export const useDateTimeField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope, clearable } =
|
||||
useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('DATE_TIME', isFieldDateTime, fieldDefinition);
|
||||
assertFieldMetadata(
|
||||
FieldMetadataType.DateTime,
|
||||
isFieldDateTime,
|
||||
fieldDefinition,
|
||||
);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldEmailValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -12,7 +13,7 @@ import { isFieldEmail } from '../../types/guards/isFieldEmail';
|
||||
export const useEmailField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('EMAIL', isFieldEmail, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Email, isFieldEmail, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { usePersistField } from '../../hooks/usePersistField';
|
||||
@ -14,7 +15,11 @@ import { isFieldFullNameValue } from '../../types/guards/isFieldFullNameValue';
|
||||
export const useFullNameField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('FULL_NAME', isFieldFullName, fieldDefinition);
|
||||
assertFieldMetadata(
|
||||
FieldMetadataType.FullName,
|
||||
isFieldFullName,
|
||||
fieldDefinition,
|
||||
);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { usePersistField } from '../../hooks/usePersistField';
|
||||
@ -14,7 +15,7 @@ import { isFieldLinkValue } from '../../types/guards/isFieldLinkValue';
|
||||
export const useLinkField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('LINK', isFieldLink, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Link, isFieldLink, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldNumberValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import {
|
||||
canBeCastAsIntegerOrNull,
|
||||
castAsIntegerOrNull,
|
||||
@ -17,7 +18,7 @@ import { isFieldNumber } from '../../types/guards/isFieldNumber';
|
||||
export const useNumberField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('NUMBER', isFieldNumber, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Number, isFieldNumber, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -5,6 +5,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldPhoneValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { usePersistField } from '../../hooks/usePersistField';
|
||||
@ -14,7 +15,7 @@ import { isFieldPhone } from '../../types/guards/isFieldPhone';
|
||||
export const usePhoneField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('TEXT', isFieldPhone, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Text, isFieldPhone, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -5,6 +5,7 @@ import { useGetButtonIcon } from '@/object-record/record-field/hooks/useGetButto
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldRelationValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -14,7 +15,12 @@ import { isFieldRelation } from '../../types/guards/isFieldRelation';
|
||||
export const useRelationField = () => {
|
||||
const { entityId, fieldDefinition, maxWidth } = useContext(FieldContext);
|
||||
const button = useGetButtonIcon();
|
||||
assertFieldMetadata('RELATION', isFieldRelation, fieldDefinition);
|
||||
|
||||
assertFieldMetadata(
|
||||
FieldMetadataType.Relation,
|
||||
isFieldRelation,
|
||||
fieldDefinition,
|
||||
);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useRecordFieldInput } from '@/object-record/record-field/hooks/useRecordFieldInput';
|
||||
import { FieldTextValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -14,7 +15,7 @@ export const useTextField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope, maxWidth } =
|
||||
useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('TEXT', isFieldText, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Text, isFieldText, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { useRecoilState } from 'recoil';
|
||||
import { FieldUUidValue } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { isFieldUuid } from '@/object-record/record-field/types/guards/isFieldUuid';
|
||||
import { recordStoreFamilySelector } from '@/object-record/record-store/states/selectors/recordStoreFamilySelector';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldContext } from '../../contexts/FieldContext';
|
||||
import { assertFieldMetadata } from '../../types/guards/assertFieldMetadata';
|
||||
@ -12,7 +13,7 @@ import { isFieldTextValue } from '../../types/guards/isFieldTextValue';
|
||||
export const useUuidField = () => {
|
||||
const { entityId, fieldDefinition, hotkeyScope } = useContext(FieldContext);
|
||||
|
||||
assertFieldMetadata('UUID', isFieldUuid, fieldDefinition);
|
||||
assertFieldMetadata(FieldMetadataType.Uuid, isFieldUuid, fieldDefinition);
|
||||
|
||||
const fieldName = fieldDefinition.metadata.fieldName;
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { expect, fn, userEvent, within } from '@storybook/test';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
|
||||
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import {
|
||||
@ -43,7 +44,7 @@ const BooleanFieldInputWithContext = ({
|
||||
fieldMetadataId: 'boolean',
|
||||
label: 'Boolean',
|
||||
iconName: 'Icon123',
|
||||
type: 'BOOLEAN',
|
||||
type: FieldMetadataType.Boolean,
|
||||
metadata: {
|
||||
fieldName: 'Boolean',
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, within } from '@storybook/test';
|
||||
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import { useDateTimeField } from '../../../hooks/useDateTimeField';
|
||||
@ -44,7 +45,7 @@ const DateFieldInputWithContext = ({
|
||||
fieldDefinition={{
|
||||
fieldMetadataId: 'date',
|
||||
label: 'Date',
|
||||
type: 'DATE_TIME',
|
||||
type: FieldMetadataType.DateTime,
|
||||
iconName: 'IconCalendarEvent',
|
||||
metadata: {
|
||||
fieldName: 'Date',
|
||||
|
@ -3,6 +3,7 @@ import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
|
||||
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import { useEmailField } from '../../../hooks/useEmailField';
|
||||
@ -44,7 +45,7 @@ const EmailFieldInputWithContext = ({
|
||||
fieldDefinition={{
|
||||
fieldMetadataId: 'email',
|
||||
label: 'Email',
|
||||
type: 'EMAIL',
|
||||
type: FieldMetadataType.Email,
|
||||
iconName: 'IconLink',
|
||||
metadata: {
|
||||
fieldName: 'email',
|
||||
|
@ -3,6 +3,7 @@ import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
|
||||
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import { useNumberField } from '../../../hooks/useNumberField';
|
||||
@ -45,7 +46,7 @@ const NumberFieldInputWithContext = ({
|
||||
fieldMetadataId: 'number',
|
||||
label: 'Number',
|
||||
iconName: 'Icon123',
|
||||
type: 'NUMBER',
|
||||
type: FieldMetadataType.Number,
|
||||
metadata: {
|
||||
fieldName: 'number',
|
||||
placeHolder: 'Enter number',
|
||||
|
@ -3,6 +3,7 @@ import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
|
||||
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import { usePhoneField } from '../../../hooks/usePhoneField';
|
||||
@ -44,7 +45,7 @@ const PhoneFieldInputWithContext = ({
|
||||
fieldDefinition={{
|
||||
fieldMetadataId: 'phone',
|
||||
label: 'Phone',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
iconName: 'IconPhone',
|
||||
metadata: {
|
||||
fieldName: 'phone',
|
||||
|
@ -14,6 +14,7 @@ import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMembe
|
||||
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
import { ComponentWithRecoilScopeDecorator } from '~/testing/decorators/ComponentWithRecoilScopeDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
@ -65,7 +66,7 @@ const RelationFieldInputWithContext = ({
|
||||
fieldDefinition={{
|
||||
fieldMetadataId: 'relation',
|
||||
label: 'Relation',
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
iconName: 'IconLink',
|
||||
metadata: {
|
||||
fieldName: 'Relation',
|
||||
|
@ -3,6 +3,7 @@ import { Decorator, Meta, StoryObj } from '@storybook/react';
|
||||
import { expect, fn, userEvent, waitFor, within } from '@storybook/test';
|
||||
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { FieldMetadataType } from '~/generated/graphql';
|
||||
|
||||
import { FieldContextProvider } from '../../../__stories__/FieldContextProvider';
|
||||
import { useTextField } from '../../../hooks/useTextField';
|
||||
@ -44,7 +45,7 @@ const TextFieldInputWithContext = ({
|
||||
fieldDefinition={{
|
||||
fieldMetadataId: 'text',
|
||||
label: 'Text',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
iconName: 'IconTag',
|
||||
metadata: {
|
||||
fieldName: 'Text',
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldMetadata } from './FieldMetadata';
|
||||
import { FieldType } from './FieldType';
|
||||
|
||||
export type FieldDefinitionRelationType =
|
||||
| 'FROM_MANY_OBJECTS'
|
||||
@ -14,7 +15,7 @@ export type FieldDefinition<T extends FieldMetadata> = {
|
||||
disableTooltip?: boolean;
|
||||
labelWidth?: number;
|
||||
iconName: string;
|
||||
type: FieldType;
|
||||
type: FieldMetadataType;
|
||||
metadata: T;
|
||||
infoTooltipContent?: string;
|
||||
};
|
||||
|
@ -1,21 +0,0 @@
|
||||
export type FieldType =
|
||||
| 'BOOLEAN'
|
||||
| 'CHIP'
|
||||
| 'CURRENCY'
|
||||
| 'DATE_TIME'
|
||||
| 'DOUBLE_TEXT_CHIP'
|
||||
| 'DOUBLE_TEXT'
|
||||
| 'EMAIL'
|
||||
| 'FULL_NAME'
|
||||
| 'LINK'
|
||||
| 'NUMBER'
|
||||
| 'PHONE'
|
||||
| 'RATING'
|
||||
| 'RELATION'
|
||||
| 'SELECT'
|
||||
| 'TEXT'
|
||||
| 'URL'
|
||||
| 'UUID'
|
||||
| 'MULTI_SELECT'
|
||||
| 'NUMERIC'
|
||||
| 'RAW_JSON';
|
@ -1,3 +1,5 @@
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
import { FieldDefinition } from '../FieldDefinition';
|
||||
import {
|
||||
FieldBooleanMetadata,
|
||||
@ -16,10 +18,9 @@ import {
|
||||
FieldTextMetadata,
|
||||
FieldUuidMetadata,
|
||||
} from '../FieldMetadata';
|
||||
import { FieldType } from '../FieldType';
|
||||
|
||||
type AssertFieldMetadataFunction = <
|
||||
E extends FieldType,
|
||||
E extends FieldMetadataType,
|
||||
T extends E extends 'BOOLEAN'
|
||||
? FieldBooleanMetadata
|
||||
: E extends 'CURRENCY'
|
||||
|
@ -3,7 +3,6 @@ import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
|
||||
import { formatFieldMetadataItemAsColumnDefinition } from '@/object-metadata/utils/formatFieldMetadataItemAsColumnDefinition';
|
||||
import { isObjectMetadataAvailableForRelation } from '@/object-metadata/utils/isObjectMetadataAvailableForRelation';
|
||||
import { parseFieldType } from '@/object-metadata/utils/parseFieldType';
|
||||
import { useUpdateOneRecord } from '@/object-record/hooks/useUpdateOneRecord';
|
||||
import {
|
||||
FieldContext,
|
||||
@ -147,10 +146,9 @@ export const RecordShowContainer = ({
|
||||
objectRecordId + labelIdentifierFieldMetadata?.id,
|
||||
isLabelIdentifier: false,
|
||||
fieldDefinition: {
|
||||
type: parseFieldType(
|
||||
type:
|
||||
labelIdentifierFieldMetadata?.type ||
|
||||
FieldMetadataType.Text,
|
||||
),
|
||||
FieldMetadataType.Text,
|
||||
iconName: '',
|
||||
fieldMetadataId: labelIdentifierFieldMetadata?.id ?? '',
|
||||
label: labelIdentifierFieldMetadata?.label || '',
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const recordTableRow = {
|
||||
rowIndex: 2,
|
||||
@ -19,7 +20,7 @@ export const recordTableCell: {
|
||||
fieldMetadataId: 'fieldMetadataId',
|
||||
label: 'label',
|
||||
iconName: 'iconName',
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
metadata: {
|
||||
placeHolder: 'placeHolder',
|
||||
fieldName: 'fieldName',
|
||||
|
@ -3,7 +3,6 @@ import styled from '@emotion/styled';
|
||||
|
||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { parseFieldType } from '@/object-metadata/utils/parseFieldType';
|
||||
import { FieldDisplay } from '@/object-record/record-field/components/FieldDisplay';
|
||||
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
|
||||
import { BooleanFieldInput } from '@/object-record/record-field/meta-types/input/components/BooleanFieldInput';
|
||||
@ -96,7 +95,7 @@ export const SettingsDataModelFieldPreview = ({
|
||||
entityId,
|
||||
isLabelIdentifier,
|
||||
fieldDefinition: {
|
||||
type: parseFieldType(fieldMetadataItem.type),
|
||||
type: fieldMetadataItem.type,
|
||||
iconName: 'FieldIcon',
|
||||
fieldMetadataId: fieldMetadataItem.id || '',
|
||||
label: fieldMetadataItem.label,
|
||||
|
@ -2,7 +2,6 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi
|
||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
||||
import { isLabelIdentifierField } from '@/object-metadata/utils/isLabelIdentifierField';
|
||||
import { parseFieldType } from '@/object-metadata/utils/parseFieldType';
|
||||
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
|
||||
import { isFieldValueEmpty } from '@/object-record/record-field/utils/isFieldValueEmpty';
|
||||
import { SettingsObjectFieldSelectFormValues } from '@/settings/data-model/components/SettingsObjectFieldSelectForm';
|
||||
@ -59,7 +58,7 @@ export const useFieldPreview = ({
|
||||
const isValueFromFirstRecord =
|
||||
firstRecord &&
|
||||
!isFieldValueEmpty({
|
||||
fieldDefinition: { type: parseFieldType(fieldMetadataItem.type) },
|
||||
fieldDefinition: { type: fieldMetadataItem.type },
|
||||
fieldValue: fieldPreviewValueFromFirstRecord,
|
||||
});
|
||||
|
||||
|
@ -2,5 +2,5 @@ import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export type SettingsSupportedFieldType = Exclude<
|
||||
FieldMetadataType,
|
||||
FieldMetadataType.Position
|
||||
FieldMetadataType.Position | FieldMetadataType.RawJson
|
||||
>;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { FieldMetadata } from '@/object-record/record-field/types/FieldMetadata';
|
||||
import { ColumnDefinition } from '@/object-record/record-table/types/ColumnDefinition';
|
||||
import { filterAvailableTableColumns } from '@/object-record/utils/filterAvailableTableColumns';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
|
||||
export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
[
|
||||
@ -9,7 +10,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-5e4e-4007-a630-8a2617914889',
|
||||
label: 'Domain Name',
|
||||
size: 100,
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
metadata: {
|
||||
fieldName: 'domainName',
|
||||
placeHolder: 'Domain Name',
|
||||
@ -25,7 +26,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-7fbd-41ad-b64d-25a15ff62f04',
|
||||
label: 'Employees',
|
||||
size: 100,
|
||||
type: 'NUMBER',
|
||||
type: FieldMetadataType.Number,
|
||||
metadata: {
|
||||
fieldName: 'employees',
|
||||
placeHolder: 'Employees',
|
||||
@ -41,7 +42,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-6d30-4111-9f40-b4301906fd3c',
|
||||
label: 'Name',
|
||||
size: 100,
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
metadata: {
|
||||
fieldName: 'name',
|
||||
placeHolder: 'Name',
|
||||
@ -57,7 +58,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-e7c8-4771-8cc4-ce0e8c36a3c0',
|
||||
label: 'Favorites',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'favorites',
|
||||
placeHolder: 'Favorites',
|
||||
@ -74,7 +75,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-ad10-4117-a039-3f04b7a5f939',
|
||||
label: 'Address',
|
||||
size: 100,
|
||||
type: 'TEXT',
|
||||
type: FieldMetadataType.Text,
|
||||
metadata: {
|
||||
fieldName: 'address',
|
||||
placeHolder: 'Address',
|
||||
@ -90,7 +91,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-0739-495d-8e70-c0807f6b2268',
|
||||
label: 'Account Owner',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'accountOwner',
|
||||
placeHolder: 'Account Owner',
|
||||
@ -107,7 +108,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-68b4-4c8e-af19-738eba2a42a5',
|
||||
label: 'People',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'people',
|
||||
placeHolder: 'People',
|
||||
@ -124,7 +125,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-61af-4ffd-b79b-baed6db8ad11',
|
||||
label: 'Attachments',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'attachments',
|
||||
placeHolder: 'Attachments',
|
||||
@ -141,7 +142,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-4dc2-47c9-bb15-6e6f19ba9e46',
|
||||
label: 'Creation date',
|
||||
size: 100,
|
||||
type: 'DATE_TIME',
|
||||
type: FieldMetadataType.DateTime,
|
||||
metadata: {
|
||||
fieldName: 'createdAt',
|
||||
placeHolder: 'Creation date',
|
||||
@ -157,7 +158,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-9e9f-4235-98b2-c76f3e2d281e',
|
||||
label: 'ICP',
|
||||
size: 100,
|
||||
type: 'BOOLEAN',
|
||||
type: FieldMetadataType.Boolean,
|
||||
metadata: {
|
||||
fieldName: 'idealCustomerProfile',
|
||||
placeHolder: 'ICP',
|
||||
@ -173,7 +174,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-a61d-4b78-b998-3fd88b4f73a1',
|
||||
label: 'Linkedin',
|
||||
size: 100,
|
||||
type: 'LINK',
|
||||
type: FieldMetadataType.Link,
|
||||
metadata: {
|
||||
fieldName: 'linkedinLink',
|
||||
placeHolder: 'Linkedin',
|
||||
@ -189,7 +190,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-e3fc-46ff-b552-3e757843f06e',
|
||||
label: 'Opportunities',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'opportunities',
|
||||
placeHolder: 'Opportunities',
|
||||
@ -206,7 +207,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-46e3-479a-b8f4-77137c74daa6',
|
||||
label: 'X',
|
||||
size: 100,
|
||||
type: 'LINK',
|
||||
type: FieldMetadataType.Link,
|
||||
metadata: {
|
||||
fieldName: 'xLink',
|
||||
placeHolder: 'X',
|
||||
@ -222,7 +223,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-4a2e-4b41-8562-279963e8947e',
|
||||
label: 'Activities',
|
||||
size: 100,
|
||||
type: 'RELATION',
|
||||
type: FieldMetadataType.Relation,
|
||||
metadata: {
|
||||
fieldName: 'activityTargets',
|
||||
placeHolder: 'Activities',
|
||||
@ -239,7 +240,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COLUMN_DEFINITIONS = (
|
||||
fieldMetadataId: '20202020-4a5a-466f-92d9-c3870d9502a9',
|
||||
label: 'ARR',
|
||||
size: 100,
|
||||
type: 'CURRENCY',
|
||||
type: FieldMetadataType.Currency,
|
||||
metadata: {
|
||||
fieldName: 'annualRecurringRevenue',
|
||||
placeHolder: 'ARR',
|
||||
|
Loading…
Reference in New Issue
Block a user