mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
add search
This commit is contained in:
@@ -59,7 +59,10 @@ export class DespachosPrPage implements OnInit {
|
||||
SessionStore = SessionStore
|
||||
environment = environment
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -99,8 +102,25 @@ export class DespachosPrPage implements OnInit {
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.LoadList()
|
||||
});
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
this.LoadList();
|
||||
|
||||
@@ -10,6 +10,43 @@
|
||||
<div class="title flex-1"><ion-label >Despachos</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
|
||||
<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">
|
||||
|
||||
|
||||
@@ -238,4 +238,26 @@ ion-item{
|
||||
|
||||
.label-deadline {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ export class DespachosPage implements OnInit {
|
||||
|
||||
despachoStore = DespachoStore;
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -51,8 +55,40 @@ export class DespachosPage implements OnInit {
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
|
||||
@@ -29,7 +29,9 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
skeletonLoader = true
|
||||
deplomasStore = DeplomasStore
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -56,6 +58,23 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,10 @@ export class DiplomasGerarPage implements OnInit {
|
||||
deplomasStore = DeplomasStore
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -56,7 +59,24 @@ export class DiplomasGerarPage implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ export class DiplomasPage implements OnInit, OnDestroy {
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
@@ -85,6 +88,23 @@ export class DiplomasPage implements OnInit, OnDestroy {
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async getTotalDocs(DocId: any) {
|
||||
|
||||
@@ -45,6 +45,9 @@ export class EventListPage implements OnInit {
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
showFilter = false
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
|
||||
@@ -36,6 +36,10 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
listToPresent= []
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -80,6 +84,23 @@ export class ExpedientePage implements OnInit {
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.LoadList();
|
||||
});
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
|
||||
@@ -36,6 +36,11 @@ export class ExpedientesPrPage implements OnInit {
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -68,6 +73,23 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
|
||||
@@ -43,6 +43,10 @@ export class PedidosPage implements OnInit {
|
||||
@Output() openExpedientDetail: EventEmitter<any> = new EventEmitter<any>();
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private processes: ProcessesService,
|
||||
@@ -90,6 +94,23 @@ export class PedidosPage implements OnInit {
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.getFromDb();
|
||||
});
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
@@ -41,6 +41,10 @@ export class PendentesPage implements OnInit {
|
||||
listToPresent = [];
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private alertService: AlertService,
|
||||
@@ -81,6 +85,23 @@ export class PendentesPage implements OnInit {
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -2,41 +2,82 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Despachos</ion-label></div>
|
||||
<div class="theicon">
|
||||
<div class="theicon d-flex">
|
||||
<!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button> -->
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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="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>
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -218,3 +218,27 @@ ion-item{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ 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 { TaskService } from 'src/app/services/task.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos',
|
||||
@@ -15,12 +16,16 @@ export class DespachosPage implements OnInit {
|
||||
despachoStore = DespachoStore;
|
||||
skeletonLoader = true;
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor (
|
||||
private router: Router,
|
||||
private despachoRule: DespachoService,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
public ThemeService: ThemeService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -48,6 +53,37 @@ export class DespachosPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
|
||||
goToDespacho({ SerialNumber } : customTask) {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,45 @@
|
||||
<div class="title width-100">
|
||||
<div class="title-container d-flex justify-space-between">
|
||||
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
|
||||
<div>
|
||||
<div class="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">
|
||||
|
||||
|
||||
@@ -230,3 +230,29 @@
|
||||
left: 50%;
|
||||
margin: -35px 0 0 -35px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventsService } from 'src/app/services/events.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-events-to-approve',
|
||||
@@ -37,6 +38,11 @@ export class EventsToApprovePage implements OnInit {
|
||||
environment = environment
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -46,7 +52,8 @@ export class EventsToApprovePage implements OnInit {
|
||||
private sortService: SortService,
|
||||
private storage: Storage,
|
||||
public eventService: EventsService,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
public ThemeService: ThemeService,
|
||||
)
|
||||
{}
|
||||
|
||||
@@ -75,6 +82,38 @@ export class EventsToApprovePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadToApproveEvents();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon" (click)="refreshing()">
|
||||
<div class="theicon d-flex" (click)="refreshing()">
|
||||
|
||||
<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">
|
||||
|
||||
|
||||
@@ -159,3 +159,29 @@ ion-item{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,11 @@ export class ExpedientesPrPage implements OnInit {
|
||||
loggeduser: LoginUserRespose;
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
@@ -60,6 +65,37 @@ export class ExpedientesPrPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
|
||||
this.openExpedientDetail.emit(data);
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
<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">
|
||||
|
||||
|
||||
@@ -159,3 +159,33 @@ ion-item{
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.search-input-container{
|
||||
background-color: white;
|
||||
border-radius: 27.5px;
|
||||
border: solid 1px #ebebeb;
|
||||
font-size: 14px;
|
||||
|
||||
input {
|
||||
padding: 0px !important;
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
.icon{
|
||||
color: #797979;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 25px;
|
||||
align-items: center;
|
||||
}
|
||||
.input-text{
|
||||
width: 100%;
|
||||
}
|
||||
.icon-z{
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,11 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
@@ -63,6 +67,36 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
segmentChanged() {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon btn-refresh">
|
||||
<div class="theicon btn-refresh 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">
|
||||
|
||||
|
||||
@@ -234,3 +234,28 @@ ion-item{
|
||||
left: 50%;
|
||||
margin: -35px 0 0 -35px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@ export class PedidosPage implements OnInit {
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
@@ -71,6 +76,37 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
|
||||
<div class="theicon">
|
||||
<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">
|
||||
|
||||
|
||||
@@ -221,3 +221,28 @@ ion-item{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-pendentes',
|
||||
@@ -27,13 +29,18 @@ export class PendentesPage implements OnInit {
|
||||
segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private router: Router,
|
||||
private sortService: SortService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
public TaskService: TaskService,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
}
|
||||
@@ -54,6 +61,36 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.TaskService.despachoStore.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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
async LoadList(){
|
||||
this.skeletonLoader = true;
|
||||
this.processes.GetPendingTasks(false).subscribe(async (pendentes) => {
|
||||
|
||||
@@ -61,6 +61,7 @@ export class DeplomasService {
|
||||
this._diplomasGerarList = restoreDiplomasGerarList.list || []
|
||||
this._diplomasGerarListCount = parseInt(restoreDiplomasGerarList.count) || 0
|
||||
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -131,6 +132,8 @@ export class DeplomasService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
resetDiplomasParaAssinar(value: any[]) {
|
||||
@@ -142,6 +145,8 @@ export class DeplomasService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
resetDiplomasReview(value: any[]) {
|
||||
@@ -152,6 +157,8 @@ export class DeplomasService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
resetDiplomaGerar(value: any[]) {
|
||||
@@ -163,6 +170,8 @@ export class DeplomasService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,47 +35,9 @@ export class DespachoStoreService {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._list = restore.list || []
|
||||
this._count = parseInt(restore.count) || 0
|
||||
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
|
||||
// this.Query().Update(
|
||||
// (select:customTask): boolean => select.Folio == 'Formação',
|
||||
// (update:customTask) => update.Folio = 'Formação 5'
|
||||
// )
|
||||
|
||||
// this.Query().Update(
|
||||
// (select:customTask): boolean => select.Folio == 'Formação',
|
||||
// (update:customTask) => {
|
||||
// update.Folio = 'Formação 7';
|
||||
// update.DocumentURL = 'peter';
|
||||
// }
|
||||
// )
|
||||
|
||||
// this.Query().Update(
|
||||
// (select:customTask): boolean => select.Folio == 'Formação',
|
||||
// (update:customTask): customTask => ({
|
||||
// CreateDate: '',
|
||||
// DocId: 0,
|
||||
// DocumentURL: '',
|
||||
// DocumentsQty: '',
|
||||
// FolderID: 0,
|
||||
// Folio:' ',
|
||||
// Remetente: '',
|
||||
// Senders: '',
|
||||
// SerialNumber: '',
|
||||
// Status: '',
|
||||
// WorkflowName: '',
|
||||
// activityInstanceName: ''
|
||||
// })
|
||||
// )
|
||||
|
||||
// this.Query().Delete(
|
||||
// (select: customTask): boolean => select.DocId == 3 && select.DocId >= 1
|
||||
// )
|
||||
|
||||
}, 5000)
|
||||
|
||||
}
|
||||
|
||||
@@ -141,6 +103,7 @@ export class DespachoStoreService {
|
||||
this._count = this._list.length
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
setTimeout(()=>{
|
||||
localstoreService.set(this.keyName,{
|
||||
list: this._list,
|
||||
|
||||
@@ -29,6 +29,7 @@ constructor() {
|
||||
setTimeout(()=>{
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._list = restore.list || []
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -71,6 +72,7 @@ private save() {
|
||||
})
|
||||
}, 10)
|
||||
|
||||
this.runCallback()
|
||||
this.updateNewCount()
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export class EventoaprovacaoStoreService {
|
||||
this._list = list || {}
|
||||
|
||||
this.updateCount();
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -78,6 +79,7 @@ export class EventoaprovacaoStoreService {
|
||||
this._list[segment] = []
|
||||
this._counts[segment] = 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
value = value.map( e => this.EventoApprovePipe.transform(e, e))
|
||||
@@ -92,6 +94,8 @@ export class EventoaprovacaoStoreService {
|
||||
list: this._list,
|
||||
counts: this._counts
|
||||
})
|
||||
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
if(window['all-process-gabinete']) {
|
||||
|
||||
@@ -32,6 +32,8 @@ export class ExpedientegdStoreService {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._list = restore.list || []
|
||||
this._count = parseInt(restore.count) || 0
|
||||
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -61,6 +63,8 @@ export class ExpedientegdStoreService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
private save() {
|
||||
|
||||
@@ -40,6 +40,8 @@ export class PedidosStoreService {
|
||||
this._listDeferimento = restoreParecer.listParecer || []
|
||||
this._countparecer = parseInt(restoreParecer.count) || 0
|
||||
this._countDeferiemnto = parseInt(restoreDeferimento.count) || 0
|
||||
|
||||
this.runCallback()
|
||||
|
||||
}, 10)
|
||||
|
||||
@@ -85,6 +87,8 @@ export class PedidosStoreService {
|
||||
|
||||
this.countparecer = this._listParecer.length
|
||||
this.saveDeferimento()
|
||||
|
||||
this.runCallback()
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
@@ -95,6 +99,7 @@ export class PedidosStoreService {
|
||||
|
||||
this.countdeferimento =this._listDeferimento.length
|
||||
this.saveParecer()
|
||||
this.runCallback()
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ export class PendestesStoreService {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._list = restore.list || []
|
||||
this._count = parseInt(restore.count) || 0
|
||||
|
||||
this.runCallback()
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -66,6 +68,8 @@ export class PendestesStoreService {
|
||||
if(window['all-process-gabinete']) {
|
||||
window['all-process-gabinete']()
|
||||
}
|
||||
|
||||
this.runCallback()
|
||||
}
|
||||
|
||||
private save() {
|
||||
|
||||
Reference in New Issue
Block a user