};
export const resetConnectorStatus = (connectorStatus: ConnectorStatus): void => {
+ connectorStatus.chargingProfiles =
+ connectorStatus.transactionId && isNotEmptyArray(connectorStatus.chargingProfiles)
+ ? connectorStatus.chargingProfiles?.filter(
+ (chargingProfile) => chargingProfile.transactionId !== connectorStatus.transactionId,
+ )
+ : [];
connectorStatus.idTagLocalAuthorized = false;
connectorStatus.idTagAuthorized = false;
connectorStatus.transactionRemoteStarted = false;
);
return false;
}
- if (isNullOrUndefined(chargingProfile.chargingSchedule.startSchedule)) {
+ if (
+ chargingProfile.chargingProfileKind === ChargingProfileKindType.RECURRING &&
+ isNullOrUndefined(chargingProfile.chargingSchedule.startSchedule)
+ ) {
logger.error(
`${logPrefix} ${moduleName}.canProceedRecurringChargingProfile: Recurring charging profile id ${chargingProfile.chargingProfileId} has no startSchedule defined`,
);