From d8131c21c09d7df8abe416a4ef2fcc176af8c7c1 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 1 Feb 2019 12:33:15 +0100 Subject: [PATCH] Split event visibility and join options Signed-off-by: Thomas Citharel Fix tests Signed-off-by: Thomas Citharel Fix format Signed-off-by: Thomas Citharel --- js/src/types/event.model.ts | 16 ++++++++-- js/src/views/Event/Create.vue | 28 +++++++--------- lib/mobilizon/events/event.ex | 10 ++++-- ...plit_event_visibility_and_join_options.exs | 32 +++++++++++++++++++ .../resolvers/event_resolver_test.exs | 3 +- 5 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 priv/repo/migrations/20190130151607_split_event_visibility_and_join_options.exs diff --git a/js/src/types/event.model.ts b/js/src/types/event.model.ts index 9e5b25a49..011cd41dd 100644 --- a/js/src/types/event.model.ts +++ b/js/src/types/event.model.ts @@ -1,11 +1,22 @@ import { IActor } from "./actor.model"; export enum EventStatus { - TENTATIVE, CONFIRMED, CANCELLED + TENTATIVE, + CONFIRMED, + CANCELLED } export enum EventVisibility { - PUBLIC, PRIVATE + PUBLIC, + UNLISTED, + RESTRICTED, + PRIVATE +} + +export enum EventJoinOptions { + FREE, + RESTRICTED, + INVITE } export enum ParticipantRole { @@ -34,6 +45,7 @@ export interface IEvent { ends_on: Date; status: EventStatus; visibility: EventVisibility; + join_options: EventJoinOptions; thumbnail: string; large_image: string; publish_at: Date; diff --git a/js/src/views/Event/Create.vue b/js/src/views/Event/Create.vue index b22b24a0b..b674f9f66 100644 --- a/js/src/views/Event/Create.vue +++ b/js/src/views/Event/Create.vue @@ -1,3 +1,4 @@ +import {EventJoinOptions} from "../../types/event.model";