mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user