@ -19,10 +19,7 @@ import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/work
|
||||
import { MessageParticipantService } from 'src/modules/messaging/services/message-participant/message-participant.service';
|
||||
import { CalendarEventParticipantService } from 'src/modules/calendar/services/calendar-event-participant/calendar-event-participant.service';
|
||||
import { filterOutContactsFromCompanyOrWorkspace } from 'src/modules/connected-account/auto-companies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util';
|
||||
import {
|
||||
FeatureFlagEntity,
|
||||
FeatureFlagKeys,
|
||||
} from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||
|
||||
@Injectable()
|
||||
export class CreateCompanyAndContactService {
|
||||
@ -154,16 +151,6 @@ export class CreateCompanyAndContactService {
|
||||
transactionManager,
|
||||
);
|
||||
|
||||
const isCalendarEnabled = await this.featureFlagRepository.findOneBy({
|
||||
workspaceId,
|
||||
key: FeatureFlagKeys.IsCalendarEnabled,
|
||||
value: true,
|
||||
});
|
||||
|
||||
if (!isCalendarEnabled || !isCalendarEnabled.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.calendarEventParticipantService.updateCalendarEventParticipantsAfterPeopleCreation(
|
||||
workspaceId,
|
||||
transactionManager,
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
|
||||
|
||||
import { FeatureFlagKeys } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
|
||||
import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity';
|
||||
import {
|
||||
RelationMetadataType,
|
||||
@ -9,7 +8,6 @@ import {
|
||||
import { CONNECTED_ACCOUNT_STANDARD_FIELD_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-field-ids';
|
||||
import { STANDARD_OBJECT_IDS } from 'src/engine/workspace-manager/workspace-sync-metadata/constants/standard-object-ids';
|
||||
import { FieldMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/field-metadata.decorator';
|
||||
import { Gate } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/gate.decorator';
|
||||
import { IsNullable } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-nullable.decorator';
|
||||
import { IsSystem } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/is-system.decorator';
|
||||
import { ObjectMetadata } from 'src/engine/workspace-manager/workspace-sync-metadata/decorators/object-metadata.decorator';
|
||||
@ -126,8 +124,5 @@ export class ConnectedAccountObjectMetadata extends BaseObjectMetadata {
|
||||
inverseSideTarget: () => CalendarChannelObjectMetadata,
|
||||
onDelete: RelationOnDeleteAction.CASCADE,
|
||||
})
|
||||
@Gate({
|
||||
featureFlag: FeatureFlagKeys.IsCalendarEnabled,
|
||||
})
|
||||
calendarChannels: Relation<CalendarChannelObjectMetadata[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user