mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
ordenation
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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) { }
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -87,7 +87,7 @@ export class AttendeePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async selectContact(itm: EventPerson){
|
||||
async selectContact(itm: EventPerson) {
|
||||
|
||||
if(this.adding == "intervenient") {
|
||||
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user