Skip to content

Commit

Permalink
Some Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankush Manchanda (Digital) authored and Pankush Manchanda (Digital) committed Oct 18, 2017
1 parent e92828b commit 39f95c2
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 38 deletions.
8 changes: 4 additions & 4 deletions debug.log
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions src/app/closure/closure.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ export class OutboundAllocateRecordsComponent implements OnInit {
@Output() outboundCount: EventEmitter<any> = new EventEmitter<any>();
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,
Expand All @@ -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();
}

Expand Down
1 change: 1 addition & 0 deletions src/app/services/callservices/callservice.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
55 changes: 34 additions & 21 deletions src/app/services/czentrix/czentrix.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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));
}
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
Expand Down

0 comments on commit 39f95c2

Please sign in to comment.