Skip to content

Commit ece6081

Browse files
nbitonfranck-boullier
authored andcommitted
feat: renamed "Deadline" to "Next Step Date" for next steps' date label (#866)
1 parent 244a5a4 commit ece6081

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

imports/ui/case/case-details.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const mediaItemRowCount = 3
2626

2727
const renderEditableTargetAttribute = (
2828
{
29-
attrName, value, targetDate, editUrl, showTime = false
29+
attrName, value, targetDate, editUrl, dateLabel, showTime = false
3030
}
3131
) => (
3232
<InfoItemContainer>
@@ -46,7 +46,7 @@ const renderEditableTargetAttribute = (
4646
}
4747
{targetDate && (
4848
<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' : ''}
5050
</div>
5151
)}
5252
</div>
@@ -506,6 +506,7 @@ class CaseDetails extends Component {
506506
</div>
507507
{renderEditableTargetAttribute({
508508
attrName: 'Solution',
509+
dateLabel: 'Deadline',
509510
value: solution,
510511
targetDate: solutionDeadline && new Date(solutionDeadline),
511512
editUrl: `${match.url}/solution`
@@ -514,6 +515,7 @@ class CaseDetails extends Component {
514515
<CaseTargetAttrDialog
515516
show={!!subMatch}
516517
attrName='Solution'
518+
dateLabel='Deadline'
517519
initialValue={solution}
518520
initialDate={solutionDeadline && new Date(solutionDeadline)}
519521
onSubmit={(value, date) => {
@@ -531,13 +533,15 @@ class CaseDetails extends Component {
531533
{renderEditableTargetAttribute({
532534
attrName: 'Next steps',
533535
value: nextSteps,
536+
dateLabel: 'Next Step Date',
534537
targetDate: nextStepsBy && new Date(nextStepsBy),
535538
editUrl: `${match.url}/nextSteps`
536539
})}
537540
<Route path={`${match.url}/nextSteps`} children={({ match: subMatch }) => (
538541
<CaseTargetAttrDialog
539542
show={!!subMatch}
540543
attrName='Next Steps'
544+
dateLabel='Next Step Date'
541545
initialValue={nextSteps}
542546
initialDate={nextStepsBy && new Date(nextStepsBy)}
543547
onSubmit={(value, date) => {

imports/ui/dialogs/case-target-attr-dialog.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type Props = {
2121
attrName: string,
2222
initialValue?: string,
2323
initialDate?: Date,
24+
dateLabel: string,
2425
onCancel: () => void,
2526
showTime?: boolean,
2627
onSubmit: (value: string, date: Date) => void
@@ -116,7 +117,7 @@ export default class CaseTargetAttrDialog extends React.Component<Props, State>
116117
}
117118

118119
render () {
119-
const { show, onCancel, attrName, showTime } = this.props
120+
const { show, onCancel, attrName, showTime, dateLabel } = this.props
120121
const { attrValue, attrDate, attrTime, isEditing, hideDateRow } = this.state
121122
const now = new Date()
122123
return (
@@ -150,7 +151,7 @@ export default class CaseTargetAttrDialog extends React.Component<Props, State>
150151
rowsMax={3}
151152
/>
152153
<div className='mt3 flex-grow'>
153-
{!hideDateRow && infoItemLabel('Deadline')}
154+
{!hideDateRow && infoItemLabel(dateLabel)}
154155
{!hideDateRow && (
155156
<div className='flex'>
156157
<div className='flex-grow flex items-center'>

0 commit comments

Comments
 (0)