Revision 54775
Added by Konstantina Galouni about 5 years ago
mailPrefs.component.ts | ||
---|---|---|
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
this.fetchId = Session.getUserEmail(); |
62 |
console.info("email: "+this.fetchId); |
|
63 |
console.info("communityId: " + this.communityId); |
|
64 | 62 |
|
65 | 63 |
this.getEmailPreferences(); |
66 | 64 |
|
... | ... | |
98 | 96 |
this.preferencesFor = "project"; |
99 | 97 |
this._mailPrefsService.getUserEmailPreferencesForOpenaire(this.properties.claimsAPIURL).subscribe( |
100 | 98 |
data => { |
101 |
console.info("email prefs returned"); |
|
102 | 99 |
|
103 | 100 |
if(data.code == "204") { |
104 | 101 |
this.status = this.errorCodes.NONE; |
105 | 102 |
} else { |
106 |
console.info(data); |
|
107 | 103 |
|
108 | 104 |
this.initialNotifications = data.data; |
109 | 105 |
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications )); |
... | ... | |
163 | 159 |
|
164 | 160 |
this.status = this.errorCodes.LOADING; |
165 | 161 |
this.savedMessage = ""; |
166 |
console.info("Send notification to db: ", this.notifications[index]); |
|
167 | 162 |
|
168 | 163 |
this._mailPrefsService.saveUserEmailPreferences(this.notifications[index], this.properties.claimsAPIURL).subscribe( |
169 | 164 |
data => { |
170 |
console.info("Notification saved successfully"); |
|
171 | 165 |
this.initialNotifications[index] = JSON.parse(JSON.stringify( this.notifications[index] )); |
172 | 166 |
|
173 | 167 |
this.status = this.errorCodes.DONE; |
... | ... | |
187 | 181 |
); |
188 | 182 |
} |
189 | 183 |
else { |
190 |
console.info("Notification not changed: ", this.notifications[index]); |
|
191 | 184 |
/*UIkit.notification({ |
192 | 185 |
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>', |
193 | 186 |
status : 'primary', |
... | ... | |
210 | 203 |
if(this.notifications.length > 0 && this.initialNotifications.length > 0) { |
211 | 204 |
this.status = this.errorCodes.LOADING; |
212 | 205 |
this.savedMessage = ""; |
213 |
console.info("Restore Notification"); |
|
214 |
console.info(this.notifications[index]); |
|
215 | 206 |
this.notifications[index] = JSON.parse(JSON.stringify( this.initialNotifications[index] )); |
216 |
console.info(this.initialNotifications[index]); |
|
217 | 207 |
this.status = this.errorCodes.DONE; |
218 | 208 |
this.prefsChanged[index] = false; |
219 | 209 |
} |
... | ... | |
245 | 235 |
} else { |
246 | 236 |
code = err.status; |
247 | 237 |
} |
248 |
console.info(code); |
|
249 | 238 |
if(code == "403") { |
250 | 239 |
this.status = this.errorCodes.FORBIDDEN; |
251 | 240 |
} |
Also available in: Unified diff
[trunk]: Remove unnecessary logs from library.