Commit 768ab406 by Harsh Shah

S53475495 #Create Job button is no-longer disabled in the Create job process

parent 6fb97f07
import { Message } from '@angular/compiler/src/i18n/i18n_ast';
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { BsModalService } from 'ngx-bootstrap/modal';
......@@ -55,7 +55,8 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
private titleService: Title,
private router: Router,
private modalService: BsModalService,
private iframeMsgHandlingService: IframeMsgHandlingService
private iframeMsgHandlingService: IframeMsgHandlingService,
private changeDetector: ChangeDetectorRef
) {
}
......@@ -67,21 +68,22 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
return;
}
if (message.name === 'HiringTeamChat' && message.message === null) {
this.jobApplicationID = null;
this.showBubble = false;
return;
}
if (message.name !== 'HiringTeamChat' || message.message === null) {
return;
if (message.name === 'HiringTeamChat') {
if(!message.message) {
this.jobApplicationID = null;
this.showBubble = false;
} else {
const msg = JSON.parse(message.message);
this.jobApplicationID = msg.JobApplicationID;
// Show Chat bubble if message service allows
this.showBubble = true;
}
} else if (message.name === 'DisableCreateJobButton') {
if(message.message != this.createJobDisabled) {
this.createJobDisabled = message.message;
this.changeDetector.detectChanges();
}
}
const msg = JSON.parse(message.message);
this.jobApplicationID = msg.JobApplicationID;
// Show Chat bubble if message service allows
this.showBubble = true;
}
));
......
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