Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Feb 2, 2025
2 parents 125728a + 610d173 commit b275089
Show file tree
Hide file tree
Showing 139 changed files with 509 additions and 1,625 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
### Fixed
### Removed
- removed console.log from myems-web and myems-admin

## [v5.1.0] - 2025-01-19
### Added
Expand All @@ -17,7 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added `myems_historical_db`.`tbl_text_value_latest` in database
- added columns to `myems_fdd_db`.`tbl_web_messages` in database
### Changed
- changed length of decimal part of latitude and longitude to 10 in database
- changed length of decimal part of latitude and longitude to 10 in database
- updated notification in myems-web
- updated dockerfiles to reduce images size
- updated command actions in myems-api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ app.controller('TextMessageOptionController', function(
load: true,
period:$scope.currentPeriod
});
console.log(query)
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
TextMessageService.getResult(query, headers, function (response) {
if (angular.isDefined(response.status) && response.status === 200) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ app.controller('WechatMessageOptionController', function(
load: true,
period:$scope.currentPeriod
});
console.log(query)
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
WechatMessageService.getResult(query, headers, function (response) {
if (angular.isDefined(response.status) && response.status === 200) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ app.controller('ShopfloorController', function (
});

modalInstance.result.then(function(modifiedShopfloor) {
console.log(modifiedShopfloor);
modifiedShopfloor.cost_center_id = modifiedShopfloor.cost_center.id;
modifiedShopfloor.contact_id = modifiedShopfloor.contact.id;
if (angular.isDefined(shopfloor.is_input_counted) == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ app.controller('WorkingCalendarNonWorkingDayController', function (
var nonWorkingDayID = angular.element('#' + dragEl).scope().nonWorkingDay.id;
let headers = { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token };
WorkingCalendarNonWorkingDayService.deleteNonWorkingDay(nonWorkingDayID, headers, function (response) {
console.log(response);
if (angular.isDefined(response.status) && response.status === 204) {
toaster.pop({
type: "success",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ const AdvacnedReporting = ({ setRedirect, setRedirectUrl, t }) => {
// Handler
const handleSubmit = e => {
e.preventDefault();
console.log('handleSubmit');
console.log(moment(reportingPeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss'));
console.log(moment(reportingPeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss'));

// disable submit button
setSubmitButtonDisabled(true);
// show spinner
Expand Down Expand Up @@ -140,7 +136,6 @@ const AdvacnedReporting = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);
let reportList = [];

if (json.length > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,12 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
body: null
})
.then(response => {
console.log(response);
if (response.ok) {
isResponseOK = true;
}
return response.json();
})
.then(json => {
console.log(json);
if (isResponseOK) {
// rename keys
json = JSON.parse(
Expand All @@ -102,7 +100,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
.join('"label":')
);

console.log(json);
setDistributionSystemList(json);
setSelectedDistributionSystemID([json[0]].map(o => o.value));

Expand Down Expand Up @@ -142,7 +139,6 @@ const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);
json.forEach(currentPoint => {
let textElement = document.getElementById('PT' + currentPoint['point_id']);
if (textElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,12 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
body: null
})
.then(response => {
console.log(response);
if (response.ok) {
isResponseOK = true;
}
return response.json();
})
.then(json => {
console.log(json);
if (isResponseOK) {
// rename keys
json = JSON.parse(
Expand Down Expand Up @@ -167,7 +165,6 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setEnergyFlowDiagramList(json[0]);
if (json[0].length > 0) {
setSelectedEnergyFlowDiagram(json[0][0].value);
Expand Down Expand Up @@ -228,7 +225,6 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setEnergyFlowDiagramList(json[0]);
if (json[0].length > 0) {
setSelectedEnergyFlowDiagram(json[0][0].value);
Expand Down Expand Up @@ -367,11 +363,6 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
// Handler
const handleSubmit = e => {
e.preventDefault();
console.log('handleSubmit');
console.log(selectedSpaceID);
console.log(selectedEnergyFlowDiagram);
console.log(moment(reportingPeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss'));
console.log(moment(reportingPeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss'));

// disable submit button
setSubmitButtonDisabled(true);
Expand Down Expand Up @@ -410,9 +401,7 @@ const EnergyFlowDiagram = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);
setEnergyFlowDiagramData(json);
console.log(energyFlowDiagramData);

let detial_value_list = [];
// choose the first point's timestamps (not empty) for all points
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class RealtimeChart extends Component {
}

componentDidMount() {
console.log(this.props);
const { t } = this.props;
this._isMounted = true;
// fetch realtime data at the first time
Expand All @@ -46,7 +45,6 @@ class RealtimeChart extends Component {
})
.then(json => {
if (isResponseOK) {
console.log(json);
let pointList = [];
json.forEach((currentCircuit, circuitIndex) => {
json[circuitIndex]['points'].forEach((currentPoint, pointIndex) => {
Expand Down Expand Up @@ -93,7 +91,6 @@ class RealtimeChart extends Component {
})
.then(json => {
if (isResponseOK) {
console.log(json);
let pointList = [];
json.forEach((currentCircuit, circuitIndex) => {
json[circuitIndex]['points'].forEach((currentPoint, pointIndex) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,12 @@ const CombinedEquipmentBatch = ({ setRedirect, setRedirectUrl, t }) => {
body: null
})
.then(response => {
console.log(response);
if (response.ok) {
isResponseOK = true;
}
return response.json();
})
.then(json => {
console.log(json);
if (isResponseOK) {
// rename keys
json = JSON.parse(
Expand Down Expand Up @@ -187,10 +185,6 @@ const CombinedEquipmentBatch = ({ setRedirect, setRedirectUrl, t }) => {
// Handler
const handleSubmit = e => {
e.preventDefault();
console.log('handleSubmit');
console.log(selectedSpaceID);
console.log(moment(reportingPeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss'));
console.log(moment(reportingPeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss'));

// disable submit button
setSubmitButtonDisabled(true);
Expand Down Expand Up @@ -234,7 +228,6 @@ const CombinedEquipmentBatch = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);
let detailed_column_list = [];
detailed_column_list.push({
dataField: 'name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,12 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
body: null
})
.then(response => {
console.log(response);
if (response.ok) {
isResponseOK = true;
}
return response.json();
})
.then(json => {
console.log(json);
if (isResponseOK) {
// rename keys
json = JSON.parse(
Expand Down Expand Up @@ -222,7 +220,6 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setCombinedEquipmentList(json[0]);
if (json[0].length > 0) {
setSelectedCombinedEquipment(json[0][0].value);
Expand Down Expand Up @@ -281,7 +278,6 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setCombinedEquipmentList(json[0]);
if (json[0].length > 0) {
setSelectedCombinedEquipment(json[0][0].value);
Expand All @@ -302,7 +298,6 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
};

let onComparisonTypeChange = ({ target }) => {
console.log(target.value);
setComparisonType(target.value);
if (target.value === 'year-over-year') {
setBasePeriodDateRangePickerDisabled(true);
Expand Down Expand Up @@ -449,15 +444,6 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
// Handler
const handleSubmit = e => {
e.preventDefault();
console.log('handleSubmit');
console.log(selectedSpaceID);
console.log(selectedCombinedEquipment);
console.log(comparisonType);
console.log(periodType);
console.log(basePeriodDateRange[0] != null ? moment(basePeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss') : null);
console.log(basePeriodDateRange[1] != null ? moment(basePeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss') : null);
console.log(moment(reportingPeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss'));
console.log(moment(reportingPeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss'));

// disable submit button
setSubmitButtonDisabled(true);
Expand Down Expand Up @@ -508,7 +494,6 @@ const CombinedEquipmentCarbon = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);

let cardSummaryList = [];
json['reporting_period']['names'].forEach((currentValue, index) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,12 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
body: null
})
.then(response => {
console.log(response);
if (response.ok) {
isResponseOK = true;
}
return response.json();
})
.then(json => {
console.log(json);
if (isResponseOK) {
// rename keys
json = JSON.parse(
Expand Down Expand Up @@ -222,7 +220,6 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setCombinedEquipmentList(json[0]);
if (json[0].length > 0) {
setSelectedCombinedEquipment(json[0][0].value);
Expand Down Expand Up @@ -281,7 +278,6 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
.split('"name":')
.join('"label":')
);
console.log(json);
setCombinedEquipmentList(json[0]);
if (json[0].length > 0) {
setSelectedCombinedEquipment(json[0][0].value);
Expand All @@ -302,7 +298,6 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
};

let onComparisonTypeChange = ({ target }) => {
console.log(target.value);
setComparisonType(target.value);
if (target.value === 'year-over-year') {
setBasePeriodDateRangePickerDisabled(true);
Expand Down Expand Up @@ -449,15 +444,6 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
// Handler
const handleSubmit = e => {
e.preventDefault();
console.log('handleSubmit');
console.log(selectedSpaceID);
console.log(selectedCombinedEquipment);
console.log(comparisonType);
console.log(periodType);
console.log(basePeriodDateRange[0] != null ? moment(basePeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss') : null);
console.log(basePeriodDateRange[1] != null ? moment(basePeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss') : null);
console.log(moment(reportingPeriodDateRange[0]).format('YYYY-MM-DDTHH:mm:ss'));
console.log(moment(reportingPeriodDateRange[1]).format('YYYY-MM-DDTHH:mm:ss'));

// disable submit button
setSubmitButtonDisabled(true);
Expand Down Expand Up @@ -508,8 +494,6 @@ const CombinedEquipmentCost = ({ setRedirect, setRedirectUrl, t }) => {
})
.then(json => {
if (isResponseOK) {
console.log(json);

let cardSummaryList = [];
json['reporting_period']['names'].forEach((currentValue, index) => {
let cardSummaryItem = {};
Expand Down
Loading

0 comments on commit b275089

Please sign in to comment.