fix: Remove ocppConnectionName from connectors and transactions queries, fix OCPPMessages filter
This commit is contained in:
@@ -10,5 +10,5 @@ type PageProps = {
|
||||
|
||||
export default async function ShowChargingStationPage({ params }: PageProps) {
|
||||
const { id } = await params;
|
||||
return <ChargingStationDetail params={{ id: String(id)} />;
|
||||
return <ChargingStationDetail params={{ id: String(id) }} />;
|
||||
}
|
||||
|
||||
@@ -90,9 +90,9 @@ export const ChargingStationDetailCard = ({
|
||||
sorters: [{ field: OCPPMessageProps.timestamp, order: 'desc' }],
|
||||
filters: [
|
||||
{
|
||||
field: OCPPMessageProps.ocppConnectionName,
|
||||
field: 'stationId',
|
||||
operator: 'eq',
|
||||
value: station?.ocppConnectionName,
|
||||
value: station?.id,
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { AccessDeniedFallbackCard } from '@lib/client/components/access-denied-f
|
||||
import { Skeleton } from '@lib/client/components/ui/skeleton';
|
||||
|
||||
type ChargingStationDetailProps = {
|
||||
params: { id: number };
|
||||
params: { id: string };
|
||||
};
|
||||
|
||||
export const ChargingStationDetail: React.FC<ChargingStationDetailProps> = ({ params }) => {
|
||||
|
||||
@@ -275,11 +275,9 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
|
||||
transactions: transactions(where: { isActive: { _eq: true } }) {
|
||||
id
|
||||
stationId
|
||||
ocppConnectionName
|
||||
timeSpentCharging
|
||||
isActive
|
||||
chargingState
|
||||
ocppConnectionName
|
||||
stoppedReason
|
||||
transactionId
|
||||
evseId
|
||||
@@ -290,7 +288,6 @@ export const CHARGING_STATIONS_GET_QUERY = gql`
|
||||
}
|
||||
connectors: connectors {
|
||||
id
|
||||
ocppConnectionName
|
||||
stationId
|
||||
evseId
|
||||
connectorId
|
||||
@@ -342,7 +339,6 @@ export const GET_CHARGING_STATIONS_WITH_LOCATION_AND_LATEST_STATUS_NOTIFICATIONS
|
||||
timeSpentCharging
|
||||
isActive
|
||||
chargingState
|
||||
ocppConnectionName
|
||||
stoppedReason
|
||||
transactionId
|
||||
evseId
|
||||
|
||||
Reference in New Issue
Block a user