Add isOnline event option to mark event as fully online

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-15 15:59:49 +02:00
parent d2ccc21f91
commit 7ecf2e1da0
9 changed files with 52 additions and 10 deletions

View File

@@ -243,6 +243,8 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
description:
"Whether to show or hide the person organizer when event is organized by a group"
)
field(:is_online, :boolean, description: "Whether the event is fully online")
end
@desc """
@@ -294,6 +296,8 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
description:
"Whether to show or hide the person organizer when event is organized by a group"
)
field(:is_online, :boolean, description: "Whether the event is fully online")
end
enum :event_metadata_type do

View File

@@ -28,7 +28,8 @@ defmodule Mobilizon.Events.EventOptions do
show_start_time: boolean,
show_end_time: boolean,
timezone: String.t() | nil,
hide_organizer_when_group_event: boolean
hide_organizer_when_group_event: boolean,
is_online: boolean()
}
@attrs [
@@ -43,7 +44,8 @@ defmodule Mobilizon.Events.EventOptions do
:show_start_time,
:show_end_time,
:timezone,
:hide_organizer_when_group_event
:hide_organizer_when_group_event,
:is_online
]
@primary_key false
@@ -61,6 +63,7 @@ defmodule Mobilizon.Events.EventOptions do
field(:show_end_time, :boolean, default: true)
field(:timezone, :string)
field(:hide_organizer_when_group_event, :boolean, default: false)
field(:is_online, :boolean, default: false)
embeds_many(:offers, EventOffer)
embeds_many(:participation_condition, EventParticipationCondition)