Forwarded Id in the edit event page and removed last occurrence of botId
This commit is contained in:
1 parent
7db9527694
commit
4cb529af1e
4 files changed
+28
-11
No files matched your search
@@ -29,7 +29,7 @@ class Basic extends React.Component {
|
||||
|
||||
<TextField
|
||||
label='Public id'
|
||||
value='Your public ID will be generated automatically'
|
||||
value={`${event.id}(your public ID is generated automatically and unmutable)`}
|
||||
className={classes.inputField}
|
||||
disabled
|
||||
/>
|
||||
|
||||
@@ -39,6 +39,7 @@ class Queried extends React.Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
value: 0,
|
||||
id: this.props.event.id,
|
||||
title: this.props.event.title,
|
||||
subtitle: this.props.event.subtitle,
|
||||
description: this.props.event.description,
|
||||
@@ -62,6 +63,7 @@ class Queried extends React.Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
id,
|
||||
title,
|
||||
subtitle,
|
||||
description,
|
||||
@@ -76,9 +78,9 @@ class Queried extends React.Component {
|
||||
const { classes } = this.props;
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Mutation mutation={hostedEventsCalls.EVENTS_CREATEEVENT}
|
||||
<Mutation mutation={hostedEventsCalls.EVENTS_EDITEVENT}
|
||||
update={(store, { data }) => {
|
||||
this.props.history.push(`/events/edit/${data.events_CreateEvent.id}`);
|
||||
this.props.history.push(`/events/edit/${data.events_EditEvent.id}`);
|
||||
}
|
||||
}
|
||||
>
|
||||
@@ -127,6 +129,7 @@ class Queried extends React.Component {
|
||||
e.preventDefault();
|
||||
hostEvent({
|
||||
variables: {
|
||||
eventId: id,
|
||||
event: {
|
||||
title,
|
||||
subtitle,
|
||||
@@ -143,6 +146,7 @@ class Queried extends React.Component {
|
||||
{value === 0 && <TabContainer>
|
||||
<Basic
|
||||
event={{
|
||||
id,
|
||||
title,
|
||||
subtitle,
|
||||
description,
|
||||
|
||||
@@ -1,23 +1,35 @@
|
||||
import gql from 'graphql-tag';
|
||||
import { eventMinimalInfo } from '../Fragments';
|
||||
import { eventFullInfo } from '../Fragments';
|
||||
|
||||
const EVENTS_CREATEEVENT = gql`
|
||||
mutation Events_CreateEvent($event: events_EventInput!) {
|
||||
events_CreateEvent(event: $event) {
|
||||
...EventMinimalInfo
|
||||
...eventFullInfo
|
||||
}
|
||||
}
|
||||
${eventMinimalInfo}
|
||||
${eventFullInfo}
|
||||
`;
|
||||
|
||||
const EVENTS_EDITEVENT = gql`
|
||||
mutation Events_EditEvent($eventId: ID!, $event: events_EventInput!) {
|
||||
events_EditEvent(eventId: $eventId, event: $event) {
|
||||
...eventFullInfo
|
||||
}
|
||||
}
|
||||
${eventFullInfo}
|
||||
`;
|
||||
|
||||
const EVENTS_EVENTSBYHOST = gql`
|
||||
query Events_EventsByHost{
|
||||
events_EventsByHost {
|
||||
...EventMinimalInfo
|
||||
...eventFullInfo
|
||||
}
|
||||
}
|
||||
${eventMinimalInfo}
|
||||
${eventFullInfo}
|
||||
`;
|
||||
|
||||
export default {
|
||||
EVENTS_CREATEEVENT,
|
||||
EVENTS_EDITEVENT,
|
||||
EVENTS_EVENTSBYHOST,
|
||||
};
|
||||
@@ -56,14 +56,15 @@ export const eventFullInfo = gql`
|
||||
}
|
||||
participants {
|
||||
participantId
|
||||
|
||||
participant {
|
||||
id
|
||||
name
|
||||
}
|
||||
state
|
||||
botId
|
||||
releaseId
|
||||
operationId
|
||||
clone{
|
||||
botId
|
||||
}
|
||||
}
|
||||
invitations {
|
||||
inviteeId
|
||||
|
||||
Reference in new issue
Block a user