feat(charge-points): add pricing mode for charge points with validation
feat(pricing): implement tariff management with peak, valley, and flat pricing feat(api): add tariff API for fetching and updating pricing configurations feat(tariff-schema): create database schema for tariff configuration feat(pricing-page): create UI for displaying and managing pricing tiers fix(sidebar): update sidebar to include pricing settings link
This commit is contained in:
@@ -11,6 +11,7 @@ import dayjs from "@/lib/dayjs";
|
||||
import { EvCharger, Plug } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { IdTagCard } from "@/components/id-tag-card";
|
||||
import router from "next/router";
|
||||
|
||||
// ── Status maps (same as charge-points page) ────────────────────────────────
|
||||
|
||||
@@ -333,12 +334,8 @@ function ChargePageContent() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<h2 className="text-2xl font-bold text-foreground">充电指令已发送</h2>
|
||||
<p className="text-sm text-muted leading-relaxed">
|
||||
充电桩正在响应,充电将自动开始
|
||||
<br />
|
||||
可在「充电记录」中查看实时进度
|
||||
</p>
|
||||
<h2 className="text-2xl font-bold text-foreground">正在启动中</h2>
|
||||
<p className="text-sm text-muted leading-relaxed">充电桩正在响应,稍候将自动开始</p>
|
||||
</div>
|
||||
<div className="w-full max-w-xs rounded-2xl border border-border bg-surface p-4 text-left space-y-2">
|
||||
<div className="flex justify-between text-sm">
|
||||
@@ -354,10 +351,12 @@ function ChargePageContent() {
|
||||
<span className="font-mono font-medium text-foreground">{selectedIdTag}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Button size="lg" onPress={resetAll} className="w-full max-w-xs">
|
||||
<ThunderboltFill className="size-4" />
|
||||
再次充电
|
||||
</Button>
|
||||
<Link href="/dashboard/transactions" className="w-full max-w-xs">
|
||||
<Button size="lg" className="w-full">
|
||||
<ThunderboltFill className="size-4" />
|
||||
充电记录
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -498,7 +497,9 @@ function ChargePageContent() {
|
||||
/{cp.connectors.length} 空闲
|
||||
</span>
|
||||
</span>
|
||||
{cp.feePerKwh > 0 ? (
|
||||
{cp.pricingMode === "tou" ? (
|
||||
<span className="text-sm font-medium text-accent">峰谷电价</span>
|
||||
) : cp.feePerKwh > 0 ? (
|
||||
<span className="text-sm font-medium text-foreground">
|
||||
¥{(cp.feePerKwh / 100).toFixed(2)}
|
||||
<span className="text-xs text-muted font-normal">/kWh</span>
|
||||
|
||||
Reference in New Issue
Block a user