mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { AES, enc, SHA1 } from 'crypto-js'
|
||||
import { isArray } from 'ionic-angular/umd/util/util';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -24,8 +25,8 @@ export class EventoaprovacaoStoreService {
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
let restoreMd = localstoreService.get(this.keyNamemd, {})
|
||||
let restorePr = localstoreService.get(this.keyNamepr, {})
|
||||
let restoreMd = localstoreService.get(this.keyNamemd, [])
|
||||
let restorePr = localstoreService.get(this.keyNamepr, [])
|
||||
|
||||
this._listPr = restorePr.listPr || []
|
||||
this._listMd = restoreMd.lisMd || []
|
||||
@@ -36,8 +37,8 @@ export class EventoaprovacaoStoreService {
|
||||
|
||||
}
|
||||
|
||||
get listpr() { return this._listPr }
|
||||
get listmd() { return this._listMd }
|
||||
get listpr() { return this._listPr || [] }
|
||||
get listmd() { return this._listMd || [] }
|
||||
|
||||
get count() { return this._count || 0 }
|
||||
set count(value: number) {
|
||||
@@ -55,20 +56,24 @@ export class EventoaprovacaoStoreService {
|
||||
}
|
||||
|
||||
resetpr(eventsList: any) {
|
||||
this._listPr = eventsList
|
||||
if(Array.isArray(eventsList)) {
|
||||
this._listPr = eventsList
|
||||
|
||||
this.countPr = this._listPr.length
|
||||
this.count = this.countPr + this.countMd
|
||||
this.countPr = this._listPr.length
|
||||
this.count = this.countPr + this.countMd
|
||||
|
||||
this.savePr()
|
||||
this.savePr()
|
||||
}
|
||||
}
|
||||
|
||||
resetmd(eventsList: any) {
|
||||
this._listMd = eventsList
|
||||
if(Array.isArray(eventsList)) {
|
||||
this._listMd = eventsList
|
||||
|
||||
this.countMd = this._listMd.length
|
||||
this.count = this.countPr + this.countMd
|
||||
this.saveMd()
|
||||
this.countMd = this._listMd.length
|
||||
this.count = this.countPr + this.countMd
|
||||
this.saveMd()
|
||||
}
|
||||
}
|
||||
|
||||
private saveMd() {
|
||||
|
||||
@@ -149,6 +149,35 @@ class SessionService {
|
||||
return initials;
|
||||
}
|
||||
|
||||
|
||||
clearPermission() {
|
||||
this.permission = {
|
||||
Agenda: {
|
||||
access: false
|
||||
},
|
||||
Gabinete: {
|
||||
access: false,
|
||||
pr_tasks: false,
|
||||
md_tasks: false,
|
||||
aprove_event: false
|
||||
},
|
||||
Actions: {
|
||||
access : false,
|
||||
create : false,
|
||||
delete : false,
|
||||
edit : false,
|
||||
createPost : false,
|
||||
deletePost : false,
|
||||
editPost : false
|
||||
},
|
||||
Chat: {
|
||||
access: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setPermission() {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user