diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index 5ff1e22eb..3172432d5 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -103,6 +103,7 @@ export class ProfilePage implements OnInit { this.DataArray = [] value.forEach((element, i) => { + console.log('Getnotifications',element, i ) let notificationObject; if (element.notification) { diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 77967517b..06478d540 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -139,7 +139,7 @@ export class LoginPage implements OnInit { } this.changeProfileService.runLogin(); - this.getToken(); + /* this.getToken(); */ SessionStore.setInativity(true); this.goback(); diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 4c18c80a3..23eb8bf2b 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -163,7 +163,23 @@ export class NotificationsService { this.storageService.get("Notifications").then((store) => { store.push(notification) - this.storageService.store("Notifications", store) + console.log('Store Notification ',store) + + const result = store.reduce((accumulator, current) => { + let exists = accumulator.find(item => { + return item.id === current.id; + }); + if(!exists) { + accumulator = accumulator.concat(current); + } + return accumulator; + }, []); + + console.log(result); + + + + this.storageService.store("Notifications", result) }).catch((error) => { if (!error) { this.storageService.store("Notifications", [notification]) diff --git a/version/git-version.ts b/version/git-version.ts index eba9024fd..85a3583ab 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "df8fbc373", - "SHA": "df8fbc373ea871a70c5cddc0341f210a82a3fc56", + "shortSHA": "c96aad213", + "SHA": "c96aad2136d71846600d94c92d4a2f82439a0e3c", "branch": "developer", "lastCommitAuthor": "'Eudes InĂ¡cio'", - "lastCommitTime": "'Mon Jul 31 16:41:50 2023 +0100'", - "lastCommitMessage": "pull made", - "lastCommitNumber": "5131", + "lastCommitTime": "'Mon Jul 31 16:58:36 2023 +0100'", + "lastCommitMessage": "pull made and remove time from notification erro", + "lastCommitNumber": "5133", "change": "", - "changeStatus": "On branch developer\nYour branch and 'origin/developer' have diverged,\nand have 7 and 1 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\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/profile/profile.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.html", + "changeStatus": "On branch developer\nYour branch is ahead of 'origin/developer' by 8 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/services/notifications.service.ts", "changeAuthor": "eudes.inacio" } \ No newline at end of file