mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -11,6 +11,7 @@ import { JsonStore } from '../../services/jsonStore.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { NotificationsService } from '../../services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { synchro } from 'src/app/services/socket/synchro.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-profile',
|
||||
@@ -42,24 +43,35 @@ export class ProfilePage implements OnInit {
|
||||
private zone: NgZone,
|
||||
private notificationservice: NotificationsService,
|
||||
private platform: Platform,
|
||||
private notificationsService: NotificationsService,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
console.log(this.loggeduser.RoleDescription)
|
||||
|
||||
this.checkState()
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.getNotificationData();
|
||||
} else {
|
||||
this.getNotificationData();
|
||||
this.getNotificationData();
|
||||
}
|
||||
|
||||
this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
setTimeout(()=>{
|
||||
this.getNotificationData();
|
||||
}, 100)
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
@@ -68,7 +80,7 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
asyncNotification(){}
|
||||
|
||||
async getNotificationData(){
|
||||
async getNotificationData() {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
@@ -78,6 +90,8 @@ export class ProfilePage implements OnInit {
|
||||
value = JSON.parse(value)
|
||||
console.log("CSDfdvdf",value)
|
||||
}
|
||||
|
||||
this.DataArray = []
|
||||
value.forEach((element,i) => {
|
||||
console.log("ARaaAA", element)
|
||||
let notificationObject;
|
||||
@@ -213,18 +227,6 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
checkState() {
|
||||
|
||||
let userData = this.localstoreService.get('UserData', {})
|
||||
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
this.userLoginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async editProfile() {
|
||||
|
||||
const enterAnimation = (baseEl: any) => {
|
||||
|
||||
Reference in New Issue
Block a user