From 39f95c2909f9dda16c82057af3c40607de8c44fa Mon Sep 17 00:00:00 2001 From: "Pankush Manchanda (Digital)" Date: Wed, 18 Oct 2017 16:49:09 +0530 Subject: [PATCH] Some Changes --- debug.log | 8 +-- src/app/closure/closure.component.ts | 4 +- .../outbound-allocate-records.component.ts | 10 +--- .../callservices/callservice.service.ts | 1 + src/app/services/czentrix/czentrix.service.ts | 55 ++++++++++++------- .../outbound-search-records.service.ts | 2 +- tslint.json | 2 +- 7 files changed, 44 insertions(+), 38 deletions(-) diff --git a/debug.log b/debug.log index 8e251ed0..1ee60183 100644 --- a/debug.log +++ b/debug.log @@ -1,8 +1,8 @@ [0808/165106:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 -[0808/165106:ERROR:node_debugger.cc(86)] Cannot start debugger server +[0808/165106:ERROR:node_.cc(86)] Cannot start server [0810/145956:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 -[0810/145956:ERROR:node_debugger.cc(86)] Cannot start debugger server +[0810/145956:ERROR:node_.cc(86)] Cannot start server [0814/175243:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 -[0814/175243:ERROR:node_debugger.cc(86)] Cannot start debugger server +[0814/175243:ERROR:node_.cc(86)] Cannot start server [0926/123124:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004 -[0926/123124:ERROR:node_debugger.cc(86)] Cannot start debugger server +[0926/123124:ERROR:node_.cc(86)] Cannot start server diff --git a/src/app/closure/closure.component.ts b/src/app/closure/closure.component.ts index 215b6a58..b434749d 100644 --- a/src/app/closure/closure.component.ts +++ b/src/app/closure/closure.component.ts @@ -130,7 +130,7 @@ export class ClosureComponent implements OnInit } getLanguages() { this._callServices.getLanguages().subscribe(response => { - debugger; + this.languages = response; this.preferredLanguageName = this.languages.filter(lang => { return lang.languageName.toLowerCase() === 'hindi' @@ -229,7 +229,7 @@ export class ClosureComponent implements OnInit outBoundCloseCall(benData: any) { this.beneficiaryRegID = benData.dataPass.beneficiaryRegID; if (benData.dataPass.i_bendemographics.m_language || benData.dataPass.i_bendemographics.m_language.languageName) { - debugger; + ; this.preferredLanguageName = benData.dataPass.i_bendemographics.m_language.languageName; // this.preferredLanguageName = benData.dataPass.i_bendemographics.m_language.map(function (item) { // return { diff --git a/src/app/outbound-allocate-records/outbound-allocate-records.component.ts b/src/app/outbound-allocate-records/outbound-allocate-records.component.ts index 9684861d..f5073002 100644 --- a/src/app/outbound-allocate-records/outbound-allocate-records.component.ts +++ b/src/app/outbound-allocate-records/outbound-allocate-records.component.ts @@ -34,13 +34,7 @@ export class OutboundAllocateRecordsComponent implements OnInit { @Output() outboundCount: EventEmitter = new EventEmitter(); initialCount: number; @ViewChild('allocateRef') input: ElementRef; - // outboundallocateform = new FormGroup({ - // totalNewRecords: new FormControl(), - // userID: new FormControl(), - // AllocateNoOfRecords: new FormControl(), - // roleID: new FormControl(), - // OutboundSearchRecordService - // }); + constructor( private _OCAService: OutboundCallAllocationService, @@ -50,8 +44,6 @@ export class OutboundAllocateRecordsComponent implements OnInit { private _OSRService: OutboundSearchRecordService, private renderer: Renderer ) { - // this.providerServiceMapID = this.saved_data.current_service.serviceID; - // this.getOutboundCall(this.providerServiceMapID); this.createForm(); } diff --git a/src/app/services/callservices/callservice.service.ts b/src/app/services/callservices/callservice.service.ts index 3970ff04..3a1084c6 100644 --- a/src/app/services/callservices/callservice.service.ts +++ b/src/app/services/callservices/callservice.service.ts @@ -22,6 +22,7 @@ export class CallServices { _unblockPhoneNo = this._commonURL + 'call/unblockPhoneNumber'; _outbouncClose_url = this._commonURL + '/call/completeOutboundCall'; _getLanguage_url = this._commonURL + '/beneficiary/getLanguageList' + _getAgentStatus_url = this._commonURL + ''; constructor( private _http: Http, private _config: ConfigService, diff --git a/src/app/services/czentrix/czentrix.service.ts b/src/app/services/czentrix/czentrix.service.ts index 57bbdc2e..06d10433 100644 --- a/src/app/services/czentrix/czentrix.service.ts +++ b/src/app/services/czentrix/czentrix.service.ts @@ -3,19 +3,18 @@ import { Http, Response, Headers, URLSearchParams, RequestOptions } from '@angul import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; -import { ConfigService } from "../config/config.service"; -import { dataService } from "../dataService/data.service"; +import { ConfigService } from '../config/config.service'; +import { dataService } from '../dataService/data.service'; @Injectable() export class CzentrixServices { headers = new Headers({ 'Content-Type': 'application/json' }); options = new RequestOptions({ headers: this.headers }); - + common_url = this._config.getCommonBaseURL(); address = this._config.getTelephonyServerURL(); agent_id: any = this._data.cZentrixAgentID; path = 'apps/appsHandler.php?'; - // _getTodaysCallReport = this.address + 'apps/cust_appsHandler.php?transaction_id=CTI_AGENT_CALL_RECORD&agent_id=' + this.agent_id + '&resFormat=3' resFormat = 3; transaction_id: any; ip: any; @@ -25,54 +24,62 @@ export class CzentrixServices { agentLogin(agentId, ipAddress) { - this.transaction_id = "CTI_LOGIN"; + this.transaction_id = 'CTI_LOGIN'; this.agent_id = agentId; this.ip = ipAddress; - let params = "transaction_id=" + this.transaction_id + "&agent_id=" + this.agent_id + "&ip=" + this.ip + "&resFormat=" + this.resFormat; + let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } getLoginKey(uname, password) { return this.http + // tslint:disable-next-line:max-line-length .get(this.address + 'apps/cust_appsHandler.php?transaction_id=CTI_LOGIN_KEY&username=' + uname + '&password=' + password + '&resFormat=3') .map(this.extractData).catch(this.handleError); } agentLogout(agentId, ipAddress) { - this.transaction_id = "CTI_LOGOUT"; + this.transaction_id = 'CTI_LOGOUT'; this.agent_id = agentId; this.ip = ipAddress; - let params = "transaction_id=" + this.transaction_id + "&agent_id=" + this.agent_id + "&ip=" + this.ip + "&resFormat=" + this.resFormat; + let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } getOnlineAgents(agentId, ipAddress) { - this.transaction_id = "CTI_ONLINE_AGENTS"; + this.transaction_id = 'CTI_ONLINE_AGENTS'; this.agent_id = agentId; this.ip = ipAddress; - let params = "transaction_id=" + this.transaction_id + "&agent_id=" + this.agent_id + "&ip=" + this.ip + "&resFormat=" + this.resFormat; + let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } + + getAgentStatus() { + + } + manualDialaNumber(agentId, ipAddress, phoneNum) { - this.transaction_id = "CTI_DIAL"; + this.transaction_id = 'CTI_DIAL'; this.agent_id = agentId; this.ip = ipAddress; this.phone_num = phoneNum; - let params = "transaction_id=" + this.transaction_id + "&agent_id=" + this.agent_id + "&ip=" + this.ip + "&phone_num=" + this.phone_num + "&resFormat=" + this.resFormat; + // tslint:disable-next-line:max-line-length + let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&phone_num=' + this.phone_num + '&resFormat=' + this.resFormat; return this.callAPI(params); } transferCall(transferFromAgentId, transferToAgentId, ipAddress) { - this.transaction_id = "CTI_TRANSFER_AGENT"; + this.transaction_id = 'CTI_TRANSFER_AGENT'; this.ip = ipAddress; - let params = "transaction_id=" + this.transaction_id + '&transfer_ from=' + transferFromAgentId + '&transfer_to=' + transferToAgentId + '&ip=' + this.ip + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + let params = 'transaction_id=' + this.transaction_id + '&transfer_ from=' + transferFromAgentId + '&transfer_to=' + transferToAgentId + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } @@ -93,12 +100,13 @@ export class CzentrixServices { return this.callAPI(params); } - switchBreakFree(agentId, ipAddress, state) { //state : BREAK / FREE + switchBreakFree(agentId, ipAddress, state) { // state : BREAK / FREE this.transaction_id = 'CTI_PAUSE'; this.agent_id = agentId; this.ip = ipAddress; - let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&state=' + state + '&ip=' + this.ip + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&state=' + state + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } @@ -107,7 +115,8 @@ export class CzentrixServices { this.agent_id = agentId; this.ip = ipAddress; - let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } @@ -116,7 +125,8 @@ export class CzentrixServices { this.agent_id = agentId; this.ip = ipAddress; - let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&state=' + state + '&ip=' + this.ip + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&state=' + state + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } @@ -125,7 +135,8 @@ export class CzentrixServices { this.agent_id = agentId; this.ip = ipAddress; - let params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&ip=' + this.ip + '&resFormat=' + this.resFormat; return this.callAPI(params); } @@ -136,7 +147,8 @@ export class CzentrixServices { getIpAddress(agentId) { this.transaction_id = 'CTI_GET_AGENTIP'; this.agent_id = agentId; - let params = 'apps/cust_appsHandler.php?transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'apps/cust_appsHandler.php?transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&resFormat=' + this.resFormat; return this.http.get(this.address + params).map((res: Response) => this.extractData(res)); } @@ -148,7 +160,8 @@ export class CzentrixServices { getTodayCallReports() { this.transaction_id = 'CTI_AGENT_CALL_RECORD'; this.agent_id = this._data.cZentrixAgentID; - let params = 'apps/cust_appsHandler.php?transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&resFormat=' + this.resFormat; + // tslint:disable-next-line:max-line-length + const params = 'apps/cust_appsHandler.php?transaction_id=' + this.transaction_id + '&agent_id=' + this.agent_id + '&resFormat=' + this.resFormat; return this.http.get(this.address + params).map(this.extractData).catch(this.handleError); } diff --git a/src/app/services/outboundServices/outbound-search-records.service.ts b/src/app/services/outboundServices/outbound-search-records.service.ts index b3761e3d..881ced91 100644 --- a/src/app/services/outboundServices/outbound-search-records.service.ts +++ b/src/app/services/outboundServices/outbound-search-records.service.ts @@ -28,7 +28,7 @@ export class OutboundSearchRecordService { } getUnallocatedCalls(serviceID: any, startDate?: any, endDate?: any, language?: any, userID?: any) { - debugger; + ; const obj = {}; if (userID) { obj['providerServiceMapID'] = serviceID; diff --git a/tslint.json b/tslint.json index 97adaa5e..cc280940 100644 --- a/tslint.json +++ b/tslint.json @@ -44,7 +44,7 @@ "trace" ], "no-construct": true, - "no-debugger": true, + "no-": true, "no-empty": false, "no-empty-interface": true, "no-eval": true,