remove limites

This commit is contained in:
Peter Maquiran
2023-06-10 14:17:41 +01:00
parent de531bc550
commit 04b5373eaa
10 changed files with 146 additions and 17 deletions
+7 -5
View File
@@ -155,16 +155,18 @@
</div>
<div class="content overflow-y-auto flex-grow-1 height-100">
<ion-list>
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente"
(click)="goToExpediente(task.SerialNumber)">
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of AllProcess"
(click)="TaskService.goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName || task.workflowDisplayName || task.workflowName, task.activityInstanceName)">
<div class="item-exp d-flex">
<div class="schedule-date">
<div class="time-end">{{task.TaskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.TaskStartDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details pointer">
<div class="description">{{ task.Subject }}</div>
<div class="location">{{ task.Senders }}</div>
<div class="description">{{task.Folio || task.Subject || task.workflowInstanceDataFields.Subject }}</div>
<div class="location" *ngIf="task.Senders">{{ task.Senders }}</div>
<div class="location" *ngIf="task.workflowInstanceDataFields">{{task.workflowInstanceDataFields.Sender }}</div>
<!-- <div class="location" *ngIf="!task.Senders && !task.workflowInstanceDataFields">{{task.workflowInstanceDataFields.Sender }}</div> -->
</div>
</div>
</ion-item>
@@ -275,7 +277,7 @@
</div>
<div class="content overflow-y-auto flex-grow-1 height-100">
<ion-list>
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of listToPresentexpediente"
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of AllProcess"
(click)="goToExpediente(task.SerialNumber)">
<div class="item-exp d-flex">
<div class="schedule-date">
+4
View File
@@ -201,6 +201,7 @@ ion-toolbar{
color: var(--subtitle-text-color);
font-size: 16px;
margin: 0 auto;
min-height: 19px;
}
.div-botton-middle{
width: 75%;
@@ -445,10 +446,13 @@ ion-toolbar{
flex-wrap: wrap;
align-items: center;
width: 78%;
min-height: 39px;
align-items: baseline;
.location{
font-family: Roboto;
font-size: 15px;
color: black;
min-height: 19px;
width: 100%;
}
+42
View File
@@ -68,6 +68,13 @@ export class EventsPage implements OnInit {
showCorrespondenciasLoader = false
loadingAllTask = false
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Não lidos'
showSearch = true;
searchSubject: string = '';
AllProcess = []
ordinance: string = 'old'
constructor(
private eventService: EventsService,
private router: Router,
@@ -102,6 +109,13 @@ export class EventsPage implements OnInit {
this.listToPresentexpediente = []
})
this.TaskService.registerCallback({
id: import.meta.url,
funx:() => {
this.dynamicSearch()
}
})
}
ngOnInit() {
@@ -128,6 +142,34 @@ export class EventsPage implements OnInit {
}
async dynamicSearch() {
const ordinance = this.ordinance
if(this.showSearch && this.searchSubject) {
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())
}).filter( task => this.TaskService.filter(task, this.filterName))
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
} else {
const AllProcess = this.TaskService.AllProcess
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
}
}
}
async loadAllTask() {
this.loadingAllTask = true
await this.TaskService.LoadTask()
@@ -212,17 +212,19 @@ export class GabineteDigitalPage implements OnInit {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
}).filter( task => this.TaskService.filter(task, this.filterName))
})
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
}
} else {
const AllProcess = this.TaskService.AllProcess
const AllProcess = this.TaskService.AllProcess.filter( task => this.TaskService.filter(task, this.filterName))
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
.filter( task => this.TaskService.filter(task, this.filterName))
}
}