mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add filter
This commit is contained in:
@@ -21,6 +21,8 @@ import { ChangeProfileService } from './change-profile.service';
|
||||
import { PermissionService } from './permission.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { SortService } from './functions/sort.service';
|
||||
import { TracingType, XTracerAsync } from './monitoring/opentelemetry/tracer';
|
||||
import { EEventFilterStatus } from './Repositorys/Agenda/model/enums';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -311,7 +313,8 @@ export class TaskService {
|
||||
}
|
||||
|
||||
|
||||
async loadEventosParaAprovacao() {
|
||||
@XTracerAsync({name:'taskService/loadEventosParaAprovacao', log: false, bugPrint: true})
|
||||
async loadEventosParaAprovacao(tracing?: TracingType) {
|
||||
this.showLoaderNum++
|
||||
console.log('PR')
|
||||
// PR dont have event to approve
|
||||
@@ -328,8 +331,13 @@ export class TaskService {
|
||||
userId = calendar.OwnerUserId
|
||||
}
|
||||
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({userId})
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
|
||||
userId,
|
||||
status: EEventFilterStatus.Pending
|
||||
})
|
||||
|
||||
if(allEvents.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
let eventsList = []
|
||||
if(allEvents.value.length >= 1) {
|
||||
@@ -338,6 +346,9 @@ export class TaskService {
|
||||
} else {
|
||||
this.eventoaprovacaostore.save(userId, [])
|
||||
}
|
||||
} else {
|
||||
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user