mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
add labels
This commit is contained in:
@@ -22,6 +22,13 @@ export class DeplomasService {
|
||||
private _diplomasGerarListCount = 0;
|
||||
private _diplomasListCount = 0;
|
||||
|
||||
|
||||
|
||||
diplomasAssinadoListNewCount = []
|
||||
diplomasReviewListNewCount = []
|
||||
diplomasGerarListNewCount = []
|
||||
diplomasParaAssinarNewCount = []
|
||||
|
||||
constructor() {
|
||||
this.keyNameDiplomasAssinado = (SHA1("DeplomasService"+"diplomasAssinado")).toString()
|
||||
this.keyNameDiplomasReview = (SHA1("DeplomasService"+"diplomasReview")).toString()
|
||||
@@ -150,6 +157,7 @@ export class DeplomasService {
|
||||
count: this._diplomasReviewCount,
|
||||
})
|
||||
}, 10)
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
private saveDiplomasAssinadoList() {
|
||||
@@ -159,7 +167,8 @@ export class DeplomasService {
|
||||
list: this._diplomasAssinadoList,
|
||||
count: this._diplomasAssinadoListCount,
|
||||
})
|
||||
}, 10)
|
||||
}, 10)
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
private saveDiplomasParaAssinar () {
|
||||
@@ -169,6 +178,7 @@ export class DeplomasService {
|
||||
count: this._diplomasListCount,
|
||||
})
|
||||
}, 10)
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
private savetDiplomaGerar() {
|
||||
@@ -178,8 +188,38 @@ export class DeplomasService {
|
||||
count: this._diplomasGerarListCount,
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
|
||||
updateNewCount() {
|
||||
this.diplomasAssinadoListNewCount = this._diplomasAssinadoList.filter((e) =>{
|
||||
return this.lessthen24Hours(e.TaskStartDate)
|
||||
})
|
||||
this.diplomasReviewListNewCount = this._diplomasReviewList.filter((e) =>{
|
||||
return this.lessthen24Hours(e.TaskStartDate)
|
||||
})
|
||||
this.diplomasGerarListNewCount = this._diplomasGerarList.filter((e) =>{
|
||||
return this.lessthen24Hours(e.TaskStartDate)
|
||||
})
|
||||
this.diplomasParaAssinarNewCount = this._diplomasParaAssinar.filter((e) =>{
|
||||
return this.lessthen24Hours(e.TaskStartDate)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
lessthen24Hours(isoDateString:string) {
|
||||
const creationDate = new Date(isoDateString)
|
||||
const creationDatePlus24h = new Date(creationDate)
|
||||
creationDatePlus24h.setHours((creationDate.getHours() + 24))
|
||||
const currentDate = new Date()
|
||||
|
||||
return creationDatePlus24h.getTime() > currentDate.getTime()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export let DeplomasStore = new DeplomasService()
|
||||
|
||||
Reference in New Issue
Block a user