@@ -9,12 +9,6 @@ import { environment } from '../../../environments/environment'
9
9
import { AuthService } from '../../auth/auth.service'
10
10
import { EventService } from '../../events/event.service'
11
11
12
- import { catchError } from 'rxjs/operators' ;
13
- import { Observable } from 'rxjs' ;
14
-
15
-
16
- import { HttpClient , HttpHeaders , HttpParams } from '@angular/common/http' ;
17
-
18
12
@Component ( {
19
13
selector : 'app-downloads' ,
20
14
templateUrl : './downloads.component.html' ,
@@ -32,8 +26,7 @@ export class DownloadsComponent implements OnInit {
32
26
private companyService : CompanyService ,
33
27
private authService : AuthService ,
34
28
private eventService : EventService ,
35
- private titleService : Title ,
36
- private http : HttpClient
29
+ private titleService : Title
37
30
) { }
38
31
39
32
@@ -70,60 +63,4 @@ export class DownloadsComponent implements OnInit {
70
63
} )
71
64
}
72
65
73
- downloadCVs ( ) {
74
- if ( this . cvsDownloadUrl ) {
75
- const httpOptions = {
76
- headers : new HttpHeaders ( {
77
- 'Content-Type' : 'application/json'
78
- } ) ,
79
- observe : 'response' as 'response'
80
- } ;
81
-
82
- this . http . get ( this . cvsDownloadUrl , httpOptions )
83
- . pipe (
84
- catchError ( err => {
85
- console . error ( 'Failed to download CVs:' , err ) ;
86
- alert ( 'Unable to dowload CVs at this time. When available the team will contact you.' ) ;
87
- throw err ; // Re-throw the error if needed for further handling
88
- } )
89
- )
90
- . subscribe ( {
91
- next : response => {
92
- // Success, open the download URL
93
- window . open ( this . cvsDownloadUrl , '_blank' ) ;
94
- }
95
- } ) ;
96
- } else {
97
- alert ( 'CV download URL is not available.' ) ;
98
- }
99
- }
100
-
101
- downloadLinksCVs ( ) {
102
- if ( this . linksCVsDownloadUrl ) {
103
- const httpOptions = {
104
- headers : new HttpHeaders ( {
105
- 'Content-Type' : 'application/json'
106
- } ) ,
107
- observe : 'response' as 'response'
108
- } ;
109
-
110
- this . http . get ( this . linksCVsDownloadUrl , httpOptions )
111
- . pipe (
112
- catchError ( err => {
113
- console . error ( 'Failed to download linked CVs:' , err ) ;
114
- alert ( 'Unable to dowload links CVs at this time. When available the team will contact you.' ) ;
115
- throw err ; // Re-throw the error if needed for further handling
116
- } )
117
- )
118
- . subscribe ( {
119
- next : response => {
120
- // Success, open the download URL
121
- window . open ( this . linksCVsDownloadUrl , '_blank' ) ;
122
- }
123
- } ) ;
124
- } else {
125
- alert ( 'Links CV download URL is not available.' ) ;
126
- }
127
- }
128
-
129
66
}
0 commit comments