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
@@ -4,36 +4,77 @@
<div class="thetitle">
<ion-label >{{ environment.dispatchPR}}</ion-label>
</div>
<div class="theicon">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<div class="theicon d-flex">
<mat-option value="Para hoje" >
Para hoje
</mat-option>
<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="Novos" >
Novos
</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="Lidos" >
Lidos
</mat-option>
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</div>
</div>
</div>
</div>
</div>
<mat-option value="Não lidos" >
Não lidos
</mat-option>
<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>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
<!-- <button title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -52,7 +93,7 @@
</ion-refresher>
<app-task-list
[taskList] = despachosprstore.list
[taskList] = list
[skeletonLoader] = skeletonLoader
(viewTaskDetail)="goToDespacho($event)"
[filterName]="filterName"
@@ -236,4 +236,29 @@ ion-item{
font-size: 45px;
float: right;
margin-right: 10px;
}
}
.search-input-container{
background-color: white;
border-radius: 27.5px;
border: solid 1px #ebebeb;
font-size: 14px;
.icon{
color: #797979;
width: 41px;
height: 41px;
display: flex;
justify-content: center;
font-size: 25px;
align-items: center;
}
.input-text{
width: 100%;
}
.icon-z{
width: 20px;
}
}
@@ -10,6 +10,8 @@ import { SortService } from 'src/app/services/functions/sort.service';
import { SessionStore } from 'src/app/store/session.service';
import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service'
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-despachos-pr',
@@ -25,6 +27,11 @@ export class DespachosPrPage implements OnInit {
despachosprstore = DespachosprStore;
environment = environment
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
//
showSearch = false
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
constructor (
private processes:ProcessesService,
@@ -32,6 +39,7 @@ constructor (
private router: Router,
private sortService: SortService,
public TaskService: TaskService,
public ThemeService: ThemeService,
) {
this.loggeduser = SessionStore.user;
@@ -52,17 +60,51 @@ constructor (
}
});
this.dynamicSearch();
}
async LoadList() {
this.skeletonLoader = true;
await this.TaskService.loadDiplomas()
this.dynamicSearch()
this.skeletonLoader = false;
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.despachosprstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.list = this.despachosprstore.list
}
}
openSearch() {
this.dynamicSearch()
}
async closeSearch() {
this.searchSubject = ''
this.dynamicSearch()
}
async basicSearch() {
this.dynamicSearch()
}
refreshing(){
setTimeout(() => {
this.LoadList();
@@ -7,7 +7,42 @@
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
<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>
<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">
<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">
@@ -58,7 +93,7 @@
</ion-refresher>
<app-task-list
[taskList] = TaskService.despachoStore.list
[taskList] = list
[skeletonLoader] = skeletonLoader
(viewTaskDetail)="goToDespacho($event)"
[filterName]="filterName"
@@ -1,7 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { customTask } from '../../../models/dailyworktask.model';
import { NavigationStart, Router } from '@angular/router';
import { DespachoStore } from 'src/app/store/despacho-store.service';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { TaskService } from 'src/app/services/task.service';
import { ThemeService } from 'src/app/services/theme.service'
@@ -13,7 +12,6 @@ import { ThemeService } from 'src/app/services/theme.service'
})
export class DespachosPage implements OnInit {
despachoStore = DespachoStore;
skeletonLoader = true;
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
showSearch = false
@@ -46,11 +44,14 @@ export class DespachosPage implements OnInit {
id: import.meta.url,
funx:() => {
const filter = this.TaskService.despachoStore.list.filter(task => this.TaskService.filter(task, this.filterName))
this.list = this.TaskService.despachoStore.list.filter(task => this.TaskService.filter(task, this.filterName))
}
})
this.dynamicSearch();
}
@@ -93,6 +94,7 @@ export class DespachosPage implements OnInit {
this.skeletonLoader = true;
await this.despachoRule.getList({updateStore: true})
this.dynamicSearch()
this.skeletonLoader = false;
}
@@ -2,36 +2,77 @@
<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">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<div class="theicon d-flex">
<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="Todos" >
Todos
</mat-option>
<mat-option value="OverdueTasks">
Em atraso
</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 title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -51,7 +92,7 @@
<div class="main-container width-100 overflow-y-auto height-100">
<div *ngIf="deplomasStore.diplomasParaAssinarList.length >= 1">
<div *ngIf="list.length >= 1">
<ion-list >
@@ -59,7 +100,7 @@
(click)="viewExpedientDetail(task.SerialNumber)" -->
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of deplomasStore.diplomasParaAssinarList"
*ngFor = "let task of list"
(click)="goToDiploma(task.SerialNumber)"
>
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -97,13 +138,13 @@
</div>
<div
*ngIf="!skeletonLoader && deplomasStore.diplomasParaAssinarList.length == 0"
*ngIf="!skeletonLoader && list.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && deplomasStore.diplomasParaAssinarList.length == 0">
<div *ngIf="skeletonLoader && list.length == 0">
<ion-list>
<ion-item>
@@ -21,7 +21,12 @@ export class DiplomasAssinarPage 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;
constructor(
private processes:ProcessesService,
@@ -45,8 +50,40 @@ export class DiplomasAssinarPage implements OnInit {
}
});
this.dynamicSearch()
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.list = this.deplomasStore.diplomasParaAssinarList
}
}
openSearch() {
this.dynamicSearch()
}
async closeSearch() {
this.searchSubject = ''
this.dynamicSearch()
}
async basicSearch() {
this.dynamicSearch()
}
goToDiploma(serialNumber:any){
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
}
@@ -2,39 +2,77 @@
<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">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName">
<div class="theicon d-flex">
<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 title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -55,11 +93,11 @@
<div class="main-container width-100 overflow-y-auto height-100" [ngSwitch]="segment">
<div *ngIf="deplomasStore.diplomasReviewList.length >= 1 && p.userPermission([p.permissionList.Gabinete.md_tasks])">
<div *ngIf="listDiplomasPorValidar.length >= 1 && p.userPermission([p.permissionList.Gabinete.md_tasks])">
<ion-list *ngSwitchCase="'validar'">
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of deplomasStore.diplomasReviewList"
*ngFor = "let task of listDiplomasPorValidar"
(click)="goToDiploma(task.SerialNumber)"
>
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
@@ -93,11 +131,11 @@
</ion-list>
</div>
<div *ngIf="deplomasStore.diplomasAssinadoList.length >= 1">
<div *ngIf="listDiplomasAssinadosPR.length >= 1">
<ion-list *ngSwitchCase="'assinados'">
<div
class=" ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of deplomasStore.diplomasAssinadoList"
*ngFor = "let task of listDiplomasAssinadosPR"
(click)="goToDiploma(task.SerialNumber)"
>
@@ -135,7 +173,7 @@
<div *ngSwitchCase="'validar'" class="centered-div" >
<div
*ngIf=" deplomasStore.diplomasReviewList.length == 0 && !skeletonLoader"
*ngIf=" listDiplomasPorValidar.length == 0 && !skeletonLoader"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -144,7 +182,7 @@
<div *ngSwitchCase="'assinados'" class="centered-div">
<div
*ngIf="deplomasStore.diplomasAssinadoList.length == 0 && !skeletonLoader"
*ngIf="listDiplomasAssinadosPR.length == 0 && !skeletonLoader"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
@@ -154,7 +192,7 @@
<div *ngSwitchCase="'validar'" >
<ion-list *ngIf="skeletonLoader && deplomasStore.diplomasReviewList.length == 0">
<ion-list *ngIf="skeletonLoader && listDiplomasPorValidar.length == 0">
<ion-list>
<ion-item>
<ion-thumbnail slot="end">
@@ -182,7 +220,7 @@
<div *ngSwitchCase="'assinados'" >
<ion-list *ngIf="skeletonLoader && deplomasStore.diplomasAssinadoList.length == 0">
<ion-list *ngIf="skeletonLoader && listDiplomasAssinadosPR.length == 0">
<ion-list>
<ion-item>
<ion-thumbnail slot="end">
@@ -29,6 +29,14 @@ export class DiplomasPage implements OnInit {
deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe()
showSearch = false
searchSubject = ''
listDiplomasPorValidar = []
listDiplomasAssinadosPR = []
hideSearchBtn: boolean = false;
constructor(
private processes:ProcessesService,
private router: Router,
@@ -53,8 +61,49 @@ export class DiplomasPage implements OnInit {
});
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.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.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
} else {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
}
}
openSearch() {
this.dynamicSearch()
}
async closeSearch() {
this.searchSubject = ''
this.dynamicSearch()
}
async basicSearch() {
this.dynamicSearch()
}
segmentChanged(ev: any) {
this.LoadList();
}
@@ -68,6 +117,8 @@ export class DiplomasPage implements OnInit {
await this.TaskService.loadDiplomas()
this.dynamicSearch()
this.showLoader = false;
this.skeletonLoader = false
}
@@ -6,36 +6,77 @@
<div class="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>
<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>
<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">
<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>
<mat-option value="OverdueTasks">
Em atraso
</mat-option>
<mat-option value="Todos" >
Todos
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
@@ -45,7 +86,7 @@
Minha agenda
</ion-segment-button> -->
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId">
<ion-segment-button *ngFor="let calendars of eventService.calendarNamesAry; let i index" [value]="i === 'Meu calendario' ? 'Meu calendario' : i.OwnerUserId" (ionChange)="dynamicSearch()">
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'">{{ environment.agendaPR }}</div>
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Ministro e Director do Gabinete do PR'"> environment.agendaVP </div>
@@ -69,7 +110,7 @@
<ion-list class="width-100" >
<div
class="item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor="let event of eventoaprovacaostore.get(segment)"
*ngFor="let event of list"
(click)="goToEventDetail(event)"
>
<div class="expediente" *ngIf="TaskService.filter(event, filterName)">
@@ -94,9 +135,9 @@
</ion-list>
</div>
<div *ngIf="eventoaprovacaostore.get(segment)" class="centered-div">
<div *ngIf="list" class="centered-div">
<div *ngIf="eventoaprovacaostore.get(segment).length == 0">
<div *ngIf="list.length == 0">
<div >
<div class="d-flex height-90 align-center justify-content-center"
>
@@ -39,10 +39,12 @@ export class EventsToApprovePage implements OnInit {
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
//
showSearch = false
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
constructor(
private processes:ProcessesService,
@@ -80,6 +82,7 @@ export class EventsToApprovePage implements OnInit {
}
});
this.dynamicSearch()
}
@@ -88,13 +91,13 @@ export class EventsToApprovePage implements OnInit {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.list = this.eventoaprovacaostore.get(this.segment).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.list = this.eventoaprovacaostore.get(this.segment)
}
}
@@ -138,6 +141,7 @@ export class EventsToApprovePage implements OnInit {
}
this.eventoaprovacaostore.save(segment, this.eventsList)
this.dynamicSearch()
} else {
@@ -153,6 +157,7 @@ export class EventsToApprovePage implements OnInit {
this.eventsList = this.eventsList
this.showLoader = false;
this.eventoaprovacaostore.save(segment, this.eventsList)
this.dynamicSearch()
}
this.showLoader = false;
@@ -5,37 +5,77 @@
<div class="theicon d-flex" (click)="refreshing()">
<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>
<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>
<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>
<!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -46,10 +86,10 @@
<div class="content width-100 overflow-y-auto height-100">
<ion-list *ngIf="expedienteGdStore.list.length >= 1">
<ion-list *ngIf="list.length >= 1">
<div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of expedienteGdStore.list"
*ngFor = "let task of list"
(click)="goToExpediente(task.SerialNumber)"
>
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
@@ -84,13 +124,13 @@
<div
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
*ngIf="!skeletonLoader && list.length == 0 && list.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && expedienteGdStore.list.length == 0">
<div *ngIf="skeletonLoader && list.length == 0">
<ion-list>
<ion-item>
@@ -63,6 +63,7 @@ export class ExpedientesPrPage implements OnInit {
}
});
this.dynamicSearch()
}
@@ -70,13 +71,13 @@ export class ExpedientesPrPage implements OnInit {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.list = this.expedienteGdStore.list.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.list = this.expedienteGdStore.list
}
}
@@ -113,6 +114,7 @@ export class ExpedientesPrPage implements OnInit {
this.expedienteGdStore.reset(this.taskslist);
this.skeletonLoader = false;
this.dynamicSearch()
}, (error) => {
this.skeletonLoader = false
@@ -4,38 +4,76 @@
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon d-flex">
<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>
<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">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
</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>
<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 title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -55,10 +93,10 @@
<div class="content width-100 overflow-y-auto height-100" >
<div >
<ion-list *ngIf="expedientegbstore.list.length >=0">
<ion-list *ngIf="list.length >=0">
<div
class=" item-hover 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)">
@@ -93,14 +131,14 @@
</div>
<div
*ngIf="!skeletonLoader && expedientegbstore.list.length == 0"
*ngIf="!skeletonLoader && list.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && expedientegbstore.list.length == 0">
<ion-list *ngIf="expedientegbstore.list.length == 0">
<div *ngIf="skeletonLoader && list.length == 0">
<ion-list *ngIf="list.length == 0">
<ion-item>
<ion-thumbnail slot="end">
<ion-skeleton-text animated></ion-skeleton-text>
@@ -65,20 +65,23 @@ export class ExpedientsPage implements OnInit {
}
});
this.dynamicSearch()
}
async dynamicSearch() {
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.list = this.expedientegbstore.list.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.list = this.expedientegbstore.list
}
}
@@ -121,6 +124,7 @@ export class ExpedientsPage implements OnInit {
})
this.expedientegbstore.reset(taskslist);
this.dynamicSearch()
}, (error) => {
this.skeletonLoader = false
// this.getEventsFromLocalDb();
@@ -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
@@ -5,36 +5,76 @@
<div class="theicon 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 title="Atualizar" class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> -->
@@ -52,7 +92,7 @@
</ion-refresher>
<app-task-list
[taskList] = pendentesstore.list
[taskList] = list
[skeletonLoader] = skeletonLoader
(viewTaskDetail)="viewTaskDetails($event)"
[filterName]="filterName"
@@ -59,6 +59,7 @@ export class PendentesPage implements OnInit {
});
this.dynamicSearch()
}
@@ -66,18 +67,17 @@ export class PendentesPage implements OnInit {
if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => {
this.list = this.pendentesstore.list.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.list = this.pendentesstore.list
}
}
openSearch() {
this.dynamicSearch()
}
@@ -111,6 +111,8 @@ export class PendentesPage implements OnInit {
this.storage.set('pendente-list',pendentesList).then(() => {
})
this.dynamicSearch()
}, (error) => {
this.skeletonLoader = false;