Commit 6cb6d98f by chamath

S53527407 - Mobile UX - Messaging.

Message engine back button issue fixed.
parent a8e61d72
import { Location } from '@angular/common';
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { MenuItem } from 'primeng/api';
import { Editor } from 'primeng/editor';
import { FileUpload } from 'primeng/fileupload';
import { Subscription } from 'rxjs/Subscription';
import { environment } from '../../../environments/environment';
import { AppService } from '../../app.service';
import { ASSOCS } from '../../constants';
import { ChatAttachmentModel } from '../../models/chat-attachment.model';
......@@ -21,6 +19,7 @@ import { BaseComponent } from '../admin-portal/base/base.component';
import { ApplicantPortalLayoutService } from '../applicant-portal/applicant-portal-layout/applicant-portal-layout.service';
import { MessageEngineService } from './message-engine.service';
@Component({
selector: 'app-message-engine',
templateUrl: './message-engine.component.html',
......@@ -51,8 +50,6 @@ export class MessageEngineComponent extends BaseComponent implements OnInit {
markedAsRead: boolean = false;
constructor(
private router: Router,
private activatedRoute: ActivatedRoute,
private utilsService: UtilsService,
private saveService: SaveService,
private appService: AppService,
......@@ -65,7 +62,7 @@ export class MessageEngineComponent extends BaseComponent implements OnInit {
}
goBack(): void {
const url = `${environment.baseUrl}ApplicantPortal-JobApplication.htm?cms.rm=Page&JobID=${this.jobApplicationID}`;
const url = `${environment.baseUrl}ApplicantPortal-JobApplication.htm?cms.rm=Page&JobID=${this.utilsService.getId(this.jobApplication.Job.ObjectID)}`;
if (window.history.length > 2) {
const cur_path = this.location.path();
this.location.back();
......@@ -132,6 +129,7 @@ export class MessageEngineComponent extends BaseComponent implements OnInit {
this.createdObjs = {};
const assocs = [
ASSOCS.JOB,
ASSOCS.MESSAGES,
[ASSOCS.MESSAGES, ASSOCS.SENT_BY].join('.'),
[ASSOCS.MESSAGES, ASSOCS.ATTACHMENTS].join('.'),
......
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