feat(api & web): Implement real-time Eco Routing, Fuel & Energy Consumption and Cost Engine
This commit is contained in:
@@ -427,6 +427,26 @@ function App() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Fuel & Eco Energy Impact */}
|
||||
{routeData.ecoMetrics && (
|
||||
<div style={{ marginTop: 10, paddingTop: 8, borderTop: '1px solid rgba(255,255,255,0.08)', fontSize: '0.78rem' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 6 }}>
|
||||
<span style={{ color: '#38bdf8', fontWeight: 600 }}>🌿 مؤشر الطاقة واستهلاك الوقود:</span>
|
||||
<span style={{ fontSize: '0.72rem', padding: '2px 6px', borderRadius: 4, background: routeData.ecoMetrics.ecoScore >= 80 ? 'rgba(34, 197, 94, 0.2)' : 'rgba(245, 158, 11, 0.2)', color: routeData.ecoMetrics.ecoScore >= 80 ? '#4ade80' : '#fbbf24' }}>
|
||||
{routeData.ecoMetrics.ecoBadge} ({routeData.ecoMetrics.ecoScore}/100)
|
||||
</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', color: '#94a3b8', marginBottom: 4 }}>
|
||||
<span>⛽ وقود مقدر: <strong style={{ color: '#f8fafc' }}>{routeData.ecoMetrics.estimatedGasolineLiters} لتر</strong></span>
|
||||
<span>💰 تكلفة تقديرية: <strong style={{ color: '#4ade80' }}>{routeData.ecoMetrics.estimatedCostJOD} د.أ</strong></span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', color: '#94a3b8' }}>
|
||||
<span>⚡ استهلاك EV: <strong style={{ color: '#38bdf8' }}>{routeData.ecoMetrics.estimatedEvKWh} kWh</strong></span>
|
||||
<span>🌱 انبعاثات الكربون: <strong style={{ color: '#94a3b8' }}>{routeData.ecoMetrics.co2Kg} كغم</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Steep Slope Warnings Alert */}
|
||||
{routeData.elevationSummary?.steepWarnings && routeData.elevationSummary.steepWarnings.length > 0 && (
|
||||
<div style={{
|
||||
|
||||
Reference in New Issue
Block a user