mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Change action click with wasTapped
This commit is contained in:
@@ -10,7 +10,7 @@ import { ExpedientePage } from '../pages/gabinete-digital/expediente/expediente.
|
||||
import { EventListPage } from '../pages/gabinete-digital/event-list/event-list.page';
|
||||
import { PublicationsPage } from '../pages/publications/publications.page'
|
||||
import { ViewPublicationsPage } from '../pages/publications/view-publications/view-publications.page' */
|
||||
import { ModalController, AlertController, AnimationController } from '@ionic/angular';
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
import { ViewEventPage } from '../pages/agenda/view-event/view-event.page';
|
||||
import { ExpedienteDetailPage } from '../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
|
||||
import { PublicationDetailPage } from '../pages/publications/publication-detail/publication-detail.page';
|
||||
@@ -26,12 +26,13 @@ export class NotificationsService {
|
||||
folderId: string;
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private fcm: FCM,
|
||||
private http: HttpClient,
|
||||
private fcm: FCM,
|
||||
private storageService: StorageService,
|
||||
private modalController: ModalController,
|
||||
private modalController: ModalController,
|
||||
public modalCtrl: AlertController,
|
||||
private animationController: AnimationController,/* ,
|
||||
private animationController: AnimationController,
|
||||
private platform: Platform/* ,
|
||||
public agenda: AgendaPage,
|
||||
public expediante: ExpedientePage,
|
||||
public eventList: EventListPage,
|
||||
@@ -45,7 +46,11 @@ export class NotificationsService {
|
||||
}
|
||||
|
||||
getAndpostToken(username) {
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
if(this.platform.is('desktop')) {
|
||||
console.log('Notifications not supported')
|
||||
} else {
|
||||
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
|
||||
return this.fcm.getToken().then(token => {
|
||||
console.log('token: ', token)
|
||||
@@ -69,10 +74,12 @@ export class NotificationsService {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async onReceviNotification(viewEventDetail,viewExpedientDetail,openApproveModal,viewPublications,viewPublicationDetail) {
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
async onReceviNotification(viewEventDetail, viewExpedientDetail, openApproveModal, viewPublications, viewPublicationDetail) {
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
if (data.click_action) {
|
||||
console.log("Received in background: ", data);
|
||||
|
||||
@@ -105,6 +112,13 @@ export class NotificationsService {
|
||||
});
|
||||
}
|
||||
|
||||
platformVerify() {
|
||||
|
||||
if (this.platform.is('cordova')) {
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId: any) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
@@ -124,17 +138,17 @@ export class NotificationsService {
|
||||
});
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber){
|
||||
async openApproveModal(eventSerialNumber) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 1024){
|
||||
if (window.innerWidth <= 1024) {
|
||||
classs = 'cal-modal modal modal-desktop'
|
||||
} else {
|
||||
} else {
|
||||
classs = 'gabinete-digital-mobile-modal-to-Desktop'
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps:{
|
||||
componentProps: {
|
||||
serialNumber: eventSerialNumber,
|
||||
},
|
||||
cssClass: 'event-list',
|
||||
@@ -153,7 +167,7 @@ export class NotificationsService {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
console.log(serialNumber);
|
||||
console.log(serialNumber);
|
||||
console.log('expediante 2')
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedienteDetailPage,
|
||||
@@ -183,7 +197,7 @@ export class NotificationsService {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -225,5 +239,5 @@ export class NotificationsService {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user