Use new type position for standard objects and newly created objects (#4349)
Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -12,6 +12,7 @@ const checkPosition = (value: any): PositionType => {
|
||||
if (isValidNumberPosition(value) || isValidStringPosition(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
throw new Error('Invalid position found');
|
||||
};
|
||||
|
||||
|
||||
@ -99,9 +99,9 @@ export class CompanyObjectMetadata extends BaseObjectMetadata {
|
||||
idealCustomerProfile: boolean;
|
||||
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.NUMBER,
|
||||
type: FieldMetadataType.POSITION,
|
||||
label: 'Position',
|
||||
description: 'Position',
|
||||
description: 'Company record position',
|
||||
icon: 'IconHierarchy2',
|
||||
})
|
||||
@IsSystem()
|
||||
|
||||
@ -82,9 +82,9 @@ export class OpportunityObjectMetadata extends BaseObjectMetadata {
|
||||
stage: string;
|
||||
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.NUMBER,
|
||||
type: FieldMetadataType.POSITION,
|
||||
label: 'Position',
|
||||
description: 'Position',
|
||||
description: 'Opportunity record position',
|
||||
icon: 'IconHierarchy2',
|
||||
})
|
||||
@IsSystem()
|
||||
|
||||
@ -97,9 +97,9 @@ export class PersonObjectMetadata extends BaseObjectMetadata {
|
||||
avatarUrl: string;
|
||||
|
||||
@FieldMetadata({
|
||||
type: FieldMetadataType.NUMBER,
|
||||
type: FieldMetadataType.POSITION,
|
||||
label: 'Position',
|
||||
description: 'Record Position',
|
||||
description: 'Person record Position',
|
||||
icon: 'IconHierarchy2',
|
||||
})
|
||||
@IsSystem()
|
||||
|
||||
Reference in New Issue
Block a user