diff --git a/js/src/components/Event/ExternalParticipationButton.vue b/js/src/components/Event/ExternalParticipationButton.vue new file mode 100644 index 000000000..535194949 --- /dev/null +++ b/js/src/components/Event/ExternalParticipationButton.vue @@ -0,0 +1,27 @@ + +
+ + + diff --git a/js/src/graphql/event.ts b/js/src/graphql/event.ts index 605d9ddc3..e9f7682a7 100644 --- a/js/src/graphql/event.ts +++ b/js/src/graphql/event.ts @@ -21,6 +21,7 @@ const FULL_EVENT_FRAGMENT = gql` status visibility joinOptions + externalParticipationUrl draft language category @@ -121,6 +122,7 @@ export const FETCH_EVENT_BASIC = gql` id uuid joinOptions + externalParticipationUrl participantStats { going notApproved @@ -199,6 +201,7 @@ export const CREATE_EVENT = gql` $status: EventStatus $visibility: EventVisibility $joinOptions: EventJoinOptions + $externalParticipationUrl: String $draft: Boolean $tags: [String] $picture: MediaInput @@ -220,6 +223,7 @@ export const CREATE_EVENT = gql` status: $status visibility: $visibility joinOptions: $joinOptions + externalParticipationUrl: $externalParticipationUrl draft: $draft tags: $tags picture: $picture @@ -247,6 +251,7 @@ export const EDIT_EVENT = gql` $status: EventStatus $visibility: EventVisibility $joinOptions: EventJoinOptions + $externalParticipationUrl: String $draft: Boolean $tags: [String] $picture: MediaInput @@ -269,6 +274,7 @@ export const EDIT_EVENT = gql` status: $status visibility: $visibility joinOptions: $joinOptions + externalParticipationUrl: $externalParticipationUrl draft: $draft tags: $tags picture: $picture diff --git a/js/src/types/enums.ts b/js/src/types/enums.ts index 1061d196b..55732bd4e 100644 --- a/js/src/types/enums.ts +++ b/js/src/types/enums.ts @@ -64,6 +64,7 @@ export enum EventJoinOptions { FREE = "FREE", RESTRICTED = "RESTRICTED", INVITE = "INVITE", + EXTERNAL = "EXTERNAL", } export enum EventVisibilityJoinOptions { diff --git a/js/src/types/event.model.ts b/js/src/types/event.model.ts index e06703665..314d50c81 100644 --- a/js/src/types/event.model.ts +++ b/js/src/types/event.model.ts @@ -42,6 +42,7 @@ interface IEventEditJSON { status: EventStatus; visibility: EventVisibility; joinOptions: EventJoinOptions; + externalParticipationUrl: string | null; draft: boolean; picture?: IMedia | { mediaId: string } | null; attributedToId: string | null; @@ -71,6 +72,7 @@ export interface IEvent { status: EventStatus; visibility: EventVisibility; joinOptions: EventJoinOptions; + externalParticipationUrl: string | null; draft: boolean; picture: IMedia | null; @@ -131,6 +133,8 @@ export class EventModel implements IEvent { joinOptions = EventJoinOptions.FREE; + externalParticipationUrl: string | null = null; + status = EventStatus.CONFIRMED; draft = true; @@ -196,6 +200,7 @@ export class EventModel implements IEvent { this.status = hash.status; this.visibility = hash.visibility; this.joinOptions = hash.joinOptions; + this.externalParticipationUrl = hash.externalParticipationUrl; this.draft = hash.draft; this.picture = hash.picture; @@ -248,6 +253,7 @@ export function toEditJSON(event: IEditableEvent): IEventEditJSON { category: event.category, visibility: event.visibility, joinOptions: event.joinOptions, + externalParticipationUrl: event.externalParticipationUrl, draft: event.draft, tags: event.tags.map((t) => t.title), onlineAddress: event.onlineAddress, diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index 2240edf27..f26b73737 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -221,9 +221,33 @@ --> ++