Edit events fixes and update cache
This commit is contained in:
@@ -12,6 +12,43 @@ const participantQuery = `
|
||||
}
|
||||
`;
|
||||
|
||||
const physicalAddressQuery = `
|
||||
description,
|
||||
floor,
|
||||
street,
|
||||
locality,
|
||||
postalCode,
|
||||
region,
|
||||
country,
|
||||
geom
|
||||
`;
|
||||
|
||||
const tagsQuery = `
|
||||
id,
|
||||
slug,
|
||||
title
|
||||
`;
|
||||
|
||||
const optionsQuery = `
|
||||
maximumAttendeeCapacity,
|
||||
remainingAttendeeCapacity,
|
||||
showRemainingAttendeeCapacity,
|
||||
offers {
|
||||
price,
|
||||
priceCurrency,
|
||||
url
|
||||
},
|
||||
participationConditions {
|
||||
title,
|
||||
content,
|
||||
url
|
||||
},
|
||||
attendees,
|
||||
program,
|
||||
commentModeration,
|
||||
showParticipationPrice
|
||||
`;
|
||||
|
||||
export const FETCH_EVENT = gql`
|
||||
query($uuid:UUID!) {
|
||||
event(uuid: $uuid) {
|
||||
@@ -29,20 +66,14 @@ export const FETCH_EVENT = gql`
|
||||
picture {
|
||||
id
|
||||
url
|
||||
name
|
||||
},
|
||||
publishAt,
|
||||
category,
|
||||
# online_address,
|
||||
# phone_address,
|
||||
online_address,
|
||||
phone_address,
|
||||
physicalAddress {
|
||||
description,
|
||||
floor,
|
||||
street,
|
||||
locality,
|
||||
postalCode,
|
||||
region,
|
||||
country,
|
||||
geom
|
||||
${physicalAddressQuery}
|
||||
}
|
||||
organizerActor {
|
||||
avatar {
|
||||
@@ -65,9 +96,7 @@ export const FETCH_EVENT = gql`
|
||||
${participantQuery}
|
||||
},
|
||||
tags {
|
||||
id,
|
||||
slug,
|
||||
title
|
||||
${tagsQuery}
|
||||
},
|
||||
relatedEvents {
|
||||
uuid,
|
||||
@@ -86,23 +115,7 @@ export const FETCH_EVENT = gql`
|
||||
}
|
||||
},
|
||||
options {
|
||||
maximumAttendeeCapacity,
|
||||
remainingAttendeeCapacity,
|
||||
showRemainingAttendeeCapacity,
|
||||
offers {
|
||||
price,
|
||||
priceCurrency,
|
||||
url
|
||||
},
|
||||
participationConditions {
|
||||
title,
|
||||
content,
|
||||
url
|
||||
},
|
||||
attendees,
|
||||
program,
|
||||
commentModeration,
|
||||
showParticipationPrice
|
||||
${optionsQuery}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,37 +172,62 @@ export const FETCH_EVENTS = gql`
|
||||
`;
|
||||
|
||||
export const CREATE_EVENT = gql`
|
||||
mutation CreateEvent(
|
||||
mutation createEvent(
|
||||
$organizerActorId: ID!,
|
||||
$title: String!,
|
||||
$description: String!,
|
||||
$organizerActorId: ID!,
|
||||
$category: String,
|
||||
$beginsOn: DateTime!,
|
||||
$endsOn: DateTime,
|
||||
$picture: PictureInput,
|
||||
$tags: [String],
|
||||
$options: EventOptionsInput,
|
||||
$physicalAddress: AddressInput,
|
||||
$status: EventStatus,
|
||||
$visibility: EventVisibility
|
||||
$tags: [String],
|
||||
$picture: PictureInput,
|
||||
$onlineAddress: String,
|
||||
$phoneAddress: String,
|
||||
$category: String,
|
||||
$physicalAddress: AddressInput,
|
||||
$options: EventOptionsInput,
|
||||
) {
|
||||
createEvent(
|
||||
organizerActorId: $organizerActorId,
|
||||
title: $title,
|
||||
description: $description,
|
||||
beginsOn: $beginsOn,
|
||||
endsOn: $endsOn,
|
||||
organizerActorId: $organizerActorId,
|
||||
category: $category,
|
||||
options: $options,
|
||||
picture: $picture,
|
||||
status: $status,
|
||||
visibility: $visibility,
|
||||
tags: $tags,
|
||||
physicalAddress: $physicalAddress,
|
||||
visibility: $visibility
|
||||
picture: $picture,
|
||||
onlineAddress: $onlineAddress,
|
||||
phoneAddress: $phoneAddress,
|
||||
category: $category,
|
||||
physicalAddress: $physicalAddress
|
||||
options: $options,
|
||||
) {
|
||||
id,
|
||||
uuid,
|
||||
title,
|
||||
description,
|
||||
beginsOn,
|
||||
endsOn,
|
||||
status,
|
||||
visibility,
|
||||
picture {
|
||||
id
|
||||
url
|
||||
},
|
||||
publishAt,
|
||||
category,
|
||||
online_address,
|
||||
phone_address,
|
||||
physicalAddress {
|
||||
${physicalAddressQuery}
|
||||
},
|
||||
tags {
|
||||
${tagsQuery}
|
||||
},
|
||||
options {
|
||||
${optionsQuery}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,32 +235,62 @@ export const CREATE_EVENT = gql`
|
||||
|
||||
export const EDIT_EVENT = gql`
|
||||
mutation updateEvent(
|
||||
$id: ID!,
|
||||
$title: String!,
|
||||
$description: String!,
|
||||
$organizerActorId: ID!,
|
||||
$category: String,
|
||||
$beginsOn: DateTime!,
|
||||
$endsOn: DateTime,
|
||||
$picture: PictureInput,
|
||||
$tags: [String],
|
||||
$options: EventOptionsInput,
|
||||
$physicalAddress: AddressInput,
|
||||
$visibility: EventVisibility
|
||||
$id: ID!,
|
||||
$title: String,
|
||||
$description: String,
|
||||
$beginsOn: DateTime,
|
||||
$endsOn: DateTime,
|
||||
$status: Int,
|
||||
$visibility: EventVisibility
|
||||
$tags: [String],
|
||||
$picture: PictureInput,
|
||||
$onlineAddress: String,
|
||||
$phoneAddress: String,
|
||||
$category: String,
|
||||
$physicalAddress: AddressInput,
|
||||
$options: EventOptionsInput,
|
||||
) {
|
||||
updateEvent(eventId: $id,
|
||||
title: $title,
|
||||
description: $description,
|
||||
beginsOn: $beginsOn,
|
||||
endsOn: $endsOn,
|
||||
organizerActorId: $organizerActorId,
|
||||
category: $category,
|
||||
options: $options,
|
||||
picture: $picture,
|
||||
tags: $tags,
|
||||
physicalAddress: $physicalAddress,
|
||||
visibility: $visibility) {
|
||||
uuid
|
||||
updateEvent(
|
||||
eventId: $id,
|
||||
title: $title,
|
||||
description: $description,
|
||||
beginsOn: $beginsOn,
|
||||
endsOn: $endsOn,
|
||||
status: $status,
|
||||
visibility: $visibility,
|
||||
tags: $tags,
|
||||
picture: $picture,
|
||||
onlineAddress: $onlineAddress,
|
||||
phoneAddress: $phoneAddress,
|
||||
category: $category,
|
||||
physicalAddress: $physicalAddress
|
||||
options: $options,
|
||||
) {
|
||||
id,
|
||||
uuid,
|
||||
title,
|
||||
description,
|
||||
beginsOn,
|
||||
endsOn,
|
||||
status,
|
||||
visibility,
|
||||
picture {
|
||||
id
|
||||
url
|
||||
},
|
||||
publishAt,
|
||||
category,
|
||||
online_address,
|
||||
phone_address,
|
||||
physicalAddress {
|
||||
${physicalAddressQuery}
|
||||
},
|
||||
tags {
|
||||
${tagsQuery}
|
||||
},
|
||||
options {
|
||||
${optionsQuery}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user