Make category optionnal and hide it from the form
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bfb3eebccf
commit
8f31beb0fb
@ -141,7 +141,7 @@ export const CREATE_EVENT = gql`
|
|||||||
$title: String!,
|
$title: String!,
|
||||||
$description: String!,
|
$description: String!,
|
||||||
$organizerActorId: ID!,
|
$organizerActorId: ID!,
|
||||||
$category: String!,
|
$category: String,
|
||||||
$beginsOn: DateTime!,
|
$beginsOn: DateTime!,
|
||||||
$picture: PictureInput,
|
$picture: PictureInput,
|
||||||
$tags: [String],
|
$tags: [String],
|
||||||
@ -174,7 +174,7 @@ export const EDIT_EVENT = gql`
|
|||||||
$title: String!,
|
$title: String!,
|
||||||
$description: String!,
|
$description: String!,
|
||||||
$organizerActorId: Int!,
|
$organizerActorId: Int!,
|
||||||
$category: String!
|
$category: String
|
||||||
) {
|
) {
|
||||||
EditEvent(title: $title, description: $description, organizerActorId: $organizerActorId, category: $category) {
|
EditEvent(title: $title, description: $description, organizerActorId: $organizerActorId, category: $category) {
|
||||||
uuid
|
uuid
|
||||||
|
@ -53,7 +53,7 @@ export interface IEvent {
|
|||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
description: string;
|
description: string;
|
||||||
category: Category;
|
category: Category|null;
|
||||||
|
|
||||||
beginsOn: Date;
|
beginsOn: Date;
|
||||||
endsOn: Date;
|
endsOn: Date;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<editor v-model="event.description" />
|
<editor v-model="event.description" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<b-field :label="$gettext('Category')">
|
<!--<b-field :label="$gettext('Category')">
|
||||||
<b-select placeholder="Select a category" v-model="event.category">
|
<b-select placeholder="Select a category" v-model="event.category">
|
||||||
<option
|
<option
|
||||||
v-for="category in categories"
|
v-for="category in categories"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
:key="category"
|
:key="category"
|
||||||
>{{ $gettext(category) }}</option>
|
>{{ $gettext(category) }}</option>
|
||||||
</b-select>
|
</b-select>
|
||||||
</b-field>
|
</b-field>-->
|
||||||
|
|
||||||
<h2 class="subtitle">
|
<h2 class="subtitle">
|
||||||
<translate>
|
<translate>
|
||||||
@ -103,7 +103,7 @@ export default class CreateEvent extends Vue {
|
|||||||
@Prop({ required: false, type: String }) uuid!: string;
|
@Prop({ required: false, type: String }) uuid!: string;
|
||||||
|
|
||||||
loggedPerson: IPerson = new Person();
|
loggedPerson: IPerson = new Person();
|
||||||
categories: string[] = Object.keys(Category);
|
/*categories: string[] = Object.keys(Category);*/
|
||||||
event: IEvent = new EventModel();
|
event: IEvent = new EventModel();
|
||||||
pictureFile: File | null = null;
|
pictureFile: File | null = null;
|
||||||
EventVisibility = EventVisibility;
|
EventVisibility = EventVisibility;
|
||||||
|
@ -91,7 +91,6 @@ defmodule Mobilizon.Events.Event do
|
|||||||
:title,
|
:title,
|
||||||
:begins_on,
|
:begins_on,
|
||||||
:organizer_actor_id,
|
:organizer_actor_id,
|
||||||
:category,
|
|
||||||
:url,
|
:url,
|
||||||
:uuid
|
:uuid
|
||||||
])
|
])
|
||||||
|
@ -131,7 +131,7 @@ defmodule MobilizonWeb.Schema.EventType do
|
|||||||
arg(:online_address, :string)
|
arg(:online_address, :string)
|
||||||
arg(:phone_address, :string)
|
arg(:phone_address, :string)
|
||||||
arg(:organizer_actor_id, non_null(:id))
|
arg(:organizer_actor_id, non_null(:id))
|
||||||
arg(:category, non_null(:string))
|
arg(:category, :string)
|
||||||
arg(:physical_address, :address_input)
|
arg(:physical_address, :address_input)
|
||||||
|
|
||||||
resolve(&Event.create_event/3)
|
resolve(&Event.create_event/3)
|
||||||
|
Loading…
Reference in New Issue
Block a user