Revert "Merge branch 'external-events' into 'main'"
This reverts merge request !1223
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
<template>
|
||||
<div class="participation-button">
|
||||
<a
|
||||
class="button is-large is-primary"
|
||||
type="button"
|
||||
target="_blank"
|
||||
:href="
|
||||
event.externalParticipationUrl
|
||||
? encodeURI(`${event.externalParticipationUrl}?uuid=${event.uuid}`)
|
||||
: '#'
|
||||
"
|
||||
:disabled="!event.externalParticipationUrl"
|
||||
>{{ $t("Go to booking") }}
|
||||
<b-icon style="margin-left: 0" icon="open-in-new"
|
||||
/></a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { IEvent } from "../../types/event.model";
|
||||
|
||||
@Component
|
||||
export default class ExternalParticipationButton extends Vue {
|
||||
@Prop({ required: true }) event!: IEvent;
|
||||
}
|
||||
</script>
|
||||
@@ -21,7 +21,6 @@ const FULL_EVENT_FRAGMENT = gql`
|
||||
status
|
||||
visibility
|
||||
joinOptions
|
||||
externalParticipationUrl
|
||||
draft
|
||||
language
|
||||
category
|
||||
@@ -122,7 +121,6 @@ export const FETCH_EVENT_BASIC = gql`
|
||||
id
|
||||
uuid
|
||||
joinOptions
|
||||
externalParticipationUrl
|
||||
participantStats {
|
||||
going
|
||||
notApproved
|
||||
@@ -201,7 +199,6 @@ export const CREATE_EVENT = gql`
|
||||
$status: EventStatus
|
||||
$visibility: EventVisibility
|
||||
$joinOptions: EventJoinOptions
|
||||
$externalParticipationUrl: String
|
||||
$draft: Boolean
|
||||
$tags: [String]
|
||||
$picture: MediaInput
|
||||
@@ -223,7 +220,6 @@ export const CREATE_EVENT = gql`
|
||||
status: $status
|
||||
visibility: $visibility
|
||||
joinOptions: $joinOptions
|
||||
externalParticipationUrl: $externalParticipationUrl
|
||||
draft: $draft
|
||||
tags: $tags
|
||||
picture: $picture
|
||||
@@ -251,7 +247,6 @@ export const EDIT_EVENT = gql`
|
||||
$status: EventStatus
|
||||
$visibility: EventVisibility
|
||||
$joinOptions: EventJoinOptions
|
||||
$externalParticipationUrl: String
|
||||
$draft: Boolean
|
||||
$tags: [String]
|
||||
$picture: MediaInput
|
||||
@@ -274,7 +269,6 @@ export const EDIT_EVENT = gql`
|
||||
status: $status
|
||||
visibility: $visibility
|
||||
joinOptions: $joinOptions
|
||||
externalParticipationUrl: $externalParticipationUrl
|
||||
draft: $draft
|
||||
tags: $tags
|
||||
picture: $picture
|
||||
|
||||
@@ -64,7 +64,6 @@ export enum EventJoinOptions {
|
||||
FREE = "FREE",
|
||||
RESTRICTED = "RESTRICTED",
|
||||
INVITE = "INVITE",
|
||||
EXTERNAL = "EXTERNAL",
|
||||
}
|
||||
|
||||
export enum EventVisibilityJoinOptions {
|
||||
|
||||
@@ -42,7 +42,6 @@ interface IEventEditJSON {
|
||||
status: EventStatus;
|
||||
visibility: EventVisibility;
|
||||
joinOptions: EventJoinOptions;
|
||||
externalParticipationUrl: string | null;
|
||||
draft: boolean;
|
||||
picture?: IMedia | { mediaId: string } | null;
|
||||
attributedToId: string | null;
|
||||
@@ -72,7 +71,6 @@ export interface IEvent {
|
||||
status: EventStatus;
|
||||
visibility: EventVisibility;
|
||||
joinOptions: EventJoinOptions;
|
||||
externalParticipationUrl: string | null;
|
||||
draft: boolean;
|
||||
|
||||
picture: IMedia | null;
|
||||
@@ -133,8 +131,6 @@ export class EventModel implements IEvent {
|
||||
|
||||
joinOptions = EventJoinOptions.FREE;
|
||||
|
||||
externalParticipationUrl: string | null = null;
|
||||
|
||||
status = EventStatus.CONFIRMED;
|
||||
|
||||
draft = true;
|
||||
@@ -200,7 +196,6 @@ 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;
|
||||
@@ -253,7 +248,6 @@ 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,
|
||||
|
||||
@@ -221,33 +221,9 @@
|
||||
</b-radio>
|
||||
</div>-->
|
||||
|
||||
<div class="field">
|
||||
<label class="label">{{ $t("External registration") }}</label>
|
||||
<b-switch v-model="externalParticipation">
|
||||
{{
|
||||
$t("I want to manage the registration with an external provider.")
|
||||
}}
|
||||
</b-switch>
|
||||
</div>
|
||||
|
||||
<div class="field" v-if="externalParticipation">
|
||||
<b-field :label="$t('URL')">
|
||||
<b-input
|
||||
icon="link"
|
||||
type="url"
|
||||
v-model="event.externalParticipationUrl"
|
||||
placeholder="URL"
|
||||
/>
|
||||
</b-field>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="field"
|
||||
v-if="
|
||||
config &&
|
||||
config.anonymous.participation.allowed &&
|
||||
!externalParticipation
|
||||
"
|
||||
v-if="config && config.anonymous.participation.allowed"
|
||||
>
|
||||
<label class="label">{{ $t("Anonymous participations") }}</label>
|
||||
<b-switch v-model="eventOptions.anonymousParticipation">
|
||||
@@ -270,21 +246,21 @@
|
||||
</b-switch>
|
||||
</div>
|
||||
|
||||
<div class="field" v-if="!externalParticipation">
|
||||
<div class="field">
|
||||
<label class="label">{{ $t("Participation approval") }}</label>
|
||||
<b-switch v-model="needsApproval">{{
|
||||
$t("I want to approve every participation request")
|
||||
}}</b-switch>
|
||||
</div>
|
||||
|
||||
<div class="field" v-if="!externalParticipation">
|
||||
<div class="field">
|
||||
<label class="label">{{ $t("Number of places") }}</label>
|
||||
<b-switch v-model="limitedPlaces">{{
|
||||
$t("Limited number of places")
|
||||
}}</b-switch>
|
||||
</div>
|
||||
|
||||
<div class="box" v-if="limitedPlaces && !externalParticipation">
|
||||
<div class="box" v-if="limitedPlaces">
|
||||
<b-field :label="$t('Number of places')" label-for="number-of-places">
|
||||
<b-numberinput
|
||||
controls-position="compact"
|
||||
@@ -1194,18 +1170,6 @@ export default class EditEvent extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
get externalParticipation(): boolean {
|
||||
return this.event?.joinOptions == EventJoinOptions.EXTERNAL;
|
||||
}
|
||||
|
||||
set externalParticipation(value: boolean) {
|
||||
if (value === true) {
|
||||
this.event.joinOptions = EventJoinOptions.EXTERNAL;
|
||||
} else {
|
||||
this.event.joinOptions = EventJoinOptions.FREE;
|
||||
}
|
||||
}
|
||||
|
||||
get checkTitleLength(): Array<string | undefined> {
|
||||
return this.event.title.length > 80
|
||||
? ["is-info", this.$t("The event title will be ellipsed.") as string]
|
||||
|
||||
10
js/src/views/Event/Event.vue
Normal file → Executable file
10
js/src/views/Event/Event.vue
Normal file → Executable file
@@ -94,13 +94,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="column is-3-tablet">
|
||||
<external-participation-button
|
||||
v-if="event.joinOptions === EventJoinOptions.EXTERNAL"
|
||||
:event="event"
|
||||
:current-actor="currentActor"
|
||||
/>
|
||||
<participation-section
|
||||
v-else
|
||||
:participation="participations[0]"
|
||||
:event="event"
|
||||
:anonymousParticipation="anonymousParticipation"
|
||||
@@ -126,7 +120,7 @@
|
||||
<tag>{{ organizer.domain }}</tag>
|
||||
</a>
|
||||
</template>
|
||||
<p v-if="event.joinOptions !== EventJoinOptions.EXTERNAL">
|
||||
<p>
|
||||
<router-link
|
||||
class="participations-link"
|
||||
v-if="canManageEvent && event.draft === false"
|
||||
@@ -514,7 +508,6 @@ import { CREATE_REPORT } from "../../graphql/report";
|
||||
import EventMixin from "../../mixins/event";
|
||||
import IdentityPicker from "../Account/IdentityPicker.vue";
|
||||
import ParticipationSection from "../../components/Participation/ParticipationSection.vue";
|
||||
import ExternalParticipationButton from "../../components/Event/ExternalParticipationButton.vue";
|
||||
import RouteName from "../../router/name";
|
||||
import CommentTree from "../../components/Comment/CommentTree.vue";
|
||||
import "intersection-observer";
|
||||
@@ -549,7 +542,6 @@ import { IUser } from "@/types/current-user.model";
|
||||
ReportModal,
|
||||
IdentityPicker,
|
||||
ParticipationSection,
|
||||
ExternalParticipationButton,
|
||||
CommentTree,
|
||||
Tag,
|
||||
PopoverActorCard,
|
||||
|
||||
Reference in New Issue
Block a user