use new object properties for orders and process

This commit is contained in:
GotPPay
2018-08-14 23:35:45 +02:00
parent 8b5374ee24
commit 672fb62728
4 changed files with 25 additions and 24 deletions

View File

@@ -7,7 +7,7 @@ const completedOrdersStatuses = ['production', 'end-of-life'];
class OrderProcess extends Component {
isStepVisible(step) {
return (step.status === 'in-progress' || step.status === 'done') && step.isVisibleForCustomer === 1;
return (step.status === 'pending' || step.status === 'complete') && step.isVisibleForCustomer === 1;
}
render() {
@@ -41,7 +41,7 @@ class OrderProcess extends Component {
<Row>
<Col xl="12" lg="12" md="12" xs="12" className="order-package-process">
{
visibleSteps.map((step, index) => <ProcessStep isStepVisible={this.isStepVisible} stepNumber={visibleSteps.length - index} step={step} key={'step-' + step.idProcess + '-' + step.idProcessStep}/>)
visibleSteps.reverse().map((step, index) => <ProcessStep isStepVisible={this.isStepVisible} stepNumber={visibleSteps.length - index} step={step} key={'step-' + step.idProcess + '-' + step.idProcessStep}/>)
}
</Col>
</Row>