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:
@@ -10,8 +10,21 @@
|
||||
<div class="header-title">
|
||||
<label>Expediente <span class="lowercase" *ngIf="filterName != 'Todos' ">{{ filterName }}</span></label>
|
||||
</div>
|
||||
<div class="btn-refresh">
|
||||
<!-- <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<div class="btn-refresh 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">
|
||||
|
||||
<mat-option value="Para hoje" >
|
||||
@@ -41,7 +54,8 @@
|
||||
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
|
||||
</mat-form-field>
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
@@ -62,7 +76,7 @@
|
||||
<ion-list>
|
||||
<div
|
||||
class=" ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of expedientegbstore.list"
|
||||
*ngFor = "let task of list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
|
||||
|
||||
@@ -39,6 +39,7 @@ export class ExpedientePage implements OnInit {
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
constructor(
|
||||
@@ -88,17 +89,29 @@ export class ExpedientePage 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 searchedList = 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, searchedList)
|
||||
} else {
|
||||
this.list = this.TaskService.AllProcess
|
||||
|
||||
const list = this.expedientegbstore.list
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -122,7 +135,7 @@ export class ExpedientePage implements OnInit {
|
||||
this.taskslist = this.taskslist.filter(function(item) {
|
||||
return item.activityInstanceName != 'Retificar Expediente'
|
||||
})
|
||||
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate')
|
||||
this.listToPresent = this.sortService.sortDate(this.taskslist, 'TaskStartDate').reverse()
|
||||
|
||||
this.expedientegbstore.reset(this.listToPresent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user