File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/projects/create/components Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,21 @@ class ProjectWizard extends Component {
4848 const incompleteProjectStr = window . localStorage . getItem ( LS_INCOMPLETE_PROJECT )
4949 if ( incompleteProjectStr ) {
5050 const incompleteProject = JSON . parse ( incompleteProjectStr )
51+ // const incompleteProjectType = _.get(incompleteProject, 'type')
52+ const incompleteProduct = _ . get ( incompleteProject , 'details.products[0]' )
53+ let wizardStep = WZ_STEP_INCOMP_PROJ_CONF
54+ if ( incompleteProduct && params && params . product ) {
55+ // assumes the params.product to be id of a product because incomplete project is set only
56+ // after user selects a particular product
57+ const product = findProduct ( params . product , true )
58+ if ( product && product . id === incompleteProduct ) {
59+ wizardStep = WZ_STEP_FILL_PROJ_DETAILS
60+ }
61+ }
5162 this . setState ( {
5263 project : update ( this . state . project , { $merge : incompleteProject } ) ,
5364 dirtyProject : update ( this . state . dirtyProject , { $merge : incompleteProject } ) ,
54- wizardStep : WZ_STEP_INCOMP_PROJ_CONF ,
65+ wizardStep : wizardStep ,
5566 isProjectDirty : false
5667 } , ( ) => {
5768 typeof onStepChange === 'function' && onStepChange ( this . state . wizardStep )
You can’t perform that action at this time.
0 commit comments