diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts
index e0aa5897b..9a956c575 100644
--- a/src/app/modals/profile/profile.page.ts
+++ b/src/app/modals/profile/profile.page.ts
@@ -98,8 +98,12 @@ export class ProfilePage implements OnInit {
getProfilpicture() {
this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
+ if(picture) {
+ this.profilePicture = picture
+ } else {
+ this.profilePicture = "";
+ }
console.log(picture)
- this.profilePicture = picture
}).catch((error ) => {
this.profilePicture = "";
})
diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html
index 6e236ed76..183de406c 100644
--- a/src/app/shared/header/header.page.html
+++ b/src/app/shared/header/header.page.html
@@ -48,15 +48,14 @@
-->
-

+ src='assets/images/secretaria_geral.png'> -->
@@ -212,15 +211,14 @@
-->
-

+ src='assets/images/secretaria_geral.png'> -->
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index c2ab2444a..410b2e139 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -102,26 +102,29 @@ export class HeaderPage implements OnInit {
getProfilpicture() {
- this.attachmentService.getUserProfilePhoto(this.SessionStore.user.UserPhoto).subscribe((base) => {
+ if(this.SessionStore.user.UserPhoto) {
+ this.attachmentService.getUserProfilePhoto(this.SessionStore.user.UserPhoto).subscribe((base) => {
- this.storageService.store(this.SessionStore.user.RoleID.toString(), 'data:image/jpeg;base64,' + base).then((value) => {
- this.profilePicture = 'data:image/jpeg;base64,' + base;
-
- console.log('picture saved', value)
- }).catch((error) => {
- console.log('picture not saved')
- });
- }, (error) => {
- console.log('profile picture errro: ', error)
- this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
- console.log(picture)
- this.profilePicture = picture
- }).catch((error) => {
- this.profilePicture = "";
+ this.storageService.store(this.SessionStore.user.RoleID.toString(), 'data:image/jpeg;base64,' + base).then((value) => {
+ this.profilePicture = 'data:image/jpeg;base64,' + base;
+
+ console.log('picture saved', value)
+ }).catch((error) => {
+ console.log('picture not saved')
+ });
+ }, (error) => {
+ console.log('profile picture errro: ', error)
+ this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
+ console.log(picture)
+ this.profilePicture = picture
+ }).catch((error) => {
+ this.profilePicture = "";
+ })
})
- })
-
+ } else {
+ this.profilePicture = "";
+ }
}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index a9256d5a8..726ebb13e 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -4,4 +4,4 @@ import { doneITProd } from './suport/doneIt'
import { DevDev } from './suport/dev'
-export const environment: Environment = DevDev;
+export const environment: Environment = oaprProd;