Commit 8e034309 by GD-A-150752

message-engine-css

parent fddd5c14
......@@ -88,4 +88,4 @@ export class ApplicantPortalLayoutComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.utilsService.unsubscribeSubscriptions(this.subscriptions);
}
}
\ No newline at end of file
}
......@@ -3,16 +3,21 @@
<form #form="ngForm" *ngIf="jobId && loggedInId">
<div class="ui-g ui-fluid">
<div class="ui-g-12 ui-md-12">
<div class="main-tab-template pl-1 {{embedded ? 'h-45' : '' }}">
<div *ngIf="embedded" class="main-tab-template pl-1 h-45">
<div class="chief-officer mb-0">
<a [routerLink]="[previousUrl]" class="arrow-btn-blue ml-0" *ngIf="!embedded">
<img src="assets/images/arrow-left-prev_blue.svg">
{{jobApplication?.Candidate?.User?.Name}}
</div>
<a class="arrow-btn-blue ml-0 ng-star-inserted minimize" (click)="minimize.emit()">
<img src="assets/images/arrow-left-prev_blue.svg" alt="Minimize" title="Minimize">
</a>
</div>
<div *ngIf="!embedded" class="main-tab-template pl-1">
<div class="chief-officer mb-0">
<a [routerLink]="[previousUrl]" class="arrow-btn-blue ml-0">
<img src="assets/images/arrow-left-prev_blue.svg" alt="Back">
</a>
{{jobApplication?.Job?.JobTitle}} - {{jobApplication?.Job?.HiringTeam?.HiringTeamName}}
</div>
<a class="arrow-btn-blue ml-0 ng-star-inserted minimize" *ngIf="embedded" (click)="minimize.emit()">
<img src="assets/images/arrow-left-prev_blue.svg">
</a>
</div>
<div class="ui-g ui-fluid {{embedded ? '' : 'form' }}">
<div class="ui-g-12 ui-md-12">
......@@ -38,7 +43,7 @@
<div class="ui-g-offset-2 ui-g-10 message-block"
*ngIf="message.SentBy.ObjectID === loggedInId">
<div class="ui-g-10 ui-md-11">
<div [innerHTML]="message.MessageContent"></div>
<div class="break-word" [innerHTML]="message.MessageContent"></div>
<div class="attachments">
<a *ngFor="let attachment of message.Attachments"
href="{{apiUrl+attachment.File.URI}}"
......@@ -83,9 +88,8 @@
<button class="sendBtn" (click)="saveEngineApplicantView()"
[disabled]="showLoader">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" enable-background="new 0 0 512 512"
xml:space="preserve">
x="0px" y="0px" viewBox="0 0 512 512"
enable-background="new 0 0 512 512" xml:space="preserve">
<path id="paper-plane-icon" d="M462,54.955L355.371,437.187l-135.92-128.842L353.388,167l-179.53,124.074L50,260.973L462,54.955z
M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
</svg>
......@@ -120,12 +124,12 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
<div class="main-tab-template pl-1 {{embedded ? 'h-45' : '' }}">
<div class="chief-officer mb-0">
<a [routerLink]="[previousUrl]" class="arrow-btn-blue ml-0" *ngIf="!embedded">
<img src="assets/images/arrow-left-prev_blue.svg">
<img src="assets/images/arrow-left-prev_blue.svg" alt="Back">
</a>
Please select an application and a user...
</div>
<a class="arrow-btn-blue ml-0 ng-star-inserted minimize" *ngIf="embedded" (click)="minimize.emit()">
<img src="assets/images/arrow-left-prev_blue.svg">
<img src="assets/images/arrow-left-prev_blue.svg" alt="Minimize" title="Minimize">
</a>
</div>
</div>
......
......@@ -110,7 +110,7 @@ a {
}
.sendBtn {
letter-spacing: 1px;
border-style: none;
color: #fff;
overflow: visible;
position: relative;
......
......@@ -11,12 +11,12 @@ import { ChatAttachmentModel } from '../../models/chat-attachment.model';
import { JobApplicationModel } from '../../models/job-application.model';
import { MessageModel } from '../../models/message.model';
import { SentViaEnum } from '../../models/sent-via.enum';
import { IframeMsgHandlingService } from '../../oneit/services/iframe-msg-handling.service';
import { MsgsService } from '../../oneit/services/msgs.service';
import { SaveService } from '../../oneit/services/save.service';
import { UtilsService } from '../../oneit/services/utils.service';
import { AdminPortalLayoutService } from '../admin-portal/admin-portal-layout/admin-portal-layout.service';
import { BaseComponent } from '../admin-portal/base/base.component';
import { ApplicantPortalLayoutService } from '../applicant-portal/applicant-portal-layout/applicant-portal-layout.service';
import { MessageEngineApplicantViewService } from './message-engine-applicant-view.service';
@Component({
......@@ -27,18 +27,18 @@ import { MessageEngineApplicantViewService } from './message-engine-applicant-vi
export class MessageEngineApplicantViewComponent extends BaseComponent implements OnInit {
@Input() embedded = false;
@Input() jobId = null;
@Input() loggedInId = null;
// tslint:disable-next-line:prefer-output-readonly
@Output() minimize: EventEmitter<any> = new EventEmitter<any>();
subscriptions: Array<Subscription> = [];
@ViewChild('form') form: NgForm;
@ViewChild('message') messageEditor: Editor;
@Input() jobId = null;
@Input() loggedInId = null;
@ViewChild('form') form: NgForm;
createdObjs = {};
updatedObjs = {};
deletedObjs = {};
jobApplication = new JobApplicationModel();
subscriptions: Array<Subscription> = [];
sentViaEnum: Array<SentViaEnum>;
Message = new MessageModel();
apiUrl = environment.baseUrl;
......@@ -53,10 +53,11 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
private appService: AppService,
private messageEngineApplicantViewService: MessageEngineApplicantViewService,
private adminPortalLayoutService: AdminPortalLayoutService,
private iframeMsgHandlingService: IframeMsgHandlingService,
private applicantPortalLayoutService: ApplicantPortalLayoutService,
private msgService: MsgsService
) {
super(utilsService);
// In order to get previous url for navigation
router.events
.filter(event => event instanceof NavigationEnd)
.subscribe((e: any) => {
......@@ -72,24 +73,18 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
this.appService.getTypes('SentVia')
.subscribe((data: Array<SentViaEnum>) => {
this.sentViaEnum = data;
// For Hiring Team
if (this.embedded) {
if (this.adminPortalLayoutService.userData) {
this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User;
this.initComponent();
} else {
this.subscriptions.push(this.adminPortalLayoutService.userDataUpdated
.first()
.subscribe(() => {
this.loggedInId = this.adminPortalLayoutService.userData.CompanyUser.User;
this.initComponent();
}));
}
} else {
// For applicant
this.embedded = false;
// For Hiring Team or Applicant
const service = this.embedded ? this.adminPortalLayoutService : this.applicantPortalLayoutService;
if (service.userData) {
this.loggedInId = service.userData.CompanyUser.User;
this.initComponent();
// Use candidate ID fetched from iFrameService
} else {
this.subscriptions.push(service.userDataUpdated
.first()
.subscribe(() => {
this.loggedInId = service.userData.CompanyUser.User;
this.initComponent();
}));
}
})
);
......@@ -119,7 +114,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
const assocs =
[ASSOCS.JOB, [ASSOCS.JOB, ASSOCS.HIRING_TEAM].join('.'), ASSOCS.MESSAGES, [ASSOCS.MESSAGES, ASSOCS.SENT_BY].join('.'),
[ASSOCS.MESSAGES, ASSOCS.ATTACHMENTS].join('.')];
[ASSOCS.MESSAGES, ASSOCS.ATTACHMENTS].join('.'), [ASSOCS.CANDIDATE, ASSOCS.USER].join('.')];
this.subscriptions.push(this.messageEngineApplicantViewService.getEngineApplicantViewByID(jobId, assocs)
.subscribe(
......
......@@ -4,6 +4,12 @@ import { MessageModel } from './message.model';
export class ChatAttachmentModel {
ObjectID: string;
ObjectClass = CLASSES.CHAT_ATTACHMENT;
File: {};
File: FileContent;
Message: MessageModel;
}
export class FileContent {
URI?: string;
Name: string;
FileToken?: 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