Skip to content

Commit

Permalink
Set all standard objects soft deletable (#7006)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiko authored Sep 12, 2024
1 parent a850b43 commit 9b46e8c
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Injectable } from '@nestjs/common';

import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface';
import { PartialWorkspaceEntity } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/partial-object-metadata.interface';
import { FeatureFlagMap } from 'src/engine/core-modules/feature-flag/interfaces/feature-flag-map.interface';
import { PartialWorkspaceEntity } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/partial-object-metadata.interface';
import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface';

import { isGatedAndNotEnabled } from 'src/engine/workspace-manager/workspace-sync-metadata/utils/is-gate-and-not-enabled.util';
import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity';
import { metadataArgsStorage } from 'src/engine/twenty-orm/storage/metadata-args.storage';
import { isGatedAndNotEnabled } from 'src/engine/workspace-manager/workspace-sync-metadata/utils/is-gate-and-not-enabled.util';

@Injectable()
export class StandardObjectFactory {
Expand Down Expand Up @@ -54,7 +54,7 @@ export class StandardObjectFactory {
isCustom: false,
isRemote: false,
isSystem: workspaceEntityMetadataArgs.isSystem ?? false,
isSoftDeletable: workspaceEntityMetadataArgs.softDelete ?? false,
isSoftDeletable: workspaceEntityMetadataArgs.softDelete ?? true,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
description: 'A company',
icon: 'IconBuildingSkyscraper',
labelIdentifierStandardId: COMPANY_STANDARD_FIELD_IDS.name,
softDelete: true,
})
export class CompanyWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/perso
labelPlural: 'Note Targets',
description: 'A note target',
icon: 'IconCheckbox',
softDelete: true,
})
@WorkspaceIsSystem()
export class NoteTargetWorkspaceEntity extends BaseWorkspaceEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
description: 'A note',
icon: 'IconNotes',
labelIdentifierStandardId: NOTE_STANDARD_FIELD_IDS.title,
softDelete: true,
})
export class NoteWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
description: 'An opportunity',
icon: 'IconTargetArrow',
labelIdentifierStandardId: OPPORTUNITY_STANDARD_FIELD_IDS.name,
softDelete: true,
})
@WorkspaceIsNotAuditLogged()
export class OpportunityWorkspaceEntity extends BaseWorkspaceEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o
icon: 'IconUser',
labelIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.name,
imageIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.avatarUrl,
softDelete: true,
})
export class PersonWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { TaskWorkspaceEntity } from 'src/modules/task/standard-objects/task.work
labelPlural: 'Task Targets',
description: 'An task target',
icon: 'IconCheckbox',
softDelete: true,
})
@WorkspaceIsSystem()
export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta
description: 'A task',
icon: 'IconCheckbox',
labelIdentifierStandardId: TASK_STANDARD_FIELD_IDS.title,
softDelete: true,
})
export class TaskWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceField({
Expand Down

0 comments on commit 9b46e8c

Please sign in to comment.