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
908833ff
Commit
908833ff
authored
Jul 31, 2020
by
chamath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Download summary report PDF.
parent
8163f7e3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
summary-report.component.html
...eb/dashboard/summary-report/summary-report.component.html
+1
-1
summary-report.component.ts
...-web/dashboard/summary-report/summary-report.component.ts
+17
-3
assessment.service.ts
...ular/src/app/my-career-web/services/assessment.service.ts
+11
-0
No files found.
frontend/angular/src/app/my-career-web/dashboard/summary-report/summary-report.component.html
View file @
908833ff
...
...
@@ -97,7 +97,7 @@
</div>
<div
class=
"d-flex justify-content-between"
style=
"margin: 20px 30px;"
>
<button
pButton
label=
"Download"
class=
"ui-button-info"
>
<button
pButton
label=
"Download"
class=
"ui-button-info"
(
click
)="
downloadSummaryReport
()"
>
</button>
...
...
frontend/angular/src/app/my-career-web/dashboard/summary-report/summary-report.component.ts
View file @
908833ff
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
BaseComponent
}
from
'../../base/base.component'
;
import
{
HelperService
}
from
'../../services/helper.service'
;
import
{
AssessmentService
}
from
'../../services/assessment.service'
;
import
*
as
FileSaver
from
'file-saver'
;
import
{
takeUntil
}
from
'rxjs/operators'
;
import
{
UtilsService
}
from
'../../../oneit/services/utils.service'
;
import
{
BaseComponent
}
from
'../../base/base.component'
;
import
{
SummaryReportModel
}
from
'../../models/summary-report.model'
;
import
{
AssessmentService
}
from
'../../services/assessment.service'
;
import
{
HelperService
}
from
'../../services/helper.service'
;
@
Component
({
selector
:
'app-summary-report'
,
...
...
@@ -59,4 +60,17 @@ export class SummaryReportComponent extends BaseComponent implements OnInit {
});
}
downloadSummaryReport
()
{
this
.
isLoading
=
true
;
this
.
assessmentService
.
downloadSummaryReport
()
.
pipe
(
takeUntil
(
this
.
componentInView
))
.
subscribe
((
response
)
=>
{
this
.
isLoading
=
false
;
FileSaver
.
saveAs
(
response
.
content
,
'Summary Report.pdf'
);
},
err
=>
{
this
.
utilsService
.
handleError
(
err
);
this
.
isLoading
=
false
;
});
}
}
frontend/angular/src/app/my-career-web/services/assessment.service.ts
View file @
908833ff
...
...
@@ -49,6 +49,17 @@ export class AssessmentService {
)
}
downloadSummaryReport
():
Observable
<
any
>
{
return
this
.
searchService
.
getObjectsWithDocument
(
'SummaryReport'
,
'All'
,
{},
[],
null
,
null
,
null
,
null
,
'SummaryReportPDF'
,
false
)
.
map
(
data
=>
{
if
(
data
!==
undefined
&&
data
!==
''
)
{
return
data
;
}
}
);
}
saveWorkStyle
(
params
):
Observable
<
any
>
{
return
this
.
utilsService
.
processObjects
(
'SaveWorkStyle'
,
params
);
}
...
...
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