mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Notification on perfil menu
This commit is contained in:
@@ -30,20 +30,22 @@
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="notifications-content">
|
||||
<ion-label>2 novas notificações</ion-label>
|
||||
<ion-label>{{notificationdata.length}] novas notificações</ion-label>
|
||||
<ion-list>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none">
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
||||
*ngFor = "let item of notificationdata; let i = index">
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" src="assets/images/icons-default-agenda.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>08:00</p>
|
||||
<p>09:00</p>
|
||||
<ion-label>{{ item.dateInit }}</ion-label>
|
||||
<p>{{item.dateInit}}</p>
|
||||
<p>{{item.dateEnd}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p>Luanda | Palácio Presidencial</p>
|
||||
<h3>Almoço de Família</h3>
|
||||
<p>{{item.Location}}</p>
|
||||
<h3>{{item.alert}}</h3>
|
||||
</div>
|
||||
<div class="notification-label"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
@@ -7,6 +9,8 @@ import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
|
||||
import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { EditProfilePage } from './edit-profile/edit-profile.page';
|
||||
import { JsonStore } from '../../services/jsonStore.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -17,13 +21,17 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference = ''
|
||||
notificationdata:any[];
|
||||
DataArray: Array<String> = [];
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
constructor(private modalController: ModalController,
|
||||
private authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService
|
||||
) {
|
||||
private localstoreService: LocalstoreService,
|
||||
private jsonstore: JsonStore,
|
||||
private storageservice: StorageService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
@@ -32,19 +40,28 @@ export class ProfilePage implements OnInit {
|
||||
this.checkState()
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
|
||||
var data = JSON.parse(value);
|
||||
this.notificationdata = data
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
})
|
||||
console.log("Notificaaa", this.notificationdata)
|
||||
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented(){}
|
||||
notImplemented() { }
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
window.location.pathname = '/'
|
||||
location.reload();
|
||||
}, 1000)
|
||||
@@ -58,7 +75,7 @@ export class ProfilePage implements OnInit {
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
this.userLoginPreference = ''
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user