feat: simplification of default-value specification in FieldMetadata (#4592)

* feat: wip refactor default-value

* feat: health check to migrate default value

* fix: tests

* fix: refactor defaultValue to make it more clean

* fix: unit tests

* fix: front-end default value
This commit is contained in:
Jérémy M
2024-03-27 10:56:04 +01:00
committed by GitHub
parent 90ce7709dd
commit 5c0b65eecb
43 changed files with 481 additions and 328 deletions

View File

@ -40,7 +40,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
color: 'orange',
},
],
defaultValue: { value: 'share_everything' },
defaultValue: "'share_everything'",
})
visibility: string;
@ -73,7 +73,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
{ value: 'email', label: 'Email', position: 0, color: 'green' },
{ value: 'sms', label: 'SMS', position: 1, color: 'blue' },
],
defaultValue: { value: 'email' },
defaultValue: "'email'",
})
type: string;
@ -83,7 +83,7 @@ export class MessageChannelObjectMetadata extends BaseObjectMetadata {
label: 'Is Contact Auto Creation Enabled',
description: 'Is Contact Auto Creation Enabled',
icon: 'IconUserCircle',
defaultValue: { value: true },
defaultValue: true,
})
isContactAutoCreationEnabled: boolean;

View File

@ -42,7 +42,7 @@ export class MessageParticipantObjectMetadata extends BaseObjectMetadata {
{ value: 'cc', label: 'Cc', position: 2, color: 'orange' },
{ value: 'bcc', label: 'Bcc', position: 3, color: 'red' },
],
defaultValue: { value: 'from' },
defaultValue: "'from'",
})
role: string;

View File

@ -55,7 +55,7 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
{ value: 'incoming', label: 'Incoming', position: 0, color: 'green' },
{ value: 'outgoing', label: 'Outgoing', position: 1, color: 'blue' },
],
defaultValue: { value: 'incoming' },
defaultValue: "'incoming'",
})
direction: string;