-// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
+// Partial Copyright Jerome Benoit. 2021-2024. All Rights Reserved.
import type { JSONSchemaType } from 'ajv'
import {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = []
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.validFrom = convertToDate(cp.validFrom)!
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- cp.validTo = convertToDate(cp.validTo)!
+ cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)
+ cp.validFrom = convertToDate(cp.validFrom)
+ cp.validTo = convertToDate(cp.validTo)
let cpReplaced = false
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
.filter((schedulePeriod, index) => {
if (
isWithinInterval(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
+ addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod),
compositeInterval
)
) {
),
chargingSchedulePeriod: chargingSchedule.chargingSchedulePeriod.filter(schedulePeriod =>
isWithinInterval(
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
+ addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod),
compositeInterval
)
)