5483 modify messagechannel syncstatus (#5484)
- Closes #5483 - Fix seeds - Add default value to syncSubStatus
This commit is contained in:
@ -18,10 +18,17 @@ import { WorkspaceIsNullable } from 'src/engine/twenty-orm/decorators/workspace-
|
||||
import { WorkspaceRelation } from 'src/engine/twenty-orm/decorators/workspace-relation.decorator';
|
||||
|
||||
export enum MessageChannelSyncStatus {
|
||||
// TO BE DEPRECATED
|
||||
PENDING = 'PENDING',
|
||||
ONGOING = 'ONGOING',
|
||||
SUCCEEDED = 'SUCCEEDED',
|
||||
FAILED = 'FAILED',
|
||||
|
||||
// NEW STATUSES
|
||||
NOT_SYNCED = 'NOT_SYNCED',
|
||||
ONGOING = 'ONGOING',
|
||||
COMPLETED = 'COMPLETED',
|
||||
FAILED_INSUFFICIENT_PERMISSIONS = 'FAILED_INSUFFICIENT_PERMISSIONS',
|
||||
FAILED_UNKNOWN = 'FAILED_UNKNOWN',
|
||||
}
|
||||
|
||||
export enum MessageChannelSyncSubStatus {
|
||||
@ -163,18 +170,13 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
description: 'Sync status',
|
||||
icon: 'IconStatusChange',
|
||||
options: [
|
||||
// TO BE DEPRECATED: PENDING, SUCCEEDED, FAILED
|
||||
{
|
||||
value: MessageChannelSyncStatus.PENDING,
|
||||
label: 'Pending',
|
||||
position: 0,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.ONGOING,
|
||||
label: 'Ongoing',
|
||||
position: 1,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.SUCCEEDED,
|
||||
label: 'Succeeded',
|
||||
@ -187,6 +189,37 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
position: 3,
|
||||
color: 'red',
|
||||
},
|
||||
// NEW STATUSES
|
||||
{
|
||||
value: MessageChannelSyncStatus.ONGOING,
|
||||
label: 'Ongoing',
|
||||
position: 1,
|
||||
color: 'yellow',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.NOT_SYNCED,
|
||||
label: 'Not Synced',
|
||||
position: 4,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.COMPLETED,
|
||||
label: 'Completed',
|
||||
position: 5,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.FAILED_INSUFFICIENT_PERMISSIONS,
|
||||
label: 'Failed Insufficient Permissions',
|
||||
position: 6,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
value: MessageChannelSyncStatus.FAILED_UNKNOWN,
|
||||
label: 'Failed Unknown',
|
||||
position: 7,
|
||||
color: 'red',
|
||||
},
|
||||
],
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
@ -230,6 +263,7 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
color: 'orange',
|
||||
},
|
||||
],
|
||||
defaultValue: `'${MessageChannelSyncSubStatus.FULL_MESSAGES_LIST_FETCH_PENDING}'`,
|
||||
})
|
||||
syncSubStatus: MessageChannelSyncSubStatus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user