import React, {Component} from 'react';
import {Link} from 'react-router-dom';
import {Col, Row} from 'reactstrap';
import {dashboardTexts} from '../../../constants/dashboardConstants';

class NextActionItem extends Component {
    render() {
        const {nextAction} = this.props;

        return (
            <Row className="next-actions-row">
               <Col xl="8">
                  {nextAction.stepAction}
               </Col>
               <Col xl="4">
                   <Link to={'orders/'+ nextAction.idOrder}>
                       <div className={'next-actions-status ' + nextAction.status}>{dashboardTexts.statuses[nextAction.status]}</div>
                   </Link>
               </Col>
           </Row>
        );
    }
}

export default NextActionItem;
