Skip to content

Commit c6b4093

Browse files
authored
Merge pull request #359 from Kaushik-Kumar-CEG/fix/remove-console-core-components
fix(core): remove console.log and console.info statements from core components
2 parents 13c8f3c + f593c1c commit c6b4093

12 files changed

Lines changed: 19 additions & 62 deletions

File tree

src/app/app-modules/core/components/allergen-search/allergen-search.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class AllergenSearchComponent implements OnInit, DoCheck {
4242

4343
selectedComponent: any = null;
4444
selectedComponentNo: any;
45-
message: string = '';
45+
message = '';
4646
selectedItem: any;
4747
displayedColumns: any = ['ConceptID', 'term', 'empty'];
4848

@@ -74,7 +74,6 @@ export class AllergenSearchComponent implements OnInit, DoCheck {
7474
this.selectedComponent = null;
7575
this.selectedComponentNo = item;
7676
this.selectedComponent = component;
77-
console.log('selectedComponent', this.selectedComponent);
7877
this.selectedItem = component;
7978
}
8079
submitComponentList() {
@@ -84,7 +83,7 @@ export class AllergenSearchComponent implements OnInit, DoCheck {
8483
};
8584
this.dialogRef.close(reqObj);
8685
}
87-
showProgressBar: boolean = false;
86+
showProgressBar = false;
8887
search(term: string, pageNo: any): void {
8988
if (term.length > 2) {
9089
this.showProgressBar = true;

src/app/app-modules/core/components/app-footer/app-footer.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export class AppFooterComponent implements OnInit, DoCheck {
4040
this.assignSelectedLanguage();
4141
this.today = new Date();
4242
this.year = this.today.getFullYear();
43-
console.log('inside footer', this.year);
4443
setInterval(() => {
4544
this.status = navigator.onLine;
4645
}, 1000);

src/app/app-modules/core/components/app-header/app-header.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export class AppHeaderComponent implements OnInit {
113113
if (this.isAuthenticated) {
114114
this.fetchLanguageSet();
115115
}
116-
console.log(this.filteredNavigation, 'filter');
117116
this.status = this.sessionstorage.getItem('providerServiceID');
118117
}
119118

@@ -131,7 +130,6 @@ export class AppHeaderComponent implements OnInit {
131130
this.getLanguage();
132131
}
133132
});
134-
console.log('language array' + this.languageArray);
135133
}
136134
changeLanguage(language: any) {
137135
this.http_service
@@ -162,7 +160,6 @@ export class AppHeaderComponent implements OnInit {
162160
}
163161

164162
languageSuccessHandler(response: any, language: any) {
165-
console.log('language is ', response);
166163
if (response === undefined) {
167164
alert(this.currentLanguageSet.alerts.info.langNotDefinesd);
168165
}
@@ -271,13 +268,10 @@ export class AppHeaderComponent implements OnInit {
271268
const commitDetailsPath: any = 'assets/git-version.json';
272269
this.auth.getUIVersionAndCommitDetails(commitDetailsPath).subscribe(
273270
res => {
274-
console.log('res', res);
275271
this.commitDetailsUI = res;
276272
this.versionUI = this.commitDetailsUI['version'];
277273
},
278-
err => {
279-
console.log('err', err);
280-
}
274+
err => {}
281275
);
282276
}
283277
showVersionAndCommitDetails() {

src/app/app-modules/core/components/calibration/calibration.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ import { MatTableDataSource } from '@angular/material/table';
3838
})
3939
export class CalibrationComponent implements OnInit, DoCheck {
4040
searchTerm: any;
41-
pageNo: number = 0;
42-
message: string = '';
41+
pageNo = 0;
42+
message = '';
4343
pageCount: any;
4444
selectedComponentsList = [];
45-
currentPage: number = 1;
45+
currentPage = 1;
4646
pager: any = {
4747
totalItems: 0,
4848
currentPage: 0,
@@ -96,7 +96,6 @@ export class CalibrationComponent implements OnInit, DoCheck {
9696
this.components.data = res.data.calibrationData;
9797
this.dataList = res.data.calibrationData;
9898
this.components.paginator = this.paginator;
99-
console.log('component', this.components.data);
10099
} else {
101100
this.message = this.current_language_set.common.noRecordFound;
102101
this.components.data = [];
@@ -149,7 +148,6 @@ export class CalibrationComponent implements OnInit, DoCheck {
149148
}
150149

151150
filterPreviousData(searchTerm: any) {
152-
console.log('searchTerm', searchTerm);
153151
if (!searchTerm) {
154152
this.components.data = this.dataList;
155153
this.components.paginator = this.paginator;

src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,14 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit {
111111
};
112112
}
113113

114-
onSuccess(stream: any) {
115-
console.log('capturing video stream');
116-
}
114+
onSuccess(stream: any) {}
117115

118-
onError(err: any) {
119-
console.log(err);
120-
}
116+
onError(err: any) {}
121117

122118
ngOnInit() {
123119
this.assignSelectedLanguage();
124120
this.loaded = false;
125121
this.status = this.current_language_set.capture;
126-
console.log('annoate', this.annotate);
127-
console.log('availablePoints', this.availablePoints);
128122
if (this.availablePoints?.markers)
129123
this.pointsToWrite = this.availablePoints.markers;
130124
}
@@ -135,7 +129,6 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit {
135129
this.sysImage = webcamImage?.imageAsDataUrl;
136130
this.captured = true;
137131
this.status = this.current_language_set.capture;
138-
console.info('got webcam image', this.sysImage);
139132
} else {
140133
this.captured = false;
141134
this.status = this.current_language_set.capture;
@@ -176,7 +169,6 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit {
176169

177170
public getSnapshot(): void {
178171
this.trigger.next();
179-
console.info('image type with base64 ', this.webcamImage);
180172
}
181173

182174
public get triggerObservable(): Observable<void> {

src/app/app-modules/core/components/data-sync-login/data-sync-login.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ export class DataSyncLoginComponent implements OnInit, DoCheck {
309309
) {
310310
if (this.data.provideAuthorizationToViewTmCS) {
311311
sessionStorage.setItem('authorizeToViewTMcasesheet', 'Authorized');
312-
} else {
313-
console.log('normal flow');
314312
}
315313
this.dialogRef.close(true);
316314
} else {

src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export class IotBluetoothComponent implements OnInit, DoCheck {
4040
private confirmationService: ConfirmationService
4141
) {}
4242

43-
apiAvailable: boolean = false;
44-
deviceConnected: boolean = false;
45-
deviceSearching: boolean = false;
43+
apiAvailable = false;
44+
deviceConnected = false;
45+
deviceSearching = false;
4646
infoDetails!: any[];
4747
errMsg: any;
4848
bluetoothDevices!: string[];
@@ -152,12 +152,6 @@ export class IotBluetoothComponent implements OnInit, DoCheck {
152152
this.deviceConnected = false;
153153
this.spinner = false;
154154
this.errMsg = undefined;
155-
console.log('disconnect log', JSON.parse(res['_body']));
156-
const body = JSON.parse(res['_body']);
157-
console.log(
158-
'disconnect log device connected',
159-
body['deviceConnected']
160-
);
161155
} else {
162156
this.errMsg = res['message'];
163157
}

src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ export class IotcomponentComponent implements OnInit, DoCheck {
4747
current_language_set: any;
4848
procedure: any;
4949
stripCode: any;
50-
msgCalibration: boolean = false;
51-
startedCalibration: boolean = false;
52-
stoppedCalibration: boolean = false;
53-
statusCalibration: boolean = false;
54-
stripShowMsg: boolean = false;
50+
msgCalibration = false;
51+
startedCalibration = false;
52+
stoppedCalibration = false;
53+
statusCalibration = false;
54+
stripShowMsg = false;
5555

5656
constructor(
5757
@Inject(MAT_DIALOG_DATA) public input: any,
@@ -71,7 +71,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
7171
this.statusCalibration = false;
7272
this.stoppedCalibration = false;
7373
this.errorMsg = undefined;
74-
console.log('input', this.input);
7574
this.startAPI = this.input['startAPI'];
7675
this.output = this.input['output'];
7776
this.procedure = this.input['procedure'];
@@ -91,7 +90,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
9190
});
9291

9392
dialogRef.afterClosed().subscribe(result => {
94-
console.log('calibration', result);
9593
if (result !== null) {
9694
this.stripCode = result;
9795
this.msgCalibration = true;
@@ -115,7 +113,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
115113
try {
116114
this.service.startAPI(this.procedure.value.calibrationStartAPI).subscribe(
117115
(res: any) => {
118-
console.log('dfasdas', res);
119116
if (res.status === 202) {
120117
this.progressMsg = res['_body']['message'];
121118
this.startedCalibration = true;
@@ -144,7 +141,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
144141
);
145142
this.service.statusAPI(statusAPI).subscribe(
146143
(res: any) => {
147-
console.log('dfasdas', res);
148144
if (res.status === 202 || res.status === 200) {
149145
this.stripShowMsg = false;
150146
this.statusCalibration = true;
@@ -195,7 +191,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
195191
try {
196192
this.service.startAPI(this.startAPI).subscribe(
197193
(res: any) => {
198-
console.log('dfasdas', res);
199194
if (res.status === 202) {
200195
this.progressMsg = res['_body']['message'];
201196
this.getstatus();
@@ -222,7 +217,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
222217
getstatus() {
223218
this.service.statusAPI(this.startAPI + '/status').subscribe(
224219
(res: any) => {
225-
console.log('dfasdas', res);
226220
if (res.status === 200) {
227221
clearTimeout(this.statuscall);
228222

@@ -257,7 +251,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
257251
if (this.statuscall !== undefined) {
258252
clearTimeout(this.statuscall);
259253
this.service.endAPI(this.startAPI).subscribe((res: any) => {
260-
console.log('dfasdas', res);
261254
if (res.status === 202) {
262255
//do something
263256
} else {
@@ -276,7 +269,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
276269
.endCalibrationAPI(this.procedure.value.calibrationEndAPI)
277270
.subscribe(
278271
(res: any) => {
279-
console.log('dfasdas', res);
280272
if (res.status === 202 || res.status === 200) {
281273
//do something
282274
this.stoppedCalibration = true;
@@ -299,7 +291,6 @@ export class IotcomponentComponent implements OnInit, DoCheck {
299291
.endCalibrationAPI(this.procedure.value.calibrationEndAPI)
300292
.subscribe(
301293
(res: any) => {
302-
console.log('dfasdas', res);
303294
if (res.status === 202 || res.status === 200) {
304295
//do something
305296
this.stoppedCalibration = true;

src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export class OpenPreviousVisitDetailsComponent implements OnInit {
5757
loadPreviousVisitDetails() {
5858
this.doctorService.getMMUHistory().subscribe(
5959
(data: any) => {
60-
console.log('data', data);
6160
if (data.statusCode === 200) {
6261
this.previousVisitData = data.data;
6362
this.getEachVisitData();
@@ -98,16 +97,13 @@ export class OpenPreviousVisitDetailsComponent implements OnInit {
9897
page: this.previousHistoryActivePage,
9998
itemsPerPage: this.previousHistoryRowsPerPage,
10099
});
101-
console.log('previous data', this.previousVisitData);
102100
}
103101

104102
previousHistoryPagedList: any = [];
105103
previousHistoryPageChanged(event: any): void {
106-
console.log('called', event);
107104
for (let i = 0; i < 5 && i < this.previousVisitData.length; i++) {
108105
this.previousHistoryPagedList.push(this.previousVisitData[i]);
109106
}
110-
console.log('list', this.previousHistoryPagedList);
111107
}
112108

113109
filterHistory(searchTerm?: string) {

src/app/app-modules/core/components/previous-details/previous-details.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export class PreviousDetailsComponent implements OnInit, DoCheck {
7979
}
8080

8181
filterPreviousData(searchTerm: any) {
82-
console.log('searchTerm', searchTerm);
8382
if (!searchTerm) {
8483
this.filteredDataList.data = this.dataList;
8584
this.filteredDataList.paginator = this.paginator;

0 commit comments

Comments
 (0)