add labels

This commit is contained in:
Peter Maquiran
2023-04-13 12:51:38 +01:00
parent 0660b44542
commit f8614029af
64 changed files with 1113 additions and 208 deletions
+41 -1
View File
@@ -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()
+22
View File
@@ -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()
+20 -1
View File
@@ -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()
+32 -2
View File
@@ -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()
+21
View File
@@ -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()
}
}