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
80c3a68d
Commit
80c3a68d
authored
Dec 04, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test-commit-2
parent
96df85c5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
51 deletions
+59
-51
admin-portal-layout.component.html
...al/admin-portal-layout/admin-portal-layout.component.html
+1
-1
admin-portal-layout.component.ts
...rtal/admin-portal-layout/admin-portal-layout.component.ts
+16
-2
message-engine-applicant-view.component.html
...plicant-view/message-engine-applicant-view.component.html
+11
-1
message-engine-applicant-view.component.ts
...applicant-view/message-engine-applicant-view.component.ts
+31
-47
No files found.
frontend/angular/src/app/components/admin-portal/admin-portal-layout/admin-portal-layout.component.html
View file @
80c3a68d
...
...
@@ -105,7 +105,7 @@
</div>
<p-dialog
#
messageEngine
[(
visible
)]="
showChat
"
header=
""
[
modal
]="
true
"
[
responsive
]="
true
"
class=
"message-engine"
[
style
]="{
width:
'
300px
',
height:
'
500px
'}"
>
<app-message-engine-applicant-view
*
ngIf=
"showChat"
[
embedded
]="
true
"
<app-message-engine-applicant-view
*
ngIf=
"showChat"
[
embedded
]="
true
"
[
jobId
]="
jobId
"
[
loggedInId
]="
loggedIn
"
(
minimize
)="
showChat =
false"
></app-message-engine-applicant-view>
</p-dialog>
<div
*
ngIf=
"showBubble"
class=
"chat-icon"
(
click
)="
showChat =
!showChat"
></div>
...
...
frontend/angular/src/app/components/admin-portal/admin-portal-layout/admin-portal-layout.component.ts
View file @
80c3a68d
...
...
@@ -6,6 +6,7 @@ import { BsModalService } from 'ngx-bootstrap/modal';
import
{
DeviceDetectorService
}
from
'ngx-device-detector'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
environment
}
from
'../../../../environments/environment'
;
import
{
AppService
}
from
'../../../app.service'
;
import
{
IframeMsgHandlingService
}
from
'../../../oneit/services/iframe-msg-handling.service'
;
import
{
MsgsService
}
from
'../../../oneit/services/msgs.service'
;
import
{
UserService
}
from
'../../../oneit/services/user.service'
;
...
...
@@ -41,6 +42,8 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
};
showChat
=
false
;
showBubble
=
false
;
jobId
:
string
;
loggedIn
:
string
;
constructor
(
private
deviceService
:
DeviceDetectorService
,
...
...
@@ -48,6 +51,7 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
private
userService
:
UserService
,
private
adminPortalLayoutService
:
AdminPortalLayoutService
,
private
utilsService
:
UtilsService
,
private
appService
:
AppService
,
private
titleService
:
Title
,
private
router
:
Router
,
private
modalService
:
BsModalService
,
...
...
@@ -57,19 +61,24 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
ngOnInit
():
void
{
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
console
.
log
(
'About to subscribe in Admin'
);
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
(
message
:
any
)
=>
{
console
.
log
(
'Admin Subscribed'
,
message
);
if
(
!
message
||
!
message
.
name
)
{
this
.
clearMessageData
();
return
;
}
if
(
message
.
name
!==
'HiringTeamChat'
||
message
.
message
===
null
)
{
this
.
clearMessageData
();
return
;
}
const
msg
=
JSON
.
parse
(
message
.
message
);
console
.
log
(
'Admin Parsed'
,
msg
);
this
.
jobId
=
msg
.
JobApplicationID
;
this
.
loggedIn
=
msg
.
CandidateID
;
console
.
log
(
'Admin Values:'
,
this
.
jobId
,
this
.
loggedIn
);
// Show Chat bubble if message service allows
this
.
showBubble
=
true
;
}
...
...
@@ -197,6 +206,11 @@ export class AdminPortalLayoutComponent implements OnInit, OnDestroy {
);
}
clearMessageData
():
void
{
this
.
jobId
=
null
;
this
.
loggedIn
=
null
;
}
ngOnDestroy
():
void
{
this
.
utilsService
.
unsubscribeSubscriptions
(
this
.
subscriptions
);
}
...
...
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.html
View file @
80c3a68d
...
...
@@ -117,7 +117,17 @@ M202.992,332.528v124.517l58.738-67.927L202.992,332.528z"></path>
</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
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"
>
</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"
>
</a>
</div>
</div>
</div>
</div>
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.ts
View file @
80c3a68d
...
...
@@ -32,6 +32,8 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
subscriptions
:
Array
<
Subscription
>
=
[];
@
ViewChild
(
'form'
)
form
:
NgForm
;
@
ViewChild
(
'message'
)
messageEditor
:
Editor
;
@
Input
()
jobId
=
null
;
@
Input
()
loggedInId
=
null
;
createdObjs
=
{};
updatedObjs
=
{};
deletedObjs
=
{};
...
...
@@ -40,8 +42,6 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
sentViaEnum
:
Array
<
SentViaEnum
>
;
Message
=
new
MessageModel
();
apiUrl
=
environment
.
baseUrl
;
jobId
:
string
;
loggedInId
:
string
;
showLoader
=
false
;
previousUrl
:
string
;
...
...
@@ -66,53 +66,37 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
ngOnInit
():
void
{
this
.
utilsService
.
resetCounter
();
// Subscribe to msgReceived of iframeMsgHandlingService to get JobId
console
.
log
(
'About to subscribe'
);
this
.
subscriptions
.
push
(
this
.
iframeMsgHandlingService
.
msgReceived
.
subscribe
(
(
message
:
any
)
=>
{
console
.
log
(
'Received Message'
,
message
);
if
(
!
message
||
!
message
.
name
)
{
return
;
}
if
(
message
.
name
!==
'HiringTeamChat'
||
message
.
message
===
null
)
{
return
;
}
const
msg
=
JSON
.
parse
(
message
.
message
);
console
.
log
(
'Parsed'
,
msg
);
this
.
jobId
=
msg
.
JobApplicationID
;
this
.
showLoader
=
true
;
this
.
subscriptions
.
push
(
this
.
appService
.
getTypes
(
'SentVia'
)
.
subscribe
((
data
:
Array
<
SentViaEnum
>
)
=>
{
this
.
sentViaEnum
=
data
;
// For Hiring Team
if
(
this
.
embedded
)
{
if
(
this
.
adminPortalLayoutService
.
userData
)
{
this
.
showLoader
=
true
;
console
.
log
(
'Job'
,
this
.
jobId
);
this
.
subscriptions
.
push
(
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
;
console
.
log
(
'Already Engine -> User'
,
this
.
loggedInId
);
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
this
.
adminPortalLayoutService
.
userDataUpdated
.
first
()
.
subscribe
(()
=>
{
this
.
loggedInId
=
this
.
adminPortalLayoutService
.
userData
.
CompanyUser
.
User
;
console
.
log
(
'Engine -> User'
,
this
.
loggedInId
);
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
;
// this.loggedInId = msg.CandidateID;
this
.
initComponent
();
// Use candidate ID fetched from iFrameService
}
})
);
}
));
}));
}
}
else
{
// For applicant
this
.
embedded
=
false
;
console
.
log
(
'Applicant Engine -> User'
,
this
.
loggedInId
);
this
.
initComponent
();
// Use candidate ID fetched from iFrameService
}
})
);
}
...
...
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