diff --git a/angular.json b/angular.json index db728ae2d..a4d2e967d 100644 --- a/angular.json +++ b/angular.json @@ -17,9 +17,15 @@ "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", - "assets": ["src/favicon.ico", "src/favicon.png", "src/mdo-assets"], + "assets": [ + "src/favicon.ico", + "src/favicon.png", + "src/mdo-assets" + ], "stylePreprocessorOptions": { - "includePaths": ["src/styles"] + "includePaths": [ + "src/styles" + ] }, "styles": [ { @@ -95,7 +101,7 @@ ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, @@ -121,7 +127,7 @@ ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, @@ -147,7 +153,7 @@ ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, @@ -173,7 +179,7 @@ ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, @@ -199,7 +205,7 @@ ], "optimization": true, "outputHashing": "all", - "sourceMap": false, + "sourceMap": true, "extractCss": true, "namedChunks": false, "aot": true, @@ -246,16 +252,27 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", - "assets": ["src/favicon.ico", "src/mdo-assets"], - "styles": ["src/styles.scss"], + "assets": [ + "src/favicon.ico", + "src/mdo-assets" + ], + "styles": [ + "src/styles.scss" + ], "scripts": [] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"], - "exclude": ["**/node_modules/**"] + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] } }, "e2e": { @@ -296,8 +313,13 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": ["project/ws/app/tsconfig.lib.json", "project/ws/app/tsconfig.spec.json"], - "exclude": ["**/node_modules/**"] + "tsConfig": [ + "project/ws/app/tsconfig.lib.json", + "project/ws/app/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] } } } @@ -312,4 +334,4 @@ "cli": { "analytics": false } -} +} \ No newline at end of file diff --git a/project/ws/app/src/lib/routes/events/routes/list/list-event.component.ts b/project/ws/app/src/lib/routes/events/routes/list/list-event.component.ts index e625b6fb8..af60c0cd8 100644 --- a/project/ws/app/src/lib/routes/events/routes/list/list-event.component.ts +++ b/project/ws/app/src/lib/routes/events/routes/list/list-event.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, Component, OnInit, OnDestroy } from '@angular/core' import { Router, ActivatedRoute } from '@angular/router' import { EventsService } from '../../services/events.service' -import { ConfigurationsService, EventService, LoggerService } from '@sunbird-cb/utils' +import { ConfigurationsService, EventService } from '@sunbird-cb/utils' import * as moment from 'moment' /* tslint:disable */ import _ from 'lodash' @@ -34,19 +34,20 @@ export class ListEventComponent implements OnInit, AfterViewInit, OnDestroy { private eventSvc: EventsService, private configSvc: ConfigurationsService, private activeRoute: ActivatedRoute, - private events: EventService, - private logger: LoggerService, + private events: EventService ) { this.math = Math if (this.configSvc.userProfile) { this.currentUser = this.configSvc.userProfile && this.configSvc.userProfile.userId this.department = this.configSvc.userProfile && this.configSvc.userProfile.departmentName this.departmentID = this.configSvc.userProfile && this.configSvc.userProfile.rootOrgId - this.logger.log(this.departmentID) + // tslint:disable-next-line:no-console + console.log('departmentID', this.departmentID) } else { if (_.get(this.activeRoute, 'snapshot.data.configService.userProfile.rootOrgId')) { this.departmentID = _.get(this.activeRoute, 'snapshot.data.configService.userProfile.rootOrgId') - this.logger.log(this.departmentID) + // tslint:disable-next-line:no-console + console.log('departmentID', this.departmentID) } if (_.get(this.activeRoute, 'snapshot.data.configService.userProfile.departmentName')) { this.department = _.get(this.activeRoute, 'snapshot.data.configService.userProfile.departmentName') @@ -106,7 +107,8 @@ export class ListEventComponent implements OnInit, AfterViewInit, OnDestroy { } this.eventSvc.getEventsList(requestObj).subscribe((events: any) => { - this.logger.log(events) + // tslint:disable-next-line:no-console + console.log('events', events) this.setEventListData(events) }) } @@ -141,7 +143,8 @@ export class ListEventComponent implements OnInit, AfterViewInit, OnDestroy { } const isPast = this.compareDate(expiryDateFormat); (isPast) ? this.eventData['pastEvents'].push(eventDataObj) : this.eventData['upcomingEvents'].push(eventDataObj) - this.logger.log(eventDataObj) + // tslint:disable-next-line:no-console + console.log('eventDataObj', eventDataObj) } }) this.filter('upcoming') @@ -164,7 +167,8 @@ export class ListEventComponent implements OnInit, AfterViewInit, OnDestroy { filter(key: string | 'timestamp' | 'best' | 'saved') { const upcomingEventsData: any[] = [] const pastEventsData: any[] = [] - this.logger.log(this.eventData) + // tslint:disable-next-line:no-console + console.log('eventData', this.eventData) if (this.eventData['pastEvents'] && this.eventData['pastEvents'].length > 0) { this.eventData['pastEvents'].forEach((event: any) => { pastEventsData.push(event) @@ -182,15 +186,18 @@ export class ListEventComponent implements OnInit, AfterViewInit, OnDestroy { switch (key) { case 'upcoming': this.data = upcomingEventsData - this.logger.log(this.data) + // tslint:disable-next-line:no-console + console.log('data', this.data) break case 'past': this.data = pastEventsData - this.logger.log(this.data) + // tslint:disable-next-line:no-console + console.log('data', this.data) break default: this.data = upcomingEventsData - this.logger.log(this.data) + // tslint:disable-next-line:no-console + console.log('data', this.data) break } } diff --git a/src/app/component/root/root.component.ts b/src/app/component/root/root.component.ts index 0df9e6170..168290b9c 100644 --- a/src/app/component/root/root.component.ts +++ b/src/app/component/root/root.component.ts @@ -180,7 +180,8 @@ export class RootComponent implements OnInit, AfterViewInit { raiseAppStartTelemetry() { if (!this.appStartRaised) { - this.logger.log(WsEvents.WsEventLogLevel.Info) + // tslint:disable-next-line:no-console + console.log('WsEvents.WsEventLogLevel', WsEvents.WsEventLogLevel) const event = { eventType: WsEvents.WsEventType.Telemetry, eventLogLevel: WsEvents.WsEventLogLevel.Info,