This commit is contained in:
Peter Maquiran
2023-05-08 10:52:54 +01:00
parent 073f04e541
commit ef882e8ff1
24 changed files with 861 additions and 328 deletions
@@ -5,36 +5,76 @@
<div class="theicon btn-refresh d-flex">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<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">
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src='assets/images/icons-search.svg'></ion-icon>
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
</div>
<button title="Fechar" class="btn-no-color d-flex" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-35" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</button>
<mat-option value="Para hoje" >
Para hoje
</mat-option>
<div *ngIf="showSearch">
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch">
<!-- <div class="icon" (click)="basicSearch()">
<ion-icon class="icon-z" slot="end" name="search"></ion-icon>
</div> -->
<div class="input-text d-flex ion-align-items-center">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' (ngModelChange)="dynamicSearch()"
class="search-input text-black" type="search" placeholder="Pesquisar"></ion-input>
</div>
<!-- <div class="icon" (click)="clearSearchInput()">
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'default' "name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'doneIt' "name="restaurant-outline" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon title="Limpar" *ngIf="ThemeService.currentTheme == 'gov' " name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> -->
<div (click)="basicSearch()" class="d-flex align-center icon">
<mat-option value="Novos" >
Novos
</mat-option>
<mat-option value="Lidos" >
Lidos
</mat-option>
<mat-option value="Não lidos" >
Não lidos
</mat-option>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div>
</div>
</div>
</div>
</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" >
Para hoje
</mat-option>
<mat-option value="Novos" >
Novos
</mat-option>
<mat-option value="Lidos" >
Lidos
</mat-option>
<mat-option value="Não lidos" >
Não lidos
</mat-option>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
</div>
<!-- <button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -63,13 +103,13 @@
<div class="main-container width-100 overflow-y-auto height-100 px-20" [ngSwitch]="segment">
<div *ngIf="pedidosstore.listparecer.length >= 1">
<div *ngIf="listPedidosParecer.length >= 1">
<ion-list *ngSwitchCase="'parecer'">
<!-- *ngFor = "let task of pedidosstore.listparecer; let i = index"
<!-- *ngFor = "let task of listPedidosParecer; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)" -->
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of pedidosstore.listparecer"
*ngFor = "let task of listPedidosParecer"
(click)="goToPedido(task.SerialNumber)"
>
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -105,11 +145,11 @@
</ion-list>
</div>
<div *ngIf="pedidosstore.listdeferimento.length >= 1">
<div *ngIf="listPedidosDeferimento.length >= 1">
<ion-list *ngSwitchCase="'deferimento'">
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of pedidosstore.listdeferimento"
*ngFor = "let task of listPedidosDeferimento"
(click)="goToPedido(task.SerialNumber)"
>
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -147,7 +187,7 @@
<div *ngSwitchCase="'parecer'" class="centered-div" >
<div
*ngIf=" pedidosstore.listparecer.length == 0 && !skeletonLoader"
*ngIf=" listPedidosParecer.length == 0 && !skeletonLoader"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -156,7 +196,7 @@
<div *ngSwitchCase="'deferimento'" class="centered-div">
<div
*ngIf="pedidosstore.listdeferimento.length == 0 && !skeletonLoader"
*ngIf="listPedidosDeferimento.length == 0 && !skeletonLoader"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -165,7 +205,7 @@
<div *ngSwitchCase="'deferimento'" >
<ion-list *ngIf="skeletonLoader && pedidosstore.listdeferimento.length == 0">
<ion-list *ngIf="skeletonLoader && listPedidosDeferimento.length == 0">
<ion-item>
<ion-thumbnail slot="end">
<ion-skeleton-text animated></ion-skeleton-text>
@@ -191,7 +231,7 @@
<div *ngSwitchCase="'parecer'" >
<ion-list *ngIf="skeletonLoader && pedidosstore.listparecer.length == 0">
<ion-list *ngIf="skeletonLoader && listPedidosParecer.length == 0">
<ion-item>
<ion-thumbnail slot="end">
<ion-skeleton-text animated></ion-skeleton-text>
@@ -43,7 +43,8 @@ export class PedidosPage implements OnInit {
showSearch = false
searchSubject = ''
list = []
listPedidosParecer = []
listPedidosDeferimento = []
hideSearchBtn: boolean = false;
constructor(
@@ -74,6 +75,9 @@ export class PedidosPage implements OnInit {
}
});
this.dynamicSearch()
}
@@ -81,13 +85,24 @@ export class PedidosPage implements OnInit {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.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.listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.list = this.TaskService.AllProcess
this.listPedidosParecer = this.pedidosstore.listparecer
this.listPedidosDeferimento = this.pedidosstore.listdeferimento
}
}
@@ -129,6 +144,7 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false
}
let allParecer = parecer.concat(parecerPr).reverse();
this.parecerList = new Array();
@@ -142,6 +158,8 @@ export class PedidosPage implements OnInit {
this.pedidosstore.resetparecer(this.sortService.sortDate(this.parecerList, 'CreateDate'));
this.dynamicSearch()
}
else if(this.segment == 'deferimento') {
this.taskType = "Pedido de Deferimento";
@@ -159,6 +177,7 @@ export class PedidosPage implements OnInit {
this.pedidosstore.resetdeferimento(this.sortService.sortDate(this.deferimentoList, 'CreateDate'));
this.dynamicSearch()
},() => {
this.skeletonLoader = false