0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
@@ -200,16 +211,23 @@
0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index 040e778cb..0af966ca9 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -38,6 +38,7 @@ export class HeaderPage implements OnInit {
showProfileModal = false
permissionList = new PermissionList();
notificationCount: number = 0;
+ profilePicture = "";
constructor(
@@ -52,7 +53,8 @@ export class HeaderPage implements OnInit {
private eventTriger: EventTrigger,
public ActiveTabService: ActiveTabService,
private notificationService: NotificationsService,
- private cdRef: ChangeDetectorRef
+ private cdRef: ChangeDetectorRef,
+ private storageService: StorageService,
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
@@ -76,9 +78,19 @@ export class HeaderPage implements OnInit {
async ngOnInit() {
this.hideSearch();
this.notificationLengthData();
+ this.getProfilpicture();
}
+ getProfilpicture() {
+ this.storageService.get(this.SessionStore.user.RoleID.toString()).then((picture) => {
+ console.log(picture)
+ this.profilePicture = picture
+ }).catch((error ) => {
+ this.profilePicture = "";
+ })
+ }
+
updateReciveNotification() {
this.eventTriger.getObservable().subscribe((event) => {
if (event.notification == "recive") {
diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts
index 425919d32..a642281fa 100644
--- a/src/app/shared/publication/new-publication/new-publication.page.ts
+++ b/src/app/shared/publication/new-publication/new-publication.page.ts
@@ -114,7 +114,16 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
this.capturedImageTitle = 'foto';
- //
+
+ const compressedImage = await this.compressImageBase64(
+ this.capturedImage,
+ 800, // maxWidth
+ 800, // maxHeight
+ 0.9 // quality
+ ).then((picture) => {
+ console.log('taked: ', picture)
+ this.capturedImage = picture
+ });
}
async laodPicture() {
@@ -126,6 +135,17 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = 'data:image/jpeg;base64,' +capturedImage.base64String;
this.capturedImageTitle = 'foto';
+
+ const compressedImage = await this.compressImageBase64(
+ this.capturedImage,
+ 800, // maxWidth
+ 800, // maxHeight
+ 0.9 // quality
+ ).then((picture) => {
+ console.log('Selected: ', picture)
+ this.capturedImage = picture
+ });
+
}
@@ -313,4 +333,40 @@ export class NewPublicationPage implements OnInit {
}
+ async compressImageBase64(base64String: string, maxWidth: number, maxHeight: number, quality: number): Promise {
+ return new Promise((resolve, reject) => {
+ const image = new (window as any).Image();
+ image.src = base64String;
+
+ image.onload = async () => {
+ const canvas = document.createElement('canvas');
+ let newWidth = image.width;
+ let newHeight = image.height;
+
+ if (newWidth > maxWidth) {
+ newHeight *= maxWidth / newWidth;
+ newWidth = maxWidth;
+ }
+
+ if (newHeight > maxHeight) {
+ newWidth *= maxHeight / newHeight;
+ newHeight = maxHeight;
+ }
+
+ canvas.width = newWidth;
+ canvas.height = newHeight;
+
+ const context = canvas.getContext('2d');
+ context?.drawImage(image, 0, 0, newWidth, newHeight);
+
+ const compressedBase64 = canvas.toDataURL('image/jpeg', quality);
+ resolve(compressedBase64);
+ };
+
+ image.onerror = (error) => {
+ reject(error);
+ };
+ });
+ }
+
}
diff --git a/version/git-version.ts b/version/git-version.ts
index b6003d8f4..75e68a177 100644
--- a/version/git-version.ts
+++ b/version/git-version.ts
@@ -1,12 +1,12 @@
export let versionData = {
- "shortSHA": "088ee19e5",
- "SHA": "088ee19e5ccf5ce4557d0c5e54a5bd8688239f6b",
+ "shortSHA": "53e674032",
+ "SHA": "53e67403238dbaaf46480561ce789b3f4cd17d82",
"branch": "developer-prod",
"lastCommitAuthor": "'Peter Maquiran'",
- "lastCommitTime": "'Mon Aug 28 17:39:48 2023 +0100'",
- "lastCommitMessage": "add color black",
- "lastCommitNumber": "5225",
+ "lastCommitTime": "'Tue Aug 29 16:42:46 2023 +0100'",
+ "lastCommitMessage": "agenda change timeline",
+ "lastCommitNumber": "5226",
"change": "",
- "changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.scss\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/services/agenda/list-box.service.ts\n\tmodified: src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.scss\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.scss\n\tmodified: src/global.scss",
+ "changeStatus": "On branch developer-prod\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/modals/create-process/create-process.page.html\n\tmodified: src/app/modals/document-detail/document-detail.page.html\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html\n\tmodified: src/app/modals/forward/forward.page.html\n\tmodified: src/app/modals/profile/edit-profile/edit-profile.page.html\n\tmodified: src/app/modals/profile/edit-profile/edit-profile.page.ts\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/modals/view-event/view-event.page.html\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.html\n\tmodified: src/app/pages/agenda/new-event/new-event.page.html\n\tmodified: src/app/pages/agenda/view-event/view-event.page.html\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/pages/chat/messages/messages.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas-gerar/diplomas-gerar/diplomas-gerar.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.html\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.html\n\tmodified: src/app/shared/agenda/new-event/new-event.page.html\n\tmodified: src/app/shared/agenda/view-event/view-event.page.html\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/shared/chat/messages/messages.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n\tmodified: src/app/shared/gabinete-digital/generic/task-detail-content/task-detail-content.page.html\n\tmodified: src/app/shared/gabinete-digital/generic/task-details/task-details.page.html\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.ts\n\tmodified: src/app/shared/publication/new-publication/new-publication.page.ts\n\tmodified: version/git-version.ts",
"changeAuthor": "peter.maquiran"
}
\ No newline at end of file