Commit ed6fe19e by GD-A-150752

message-engine-hiring-team css-fix

parent aae22cbf
...@@ -128,7 +128,7 @@ export const routes: Routes = [ ...@@ -128,7 +128,7 @@ export const routes: Routes = [
] ]
}, },
{ {
path: 'applicant/:job/:key', path: 'applicant/:job',
component: ApplicantPortalLayoutComponent, component: ApplicantPortalLayoutComponent,
canActivate: [AuthGuard], canActivate: [AuthGuard],
data: { data: {
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</div> </div>
<p-dialog #messageEngine [(visible)]="showChat" header="" [modal]="true" [responsive]="true" [resizable]="false" <p-dialog #messageEngine [(visible)]="showChat" header="" [modal]="true" [responsive]="true" [resizable]="false"
class="message-engine" [style]="{width: '300px', height: '500px'}"> class="message-engine" [style]="{width: '300px', height: '500px'}">
<app-message-engine-applicant-view *ngIf="showChat" [embedded]="true" [jobId]="jobId" [loggedInId]="loggedIn" <app-message-engine-applicant-view *ngIf="showChat" [embedded]="true" [jobId]="jobId"
(minimize)="showChat = false"></app-message-engine-applicant-view> (minimize)="showChat = false"></app-message-engine-applicant-view>
</p-dialog> </p-dialog>
<div *ngIf="showBubble" class="chat-icon" (click)="showChat = !showChat"></div> <div *ngIf="showBubble" class="chat-icon" (click)="showChat = !showChat"></div>
......
...@@ -43,7 +43,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -43,7 +43,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
showChat = false; showChat = false;
showBubble = false; showBubble = false;
jobId: string; jobId: string;
loggedIn: string;
constructor( constructor(
private deviceService: DeviceDetectorService, private deviceService: DeviceDetectorService,
...@@ -69,7 +68,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -69,7 +68,6 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
if (message.name === 'HiringTeamChat' && message.message === null) { if (message.name === 'HiringTeamChat' && message.message === null) {
this.jobId = null; this.jobId = null;
this.loggedIn = null;
this.showBubble = false; this.showBubble = false;
return; return;
...@@ -81,12 +79,14 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -81,12 +79,14 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
const msg = JSON.parse(message.message); const msg = JSON.parse(message.message);
this.jobId = msg.JobApplicationID; this.jobId = msg.JobApplicationID;
this.loggedIn = msg.CandidateID;
// Show Chat bubble if message service allows // Show Chat bubble if message service allows
this.showBubble = true; this.showBubble = true;
} }
)); ));
this.jobId = '38048711';
this.showBubble = true;
if (this.deviceService.isMobile()) { if (this.deviceService.isMobile()) {
window.location.href = `${environment.baseUrl}extensions/adminportal/responsive_alert.jsp`; window.location.href = `${environment.baseUrl}extensions/adminportal/responsive_alert.jsp`;
} }
......
...@@ -16,10 +16,8 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -16,10 +16,8 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
showLoader: boolean; showLoader: boolean;
subscriptions: Array<Subscription> = []; subscriptions: Array<Subscription> = [];
successMsgs: Message[] = []; successMsgs: Array<Message> = [];
pageTitle: string;
jobId: string; jobId: string;
key: string;
year = new Date().getFullYear(); year = new Date().getFullYear();
constructor( constructor(
...@@ -30,9 +28,10 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -30,9 +28,10 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
private router: Router, private router: Router,
private activatedRoute: ActivatedRoute, private activatedRoute: ActivatedRoute,
private applicantPortalLayoutService: ApplicantPortalLayoutService private applicantPortalLayoutService: ApplicantPortalLayoutService
) { } ) {
}
ngOnInit() { ngOnInit(): void {
this.subscriptions.push( this.subscriptions.push(
this.msgsService.successMsgsUpdated.subscribe( this.msgsService.successMsgsUpdated.subscribe(
data => { data => {
...@@ -47,9 +46,6 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -47,9 +46,6 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
if (params.job) { if (params.job) {
this.jobId = params.job; this.jobId = params.job;
} }
if (params.key) {
this.key = params.key;
}
this.loadData(); this.loadData();
} }
) )
...@@ -59,21 +55,21 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -59,21 +55,21 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
this.subscribeToUserData(); this.subscribeToUserData();
} }
onRouteUpdate() { onRouteUpdate(): void {
this.loadData(); this.loadData();
} }
loadData() { loadData(): void {
this.userService.reloadUserDetails(); this.userService.reloadUserDetails();
this.msgsService.clearErrorMessages(); this.msgsService.clearErrorMessages();
this.applicantPortalLayoutService.reloadApplicantUserDetails(this.jobId, this.key); this.applicantPortalLayoutService.reloadApplicantUserDetails(this.jobId);
} }
subscribeToUserData() { subscribeToUserData(): void {
this.subscriptions.push(this.applicantPortalLayoutService.userDataUpdated.subscribe( this.subscriptions.push(this.applicantPortalLayoutService.userDataUpdated.subscribe(
data => { data => {
if(data.PageTitle) { if (data.PageTitle) {
this.titleService.setTitle(data.PageTitle); this.titleService.setTitle(data.PageTitle);
} else { } else {
this.titleService.setTitle('Matchd'); this.titleService.setTitle('Matchd');
...@@ -85,7 +81,7 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy { ...@@ -85,7 +81,7 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
)); ));
} }
ngOnDestroy() { ngOnDestroy(): void {
this.utilsService.unsubscribeSubscriptions(this.subscriptions); this.utilsService.unsubscribeSubscriptions(this.subscriptions);
} }
} }
...@@ -18,12 +18,11 @@ export class ApplicantPortalLayoutService { ...@@ -18,12 +18,11 @@ export class ApplicantPortalLayoutService {
} }
reloadApplicantUserDetails(job, key): void { reloadApplicantUserDetails(job): void {
if (job && key) { if (job) {
const params = { const params = {
environment: environment.envName, environment: environment.envName,
Job: job, JobApplication: job
Key: key
}; };
this.apiService.post('svc/ApplicantUserDetails', params) this.apiService.post('svc/ApplicantUserDetails', params)
......
...@@ -29,7 +29,6 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement ...@@ -29,7 +29,6 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
@Input() embedded = false; @Input() embedded = false;
@Input() jobId = null; @Input() jobId = null;
@Input() loggedInId = null;
// tslint:disable-next-line:prefer-output-readonly // tslint:disable-next-line:prefer-output-readonly
@Output() minimize: EventEmitter<any> = new EventEmitter<any>(); @Output() minimize: EventEmitter<any> = new EventEmitter<any>();
@ViewChild('message') messageEditor: Editor; @ViewChild('message') messageEditor: Editor;
...@@ -45,6 +44,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement ...@@ -45,6 +44,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
sentViaEnum: Array<SentViaEnum>; sentViaEnum: Array<SentViaEnum>;
Message = new MessageModel(); Message = new MessageModel();
apiUrl = environment.baseUrl; apiUrl = environment.baseUrl;
loggedInId = null;
showLoader = false; showLoader = false;
previousUrl: string; previousUrl: string;
......
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