feat: Add option to link an external registration provider for events
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
committed by
Thomas Citharel
parent
4fb1282e76
commit
2de6937407
@@ -246,8 +246,25 @@
|
||||
</o-radio>
|
||||
</div>-->
|
||||
|
||||
<o-field :label="t('External registration')">
|
||||
<o-switch v-model="externalParticipation">
|
||||
{{
|
||||
t("I want to manage the registration with an external provider")
|
||||
}}
|
||||
</o-switch>
|
||||
</o-field>
|
||||
|
||||
<o-field v-if="externalParticipation" :label="t('URL')">
|
||||
<o-input
|
||||
icon="link"
|
||||
type="url"
|
||||
v-model="event.externalParticipationUrl"
|
||||
:placeholder="t('External provider URL')"
|
||||
/>
|
||||
</o-field>
|
||||
|
||||
<o-field
|
||||
v-if="anonymousParticipationConfig?.allowed"
|
||||
v-if="anonymousParticipationConfig?.allowed && !externalParticipation"
|
||||
:label="t('Anonymous participations')"
|
||||
>
|
||||
<o-switch v-model="eventOptions.anonymousParticipation">
|
||||
@@ -268,19 +285,22 @@
|
||||
</o-switch>
|
||||
</o-field>
|
||||
|
||||
<o-field :label="t('Participation approval')">
|
||||
<o-field
|
||||
:label="t('Participation approval')"
|
||||
v-show="!externalParticipation"
|
||||
>
|
||||
<o-switch v-model="needsApproval">{{
|
||||
t("I want to approve every participation request")
|
||||
}}</o-switch>
|
||||
</o-field>
|
||||
|
||||
<o-field :label="t('Number of places')">
|
||||
<o-field :label="t('Number of places')" v-show="!externalParticipation">
|
||||
<o-switch v-model="limitedPlaces">{{
|
||||
t("Limited number of places")
|
||||
}}</o-switch>
|
||||
</o-field>
|
||||
|
||||
<div class="" v-if="limitedPlaces">
|
||||
<div class="" v-if="limitedPlaces && !externalParticipation">
|
||||
<o-field :label="t('Number of places')" label-for="number-of-places">
|
||||
<o-input
|
||||
type="number"
|
||||
@@ -1308,6 +1328,19 @@ const orderedCategories = computed(() => {
|
||||
if (!eventCategories.value) return undefined;
|
||||
return sortBy(eventCategories.value, ["label"]);
|
||||
});
|
||||
|
||||
const externalParticipation = computed({
|
||||
get() {
|
||||
return event.value?.joinOptions === EventJoinOptions.EXTERNAL;
|
||||
},
|
||||
set(newValue) {
|
||||
if (newValue === true) {
|
||||
event.value.joinOptions = EventJoinOptions.EXTERNAL;
|
||||
} else {
|
||||
event.value.joinOptions = EventJoinOptions.FREE;
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user