Fix secondary links default value and types (#8532)
Fixes broken companies view
This commit is contained in:
@ -31,7 +31,7 @@ export class FieldMetadataDefaultValueString {
|
||||
|
||||
export class FieldMetadataDefaultValueRawJson {
|
||||
@ValidateIf((_object, value) => value !== null)
|
||||
@IsObject()
|
||||
@IsObject() // TODO: Should this also allow arrays?
|
||||
value: object | null;
|
||||
}
|
||||
|
||||
@ -137,6 +137,14 @@ export class FieldMetadataDefaultValueAddress {
|
||||
addressLng: number | null;
|
||||
}
|
||||
|
||||
class LinkMetadata {
|
||||
@IsString()
|
||||
label: string;
|
||||
|
||||
@IsString()
|
||||
url: string;
|
||||
}
|
||||
|
||||
export class FieldMetadataDefaultValueLinks {
|
||||
@ValidateIf((_object, value) => value !== null)
|
||||
@IsQuotedString()
|
||||
@ -147,8 +155,8 @@ export class FieldMetadataDefaultValueLinks {
|
||||
primaryLinkUrl: string | null;
|
||||
|
||||
@ValidateIf((_object, value) => value !== null)
|
||||
@IsObject()
|
||||
secondaryLinks: object | null;
|
||||
@IsArray()
|
||||
secondaryLinks: LinkMetadata[] | null;
|
||||
}
|
||||
|
||||
export class FieldMetadataDefaultActor {
|
||||
|
||||
Reference in New Issue
Block a user