+ | {t('operationalPoint')} | +{t('code')} | +{t('endStop')} | +{t('passageStop')} | +{t('startStop')} | +{t('weight')} | +{t('refEngine')} | + + + {opList.map((step, index) => { + const isFirstStep = index === 0; + const isLastStep = index === opList.length - 1; + const prevStep = opList[index - 1]; + const shouldRenderRow = isFirstStep || /* step.stop > '0' || */ isLastStep; + if (showAllPR || shouldRenderRow) { + return ( +
---|---|---|---|---|---|---|---|
+ {index + 1} + | ++ {!isFirstStep && !isLastStep && step.name === prevStep.name + ? '=' + : step.name || 'Unknown'} + | +{step.ch} | +{isLastStep ? step.time : ''} | +{isFirstStep || isLastStep ? '' : step.time} | +{isFirstStep ? step.departureTime : ''} | ++ {!isFirstStep && !isLastStep + ? '=' + : `${Math.floor(rollingStockData.mass / 1000)} t`} + | ++ {!isFirstStep && !isLastStep ? '=' : rollingStockData.metadata?.reference} + | +