Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
9dd300cd
Commit
9dd300cd
authored
Dec 04, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test-commit
parent
dc523d8b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
17 deletions
+48
-17
app.module.ts
frontend/angular/src/app/app.module.ts
+3
-1
admin-portal-layout.component.ts
...rtal/admin-portal-layout/admin-portal-layout.component.ts
+7
-2
message-engine-applicant-view.component.html
...plicant-view/message-engine-applicant-view.component.html
+8
-4
message-engine-applicant-view.component.scss
...plicant-view/message-engine-applicant-view.component.scss
+1
-0
message-engine-applicant-view.component.ts
...applicant-view/message-engine-applicant-view.component.ts
+25
-3
message-engine-applicant-view.service.ts
...e-applicant-view/message-engine-applicant-view.service.ts
+1
-3
custom.scss
frontend/angular/src/assets/css/custom.scss
+3
-4
No files found.
frontend/angular/src/app/app.module.ts
View file @
9dd300cd
import
{
DatePipe
}
from
"@angular/common"
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
FormBuilder
}
from
'@angular/forms'
;
import
{
FormBuilder
}
from
'@angular/forms'
;
import
{
Select2Module
}
from
'ng2-select2'
;
import
{
Select2Module
}
from
'ng2-select2'
;
...
@@ -69,7 +70,8 @@ import { OneITModule } from './oneit/oneit.module';
...
@@ -69,7 +70,8 @@ import { OneITModule } from './oneit/oneit.module';
ApplicantPortalLayoutService
,
ApplicantPortalLayoutService
,
AppService
,
AppService
,
EditWorkflowTemplateService
,
EditWorkflowTemplateService
,
MessageEngineApplicantViewService
MessageEngineApplicantViewService
,
DatePipe
],
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
})
})
...
...
frontend/angular/src/app/components/admin-portal/admin-portal-layout/admin-portal-layout.component.ts
View file @
9dd300cd
...
@@ -6,7 +6,7 @@ import { BsModalService } from 'ngx-bootstrap/modal';
...
@@ -6,7 +6,7 @@ import { BsModalService } from 'ngx-bootstrap/modal';
import
{
DeviceDetectorService
}
from
'ngx-device-detector'
;
import
{
DeviceDetectorService
}
from
'ngx-device-detector'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
environment
}
from
'../../../../environments/environment'
;
import
{
environment
}
from
'../../../../environments/environment'
;
import
{
IframeMsgHandlingService
}
from
"../../../oneit/services/iframe-msg-handling.service"
;
import
{
IframeMsgHandlingService
}
from
'../../../oneit/services/iframe-msg-handling.service'
;
import
{
MsgsService
}
from
'../../../oneit/services/msgs.service'
;
import
{
MsgsService
}
from
'../../../oneit/services/msgs.service'
;
import
{
UserService
}
from
'../../../oneit/services/user.service'
;
import
{
UserService
}
from
'../../../oneit/services/user.service'
;
import
{
UtilsService
}
from
'../../../oneit/services/utils.service'
;
import
{
UtilsService
}
from
'../../../oneit/services/utils.service'
;
...
@@ -57,8 +57,10 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
...
@@ -57,8 +57,10 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
ngOnInit
():
void
{
ngOnInit
():
void
{
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
console
.
log
(
'About to subscribe in Admin'
);
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
(
message
:
any
)
=>
{
(
message
:
any
)
=>
{
console
.
log
(
'Admin Subscribed'
,
message
);
if
(
!
message
||
!
message
.
name
)
{
if
(
!
message
||
!
message
.
name
)
{
return
;
return
;
}
}
...
@@ -66,10 +68,13 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
...
@@ -66,10 +68,13 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
if
(
message
.
name
!==
'HiringTeamChat'
||
message
.
message
===
null
)
{
if
(
message
.
name
!==
'HiringTeamChat'
||
message
.
message
===
null
)
{
return
;
return
;
}
}
const
msg
=
JSON
.
parse
(
message
.
message
);
console
.
log
(
'Admin Parsed'
,
msg
);
// Show Chat bubble if message service allows
this
.
showBubble
=
true
;
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`
;
}
}
...
...
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.html
View file @
9dd300cd
<div
class=
"{{embedded ? 'openedFromWorkflow' : 'dashboard-content-area second-part' }}"
>
<div
class=
"{{embedded ? 'openedFromWorkflow' : 'dashboard-content-area second-part' }}"
>
<app-error-message></app-error-message>
<app-error-message></app-error-message>
<form
#
form=
"ngForm"
>
<form
#
form=
"ngForm"
*
ngIf=
"jobId && loggedInId"
>
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"ui-g-12 ui-md-12"
>
<div
class=
"main-tab-template pl-1 {{embedded ? 'h-45' : '' }}"
>
<div
class=
"main-tab-template pl-1 {{embedded ? 'h-45' : '' }}"
>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</div>
</div>
<div
class=
"message-footer"
>
<div
class=
"message-footer"
>
<div>
via {{message.SentVia.Description}}
</div>
<div>
via {{message.SentVia.Description}}
</div>
<div>
{{message.ObjectCreatedStr}}
</div>
<div>
{{message.ObjectCreatedStr
| oneitdate : 'dd/MM/yyyy HH:mm' : 'MM-dd-yyyy HH:mm'
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</div>
</div>
<div
class=
"message-footer"
>
<div
class=
"message-footer"
>
<div>
via {{message.SentVia.Description}}
</div>
<div>
via {{message.SentVia.Description}}
</div>
<div>
{{message.ObjectCreatedStr}}
</div>
<div>
{{message.ObjectCreatedStr
| oneitdate : 'dd/MM/yyyy HH:mm' : 'MM-dd-yyyy HH:mm'
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"ui-g-12 ui-md-1 name owner {{embedded ? 'pad-5' : '' }}"
>
<div
class=
"ui-g-12 ui-md-1 name owner {{embedded ? 'pad-5' : '' }}"
>
...
@@ -94,7 +94,6 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
...
@@ -94,7 +94,6 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
icon=
"ui-icon-check"
icon=
"ui-icon-check"
(
click
)="
markAsRead
()"
></button>
(
click
)="
markAsRead
()"
></button>
</div>
</div>
<span
class=
"mt-3"
>
</span>
<p-fileUpload
*
ngIf=
"Message.Attachments"
<p-fileUpload
*
ngIf=
"Message.Attachments"
name=
"File"
[
withCredentials
]="
true
"
name=
"File"
[
withCredentials
]="
true
"
id=
"File"
url=
"{{apiUrl}}uploadFile"
auto=
"true"
id=
"File"
url=
"{{apiUrl}}uploadFile"
auto=
"true"
...
@@ -116,4 +115,9 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
...
@@ -116,4 +115,9 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
<div
id=
"showPlainText"
></div>
<div
id=
"showPlainText"
></div>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
</form>
</form>
<div
class=
"ui-g ui-fluid"
*
ngIf=
"!jobId || !loggedInId"
>
<div
class=
"ui-g-12 ui-md-12"
>
<p>
Nothing to show here!
</p>
</div>
</div>
</div>
</div>
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.scss
View file @
9dd300cd
...
@@ -5,6 +5,7 @@ a {
...
@@ -5,6 +5,7 @@ a {
::ng-deep
{
::ng-deep
{
.ui-fileupload-buttonbar
{
.ui-fileupload-buttonbar
{
padding
:
0
!
important
;
padding
:
0
!
important
;
margin-top
:
10px
;
.ui-button
{
.ui-button
{
width
:
100%
!
important
;
width
:
100%
!
important
;
...
...
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.ts
View file @
9dd300cd
...
@@ -67,8 +67,10 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -67,8 +67,10 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
utilsService
.
resetCounter
();
this
.
utilsService
.
resetCounter
();
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
console
.
log
(
'About to subscribe'
);
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
(
message
:
any
)
=>
{
(
message
:
any
)
=>
{
console
.
log
(
'Received Message'
,
message
);
if
(
!
message
||
!
message
.
name
)
{
if
(
!
message
||
!
message
.
name
)
{
return
;
return
;
}
}
...
@@ -78,6 +80,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -78,6 +80,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
}
}
const
msg
=
JSON
.
parse
(
message
.
message
);
const
msg
=
JSON
.
parse
(
message
.
message
);
console
.
log
(
'Parsed'
,
msg
);
this
.
jobId
=
msg
.
JobApplicationID
;
this
.
jobId
=
msg
.
JobApplicationID
;
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
...
@@ -85,6 +88,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -85,6 +88,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
this
.
appService
.
getTypes
(
'SentVia'
)
this
.
appService
.
getTypes
(
'SentVia'
)
.
subscribe
((
data
:
Array
<
SentViaEnum
>
)
=>
{
.
subscribe
((
data
:
Array
<
SentViaEnum
>
)
=>
{
this
.
sentViaEnum
=
data
;
this
.
sentViaEnum
=
data
;
// For Hiring Team
if
(
this
.
embedded
)
{
if
(
this
.
embedded
)
{
if
(
this
.
adminPortalLayoutService
.
userData
)
{
if
(
this
.
adminPortalLayoutService
.
userData
)
{
this
.
loggedInId
=
this
.
adminPortalLayoutService
.
userData
.
CompanyUser
.
User
;
this
.
loggedInId
=
this
.
adminPortalLayoutService
.
userData
.
CompanyUser
.
User
;
...
@@ -100,14 +104,16 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -100,14 +104,16 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
}
else
{
}
else
{
// For applicant
// For applicant
this
.
embedded
=
false
;
this
.
embedded
=
false
;
this
.
loggedInId
=
msg
.
CandidateID
;
//
this.loggedInId = msg.CandidateID;
this
.
initComponent
();
this
.
initComponent
();
// Use candidate ID fetched from iFrameService
// Use candidate ID fetched from iFrameService
}
}
})
})
);
);
}
}
));
));
}
}
initComponent
():
void
{
initComponent
():
void
{
...
@@ -124,21 +130,23 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -124,21 +130,23 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
}
}
getEngineApplicantViewByID
(
jobId
:
string
):
void
{
getEngineApplicantViewByID
(
jobId
:
string
):
void
{
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
this
.
createdObjs
=
{};
this
.
utilsService
.
resetCounter
();
this
.
utilsService
.
resetCounter
();
this
.
utilsService
.
clearErrorMessages
();
this
.
utilsService
.
clearErrorMessages
();
this
.
createdObjs
=
{};
this
.
createMessage
();
this
.
createMessage
();
const
assocs
=
const
assocs
=
[
ASSOCS
.
JOB
,
[
ASSOCS
.
JOB
,
ASSOCS
.
HIRING_TEAM
].
join
(
'.'
),
ASSOCS
.
MESSAGES
,
[
ASSOCS
.
MESSAGES
,
ASSOCS
.
SENT_BY
].
join
(
'.'
),
[
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
(
'.'
)];
this
.
subscriptions
.
push
(
this
.
messageEngineApplicantViewService
.
getEngineApplicantViewByID
(
jobId
,
assocs
)
this
.
subscriptions
.
push
(
this
.
messageEngineApplicantViewService
.
getEngineApplicantViewByID
(
jobId
,
assocs
)
.
subscribe
(
.
subscribe
(
data
=>
{
data
=>
{
this
.
jobApplication
=
data
;
this
.
jobApplication
=
data
;
this
.
jobApplication
.
Messages
=
this
.
jobApplication
.
Messages
||
[];
this
.
jobApplication
.
Messages
=
this
.
jobApplication
.
Messages
||
[];
// Assign current Job Application to new message
this
.
Message
.
JobApplication
=
this
.
jobApplication
;
this
.
Message
.
JobApplication
=
this
.
jobApplication
;
this
.
Message
.
Attachments
=
[];
this
.
Message
.
Attachments
=
[];
this
.
utilsService
.
sort
(
this
.
jobApplication
.
Messages
,
[
'ObjectCreated'
],
[
1
]);
this
.
utilsService
.
sort
(
this
.
jobApplication
.
Messages
,
[
'ObjectCreated'
],
[
1
]);
...
@@ -158,6 +166,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -158,6 +166,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
);
);
}
}
/**
* This function sets isRead property of all messages of this job application to true
*/
markAsRead
():
void
{
markAsRead
():
void
{
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
const
params
=
{
const
params
=
{
...
@@ -201,6 +212,11 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -201,6 +212,11 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
}
}
}
}
/**
* Creates a new object of ChatAttachment and assigns the FileToken and Name to it.
* Moreover, pushes it to the current Message's Attachments Array
* @param event Browser Event
*/
onUpload
(
event
:
any
):
void
{
onUpload
(
event
:
any
):
void
{
const
chatAttachment
=
new
ChatAttachmentModel
();
const
chatAttachment
=
new
ChatAttachmentModel
();
this
.
utilsService
.
createObject
(
chatAttachment
,
this
.
createdObjs
);
this
.
utilsService
.
createObject
(
chatAttachment
,
this
.
createdObjs
);
...
@@ -212,6 +228,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -212,6 +228,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
this
.
Message
.
Attachments
.
push
(
chatAttachment
);
this
.
Message
.
Attachments
.
push
(
chatAttachment
);
}
}
/**
* It simply creates a new object and assigns the default values to it.
*/
createMessage
():
void
{
createMessage
():
void
{
this
.
Message
.
SentBy
=
this
.
loggedInId
;
this
.
Message
.
SentBy
=
this
.
loggedInId
;
this
.
Message
.
SentVia
=
this
.
sentViaEnum
[
2
]
?
this
.
sentViaEnum
[
2
]
:
this
.
sentViaEnum
[
0
];
this
.
Message
.
SentVia
=
this
.
sentViaEnum
[
2
]
?
this
.
sentViaEnum
[
2
]
:
this
.
sentViaEnum
[
0
];
...
@@ -264,6 +283,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -264,6 +283,9 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
return
title
;
return
title
;
}
}
/**
* If message content is empty, generate an error message for it.
*/
IsMessageEmpty
():
boolean
{
IsMessageEmpty
():
boolean
{
if
(
this
.
showPlainText
(
this
.
Message
.
MessageContent
)
===
''
)
{
if
(
this
.
showPlainText
(
this
.
Message
.
MessageContent
)
===
''
)
{
this
.
msgService
.
addErrorMessages
(
this
.
msgService
.
addErrorMessages
(
...
...
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.service.ts
View file @
9dd300cd
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
{
SaveService
}
from
"../../oneit/services/save.service"
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
SearchService
}
from
'../../oneit/services/search.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
...
@@ -9,8 +8,7 @@ import { UtilsService } from '../../oneit/services/utils.service';
...
@@ -9,8 +8,7 @@ import { UtilsService } from '../../oneit/services/utils.service';
export
class
MessageEngineApplicantViewService
{
export
class
MessageEngineApplicantViewService
{
constructor
(
constructor
(
private
searchService
:
SearchService
,
private
searchService
:
SearchService
,
private
utilsService
:
UtilsService
,
private
utilsService
:
UtilsService
private
saveService
:
SaveService
)
{
)
{
}
}
...
...
frontend/angular/src/assets/css/custom.scss
View file @
9dd300cd
...
@@ -308,12 +308,10 @@
...
@@ -308,12 +308,10 @@
&
.ui-dialog-draggable
{
&
.ui-dialog-draggable
{
left
:
auto
!
important
;
left
:
auto
!
important
;
right
:
10px
!
important
;
right
:
10px
!
important
;
height
:
85%
!
important
;
height
:
600px
!
important
;
bottom
:
0
!
important
;
bottom
:
0
!
important
;
overflow-y
:
scroll
;
top
:
auto
!
important
;
top
:
auto
!
important
;
min-width
:
600px
;
width
:
690px
!
important
;
width
:
55%
;
}
}
}
}
...
@@ -464,6 +462,7 @@ body .ui-dropdown-panel .ui-dropdown-filter-container {
...
@@ -464,6 +462,7 @@ body .ui-dropdown-panel .ui-dropdown-filter-container {
position
:
fixed
;
position
:
fixed
;
bottom
:
10px
;
bottom
:
10px
;
right
:
20px
;
right
:
20px
;
background-image
:
url('../images/chat-icon.jpg')
;
background-repeat
:
round
;
background-repeat
:
round
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment