@@ -26,7 +26,7 @@ const mediaItemRowCount = 3
26
26
27
27
const renderEditableTargetAttribute = (
28
28
{
29
- attrName, value, targetDate, editUrl, showTime = false
29
+ attrName, value, targetDate, editUrl, dateLabel , showTime = false
30
30
}
31
31
) => (
32
32
< InfoItemContainer >
@@ -46,7 +46,7 @@ const renderEditableTargetAttribute = (
46
46
}
47
47
{ targetDate && (
48
48
< div className = 'mt2 f7 warn-crimson b' >
49
- Deadline : { moment ( targetDate ) . format ( 'YYYY-MM-DD' + ( showTime ? ', h:mm' : '' ) ) } { showTime ? ' hrs' : '' }
49
+ { dateLabel } : { moment ( targetDate ) . format ( 'YYYY-MM-DD' + ( showTime ? ', h:mm' : '' ) ) } { showTime ? ' hrs' : '' }
50
50
</ div >
51
51
) }
52
52
</ div >
@@ -506,6 +506,7 @@ class CaseDetails extends Component {
506
506
</ div >
507
507
{ renderEditableTargetAttribute ( {
508
508
attrName : 'Solution' ,
509
+ dateLabel : 'Deadline' ,
509
510
value : solution ,
510
511
targetDate : solutionDeadline && new Date ( solutionDeadline ) ,
511
512
editUrl : `${ match . url } /solution`
@@ -514,6 +515,7 @@ class CaseDetails extends Component {
514
515
< CaseTargetAttrDialog
515
516
show = { ! ! subMatch }
516
517
attrName = 'Solution'
518
+ dateLabel = 'Deadline'
517
519
initialValue = { solution }
518
520
initialDate = { solutionDeadline && new Date ( solutionDeadline ) }
519
521
onSubmit = { ( value , date ) => {
@@ -531,13 +533,15 @@ class CaseDetails extends Component {
531
533
{ renderEditableTargetAttribute ( {
532
534
attrName : 'Next steps' ,
533
535
value : nextSteps ,
536
+ dateLabel : 'Next Step Date' ,
534
537
targetDate : nextStepsBy && new Date ( nextStepsBy ) ,
535
538
editUrl : `${ match . url } /nextSteps`
536
539
} ) }
537
540
< Route path = { `${ match . url } /nextSteps` } children = { ( { match : subMatch } ) => (
538
541
< CaseTargetAttrDialog
539
542
show = { ! ! subMatch }
540
543
attrName = 'Next Steps'
544
+ dateLabel = 'Next Step Date'
541
545
initialValue = { nextSteps }
542
546
initialDate = { nextStepsBy && new Date ( nextStepsBy ) }
543
547
onSubmit = { ( value , date ) => {
0 commit comments