Callback add at home page

This commit is contained in:
Eudes Inácio
2021-08-25 16:36:33 +01:00
52 changed files with 177 additions and 177 deletions
+19 -1
View File
@@ -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;
+2 -1
View File
@@ -116,4 +116,5 @@ export class SynchroService {
export const connection = new SynchroService()
connection.setUrl()
connection.connect()
connection.connect()