Commit 7266a705 by GD-A-150752

message-engine-hiring-team

parent 81685280
...@@ -67,10 +67,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -67,10 +67,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
return; return;
} }
if (message.name !== 'HiringTeamChat' || message.message === null) {
return;
}
if (message.name === 'HiringTeamChat' && message.message === null) { if (message.name === 'HiringTeamChat' && message.message === null) {
this.jobId = null; this.jobId = null;
this.loggedIn = null; this.loggedIn = null;
...@@ -79,11 +75,13 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -79,11 +75,13 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
return; return;
} }
if (message.name !== 'HiringTeamChat' || message.message === null) {
return;
}
const msg = JSON.parse(message.message); const msg = JSON.parse(message.message);
console.log('Admin Parsed', msg);
this.jobId = msg.JobApplicationID; this.jobId = msg.JobApplicationID;
this.loggedIn = msg.CandidateID; this.loggedIn = msg.CandidateID;
console.log('Admin Values:', this.jobId, this.loggedIn);
// Show Chat bubble if message service allows // Show Chat bubble if message service allows
this.showBubble = true; this.showBubble = true;
} }
......
...@@ -67,7 +67,6 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement ...@@ -67,7 +67,6 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
ngOnInit(): void { ngOnInit(): void {
this.utilsService.resetCounter(); this.utilsService.resetCounter();
this.showLoader = true; this.showLoader = true;
console.log('Job', this.jobId);
this.subscriptions.push( this.subscriptions.push(
this.appService.getTypes('SentVia') this.appService.getTypes('SentVia')
...@@ -77,21 +76,18 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement ...@@ -77,21 +76,18 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
if (this.embedded) { if (this.embedded) {
if (this.adminPortalLayoutService.userData) { if (this.adminPortalLayoutService.userData) {
this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User; this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User;
console.log('Already Engine -> User', this.loggedInId);
this.initComponent(); this.initComponent();
} else { } else {
this.subscriptions.push(this.adminPortalLayoutService.userDataUpdated this.subscriptions.push(this.adminPortalLayoutService.userDataUpdated
.first() .first()
.subscribe(() => { .subscribe(() => {
this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User; this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User;
console.log('Engine -> User', this.loggedInId);
this.initComponent(); this.initComponent();
})); }));
} }
} else { } else {
// For applicant // For applicant
this.embedded = false; this.embedded = false;
console.log('Applicant Engine -> User', this.loggedInId);
this.initComponent(); this.initComponent();
// Use candidate ID fetched from iFrameService // Use candidate ID fetched from iFrameService
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment