/** * 新充电流程:充电前的模块 * @邠心vbe on 2023/06/20 */ import React from 'react'; import { View, Image, StyleSheet, ScrollView, Pressable } from 'react-native'; import app from '../../../app.json'; import Button, { ElevationObject } from '../../components/Button'; import TextView from '../../components/TextView'; import { ChargeStyle } from '../chargeV2/Charging'; import { PaymentList } from '../chargeV2/Payment'; import DiscountView from './DiscountView'; import PaymentListV2 from '../chargeV2/PaymentListV2'; import PagerUtil from '../chargeV2/PagerUtil'; import utils from '../../utils/utils'; export default StepStart = ({ idleFeeConfig, connectorInfo={}, currentPayment, onPaymentMethodChanged, onAuthenticate, selectedVoucher={} }) => { return ( {$t('charging.stepInsertConnector')} {$t('charging.stepInsertConnectorDesc')} {$t('charging.labelType')} {connectorInfo.chargeType}{connectorInfo.wattage || "AC22"} {$t('charging.labelPower')} {connectorInfo.wattage || "0"} kW{/*connectorInfo.rateType*/} {$t('charging.labelRate')} {/* {connectorInfo.rate || "0.00"}/{connectorInfo.rateType || "kWh"} */} {connectorInfo.rates || "S$0.00/kWh"} {(app.modules.nationally && connectorInfo.rates != connectorInfo.userRates) && ( ({connectorInfo.userRates || "S$0.00/kWh"})) } {$t('charging.labelStatus')} {$t('charging.statusAvailable')} { (idleFeeConfig && idleFeeConfig.idleFee) && Idle Fee Detail { utils.isNotEmpty(idleFeeConfig.repeatDay) && Effective Days: {utils.join(idleFeeConfig.repeatDay, ", ")} } { idleFeeConfig.allDay ? Effective Time:All day : (utils.isNotEmpty(idleFeeConfig.startTime) && utils.isNotEmpty(idleFeeConfig.endTime)) && Effective Time:{idleFeeConfig.startTime + " - " + idleFeeConfig.endTime} } { utils.isNotEmpty(idleFeeConfig.idleGracePeriod) && Grace Period: {idleFeeConfig.idleGracePeriod} min } Charging Rate: {idleFeeConfig.idleFee}/{idleFeeConfig.idleInterval} min { utils.isNotEmpty(idleFeeConfig.idleFeeCap) && Idle Fee Cap: {idleFeeConfig.idleFeeCap} } } {$t('charging.paymentMethod')} { app.v3.vouchers && {$t('voucher.vouchers')} } { app.charge.paymentMethod ? : } { app.v3.vouchers && PagerUtil.toSelectVoucher(connectorInfo.chargeBoxId, connectorInfo.connectorId)}> { utils.isNotEmpty(selectedVoucher.userVoucherId) ? {selectedVoucher.voucherName} {selectedVoucher.voucherDesc} : {$t("voucher.selectVoucher")} } }