mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -7,7 +7,17 @@
|
||||
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<div class="theicon btn-refresh d-flex align-center">
|
||||
|
||||
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
|
||||
|
||||
<ion-icon class="mr-10" 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" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -57,8 +67,9 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<app-task-list class="height-100"
|
||||
[taskList] = pendentesstore.list
|
||||
[taskList] = list
|
||||
[skeletonLoader] = skeletonLoader
|
||||
(viewTaskDetail)="viewTaskDetails($event)"
|
||||
> </app-task-list>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-pendentes',
|
||||
@@ -44,6 +45,7 @@ export class PendentesPage implements OnInit {
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -57,7 +59,8 @@ export class PendentesPage implements OnInit {
|
||||
private sortService: SortService,
|
||||
private storage: Storage,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
public ThemeService: ThemeService,
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.profile = 'mdgpr';
|
||||
@@ -89,17 +92,27 @@ export class PendentesPage 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.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.TaskService.AllProcess
|
||||
const list = this.pendentesstore.list
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user