replaced == with === in Web UI
parent
ea5577c2df
commit
e71bc4d671
|
@ -103,7 +103,7 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
setSelectedDistributionSystemID(event.target.value);
|
||||
distributionSystemList.forEach((currentItem, index) => {
|
||||
if (currentItem['value'] == event.target.value) {
|
||||
if (currentItem['value'] === event.target.value) {
|
||||
setSelectedDistributionSystemName(currentItem['label']);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -123,7 +123,7 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
}
|
||||
|
||||
energyFlowDiagramData.links.forEach(function (item) {
|
||||
if(item.value == null) {
|
||||
if(typeof item.value === 'null') {
|
||||
item.value = 0;
|
||||
}
|
||||
let sourceColor = null;
|
||||
|
|
|
@ -72,7 +72,7 @@ class RealtimeChart extends Component {
|
|||
//fetch realtime data at regular intervals
|
||||
this.refreshInterval = setInterval(() => {
|
||||
let isResponseOK = false;
|
||||
if (this.props.distributionSystemID != undefined) {
|
||||
if (typeof this.props.distributionSystemID !== 'undefined') {
|
||||
fetch(APIBaseURL + '/reports/distributionsystem?distributionsystemid=' + this.props.distributionSystemID, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
|
|
@ -346,7 +346,7 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -343,7 +343,7 @@ const CombinedEquipmentEnergyCategory = ({ setRedirect, setRedirectUrl, t }) =>
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -341,7 +341,7 @@ const EquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -340,7 +340,7 @@ const EquipmentEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -6,7 +6,7 @@ import { rgbaColor } from '../../../helpers/utils';
|
|||
import { withTranslation } from 'react-i18next';
|
||||
import uuid from 'uuid/v1';
|
||||
import { APIBaseURL } from '../../../config';
|
||||
import { getCookieValue, createCookie } from '../../../helpers/utils';
|
||||
import { getCookieValue } from '../../../helpers/utils';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ const ShopfloorCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -339,7 +339,7 @@ const ShopfloorEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -277,7 +277,7 @@ const SpaceCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -276,7 +276,7 @@ const SpaceEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -343,7 +343,7 @@ const StoreCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -339,7 +339,7 @@ const StoreEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -343,7 +343,7 @@ const TenantCost = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -338,7 +338,7 @@ const TenantEnergyCategory = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
|
@ -151,7 +151,7 @@ const Dashboard = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
let timeOfUseArray = [];
|
||||
json['reporting_period_input']['energy_category_ids'].forEach((currentValue, index) => {
|
||||
if(currentValue == 1) {
|
||||
if(currentValue === 1) {
|
||||
// energy_category_id 1 electricity
|
||||
let timeOfUseItem = {}
|
||||
timeOfUseItem['id'] = 1;
|
||||
|
|
Loading…
Reference in New Issue