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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"react": "^15.6.1",
"react-addons-css-transition-group": "^15.6.0",
"react-addons-pure-render-mixin": "^15.6.0",
"query-string": "^4.3.4",
"react-color": "^2.13.1",
"react-datetime": "2.7.1",
"react-dom": "^15.6.1",
Expand Down
2 changes: 2 additions & 0 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,5 @@ export const MAINTENANCE_MODE = false
export const LS_INCOMPLETE_PROJECT = 'incompleteProject'

export const CONNECT_MESSAGE_API_URL = process.env.CONNECT_MESSAGE_API_URL || TC_API_URL

export const NEW_PROJECT_PATH = '/new-project'
9 changes: 5 additions & 4 deletions src/projects/create/containers/CreateContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
CREATE_PROJECT_FAILURE,
LS_INCOMPLETE_PROJECT,
PROJECT_STATUS_IN_REVIEW,
ACCOUNTS_APP_REGISTER_URL
ACCOUNTS_APP_REGISTER_URL,
NEW_PROJECT_PATH
} from '../../../config/constants'

const page404 = compose(
Expand Down Expand Up @@ -141,10 +142,10 @@ class CreateConainer extends React.Component {
processing={ this.state.creatingProject }
onStepChange={ (wizardStep) => {
if (wizardStep === ProjectWizard.Steps.WZ_STEP_INCOMP_PROJ_CONF) {
browserHistory.push('/new-project/incomplete')
browserHistory.push(NEW_PROJECT_PATH + '/incomplete')
}
if (wizardStep === ProjectWizard.Steps.WZ_STEP_SELECT_PROD_TYPE) {
browserHistory.push('/new-project/')
browserHistory.push(NEW_PROJECT_PATH +'' + window.location.search)
}
this.setState({
wizardStep
Expand All @@ -157,7 +158,7 @@ class CreateConainer extends React.Component {
// compares updated product with previous product to know if user has updated the product
if (prevProduct !== product) {
if (product) {
browserHistory.push('/new-project/' + product)
browserHistory.push(NEW_PROJECT_PATH + '/' + product + window.location.search)
}
}
this.setState({
Expand Down
3 changes: 3 additions & 0 deletions src/projects/detail/components/SpecSection.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import qs from 'query-string'
import { Tabs, Tab, TCFormFields } from 'appirio-tech-react-components'
import _ from 'lodash'
import SpecQuestions from './SpecQuestions'
Expand Down Expand Up @@ -98,6 +99,7 @@ const SpecSection = props => {
case 'project-name': {
const refCodeFieldName = 'details.utm.code'
const refCode = _.get(project, refCodeFieldName, undefined)
const queryParamRefCode = qs.parse(window.location.search).refCode
return (
<div className="project-name-section">
{ (!project.status || project.status === PROJECT_STATUS_DRAFT) &&
Expand Down Expand Up @@ -129,6 +131,7 @@ const SpecSection = props => {
wrapperClass="project-refcode"
maxLength={ PROJECT_REF_CODE_MAX_LENGTH }
theme="paper-form-dotted"
disabled={ queryParamRefCode && queryParamRefCode.length > 0 }
/>
<div className="refcode-desc">
Optional
Expand Down