File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/projects/detail/components Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class CreatePhaseForm extends React.Component {
120120
121121 const phaseData = {
122122 title : model . title ,
123- description : model . description ,
123+ description : model . description || ' ' ,
124124 startDate : moment ( model . startDate ) ,
125125 endDate : moment ( model . endDate ) ,
126126 }
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ class EditStageForm extends React.Component {
7676 }
7777
7878 submitValue ( model ) {
79+ console . log ( model )
7980 const { phase, phaseIndex, updatePhaseAction } = this . props
8081 const {
8182 publishClicked
@@ -87,6 +88,7 @@ class EditStageForm extends React.Component {
8788 newStatus = PHASE_STATUS_ACTIVE
8889 }
8990 const updateParam = _ . assign ( { } , model , {
91+ description : model . description || ' ' ,
9092 startDate : updatedStartDate ,
9193 endDate : updatedEndDate || '' ,
9294 status : newStatus ,
@@ -286,7 +288,7 @@ class EditStageForm extends React.Component {
286288 wrapperClass = { `${ styles [ 'input-row' ] } ` }
287289 label = "Description"
288290 name = "description"
289- value = { phase . description }
291+ value = { phase . description . trim ( ) }
290292 maxLength = { 255 }
291293 />
292294 </ div >
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ class PhaseCard extends React.Component {
183183 { phaseEditable && ! this . state . isEditting && ( < a styleName = "edit-btn" onClick = { this . toggleEditView } />
184184 ) }
185185 </ div >
186- < div styleName = "project-description" > { attr . phase . description } </ div >
186+ { attr . phase . description . trim ( ) . length > 0 && < div styleName = "project-description" > { attr . phase . description } </ div > }
187187 < div styleName = "meta-list" >
188188 < span styleName = "meta" > { attr . duration } </ span >
189189 < span styleName = "meta" > { attr . startEndDates } </ span >
You can’t perform that action at this time.
0 commit comments