4 files changed
+14
-8
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@superalgos/operations-client",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"description": "Superalgos Operations client-side web app",
|
||||
"main": "src/index.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -43,7 +43,8 @@ class AddClone extends Component {
|
||||
stateDatetime: 0,
|
||||
createDatetime: 0,
|
||||
runAsTeam: false,
|
||||
financialBeings:[],
|
||||
teams: [],
|
||||
teamId: '',
|
||||
|
||||
// Indicator Bot
|
||||
startYear: 2019,
|
||||
@@ -131,7 +132,7 @@ class AddClone extends Component {
|
||||
</Select>
|
||||
)
|
||||
} else{
|
||||
this.financialBeings = data.teams_FbByTeamMember.fb
|
||||
this.teams = data.teams_FbByTeamMember
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -408,10 +409,11 @@ class AddClone extends Component {
|
||||
}
|
||||
|
||||
setSelectedBot(botId){
|
||||
if(isDefined(this.financialBeings)){
|
||||
for (var i = 0; i < this.financialBeings.length; i++) {
|
||||
if(this.financialBeings[i].id === botId){
|
||||
this.setState({selectedBot:this.financialBeings[i]})
|
||||
if(isDefined(this.teams)){
|
||||
for (var i = 0; i < this.teams.fb.length; i++) {
|
||||
if(this.teams.fb[i].id === botId){
|
||||
this.setState({selectedBot:this.teams.fb[i]})
|
||||
this.setState({teamId:this.teams.id})
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -439,6 +441,7 @@ class AddClone extends Component {
|
||||
async createCloneOnServer(){
|
||||
let variables = {
|
||||
clone:{
|
||||
teamId: this.state.teamId,
|
||||
botId: this.state.selectedBot.id,
|
||||
mode: this.state.mode,
|
||||
resumeExecution: this.state.resumeExecution,
|
||||
@@ -496,6 +499,8 @@ class AddClone extends Component {
|
||||
createDatetime: 0,
|
||||
runAsTeam: false,
|
||||
processName: '',
|
||||
teams: [],
|
||||
teamId: '',
|
||||
|
||||
//Error handlers
|
||||
nameError: false,
|
||||
|
||||
@@ -50,7 +50,7 @@ const resolve = async(parent, { clone }, context) => {
|
||||
}
|
||||
|
||||
try{
|
||||
let team = await teamQuery(context.authorization)
|
||||
let team = await teamQuery(context.authorization, clone.teamId)
|
||||
clone = await cloneDetails(context.userId, team.data.data.teams_TeamById, clone)
|
||||
clone.createDatetime = new Date().valueOf() / 1000|0
|
||||
clone.active = true
|
||||
|
||||
@@ -10,6 +10,7 @@ const Type = new GraphQLInputObjectType({
|
||||
name: 'CloneInput',
|
||||
description: 'Payload for clone input',
|
||||
fields: () => ({
|
||||
teamId: { type: new GraphQLNonNull(GraphQLString) },
|
||||
botId: { type: new GraphQLNonNull(GraphQLString) },
|
||||
mode: { type: GraphQLString },
|
||||
resumeExecution: { type: GraphQLBoolean },
|
||||
|
||||
Reference in new issue
Block a user