Commit ed6fe19e by GD-A-150752

message-engine-hiring-team css-fix

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