diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 6fe433f8a..f9d675478 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -39,7 +39,6 @@ export class HomePage implements OnInit { toDayEventStorage = ToDayEventStorage totalDocumentStore = TotalDocumentStore expedienteGdStore = ExpedienteGdStore - adding: "intervenient" | "CC" = "intervenient"; mobileComponent = { showAddNewEvent: false, @@ -126,12 +125,6 @@ export class HomePage implements OnInit { } - window.addEventListener('storage', (event) => { - // When local storage changes, dump the list to - // the console. - console.log(event); - }); - } goto(url) { diff --git a/src/app/pages/events/attendees/attendees.page.ts b/src/app/pages/events/attendees/attendees.page.ts index e00eb85f4..8689d453a 100644 --- a/src/app/pages/events/attendees/attendees.page.ts +++ b/src/app/pages/events/attendees/attendees.page.ts @@ -81,9 +81,9 @@ export class AttendeesPageModal implements OnInit { } - remove(itm: EventPerson){ + remove(itm: EventPerson) { - if(this.adding == "intervenient"){ + if(this.adding == "intervenient") { this.taskParticipants = this.taskParticipants.filter((contact, index) =>{ @@ -135,10 +135,23 @@ export class AttendeesPageModal implements OnInit { }); } - this.contacts = result; + this.contacts = this.sort(result as any); this.showLoader = false; } ); } + + sort(data: []) { + return data.sort(function (a: any, b: any) { + if (a.Name > b.Name) { + return -1; + } + if (b.Name > a.Name) { + return 1; + } + return 0; + }).reverse() + } + } \ No newline at end of file diff --git a/src/app/services/first-enter.service.ts b/src/app/services/first-enter.service.ts index 8560d8bf4..55acf2dca 100644 --- a/src/app/services/first-enter.service.ts +++ b/src/app/services/first-enter.service.ts @@ -11,7 +11,6 @@ import { SessionStore } from '../store/session.service'; export class FirstEnterService { constructor(private router:Router, - private platform: Platform, public p: PermissionService, private alertController: AlertController) { } diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 880e4506b..ea866e684 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -1,22 +1,17 @@ /* eslint-disable */ /* tslint:disable */ import { Injectable, NgZone } from '@angular/core'; -import { ActivatedRoute } from '@angular/router' import { HttpClient } from '@angular/common/http'; import { environment } from 'src/environments/environment'; import { StorageService } from 'src/app/services/storage.service'; import { AuthConnstants } from 'src/app/config/auth-constants'; import { Tokenn } from '../models/token.model'; -import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular'; -import { NavigationExtras, Router } from '@angular/router'; -import { ToastService } from '../services/toast.service'; -import { BackgroundService } from './background.service'; -import { v4 as uuidv4 } from 'uuid'; +import { AlertController, Platform } from '@ionic/angular'; +import { Router } from '@angular/router'; import { EventTrigger } from '../services/eventTrigger.service'; import { SessionStore } from '../store/session.service'; import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } from '@capacitor/push-notifications'; import { notificationObject } from '../models/notifications'; -/* import { Events } from 'ionic-angular' */ @Injectable({ providedIn: 'root' diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.ts b/src/app/shared/event/attendee-modal/attendee-modal.page.ts index 6184e6692..58f478a27 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -87,7 +87,7 @@ export class AttendeePage implements OnInit { } - async selectContact(itm: EventPerson){ + async selectContact(itm: EventPerson) { if(this.adding == "intervenient") { diff --git a/src/app/store/localstore.service.ts b/src/app/store/localstore.service.ts index 75878b3ea..cb2432701 100644 --- a/src/app/store/localstore.service.ts +++ b/src/app/store/localstore.service.ts @@ -10,6 +10,12 @@ export class LocalstoreService { private prefix = environment.version.lastCommitNumber+"-"; private previewPrefix = 'v17-'; + callbacks: {[key: string]: { + path: string, + funx: Function, + id: string + }} = {} + constructor() { const key = SHA1('version').toString() @@ -68,6 +74,20 @@ export class LocalstoreService { localStorage.removeItem(keyName) } + private async change(changeType: 'set' | 'delete') { + const currentPath = window.location.pathname + + for (const [key, value] of Object.entries(this.callbacks)) { + + if(currentPath.startsWith(value.path)) {} + const dontRepeat = await value.funx({event:{type: changeType}}) + if(dontRepeat) { + delete this.callbacks[key] + } + } + + } + } export const localstoreService = new LocalstoreService() \ No newline at end of file diff --git a/version/git-version.ts b/version/git-version.ts index b3783d722..e9f3fee74 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "e56e00c6f", - "SHA": "e56e00c6fa665f6b3246d8fc0fcb038010ae218b", + "shortSHA": "7851c5a78", + "SHA": "7851c5a78e9305f7f2608c10ea6b30de652607c3", "branch": "no_bug_movemente", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Thu Jan 19 10:05:21 2023 +0100'", - "lastCommitMessage": "comment develop stuff", - "lastCommitNumber": "4657", + "lastCommitTime": "'Thu Jan 19 10:24:19 2023 +0100'", + "lastCommitMessage": "fixe routes", + "lastCommitNumber": "4658", "change": "", - "changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/guards/login.guard.ts\n\tnew file: tsconfig.worker.json", + "changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/events/attendees/attendees.page.ts\n\tmodified: src/app/services/first-enter.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/shared/event/attendee-modal/attendee-modal.page.ts\n\tmodified: src/app/store/localstore.service.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file