File tree Expand file tree Collapse file tree 4 files changed +22
-20
lines changed
components/SimplePlan/components
MilestonesApprovalNotification Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import IconReject from '../../../../../../assets/icons/icon-ui-reject.svg'
88
99import { Manager , Popper } from 'react-popper'
1010import ConfirmRejectMilestone from '../ConfirmRejectMilestone/ConfirmRejectMilestone'
11- import " ./MilestoneApprovalButton.scss"
11+ import ' ./MilestoneApprovalButton.scss'
1212
1313class MilestoneApprovalButton extends React . Component {
1414 constructor ( props ) {
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ function MilestoneRow({
299299 </ tr >
300300 ) : (
301301 < tr styleName = "milestone-row" >
302- { isUpdatable ? < td styleName = "expand" onClick = { ( ) => onExpand ( ! isExpand , milestone ) } > { isExpand ? < IconClose /> : < IconExpand /> } </ td > : < td > </ td > }
302+ { isUpdatable ? < td styleName = "expand" onClick = { ( ) => onExpand ( ! isExpand , milestone ) } > { isExpand ? < IconClose /> : < IconExpand /> } </ td > : < td / >}
303303 { isEditingMilestone ? < td /> : < td styleName = "checkbox" >
304304 < TCFormFields . Checkbox
305305 name = { `select-${ rowId } ` }
@@ -356,17 +356,19 @@ function MilestoneRow({
356356 isCustomer && (
357357 < td styleName = "action" >
358358 < div styleName = "inline-menu approve" >
359- { showApproval && < MilestoneApprovalButton
360- type = { 'approve' }
361- onClick = { ( ) => {
362- onApprove ( { type : 'approve' , item : milestone } )
363- } }
359+ {
360+ showApproval && < MilestoneApprovalButton
361+ type = { 'approve' }
362+ onClick = { ( ) => {
363+ onApprove ( { type : 'approve' , item : milestone } )
364+ } }
364365 /> }
365- { showApproval && < MilestoneApprovalButton
366- type = "reject"
367- onClick = { ( v ) => {
368- onApprove ( { type : 'reject' , comment : v , item : milestone } )
369- } }
366+ {
367+ showApproval && < MilestoneApprovalButton
368+ type = "reject"
369+ onClick = { ( v ) => {
370+ onApprove ( { type : 'reject' , comment : v , item : milestone } )
371+ } }
370372 /> }
371373 </ div >
372374 </ td >
Original file line number Diff line number Diff line change @@ -28,20 +28,20 @@ class MilestonesApprovalNotification extends React.Component {
2828 }
2929
3030 findLatest ( approvals ) {
31- let d = null ;
32- let maxIndex = 0 ;
31+ let d = null
32+ let maxIndex = 0
3333 for ( let index = 0 ; index < approvals . length ; index ++ ) {
3434 const tmp = new Date ( approvals [ index ] . createdAt )
3535 if ( ! d ) {
36- d = tmp ;
37- continue ;
36+ d = tmp
37+ continue
3838 }
3939 if ( d < tmp ) {
40- d = tmp ;
41- maxIndex = index ;
40+ d = tmp
41+ maxIndex = index
4242 }
4343 }
44- return approvals [ maxIndex ] || { } ;
44+ return approvals [ maxIndex ] || { }
4545 }
4646
4747 render ( ) {
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ class DashboardContainer extends React.Component {
162162 Promise . all ( reqs ) . then ( ( ...args ) => { console . log ( 'onApproveMilestones t' , args ) } )
163163 . catch ( e => console . log ( 'onApproveMilestones f' , e ) )
164164 . finally ( ( ) => {
165- this . onChangeMilestones ( null ) ;
165+ this . onChangeMilestones ( null )
166166 } )
167167 }
168168
You can’t perform that action at this time.
0 commit comments