mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
duplication of notification solved
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
|
||||
this.changeProfileService.runLogin();
|
||||
this.getToken();
|
||||
/* this.getToken(); */
|
||||
SessionStore.setInativity(true);
|
||||
|
||||
this.goback();
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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 <file>...\" 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"
|
||||
}
|
||||
Reference in New Issue
Block a user