Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set all standard objects soft deletable #7006

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading