Skip to content

Commit 0abcb32

Browse files
author
Vikas Agarwal
committed
Merge branch 'dev' into feature/chatbot-product-type
2 parents 24fd5a1 + c5f95c9 commit 0abcb32

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"react": "^15.6.1",
5252
"react-addons-css-transition-group": "^15.6.0",
5353
"react-addons-pure-render-mixin": "^15.6.0",
54+
"query-string": "^4.3.4",
5455
"react-color": "^2.13.1",
5556
"react-datetime": "2.7.1",
5657
"react-dom": "^15.6.1",

src/config/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,5 @@ export const MAINTENANCE_MODE = false
253253
export const LS_INCOMPLETE_PROJECT = 'incompleteProject'
254254

255255
export const CONNECT_MESSAGE_API_URL = process.env.CONNECT_MESSAGE_API_URL || TC_API_URL
256+
257+
export const NEW_PROJECT_PATH = '/new-project'

src/projects/create/containers/CreateContainer.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
CREATE_PROJECT_FAILURE,
1212
LS_INCOMPLETE_PROJECT,
1313
PROJECT_STATUS_IN_REVIEW,
14-
ACCOUNTS_APP_REGISTER_URL
14+
ACCOUNTS_APP_REGISTER_URL,
15+
NEW_PROJECT_PATH
1516
} from '../../../config/constants'
1617

1718
const page404 = compose(
@@ -141,10 +142,10 @@ class CreateConainer extends React.Component {
141142
processing={ this.state.creatingProject }
142143
onStepChange={ (wizardStep) => {
143144
if (wizardStep === ProjectWizard.Steps.WZ_STEP_INCOMP_PROJ_CONF) {
144-
browserHistory.push('/new-project/incomplete')
145+
browserHistory.push(NEW_PROJECT_PATH + '/incomplete')
145146
}
146147
if (wizardStep === ProjectWizard.Steps.WZ_STEP_SELECT_PROD_TYPE) {
147-
browserHistory.push('/new-project/')
148+
browserHistory.push(NEW_PROJECT_PATH +'' + window.location.search)
148149
}
149150
this.setState({
150151
wizardStep
@@ -157,7 +158,7 @@ class CreateConainer extends React.Component {
157158
// compares updated product with previous product to know if user has updated the product
158159
if (prevProduct !== product) {
159160
if (product) {
160-
browserHistory.push('/new-project/' + product)
161+
browserHistory.push(NEW_PROJECT_PATH + '/' + product + window.location.search)
161162
}
162163
}
163164
this.setState({

src/projects/detail/components/SpecSection.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { PropTypes } from 'react'
2+
import qs from 'query-string'
23
import { Tabs, Tab, TCFormFields } from 'appirio-tech-react-components'
34
import _ from 'lodash'
45
import SpecQuestions from './SpecQuestions'
@@ -98,6 +99,7 @@ const SpecSection = props => {
9899
case 'project-name': {
99100
const refCodeFieldName = 'details.utm.code'
100101
const refCode = _.get(project, refCodeFieldName, undefined)
102+
const queryParamRefCode = qs.parse(window.location.search).refCode
101103
return (
102104
<div className="project-name-section">
103105
{ (!project.status || project.status === PROJECT_STATUS_DRAFT) &&
@@ -129,6 +131,7 @@ const SpecSection = props => {
129131
wrapperClass="project-refcode"
130132
maxLength={ PROJECT_REF_CODE_MAX_LENGTH }
131133
theme="paper-form-dotted"
134+
disabled={ queryParamRefCode && queryParamRefCode.length > 0 }
132135
/>
133136
<div className="refcode-desc">
134137
Optional

0 commit comments

Comments
 (0)