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
66a7c0c0
Commit
66a7c0c0
authored
Dec 06, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Internal CR Fix
parent
74d5e962
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
42 deletions
+42
-42
message-engine-applicant-view.component.html
...plicant-view/message-engine-applicant-view.component.html
+2
-1
message-engine-applicant-view.component.scss
...plicant-view/message-engine-applicant-view.component.scss
+12
-0
message-engine-applicant-view.component.ts
...applicant-view/message-engine-applicant-view.component.ts
+28
-41
No files found.
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.html
View file @
66a7c0c0
...
@@ -83,7 +83,8 @@
...
@@ -83,7 +83,8 @@
<div
class=
"ui-g-3"
>
<div
class=
"ui-g-3"
>
<p-splitButton
[
class
.
non-embed
]="!
embedded
"
label=
"Send"
icon=
"ui-icon-send"
<p-splitButton
[
class
.
non-embed
]="!
embedded
"
label=
"Send"
icon=
"ui-icon-send"
(
onClick
)="
saveEngineApplicantView
()"
(
onClick
)="
saveEngineApplicantView
()"
[
model
]="
items
"
>
[
disabled
]="
sendCriteria
()"
[
model
]="
sentViaMenuItems
"
>
</p-splitButton>
</p-splitButton>
<div
class=
"buttons-wrapper"
>
<div
class=
"buttons-wrapper"
>
<button
*
ngIf=
"embedded"
type=
"button"
pButton
label=
"Mark as read"
<button
*
ngIf=
"embedded"
type=
"button"
pButton
label=
"Mark as read"
...
...
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.scss
View file @
66a7c0c0
...
@@ -206,5 +206,17 @@ a {
...
@@ -206,5 +206,17 @@ a {
.ql-editor
{
.ql-editor
{
min-height
:
85px
;
min-height
:
85px
;
height
:
50px
;
border-radius
:
2px
;
-webkit-box-shadow
:
inset
0
0
5px
0
rgba
(
0
,
0
,
0
,
.08
);
box-shadow
:
inset
0
0
5px
0
rgba
(
0
,
0
,
0
,
.08
);
border
:
1px
solid
#dbdbdf
;
&
:focus
{
background-color
:
#fff
;
-webkit-box-shadow
:
inset
0
0
5px
0
rgba
(
0
,
0
,
0
,
.08
);
box-shadow
:
inset
0
0
5px
0
rgba
(
0
,
0
,
0
,
.08
);
border
:
1px
solid
rgba
(
3
,
160
,
231
,
.5
);
}
}
}
}
}
frontend/angular/src/app/components/message-engine-applicant-view/message-engine-applicant-view.component.ts
View file @
66a7c0c0
...
@@ -34,7 +34,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -34,7 +34,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
@
ViewChild
(
'message'
)
messageEditor
:
Editor
;
@
ViewChild
(
'message'
)
messageEditor
:
Editor
;
@
ViewChild
(
'form'
)
form
:
NgForm
;
@
ViewChild
(
'form'
)
form
:
NgForm
;
@
ViewChild
(
'uploader'
)
uploader
:
FileUpload
;
@
ViewChild
(
'uploader'
)
uploader
:
FileUpload
;
i
tems
:
Array
<
MenuItem
>
;
sentViaMenuI
tems
:
Array
<
MenuItem
>
;
createdObjs
=
{};
createdObjs
=
{};
updatedObjs
=
{};
updatedObjs
=
{};
deletedObjs
=
{};
deletedObjs
=
{};
...
@@ -69,24 +69,25 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -69,24 +69,25 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
ngOnInit
():
void
{
ngOnInit
():
void
{
this
.
getSetVias
();
this
.
getSetVia
Option
s
();
// For Hiring Team or Applicant
// For Hiring Team or Applicant
const
service
=
this
.
embedded
?
this
.
adminPortalLayoutService
:
this
.
applicantPortalLayoutService
;
const
service
=
this
.
embedded
?
this
.
adminPortalLayoutService
:
this
.
applicantPortalLayoutService
;
if
(
service
.
userData
)
{
if
(
service
.
userData
)
{
this
.
initComponent
(
service
);
this
.
initComponent
(
service
);
}
else
{
}
else
{
this
.
subscriptions
.
push
(
service
.
userDataUpdated
.
first
().
subscribe
(()
=>
{
this
.
subscriptions
.
push
(
service
.
userDataUpdated
.
first
()
this
.
initComponent
(
service
);
.
subscribe
(()
=>
{
}));
this
.
initComponent
(
service
);
}));
}
}
}
}
getSetVia
s
()
{
getSetVia
Options
():
void
{
this
.
subscriptions
.
push
(
this
.
subscriptions
.
push
(
this
.
appService
.
getTypes
(
'SentVia'
)
this
.
appService
.
getTypes
(
'SentVia'
)
.
subscribe
((
data
:
Array
<
SentViaEnum
>
)
=>
{
.
subscribe
((
data
:
Array
<
SentViaEnum
>
)
=>
{
this
.
sentViaEnum
=
data
;
this
.
sentViaEnum
=
data
;
this
.
i
tems
=
this
.
sentViaEnum
.
map
(
elem
=>
this
.
sentViaMenuI
tems
=
this
.
sentViaEnum
.
map
(
elem
=>
({
({
label
:
elem
.
Description
,
command
:
()
=>
this
.
Message
.
SentVia
=
elem
label
:
elem
.
Description
,
command
:
()
=>
this
.
Message
.
SentVia
=
elem
}));
}));
...
@@ -95,10 +96,10 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -95,10 +96,10 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
);
);
}
}
initComponent
(
service
):
void
{
initComponent
(
service
:
AdminPortalLayoutService
|
ApplicantPortalLayoutService
):
void
{
if
(
service
instanceof
AdminPortalLayoutService
)
{
if
(
service
instanceof
AdminPortalLayoutService
)
{
this
.
loggedInId
=
service
.
userData
.
CompanyUser
.
User
;
this
.
loggedInId
=
service
.
userData
.
CompanyUser
.
User
;
// jobId should come from @Input
;
// jobId should come from @Input
(Admin Portal)
}
else
{
}
else
{
this
.
jobId
=
service
.
jobId
;
this
.
jobId
=
service
.
jobId
;
this
.
loggedInId
=
service
.
userData
.
UserID
;
this
.
loggedInId
=
service
.
userData
.
UserID
;
...
@@ -108,7 +109,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -108,7 +109,7 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
this
.
getEngineApplicantViewByID
();
this
.
getEngineApplicantViewByID
();
}
else
{
}
else
{
// Should never come to this block
// Should never come to this block
console
.
error
(
"jobId not found."
);
console
.
error
(
'JobId not found.'
);
}
}
}
}
...
@@ -116,24 +117,22 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -116,24 +117,22 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
this
.
createdObjs
=
{};
this
.
createdObjs
=
{};
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
.
CANDIDATE
,
ASSOCS
.
USER
].
join
(
'.'
)];
[
ASSOCS
.
MESSAGES
,
ASSOCS
.
ATTACHMENTS
].
join
(
'.'
),
[
ASSOCS
.
CANDIDATE
,
ASSOCS
.
USER
].
join
(
'.'
)];
this
.
subscriptions
.
push
(
this
.
messageEngineApplicantViewService
.
getEngineApplicantViewByID
(
this
.
jobId
,
assocs
)
this
.
subscriptions
.
push
(
this
.
messageEngineApplicantViewService
.
getEngineApplicantViewByID
(
this
.
jobId
,
assocs
)
.
subscribe
(
.
subscribe
(
data
=>
{
data
=>
{
this
.
jobApplication
=
data
;
this
.
jobApplication
=
data
;
this
.
jobApplication
.
Messages
=
this
.
jobApplication
.
Messages
||
[];
this
.
jobApplication
.
Messages
=
this
.
jobApplication
.
Messages
||
[];
this
.
utilsService
.
sort
(
this
.
jobApplication
.
Messages
,
[
'ObjectCreated'
],
[
1
]);
this
.
jobApplication
.
Messages
.
forEach
(
msg
=>
{
this
.
jobApplication
.
Messages
.
forEach
(
msg
=>
{
msg
.
ObjectCreated
=
new
Date
(
msg
.
ObjectCreated
);
msg
.
ObjectCreated
=
new
Date
(
msg
.
ObjectCreated
);
});
});
// Assign current Job Application to new message
this
.
Message
.
JobApplication
=
this
.
jobApplication
;
this
.
createMessage
();
this
.
Message
.
Attachments
=
[];
this
.
utilsService
.
sort
(
this
.
jobApplication
.
Messages
,
[
'ObjectCreated'
],
[
1
]);
this
.
showLoader
=
false
;
this
.
showLoader
=
false
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -174,10 +173,14 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -174,10 +173,14 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
return
;
return
;
}
}
if
(
!
this
.
Message
.
SentVia
)
{
this
.
Message
.
SentVia
=
this
.
sentViaEnum
[
2
]
?
this
.
sentViaEnum
[
2
]
:
this
.
sentViaEnum
[
0
];
}
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjectsWithDefaultSvc
(
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
)
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjectsWithDefaultSvc
(
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
)
.
subscribe
(
.
subscribe
(
data
=>
{
()
=>
{
this
.
utilsService
.
handleSuccess
();
this
.
utilsService
.
handleSuccess
();
this
.
showLoader
=
false
;
this
.
showLoader
=
false
;
this
.
getEngineApplicantViewByID
();
this
.
getEngineApplicantViewByID
();
...
@@ -212,7 +215,8 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -212,7 +215,8 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
createMessage
():
void
{
createMessage
():
void
{
this
.
Message
=
new
MessageModel
();
this
.
Message
=
new
MessageModel
();
this
.
Message
.
SentBy
=
this
.
loggedInId
;
this
.
Message
.
SentBy
=
this
.
loggedInId
;
this
.
Message
.
SentVia
=
this
.
sentViaEnum
[
2
]
?
this
.
sentViaEnum
[
2
]
:
this
.
sentViaEnum
[
0
];
this
.
Message
.
Attachments
=
[];
this
.
Message
.
JobApplication
=
this
.
jobApplication
;
this
.
utilsService
.
createObject
(
this
.
Message
,
this
.
createdObjs
);
this
.
utilsService
.
createObject
(
this
.
Message
,
this
.
createdObjs
);
}
}
...
@@ -226,28 +230,11 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
...
@@ -226,28 +230,11 @@ export class MessageEngineApplicantViewComponent extends BaseComponent implement
.
click
();
.
click
();
}
}
setEditorClass
():
void
{
sendCriteria
():
boolean
{
setTimeout
(()
=>
{
if
(
this
.
showLoader
||
!
this
.
Message
.
Attachments
)
{
if
(
!
this
.
messageEditor
)
{
return
true
;
return
;
}
}
const
editElement
=
this
.
messageEditor
.
getQuill
().
container
;
if
(
!
editElement
)
{
return
;
}
const
editor
=
editElement
.
getElementsByClassName
(
'ql-editor'
);
if
(
!
editor
[
0
])
{
return
;
}
editor
[
0
].
classList
.
add
(
'form-control'
);
// editor[0].classList.add('editor');
editor
[
0
].
innerHTML
=
''
;
},
0
)
;
return
(
this
.
Message
.
MessageContent
===
''
||
!
this
.
Message
.
MessageContent
)
&&
!
this
.
Message
.
Attachments
.
length
;
}
}
}
}
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