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
22519df5
Commit
22519df5
authored
May 12, 2020
by
chamath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S54103527 - Add Applicant feature.
Added new columns to download, delete and replace the CV and Cover letter.
parent
6cb6d98f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
27 deletions
+104
-27
edit-applicant.component.css
...pp/components/edit-applicant/edit-applicant.component.css
+10
-0
edit-applicant.component.html
...p/components/edit-applicant/edit-applicant.component.html
+19
-3
edit-applicant.component.ts
...app/components/edit-applicant/edit-applicant.component.ts
+70
-24
search-applicants.model.ts
...p/components/search-applicants/search-applicants.model.ts
+5
-0
No files found.
frontend/angular/src/app/components/edit-applicant/edit-applicant.component.css
View file @
22519df5
.ui-g.form-group
>
div
{
.ui-g.form-group
>
div
{
padding
:
0px
!important
;
padding
:
0px
!important
;
padding-right
:
10px
!important
;
padding-right
:
10px
!important
;
}
a
.pdf-link
{
color
:
cornflowerblue
;
}
a
.pdf-link
:hover
{
color
:
blue
;
text-decoration
:
underline
;
}
}
\ No newline at end of file
frontend/angular/src/app/components/edit-applicant/edit-applicant.component.html
View file @
22519df5
...
@@ -71,13 +71,28 @@
...
@@ -71,13 +71,28 @@
</tr>
</tr>
</ng-template>
</ng-template>
<ng-template
pTemplate=
"body"
let-rowData
let-columns=
"columns"
>
<ng-template
pTemplate=
"body"
let-rowData
let-columns=
"columns"
>
<tr>
<tr>
<ng-container
*
ngFor=
"let col of columns"
>
<ng-container
*
ngFor=
"let col of columns
| slice:0:3
"
>
<td
*
ngIf=
"col.field != ''"
>
<td
*
ngIf=
"col.field != ''"
>
{{utilsService.getActualFieldValue(rowData, col.field)}}
{{utilsService.getActualFieldValue(rowData, col.field)}}
</td>
</td>
</ng-container>
</ng-container>
<ng-container
*
ngFor=
"let col of columns | slice:4:5"
>
<td>
<a
href=
"{{baseUrl}}{{rowData?.CV?.URI}}"
class=
"data-link pdf-link"
target=
"_blank"
>
{{ rowData?.CV?.Name ? rowData?.CV?.Name : rowData?.CVName?.name }}
</a>
<p-fileUpload
name=
"CV"
auto=
"true"
mode=
"basic"
capture=
"environment"
maxFileSize=
"1000000"
url=
"{{baseUrl}}uploadFile"
[
style
]="{'
float
'
:
'
right
'}"
(
onProgress
)="
showLoader =
true"
(
onUpload
)="
onUpload
($
event
,
rowData
,
'
CV
')"
withCredentials=
"true"
[
multiple
]="
false
"
chooseLabel=
"Choose New"
></p-fileUpload>
<p-button
*
ngIf=
"rowData.CV"
label=
"X"
(
onClick
)="
deleteCV
(
rowData
)"
style=
"float: right; margin-right: 20px;"
></p-button>
</td>
<td>
<a
href=
"{{baseUrl}}{{rowData?.CoverLetter?.URI}}"
class=
"data-link pdf-link"
target=
"_blank"
>
{{ rowData?.CoverLetter?.Name ? rowData?.CoverLetter?.Name : rowData?.CoverLetterName?.name }}
</a>
<p-fileUpload
name=
"CoverLetter"
auto=
"true"
mode=
"basic"
capture=
"environment"
maxFileSize=
"1000000"
url=
"{{baseUrl}}uploadFile"
[
style
]="{'
float
'
:
'
right
'}"
(
onProgress
)="
showLoader =
true"
(
onUpload
)="
onUpload
($
event
,
rowData
,
'
CoverLetter
')"
withCredentials=
"true"
[
multiple
]="
false
"
chooseLabel=
"Choose New"
></p-fileUpload>
<p-button
*
ngIf=
"rowData.CoverLetter"
label=
"X"
(
onClick
)="
deleteCoverLetter
(
rowData
)"
style=
"float: right; margin-right: 20px;"
></p-button>
</td>
</ng-container>
</tr>
</tr>
</ng-template>
</ng-template>
<ng-template
pTemplate=
"emptymessage"
let-columns
>
<ng-template
pTemplate=
"emptymessage"
let-columns
>
...
@@ -88,8 +103,9 @@
...
@@ -88,8 +103,9 @@
</tr>
</tr>
</ng-template>
</ng-template>
</p-table>
</p-table>
</span>
</span>
<p-confirmDialog
header=
"Delete Confirmation"
icon=
"fa fa-trash"
width=
"600"
></p-confirmDialog>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
<p-progressSpinner
*
ngIf=
"showLoader"
></p-progressSpinner>
</form>
</form>
</p-card>
</p-card>
frontend/angular/src/app/components/edit-applicant/edit-applicant.component.ts
View file @
22519df5
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
ConfirmationService
}
from
'primeng/api'
;
import
{
Subscription
}
from
'rxjs'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
FIELDS
}
from
'../../constants'
;
import
{
FIELDS
}
from
'../../constants'
;
import
{
S
earchApplicantService
}
from
'../search-applicants/search-applicants
.service'
;
import
{
S
aveService
}
from
'../../oneit/services/save
.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
UtilsService
}
from
'../../oneit/services/utils.service'
;
import
{
Candidate
}
from
'../search-applicants/search-applicants.model'
;
import
{
Candidate
}
from
'../search-applicants/search-applicants.model'
;
import
{
S
aveService
}
from
'../../oneit/services/save
.service'
;
import
{
S
earchApplicantService
}
from
'../search-applicants/search-applicants
.service'
;
@
Component
({
@
Component
({
selector
:
'app-edit-applicant'
,
selector
:
'app-edit-applicant'
,
templateUrl
:
'./edit-applicant.component.html'
,
templateUrl
:
'./edit-applicant.component.html'
,
styleUrls
:
[
'./edit-applicant.component.css'
]
styleUrls
:
[
'./edit-applicant.component.css'
]
})
})
export
class
EditApplicantComponent
implements
OnInit
{
export
class
EditApplicantComponent
implements
OnInit
{
...
@@ -19,25 +21,32 @@ export class EditApplicantComponent implements OnInit {
...
@@ -19,25 +21,32 @@ export class EditApplicantComponent implements OnInit {
@
ViewChild
(
'form'
)
form
:
NgForm
;
@
ViewChild
(
'form'
)
form
:
NgForm
;
saveDropdown
=
[{
saveDropdown
=
[{
label
:
'Save & Back'
,
icon
:
'ui-icon-refresh'
,
command
:
()
=>
{
this
.
saveApplicants
(
false
);
}
label
:
'Save & Back'
,
icon
:
'ui-icon-refresh'
,
command
:
()
=>
{
this
.
saveApplicants
(
false
);
}
}]
}]
readonly
FIELDS
=
FIELDS
;
readonly
FIELDS
=
FIELDS
;
applicant
:
Candidate
=
new
Candidate
();
showLoader
:
boolean
=
false
;
applicant
:
Candidate
=
new
Candidate
();
baseUrl
=
environment
.
baseUrl
;
showLoader
:
boolean
=
false
;
cols
=
[
cols
=
[
{
field
:
'Job.HiringTeam.Company.CompanyName'
,
header
:
'Customer'
,
width
:
'33%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'Job.HiringTeam.Company.CompanyName'
,
header
:
'Customer'
,
width
:
'18%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'Job.HiringTeam.HiringTeamName'
,
header
:
'Hiring Team'
,
width
:
'33%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'Job.HiringTeam.HiringTeamName'
,
header
:
'Hiring Team'
,
width
:
'18%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'Job.JobTitle'
,
header
:
'Job'
,
width
:
'33%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'Job.JobTitle'
,
header
:
'Job'
,
width
:
'18%'
,
noSort
:
false
,
noFilter
:
false
},
{
field
:
'CV'
,
header
:
'CV'
,
width
:
'23%'
,
noSort
:
true
,
noFilter
:
true
},
{
field
:
'CoverLetter'
,
header
:
'Cover Letter'
,
width
:
'23%'
,
noSort
:
true
,
noFilter
:
true
},
];
];
constructor
(
private
activatedRoute
:
ActivatedRoute
,
constructor
(
private
SearchApplicantService
:
SearchApplicantService
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
SearchApplicantService
:
SearchApplicantService
,
private
saveService
:
SaveService
,
private
utilsService
:
UtilsService
,
private
router
:
Router
)
{
}
private
saveService
:
SaveService
,
private
router
:
Router
,
private
confirmationService
:
ConfirmationService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
...
@@ -49,11 +58,37 @@ export class EditApplicantComponent implements OnInit {
...
@@ -49,11 +58,37 @@ export class EditApplicantComponent implements OnInit {
this
.
getApplicate
(
params
.
id
);
this
.
getApplicate
(
params
.
id
);
}
}
}
}
));
));
}
deleteCV
(
application
:
any
)
{
const
isMandatory
=
application
.
Job
.
WorkFlowTemplate
.
IsCVMandatory
;
this
.
deleteConfirmation
(
application
,
isMandatory
,
'CV'
);
}
deleteCoverLetter
(
application
:
any
)
{
const
isMandatory
=
application
.
Job
.
WorkFlowTemplate
.
IsCLMandatory
;
this
.
deleteConfirmation
(
application
,
isMandatory
,
'CoverLetter'
);
}
deleteConfirmation
(
application
:
any
,
isMandatory
:
boolean
,
type
:
string
)
{
this
.
confirmationService
.
confirm
({
message
:
isMandatory
?
type
+
' is mandatory in the Job Application. Do you want to proceed with the delete?'
:
'Are you sure you want to delete this '
+
type
+
'?'
,
accept
:
()
=>
{
application
.
IsArchived
=
true
;
eval
(
'application.'
+
type
+
' = null'
);
}
});
}
onUpload
(
event
:
any
,
application
:
any
,
type
:
string
)
{
eval
(
'application.'
+
type
+
' = { "FileToken": JSON.parse(event.xhr.response).files[0].token }'
);
eval
(
'application.'
+
type
+
'Name = event.files[0]'
);
this
.
showLoader
=
false
;
}
}
getApplicate
(
id
)
{
getApplicate
(
id
)
{
this
.
SearchApplicantService
.
getApplicantByID
(
id
,
[
'User'
,
'JobApplications'
,
'JobApplications.Job.HiringTeam.Company'
]).
subscribe
(
data
=>
{
this
.
SearchApplicantService
.
getApplicantByID
(
id
,
[
'User'
,
'JobApplications'
,
'JobApplications.Job.HiringTeam.Company'
,
'JobApplications.Job.WorkFlowTemplate'
]).
subscribe
(
data
=>
{
this
.
applicant
=
data
;
this
.
applicant
=
data
;
this
.
showLoader
=
false
;
this
.
showLoader
=
false
;
},
error
=>
{
},
error
=>
{
...
@@ -68,8 +103,19 @@ export class EditApplicantComponent implements OnInit {
...
@@ -68,8 +103,19 @@ export class EditApplicantComponent implements OnInit {
this
.
utilsService
.
showAllErrorMessages
();
this
.
utilsService
.
showAllErrorMessages
();
}
else
{
}
else
{
this
.
showLoader
=
true
;
this
.
showLoader
=
true
;
let
updatedObjs
=
{};
let
updatedObjs
=
{};
this
.
utilsService
.
addObjsToJSONByObjectID
(
updatedObjs
,
[
this
.
applicant
,
this
.
applicant
.
User
])
this
.
utilsService
.
addObjsToJSONByObjectID
(
updatedObjs
,
[
this
.
applicant
,
this
.
applicant
.
User
]);
this
.
utilsService
.
addObjsToJSONByObjectID
(
updatedObjs
,
this
.
applicant
.
JobApplications
);
if
(
this
.
applicant
.
JobApplications
)
{
for
(
let
application
of
this
.
applicant
.
JobApplications
)
{
application
.
FactorScoreDetails
=
null
;
application
.
CultureFit
=
null
;
application
.
RoleFit
=
null
;
application
.
RequirementFit
=
null
;
}
}
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjectsWithDefaultSvc
({},
updatedObjs
,
{})
this
.
subscriptions
.
push
(
this
.
saveService
.
saveObjectsWithDefaultSvc
({},
updatedObjs
,
{})
.
subscribe
(
.
subscribe
(
data
=>
{
data
=>
{
...
...
frontend/angular/src/app/components/search-applicants/search-applicants.model.ts
View file @
22519df5
...
@@ -20,4 +20,8 @@ export class User {
...
@@ -20,4 +20,8 @@ export class User {
export
class
JobApplications
{
export
class
JobApplications
{
ObjectID
:
string
;
ObjectID
:
string
;
ObjectClass
=
CLASSES
.
JOB_APPLICATION
;
ObjectClass
=
CLASSES
.
JOB_APPLICATION
;
FactorScoreDetails
:
any
;
CultureFit
:
any
;
RequirementFit
:
any
;
RoleFit
:
any
;
}
}
\ No newline at end of file
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