mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Fix
This commit is contained in:
@@ -71,7 +71,7 @@ export class HomePage implements OnInit {
|
||||
constructor(private zone: NgZone,
|
||||
private router: Router,
|
||||
public modalCtrl: AlertController,
|
||||
private notificatinsservice: NotificationsService,
|
||||
private notificationsService: NotificationsService,
|
||||
private platform: Platform,
|
||||
private activeroute: ActivatedRoute,
|
||||
// private network: NetworkService,
|
||||
@@ -99,6 +99,18 @@ export class HomePage implements OnInit {
|
||||
//this.folderId = this.navParams.get('folderId');
|
||||
}
|
||||
|
||||
|
||||
this.notificationsService.registerCallback(
|
||||
'Create Depacho',
|
||||
() =>{
|
||||
this.refreshing()
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -109,8 +121,8 @@ export class HomePage implements OnInit {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
this.mobilefirstConnect();
|
||||
this.notificatinsservice.getAndpostToken2();
|
||||
this.notificatinsservice.onReceviNotification();
|
||||
this.notificationsService.getAndpostToken2();
|
||||
this.notificationsService.onReceviNotification();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import { NavigationStart, NavigationEnd, Router } from '@angular/router';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-chat',
|
||||
|
||||
@@ -23,6 +23,11 @@ export class NotificationsService {
|
||||
folderId: string;
|
||||
DataArray: Array<String> = [];
|
||||
|
||||
callbacks: {
|
||||
type: string,
|
||||
funx: Function
|
||||
}[] = []
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private storageService: StorageService,
|
||||
@@ -34,7 +39,20 @@ export class NotificationsService {
|
||||
private toastService: ToastService,
|
||||
private zone: NgZone,
|
||||
private activeroute: ActivatedRoute,
|
||||
private jsonstore: JsonStore) { }
|
||||
private jsonstore: JsonStore) {
|
||||
|
||||
this.callbacks.forEach(e=> {
|
||||
if(e.type = 'Create Depacho') {
|
||||
e.funx()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
registerCallback(type: string, funx: Function ) {
|
||||
this.callbacks.push({type, funx})
|
||||
}
|
||||
|
||||
getTokenByUserIdAndId(user, userID) {
|
||||
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||
|
||||
@@ -186,11 +186,11 @@
|
||||
<mat-select placeholder="Selecione repetição*"
|
||||
[(ngModel)]="postEvent.EventRecurrence.Type"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
||||
<!-- <mat-option
|
||||
<mat-option
|
||||
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
||||
>
|
||||
{{recurring.Description}}
|
||||
</mat-option> -->
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export class NewEventPage implements OnInit {
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public color: ThemePalette = 'primary';
|
||||
recurringTypes: any;
|
||||
recurringTypes = []
|
||||
selectedRecurringType: any;
|
||||
|
||||
@Input() profile:string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from '../localstore.service'
|
||||
import { SHA1 } from 'crypto-js'
|
||||
import { localstoreService } from '../localstore.service';
|
||||
import { SHA1 } from 'crypto-js';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -16,7 +16,7 @@ export class ChatUserService {
|
||||
|
||||
this.keyName = ('chat'+SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._userList = restore.userList || {}
|
||||
}, 10)
|
||||
|
||||
Reference in New Issue
Block a user