Skip to content

Commit

Permalink
Merge pull request #4684 from alkem-io/master-to-develop-0.95
Browse files Browse the repository at this point in the history
Master to develop 0.95
  • Loading branch information
hero101 authored Nov 7, 2024
2 parents a8e2e11 + 4f68501 commit 9f51e6d
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/common/enums/authorization.privilege.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum AuthorizationPrivilege {
UPDATE_INNOVATION_FLOW = 'update-innovation-flow',
COMMUNITY_JOIN = 'community-join',
COMMUNITY_APPLY = 'community-apply',
COMMUNITY_APPLY_ACCEPT = 'community-apply-accept',
COMMUNITY_INVITE = 'community-invite',
COMMUNITY_INVITE_ACCEPT = 'community-invite-accept',
COMMUNITY_ADD_MEMBER = 'community-add-member', // only for global admins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CalloutGroupName } from '@common/enums/callout.group.name';
import { TagsetReservedName } from '@common/enums/tagset.reserved.name';
import { FlowState } from './bootstrap.space.tutorials.innovation.flow.states';
import { CreateCalloutInput } from '@domain/collaboration/callout/dto/callout.dto.create';
import { CalloutVisibility } from '@common/enums/callout.visibility';

export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
{
Expand All @@ -15,6 +16,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '👋 Welcome to your space!',
Expand All @@ -37,6 +39,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 2,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '⚙️ Set it up your way!',
Expand All @@ -59,6 +62,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 3,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '🧩 Collaboration tools',
Expand All @@ -81,6 +85,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 4,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '🧹 Cleaning up',
Expand All @@ -103,6 +108,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.COMMUNITY,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '🤝 Set up your Community',
Expand All @@ -125,6 +131,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.SUBSPACES,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '↪️ Subspaces',
Expand All @@ -147,6 +154,7 @@ export const bootstrapSpaceTutorialsCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.KNOWLEDGE,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '📚 The Knowledge Base',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { CalloutGroupName } from '@common/enums/callout.group.name';
import { TagsetReservedName } from '@common/enums/tagset.reserved.name';
import { FlowState } from './bootstrap.space.innovation.flow';
import { CreateCalloutInput } from '@domain/collaboration/callout/dto/callout.dto.create';
import { CalloutVisibility } from '@common/enums/callout.visibility';

export const bootstrapSpaceCallouts: CreateCalloutInput[] = [
{
Expand All @@ -15,6 +16,7 @@ export const bootstrapSpaceCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '👋 Welcome to your space!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CalloutType } from '@common/enums/callout.type';
import { TagsetReservedName } from '@common/enums/tagset.reserved.name';
import { FlowState } from './bootstrap.subspace.knowledge.innovation.flow.states';
import { CreateCalloutInput } from '@domain/collaboration/callout/dto/callout.dto.create';
import { CalloutVisibility } from '@common/enums/callout.visibility';

export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
{
Expand All @@ -14,6 +15,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'No Time? A quick summary ⬇️',
Expand All @@ -36,6 +38,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 2,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'The Virtual Contributor',
Expand All @@ -58,6 +61,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 3,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Interacting with a Virtual Contributor',
Expand All @@ -80,6 +84,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 4,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'The Profile of your Virtual Contributor',
Expand All @@ -102,6 +107,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 5,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Types of Content',
Expand All @@ -124,6 +130,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 6,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Terms & Conditions',
Expand All @@ -146,6 +153,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 7,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Example 1: Background information',
Expand All @@ -168,6 +176,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 8,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Example 2: Random facts and figures',
Expand All @@ -190,6 +199,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 9,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Example 3: Links and Documents',
Expand All @@ -212,6 +222,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 10,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Where to find the Virtual Contributor Profile',
Expand All @@ -234,6 +245,7 @@ export const bootstrapSubspaceKnowledgeCallouts: CreateCalloutInput[] = [
},
sortOrder: 11,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: 'Updating my Body of Knowledge',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CalloutType } from '@common/enums/callout.type';
import { TagsetReservedName } from '@common/enums/tagset.reserved.name';
import { FlowState } from './bootstrap.subspace.innovation.flow.states';
import { CreateCalloutInput } from '@domain/collaboration/callout/dto/callout.dto.create';
import { CalloutVisibility } from '@common/enums/callout.visibility';

export const bootstrapSubspaceCallouts: CreateCalloutInput[] = [
{
Expand All @@ -14,6 +15,7 @@ export const bootstrapSubspaceCallouts: CreateCalloutInput[] = [
},
sortOrder: 1,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName: '👋 Welcome to your subpace!',
Expand All @@ -37,6 +39,7 @@ export const bootstrapSubspaceCallouts: CreateCalloutInput[] = [
},
sortOrder: 2,
groupName: CalloutGroupName.HOME,
visibility: CalloutVisibility.PUBLISHED,
framing: {
profile: {
displayName:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class CalloutResolverMutations {
const savedCallout =
await this.calloutService.updateCalloutVisibility(calloutData);

if (savedCallout.visibility !== oldVisibility) {
if (!savedCallout.isTemplate && savedCallout.visibility !== oldVisibility) {
if (savedCallout.visibility === CalloutVisibility.PUBLISHED) {
// Save published info
await this.calloutService.updateCalloutPublishInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ export class CollaborationService {

if (
!collaboration.callouts ||
!collaboration.timeline ||
!collaboration.innovationFlow ||
!collaboration.authorization
)
Expand All @@ -361,7 +360,10 @@ export class CollaborationService {
await this.calloutService.deleteCallout(callout.id);
}

await this.timelineService.deleteTimeline(collaboration.timeline.id);
if (collaboration.timeline) {
// There's no timeline for collaboration templates
await this.timelineService.deleteTimeline(collaboration.timeline.id);
}

await this.authorizationPolicyService.delete(collaboration.authorization);

Expand Down

0 comments on commit 9f51e6d

Please sign in to comment.