/** * 充电页:扫码认证之后-充电开始之前 * @邠心vbe on 2023/03/10 */ import React from 'react'; import { Pressable, StyleSheet, View } from 'react-native'; import Button, {ElevationObject} from '../../components/Button'; import TextView from '../../components/TextView'; import { circleSize, DashboardView } from '../chargeV2/Charging'; import { PaymentList } from '../chargeV2/Payment'; import StationInfoView from './StationInfoView'; import PaymentListV2 from '../chargeV2/PaymentListV2'; import app from '../../../app.json'; import PagerUtil from '../chargeV2/PagerUtil'; import utils from '../../utils/utils'; export default StepChargeView = ({ isStart=false, isPending, isCharging, connectorInfo, currentPayment, curerntPerUser, lastUpdated, onStartCharge, onStopCharge, selectedVoucher={}, onPaymentMethodChanged }) => ( <> {$t('charging.selectedCharger')} {/* */} {/* Press Start to begin Charging */} {$t('charging.selectPaymentMethod')} { app.charge.paymentMethod ? : } {/* */} { (app.v3.vouchers && (!isPending || !isCharging || utils.isNotEmpty(selectedVoucher.userVoucherId))) && <> {$t('voucher.selectVoucher')} (!isPending && !isCharging) && PagerUtil.toSelectVoucher(connectorInfo.chargeBoxId, connectorInfo.connectorId)}> { utils.isNotEmpty(selectedVoucher.userVoucherId) ? {selectedVoucher.voucherName} {selectedVoucher.voucherDesc} : {$t("voucher.selectVoucher")} } { (!isPending && !isCharging) && } } { lastUpdated ? {$t('charging.lastUpdatedAt') + lastUpdated + '\n' + $t('charging.pullDownRefresh')} : <> } { isStart ?