diff --git a/apps/web/app/dashboard/charge-points/[id]/page.tsx b/apps/web/app/dashboard/charge-points/[id]/page.tsx
index 23d2d79..ca66225 100644
--- a/apps/web/app/dashboard/charge-points/[id]/page.tsx
+++ b/apps/web/app/dashboard/charge-points/[id]/page.tsx
@@ -17,7 +17,7 @@ import {
TextField,
} from "@heroui/react";
import { ArrowLeft, Pencil, PlugConnection } from "@gravity-ui/icons";
-import { api, type ChargePointDetail, type PaginatedTransactions } from "@/lib/api";
+import { api } from "@/lib/api";
import { useSession } from "@/lib/auth-client";
// ── Status maps ────────────────────────────────────────────────────────────
@@ -116,8 +116,7 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
const txQuery = useQuery({
queryKey: ["chargePointTransactions", id, txPage],
- queryFn: () =>
- api.transactions.list({ page: txPage, limit: TX_LIMIT, chargePointId: id }),
+ queryFn: () => api.transactions.list({ page: txPage, limit: TX_LIMIT, chargePointId: id }),
refetchInterval: 3_000,
});
@@ -240,104 +239,104 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
{/* Device info — admin only */}
{isAdmin && (
-
-
设备信息
-
- {[
- { label: "品牌", value: cp.chargePointVendor },
- { label: "型号", value: cp.chargePointModel },
- { label: "序列号", value: cp.chargePointSerialNumber },
- { label: "固件版本", value: cp.firmwareVersion },
- { label: "电表型号", value: cp.meterType },
- { label: "电表序列号", value: cp.meterSerialNumber },
- { label: "ICCID", value: cp.iccid },
- { label: "IMSI", value: cp.imsi },
- ].map(({ label, value }) => (
-
-
- {label}
- -
- {value ?? —}
-
-
- ))}
-
-
+
+
设备信息
+
+ {[
+ { label: "品牌", value: cp.chargePointVendor },
+ { label: "型号", value: cp.chargePointModel },
+ { label: "序列号", value: cp.chargePointSerialNumber },
+ { label: "固件版本", value: cp.firmwareVersion },
+ { label: "电表型号", value: cp.meterType },
+ { label: "电表序列号", value: cp.meterSerialNumber },
+ { label: "ICCID", value: cp.iccid },
+ { label: "IMSI", value: cp.imsi },
+ ].map(({ label, value }) => (
+
+
- {label}
+ -
+ {value ?? —}
+
+
+ ))}
+
+
)}
{/* Operation info — admin only */}
{isAdmin && (
-
-
运行配置
-
-
-
- 注册状态
- -
-
- {cp.registrationStatus}
-
-
-
-
-
- 电价
-
-
- {cp.feePerKwh > 0 ? (
-
- {cp.feePerKwh} 分/kWh
-
- (¥{(cp.feePerKwh / 100).toFixed(2)}/kWh)
+
+
运行配置
+
+
+
- 注册状态
+ -
+
+ {cp.registrationStatus}
+
+
+
+
+
- 电价
+ -
+ {cp.feePerKwh > 0 ? (
+
+ {cp.feePerKwh} 分/kWh
+
+ (¥{(cp.feePerKwh / 100).toFixed(2)}/kWh)
+
-
- ) : (
- "免费"
- )}
-
-
-
-
- 心跳间隔
- -
- {cp.heartbeatInterval != null ? (
- `${cp.heartbeatInterval} 秒`
- ) : (
- —
- )}
-
-
-
-
- 最后心跳
- -
- {cp.lastHeartbeatAt ? (
-
- {relativeTime(cp.lastHeartbeatAt)}
-
- ) : (
- —
- )}
-
-
-
-
- 最后启动通知
- -
- {cp.lastBootNotificationAt ? (
-
- {relativeTime(cp.lastBootNotificationAt)}
-
- ) : (
- —
- )}
-
-
-
-
- 注册时间
- -
- {new Date(cp.createdAt).toLocaleDateString("zh-CN")}
-
-
-
-
+ ) : (
+ "免费"
+ )}
+
+
+
+
- 心跳间隔
+ -
+ {cp.heartbeatInterval != null ? (
+ `${cp.heartbeatInterval} 秒`
+ ) : (
+ —
+ )}
+
+
+
+
- 最后心跳
+ -
+ {cp.lastHeartbeatAt ? (
+
+ {relativeTime(cp.lastHeartbeatAt)}
+
+ ) : (
+ —
+ )}
+
+
+
+
- 最后启动通知
+ -
+ {cp.lastBootNotificationAt ? (
+
+ {relativeTime(cp.lastBootNotificationAt)}
+
+ ) : (
+ —
+ )}
+
+
+
+
- 注册时间
+ -
+ {new Date(cp.createdAt).toLocaleDateString("zh-CN")}
+
+
+
+
)}
{/* Fee info — user only */}
@@ -362,7 +361,9 @@ export default function ChargePointDetailPage({ params }: { params: Promise<{ id
充电桥状态
-
+
{isOnline ? "在线" : "离线"}
diff --git a/apps/web/app/dashboard/id-tags/page.tsx b/apps/web/app/dashboard/id-tags/page.tsx
index 2f2fe0e..6e7dcf5 100644
--- a/apps/web/app/dashboard/id-tags/page.tsx
+++ b/apps/web/app/dashboard/id-tags/page.tsx
@@ -337,7 +337,12 @@ export default function IdTagsPage() {
const [deletingTag, setDeletingTag] = useState
(null);
const [claiming, setClaiming] = useState(false);
- const { data: idTagsData, isPending: loading, isFetching: refreshing, refetch } = useQuery({
+ const {
+ data: idTagsData,
+ isPending: loading,
+ isFetching: refreshing,
+ refetch,
+ } = useQuery({
queryKey: ["idTags"],
queryFn: async () => {
const [tagList, userList] = await Promise.all([
@@ -435,38 +440,38 @@ export default function IdTagsPage() {
-
-
-
-
-
-
- 新增储值卡
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 新增储值卡
+
+
+
+
+
+
+
+
+
+
+
+
) : (