feat(web): add remote start transaction feature and QR code scanning for charging

This commit is contained in:
2026-03-11 18:09:00 +08:00
parent 8ee2378c78
commit 73f0c6243a
6 changed files with 822 additions and 2 deletions

View File

@@ -208,6 +208,11 @@ export const api = {
apiFetch<Transaction & { online: boolean }>(`/api/transactions/${id}/stop`, {
method: "POST",
}),
remoteStart: (data: { chargePointIdentifier: string; connectorId: number; idTag: string }) =>
apiFetch<{ success: true }>("/api/transactions/remote-start", {
method: "POST",
body: JSON.stringify(data),
}),
delete: (id: number) =>
apiFetch<{ success: true }>(`/api/transactions/${id}`, { method: "DELETE" }),
},