Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config/projectWizard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const products = {
'Watson Chatbot': {
brief: 'Watson Chatbot',
details: 'Build Chatbot using IBM Watson',
formTitle: 'Chatbot powered by IBM Watson®',
icon: 'product-chatbot-watson',
id: 'watson_chatbot',
aliases: ['watson_chatbot'],
Expand Down
14 changes: 6 additions & 8 deletions src/projects/create/components/FillProjectDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from 'lodash'
import React, { PropTypes as PT, Component } from 'react'
import Sticky from 'react-stickynode'

import config from '../../../config/projectWizard'
import { findProduct } from '../../../config/projectWizard'
import './FillProjectDetails.scss'
import ProjectBasicDetailsForm from '../components/ProjectBasicDetailsForm'
import ProjectOutline from '../components/ProjectOutline'
Expand Down Expand Up @@ -33,22 +33,20 @@ class FillProjectDetails extends Component {

render() {
const { project, dirtyProject, processing, submitBtnText } = this.props
const product = _.get(project, 'details.products[0]')
const projectTypeId = _.get(project, 'type')
const subConfig = config[_.findKey(config, {id : projectTypeId})]
const productName = _.findKey(subConfig.subtypes, {id : product})
const productId = _.get(project, 'details.products[0]')
const product = findProduct(productId)

let specification = 'topcoder.v1'
if (product)
specification = typeToSpecification[product]
if (productId)
specification = typeToSpecification[productId]
let sections = require(`../../../config/projectQuestions/${specification}`).basicSections
return (
<div className="FillProjectDetailsWrapper">
<div className="header headerFillProjectDetails">
</div>
<div className="FillProjectDetails">
<div className="header">
<h1>Let's setup your { productName } project</h1>
<h1>{ _.get(product, 'formTitle', `Let's setup your ${ product.name } project`) }</h1>
</div>
<section className="two-col-content content">
<div className="container">
Expand Down