mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +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()
|
||||
|
||||
@@ -17,6 +17,8 @@ export class DespachoStoreService {
|
||||
|
||||
ObjectQueryService = new ObjectQueryService()
|
||||
|
||||
newList = []
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = (SHA1("DespachoStoreService"+ 'home/eventSource')).toString()
|
||||
@@ -128,8 +130,28 @@ export class DespachoStoreService {
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
|
||||
updateNewCount() {
|
||||
this.newList = this._list.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 const DespachoStore = new DespachoStoreService()
|
||||
|
||||
@@ -8,9 +8,10 @@ import { AES, enc, SHA1 } from 'crypto-js'
|
||||
export class DespachosprStoreService {
|
||||
|
||||
// main data
|
||||
private _list: [] = []
|
||||
private _list = []
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
newList = [];
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -50,6 +51,24 @@ private save() {
|
||||
list: this._list
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
updateNewCount() {
|
||||
this.newList = this._list.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()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ export class ExpedientegdStoreService {
|
||||
private keyName: string;
|
||||
private _count = 0
|
||||
|
||||
newList = []
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = (SHA1("EventoaprovacaoStoreService")).toString()
|
||||
@@ -49,9 +51,27 @@ export class ExpedientegdStoreService {
|
||||
count: this._count
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewList()
|
||||
|
||||
}
|
||||
|
||||
updateNewList() {
|
||||
this.newList = this._list.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 const ExpedienteGdStore = new ExpedientegdStoreService()
|
||||
@@ -7,13 +7,17 @@ import { AES, enc, SHA1 } from 'crypto-js'
|
||||
})
|
||||
export class PedidosStoreService {
|
||||
|
||||
private _listParecer: Event[] = []
|
||||
private _listDeferimento: Event[] = []
|
||||
private _listParecer = []
|
||||
private _listDeferimento = []
|
||||
// local storage keyName
|
||||
private keyNameparecer: string;
|
||||
private keyNamedeferiemnto: string;
|
||||
private _countparecer = 0
|
||||
private _countDeferiemnto = 0
|
||||
|
||||
|
||||
listParecerCount: Event[] = []
|
||||
listDeferimentoCount: Event[] = []
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -84,6 +88,8 @@ export class PedidosStoreService {
|
||||
count: this._countparecer,
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
|
||||
}
|
||||
|
||||
@@ -94,9 +100,33 @@ export class PedidosStoreService {
|
||||
count: this._countDeferiemnto,
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
updateNewCount() {
|
||||
this.listParecerCount = this._listParecer.filter((e) =>{
|
||||
return this.lessthen24Hours(e.TaskStartDate)
|
||||
})
|
||||
this.listDeferimentoCount = this._listDeferimento.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 const PedidosStore = new PedidosStoreService()
|
||||
|
||||
@@ -13,6 +13,8 @@ export class PendestesStoreService {
|
||||
private keyName: string;
|
||||
private _count = 0
|
||||
|
||||
newList = []
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = (SHA1("PendestesStoreService")).toString()
|
||||
@@ -55,6 +57,25 @@ export class PendestesStoreService {
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
|
||||
|
||||
updateNewCount() {
|
||||
this.newList = this._list.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()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user