diff --git a/.gitignore b/.gitignore index 5ba2467e5..bc36db74b 100644 --- a/.gitignore +++ b/.gitignore @@ -94,4 +94,6 @@ src/app/pipes/process.service.ts /.angular ./.angular -src/app/domain \ No newline at end of file +src/app/domain +_src/ +-src diff --git a/src/app/modals/document-detail/document-detail.page.scss b/src/app/modals/document-detail/document-detail.page.scss index 6372feb82..70ac70190 100644 --- a/src/app/modals/document-detail/document-detail.page.scss +++ b/src/app/modals/document-detail/document-detail.page.scss @@ -102,7 +102,7 @@ ion-button{ background: #ffb703; float: right; padding: 5px 13.5px 5px 13.5px; - color: #fff; + color: black; font-size: rem(14); } diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.html b/src/app/modals/profile/edit-profile/edit-profile.page.html index a8b47979e..47c900925 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.html +++ b/src/app/modals/profile/edit-profile/edit-profile.page.html @@ -60,15 +60,24 @@
- +
+ + + + + +
+ +
+ +
+ - - - -
- -
+
+ +
- +
diff --git a/src/app/modals/profile/edit-profile/edit-profile.page.ts b/src/app/modals/profile/edit-profile/edit-profile.page.ts index f10d05614..f053acd45 100644 --- a/src/app/modals/profile/edit-profile/edit-profile.page.ts +++ b/src/app/modals/profile/edit-profile/edit-profile.page.ts @@ -9,6 +9,7 @@ import { ThemeService } from 'src/app/services/theme.service'; import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera'; import { Filesystem, Directory } from '@capacitor/filesystem'; import { File } from '@awesome-cordova-plugins/file/ngx'; +import { StorageService } from 'src/app/services/storage.service'; @Component({ @@ -23,6 +24,7 @@ export class EditProfilePage implements OnInit { environment = environment capturedImage = ''; capturedImageTitle = ''; + profilePicture = ""; constructor(private modalController: ModalController, private animationController: AnimationController, @@ -30,9 +32,21 @@ export class EditProfilePage implements OnInit { private BackgroundService: BackgroundService, public ThemeService: ThemeService, private file: File, + private storageService: StorageService, + ) { } - ngOnInit() { } + ngOnInit() { + this.getProfilpicture() + } + getProfilpicture() { + this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => { + console.log(picture) + this.profilePicture = picture + }).catch((error ) => { + this.profilePicture = ""; + }) + } close() { this.modalController.dismiss(); @@ -132,6 +146,8 @@ export class EditProfilePage implements OnInit { async takePicture() { const capturedImage = await Camera.getPhoto({ + width: 188, + height: 188, quality: 50, // allowEditing: true, resultType: CameraResultType.Base64, @@ -139,12 +155,19 @@ export class EditProfilePage implements OnInit { }); this.capturedImage = 'data:image/jpeg;base64,' + capturedImage.base64String; + console.log(this.SessionStore.user.RoleID.toString()) + this.storageService.store(this.SessionStore.user.RoleID.toString(),this.capturedImage).then((value) => { + console.log('picture saved') + }).catch((error) => { + console.log('picture not saved') + }) + this.getProfilpicture() this.capturedImageTitle = SessionStore.user.Profile; - this.saveFile(this.capturedImage,this.capturedImageTitle,'application/img'); + /* this.saveFile(this.capturedImage,this.capturedImageTitle,'application/img'); */ } - async saveFile(pdfString, filename, type) { +/* async saveFile(pdfString, filename, type) { const blob = this.b64toBlob(pdfString, type) console.log(blob) let pathFile = '' @@ -165,11 +188,8 @@ export class EditProfilePage implements OnInit { }).then((dir) => { console.log('DIR ', dir) }); - } + } */ - getImagem() { - - } b64toBlob(b64Data, contentType) { contentType = contentType || ''; diff --git a/src/app/modals/profile/profile.page.html b/src/app/modals/profile/profile.page.html index 0f303add4..02166f8f9 100644 --- a/src/app/modals/profile/profile.page.html +++ b/src/app/modals/profile/profile.page.html @@ -39,7 +39,8 @@
- + +
+ +
+ +
+ -
+
-
+
@@ -139,25 +139,28 @@ - - +
+ + +
+ @@ -182,12 +185,12 @@
- -