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
aa473e22
Commit
aa473e22
authored
Jul 20, 2020
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intro letter downlaod added, selected template shown
parent
09826c32
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
16 deletions
+34
-16
templates.component.html
...history/career-history/templates/templates.component.html
+10
-6
templates.component.ts
...r-history/career-history/templates/templates.component.ts
+4
-7
intro-letter.component.html
...eb/intro-letters/intro-letter/intro-letter.component.html
+1
-1
intro-letter.component.ts
...-web/intro-letters/intro-letter/intro-letter.component.ts
+9
-2
career-profile.model.ts
...ular/src/app/my-career-web/models/career-profile.model.ts
+1
-0
intro-letter.service.ts
...ar/src/app/my-career-web/services/intro-letter.service.ts
+9
-0
search.service.ts
frontend/angular/src/app/oneit/services/search.service.ts
+0
-0
No files found.
frontend/angular/src/app/my-career-web/career-history/career-history/templates/templates.component.html
View file @
aa473e22
<h4
class=
"tab-heading"
>
Select the design template for your Career Profile
</h4>
<div
class=
"position-relative"
>
<app-overlay
[
isActive
]="
isLoading
"
></app-overlay>
<!--<p-carousel>-->
<!-- -->
<!--</p-carousel>-->
<h4
class=
"tab-heading"
*
ngIf=
"!careerProfile?.Template"
>
Select the design template for your Career Profile
</h4>
<div
class=
"selected-template"
*
ngIf=
"careerProfile?.Template"
>
<img
[
src
]="
apiBase
+
careerProfile
.
Template
.
FullImageURI
"
alt=
""
>
</div>
<div
class=
"text-center mt-3"
>
<button
pButton
label=
"Please choose a profile template
"
class=
"ui-button-info rounded-btn"
<div
class=
"text-center mt-3"
>
<button
pButton
[
label
]="
careerProfile
?.
Template
?
'
Choose
another
template
'
:
'
Please
choose
a
profile
template
'
"
class=
"ui-button-info rounded-btn"
(
click
)="
showTemplates
()"
></button>
</div>
</div>
...
...
frontend/angular/src/app/my-career-web/career-history/career-history/templates/templates.component.ts
View file @
aa473e22
...
...
@@ -43,6 +43,7 @@ export class TemplatesComponent extends BaseComponent implements OnInit {
.
subscribe
(
response
=>
{
this
.
isLoading
=
false
;
this
.
careerProfile
=
response
;
this
.
updatedObjs
[
this
.
careerProfile
.
ObjectID
]
=
this
.
careerProfile
;
if
(
this
.
careerProfile
.
Candidate
.
AllTempletes
)
{
this
.
careerProfile
.
Candidate
.
AllTempletes
.
map
(
t
=>
{
t
.
CanUse
=
t
.
Availability
===
this
.
tempalteStatus
.
INCLUDED_IN_FREE
...
...
@@ -50,8 +51,8 @@ export class TemplatesComponent extends BaseComponent implements OnInit {
t
.
ImgPath
=
this
.
apiBase
+
t
.
FullImageURI
});
this
.
careerProfile
.
Candidate
.
AllTempletes
.
sort
((
t1
,
t2
)
=>
t1
.
SortOrder
-
t2
.
SortOrder
);
this
.
utilsService
.
addObjsToJSONByObjectID
(
this
.
updatedObjs
,
this
.
careerProfile
.
Candidate
.
CandidateTemplates
)
}
console
.
log
(
this
.
careerProfile
);
},
err
=>
{
this
.
isLoading
=
false
;
this
.
utilsService
.
handleError
(
err
);
...
...
@@ -59,12 +60,8 @@ export class TemplatesComponent extends BaseComponent implements OnInit {
}
selectTemplate
(
template
):
void
{
const
templateModel
=
new
CandidateTemplateModel
();
templateModel
.
Candidate
=
this
.
careerProfile
.
Candidate
.
ObjectID
;
templateModel
.
Template
=
template
.
Value
;
this
.
utilsService
.
createObject
(
templateModel
,
this
.
createdObjs
);
this
.
saveService
.
saveObjectsWithDefaultSvc
(
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
updatedObjs
)
this
.
careerProfile
.
Template
=
template
;
this
.
saveService
.
saveObjectsWithDefaultSvc
(
this
.
createdObjs
,
this
.
updatedObjs
,
this
.
deletedObjs
)
.
pipe
(
takeUntil
(
this
.
componentInView
))
.
subscribe
(
response
=>
{
console
.
log
(
response
);
...
...
frontend/angular/src/app/my-career-web/intro-letters/intro-letter/intro-letter.component.html
View file @
aa473e22
...
...
@@ -78,7 +78,7 @@
<div
class=
"row mt-5"
>
<div
class=
"col-md-6"
>
<button
pButton
style=
"min-width: 180px;"
label=
"Download"
class=
"mc-btn-secondary"
></button>
<button
pButton
style=
"min-width: 180px;"
label=
"Download"
class=
"mc-btn-secondary"
(
click
)="
getIntroLetter
(
true
)"
*
ngIf=
"isEditMode"
></button>
</div>
<div
class=
"col-md-6 d-flex justify-content-end"
>
<button
(
click
)="
saveIntroLetter
()"
pButton
label=
"Update"
class=
"mc-btn-primary"
></button>
...
...
frontend/angular/src/app/my-career-web/intro-letters/intro-letter/intro-letter.component.ts
View file @
aa473e22
...
...
@@ -12,6 +12,8 @@ import { HelperService } from '../../services/helper.service';
import
{
ILWorkExperienceModel
}
from
'../../models/il-work-experience.model'
;
import
{
ILSkillModel
}
from
'../../models/il-skill.model'
;
import
*
as
FileSaver
from
'file-saver'
;
@
Component
({
selector
:
'app-intro-letter'
,
templateUrl
:
'./intro-letter.component.html'
,
...
...
@@ -70,14 +72,19 @@ export class IntroLetterComponent extends BaseComponent implements OnInit {
})
}
getIntroLetter
():
void
{
getIntroLetter
(
download
=
false
):
void
{
this
.
isLoading
=
true
;
this
.
introLetterService
.
getIntroLetter
(
this
.
introLetterId
,
[
'WorkExperiences.WorkExperience'
,
'Skills.Skill'
])
const
sub
=
download
?
this
.
introLetterService
.
downloadIntroLetter
(
this
.
introLetterId
)
:
this
.
introLetterService
.
getIntroLetter
(
this
.
introLetterId
,
[
'WorkExperiences.WorkExperience'
,
'Skills.Skill'
]);
sub
.
pipe
(
takeUntil
(
this
.
componentInView
))
.
subscribe
(
response
=>
{
this
.
isLoading
=
false
;
if
(
download
)
{
FileSaver
.
saveAs
(
response
.
content
,
`intro-letter-
${
this
.
introductionLetter
.
ObjectID
}
.pdf`
);
}
else
{
this
.
introductionLetter
=
response
;
this
.
updatedObjs
[
this
.
introductionLetter
.
ObjectID
]
=
this
.
introductionLetter
;
}
},
err
=>
{
this
.
utilsService
.
handleError
(
err
);
this
.
isLoading
=
false
;
...
...
frontend/angular/src/app/my-career-web/models/career-profile.model.ts
View file @
aa473e22
...
...
@@ -35,4 +35,5 @@ export class CareerProfileModel extends BaseModel {
TEMPLATES
:
boolean
;
WORK_HISTORY
:
boolean
;
};
Template
:
any
;
}
frontend/angular/src/app/my-career-web/services/intro-letter.service.ts
View file @
aa473e22
...
...
@@ -35,6 +35,15 @@ export class IntroLetterService {
)
}
downloadIntroLetter
(
id
):
Observable
<
any
>
{
return
this
.
searchService
.
downloadDocument
(
SERVICES
.
INTRODUCTION_LETTERS
,
id
,
'IntroductionLetterPDF'
,
null
)
.
map
(
data
=>
{
return
data
;
}
)
}
saveIntroLetters
(
createdObjs
,
updatedObjs
,
deleteObjs
):
Observable
<
any
>
{
return
this
.
saveService
.
saveObjectsWithDefaultSvc
(
createdObjs
,
updatedObjs
,
deleteObjs
);
}
...
...
frontend/angular/src/app/oneit/services/search.service.ts
View file @
aa473e22
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