This commit is contained in:
Peter Maquiran
2023-05-23 11:56:12 +01:00
parent 181a9dbd76
commit 033a6c331c
49 changed files with 832 additions and 278 deletions
@@ -81,17 +81,19 @@ export class EventListPage implements OnInit {
}
async LoadToApproveEvents() {
if(SessionStore.user.Profile == 'PR') {
return false
}
this.showLoader = true;
const segment: any = this.segment
if(this.segment == 'Meu calendario') {
// color
if(SessionStore.user.Profile == 'PR') {
this.color = 'pr'
} else {
this.color = 'mdgpr'
}
this.color = 'mdgpr'
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
try {
@@ -3,7 +3,7 @@
<div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -40,6 +40,18 @@
</div>
</div>
</div>
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -27,6 +27,7 @@ export class AllProcessesPage implements OnInit {
})
AllProcess = []
ordinance: string = 'old'
constructor(
private router: Router,
@@ -71,30 +72,40 @@ export class AllProcessesPage implements OnInit {
}
openSearch() {
this.dynamicSearch()
// this.dynamicSearch()
}
async closeSearch() {
this.searchSubject = ''
this.dynamicSearch()
// this.dynamicSearch()
}
async basicSearch() {
this.dynamicSearch()
// this.dynamicSearch()
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.AllProcess = this.TaskService.AllProcess.filter((task) => {
const AllProcess = this.TaskService.AllProcess.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.AllProcess = this.TaskService.AllProcess
}
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
} else {
const AllProcess = this.TaskService.AllProcess
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
}
checkFilter() {
@@ -4,7 +4,7 @@
<div class="thetitle">
<ion-label >{{ environment.dispatchPR}}</ion-label>
</div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center ">
<!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
@@ -35,6 +35,17 @@
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -32,6 +32,7 @@ export class DespachosPrPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor (
private processes:ProcessesService,
@@ -74,18 +75,27 @@ constructor (
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.despachosprstore.list.filter((task) => {
const list = this.despachosprstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.despachosprstore.list
const list = this.despachosprstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Despachos</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -37,6 +37,18 @@
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -18,6 +18,7 @@ export class DespachosPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor (
private router: Router,
@@ -54,18 +55,28 @@ export class DespachosPage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
const list = this.TaskService.despachoStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.TaskService.AllProcess
const list = this.TaskService.despachoStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -34,6 +34,17 @@
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -26,7 +26,8 @@ export class DiplomasAssinarPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes:ProcessesService,
@@ -54,18 +55,28 @@ export class DiplomasAssinarPage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
const list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.deplomasStore.diplomasParaAssinarList
const list = this.deplomasStore.diplomasParaAssinarList
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
@@ -2,7 +2,19 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Diplomas por gerar</ion-label></div>
<div class="theicon">
<div class="theicon d-flex align-center">
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -59,7 +71,7 @@
<ion-list >
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of deplomasStore.DiplomaGerarList"
*ngFor = "let task of list"
(click)="goToDiploma(task.SerialNumber)"
>
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
@@ -22,7 +22,12 @@ export class DiplomasGerarPage implements OnInit {
deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe()
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
//
showSearch = false
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes:ProcessesService,
@@ -35,6 +40,7 @@ export class DiplomasGerarPage implements OnInit {
ngOnInit() {
this.LoadList()
this.dynamicSearch()
}
@@ -65,4 +71,34 @@ export class DiplomasGerarPage implements OnInit {
this.skeletonLoader = false;
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
const list = this.deplomasStore.DiplomaGerarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
const list = this.deplomasStore.DiplomaGerarList
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -32,6 +32,17 @@
</div>
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
@@ -35,7 +35,7 @@ export class DiplomasPage implements OnInit {
listDiplomasPorValidar = []
listDiplomasAssinadosPR = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes:ProcessesService,
@@ -65,27 +65,42 @@ export class DiplomasPage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => {
const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
} else {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
}
}
@@ -3,7 +3,7 @@
<div class="title width-100">
<div class="title-container d-flex justify-space-between">
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
<div class="d-flex">
<div class="d-flex align-center">
<!-- <div>
@@ -36,6 +36,17 @@
</div>
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
@@ -44,7 +44,7 @@ export class EventsToApprovePage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes:ProcessesService,
@@ -86,7 +86,15 @@ export class EventsToApprovePage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
// this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
@@ -125,13 +133,14 @@ export class EventsToApprovePage implements OnInit {
this.showLoader = true;
const segment = this.segment
if(SessionStore.user.Profile == 'PR') {
return false
}
if(this.segment == 'Meu calendario') {
// color
if(SessionStore.user.Profile == 'PR') {
this.color = 'pr'
} else {
this.color = 'mdgpr'
}
this.color = 'mdgpr'
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
try {
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon d-flex" (click)="refreshing()">
<div class="theicon d-flex align-center" (click)="refreshing()">
<!-- <div>
@@ -35,6 +35,17 @@
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -32,6 +32,7 @@ export class ExpedientesPrPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
@@ -67,17 +68,28 @@ export class ExpedientesPrPage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.expedienteGdStore.list.filter((task) => {
const list = this.expedienteGdStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.expedienteGdStore.list
const list = this.expedienteGdStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<!--
<div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
@@ -35,6 +35,18 @@
</div>
</div>
-->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -29,6 +29,7 @@ export class ExpedientsPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes: ProcessesService,
@@ -71,17 +72,30 @@ export class ExpedientsPage implements OnInit {
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.expedientegbstore.list.filter((task) => {
const list = this.expedientegbstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.expedientegbstore.list
const list = this.expedientegbstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon btn-refresh d-flex">
<div class="theicon btn-refresh d-flex align-center">
<!-- <div>
@@ -36,6 +36,17 @@
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
@@ -46,6 +46,7 @@ export class PedidosPage implements OnInit {
listPedidosParecer = []
listPedidosDeferimento = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private router: Router,
@@ -81,28 +82,38 @@ export class PedidosPage implements OnInit {
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.listPedidosParecer = this.pedidosstore.listparecer.filter((task) => {
const listPedidosParecer = this.pedidosstore.listparecer.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, listPedidosParecer)
this.listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
const listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, listPedidosDeferimento)
} else {
this.listPedidosParecer = this.pedidosstore.listparecer
this.listPedidosDeferimento = this.pedidosstore.listdeferimento
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listparecer)
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listdeferimento)
}
}
@@ -145,7 +156,7 @@ export class PedidosPage implements OnInit {
}
let allParecer = parecer.concat(parecerPr).reverse();
let allParecer = parecer.concat(parecerPr)
this.parecerList = new Array();
@@ -168,7 +179,7 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
this.deferimentoList = new Array();
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active")
res.forEach(element => {
let task: customTask = this.customTaskPipe.transform(element);
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title">
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
<div class="theicon d-flex">
<div class="theicon d-flex align-center">
<!-- <div>
@@ -34,6 +34,17 @@
</div>
</div>
</div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
@@ -33,6 +33,7 @@ export class PendentesPage implements OnInit {
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor(
private processes:ProcessesService,
@@ -62,18 +63,29 @@ export class PendentesPage implements OnInit {
this.dynamicSearch()
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.pendentesstore.list.filter((task) => {
const list = this.pendentesstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
this.list = this.pendentesstore.list
const list = this.pendentesstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}