repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup eslint disablement rule
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
ocpp
/
1.6
/
OCPP16ServiceUtils.ts
diff --git
a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
index 1f119a2e4753fb476bb6ee1ddf8e13e5e96cfd8c..51cbbd168699708acc6903565f9698bd42863a30 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
@@
-38,7
+38,7
@@
import {
type OCPP16SupportedFeatureProfiles,
OCPPVersion
} from '../../../types/index.js'
type OCPP16SupportedFeatureProfiles,
OCPPVersion
} from '../../../types/index.js'
-import { isNotEmptyArray, logger, roundTo } from '../../../utils/index.js'
+import {
convertToDate,
isNotEmptyArray, logger, roundTo } from '../../../utils/index.js'
import { OCPPServiceUtils } from '../OCPPServiceUtils.js'
export class OCPP16ServiceUtils extends OCPPServiceUtils {
import { OCPPServiceUtils } from '../OCPPServiceUtils.js'
export class OCPP16ServiceUtils extends OCPPServiceUtils {
@@
-164,6
+164,10
@@
export class OCPP16ServiceUtils extends OCPPServiceUtils {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = []
}
// 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.validFrom = convertToDate(cp.validFrom)!
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ cp.validTo = convertToDate(cp.validTo)!
let cpReplaced = false
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
let cpReplaced = false
if (isNotEmptyArray(chargingStation.getConnectorStatus(connectorId)?.chargingProfiles)) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion