This commit is contained in:
Peter Maquiran
2023-05-23 11:56:12 +01:00
parent 181a9dbd76
commit 033a6c331c
49 changed files with 832 additions and 278 deletions
@@ -8,7 +8,17 @@
<div class="thetitle"> <div class="thetitle">
<ion-label >{{environment.dispatchPR }}</ion-label> <ion-label >{{environment.dispatchPR }}</ion-label>
</div> </div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -61,11 +71,12 @@
<div class="main-content width-100 overflow-y-auto height-100"> <div class="main-content width-100 overflow-y-auto height-100">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div > <div >
<ion-list> <ion-list>
<div <div
class="ion-no-padding ion-no-margin cursor-pointer" class="ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of despachoprstore.list; let i = index" *ngFor = "let task of list; let i = index"
(click)="goToDespachoPr(task.SerialNumber)" (click)="goToDespachoPr(task.SerialNumber)"
> >
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" --> <!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
@@ -63,6 +63,8 @@ export class DespachosPrPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
private modalController: ModalController, private modalController: ModalController,
@@ -106,18 +108,28 @@ export class DespachosPrPage implements OnInit {
this.dynamicSearch() this.dynamicSearch()
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const searchedList =this.TaskService.despachoprstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
} else { } else {
this.list = this.TaskService.AllProcess
const list = this.TaskService.despachoprstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -8,7 +8,17 @@
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss> <app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
<div class="title flex-1"><ion-label >Despachos</ion-label></div> <div class="title flex-1"><ion-label >Despachos</ion-label></div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
@@ -60,6 +70,7 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<div > <div >
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="height-100"> <div class="height-100">
@@ -23,6 +23,7 @@ export class DespachosPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private router: Router, private router: Router,
@@ -63,13 +64,16 @@ export class DespachosPage implements OnInit {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const searchedList = this.TaskService.despachoStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.despachoStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -87,6 +91,12 @@ export class DespachosPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async refreshing() { async refreshing() {
@@ -7,7 +7,14 @@
<div class="title"> <div class="title">
<app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss> <app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss>
<div class="thetitle"><ion-label >Diplomas</ion-label></div> <div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -27,8 +34,6 @@
Não lidos Não lidos
</mat-option> </mat-option>
<mat-option value="OverdueTasks"> <mat-option value="OverdueTasks">
Em atraso Em atraso
</mat-option> </mat-option>
@@ -60,6 +65,7 @@
</ion-refresher> </ion-refresher>
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="width-100" *ngIf="deplomasStore.diplomasParaAssinarList"> <div class="width-100" *ngIf="deplomasStore.diplomasParaAssinarList">
<div *ngIf="deplomasStore.diplomasParaAssinarList"> <div *ngIf="deplomasStore.diplomasParaAssinarList">
@@ -32,6 +32,7 @@ export class DiplomasAssinarPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'recent'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -61,18 +62,28 @@ export class DiplomasAssinarPage implements OnInit {
this.dynamicSearch() this.dynamicSearch()
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const list = this.TaskService.despachoStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.TaskService.AllProcess
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -31,6 +31,32 @@
</ion-refresher> </ion-refresher>
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="d-flex ion-justify-content-between ion-align-items-center" style="
width: 300px;
margin: 0px auto;
">
<div class="d-flex sort-by ion-justify-content-center">
<p>
<span class="order">Order por:</span>
<span *ngIf="ordinance == 'recent'" class="order-labal">Mais Recentes</span>
<span *ngIf="ordinance == 'old'" class="order-labal">Mais Antigos</span>
</p>
</div>
<div>
<div *ngIf="ordinance == 'old'" (click)="reorderList('recent')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-up.svg"></ion-icon>
</div>
<div *ngIf="ordinance == 'recent'" (click)="reorderList('old')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-down.svg"></ion-icon>
</div>
</div>
</div>
<div class="width-100" *ngIf="deplomasStore.DiplomaGerarList.length >= 1"> <div class="width-100" *ngIf="deplomasStore.DiplomaGerarList.length >= 1">
<div *ngIf="deplomasStore.DiplomaGerarList"> <div *ngIf="deplomasStore.DiplomaGerarList">
@@ -33,6 +33,7 @@ export class DiplomasGerarPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -62,18 +63,28 @@ export class DiplomasGerarPage implements OnInit {
this.dynamicSearch() this.dynamicSearch()
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const list = this.deplomasStore.DiplomaGerarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.deplomasStore.DiplomaGerarList
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -3,8 +3,9 @@
<ion-refresher-content></ion-refresher-content> <ion-refresher-content></ion-refresher-content>
</ion-refresher> </ion-refresher>
<div class="title"> <div class="title">
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
<div class="thetitle"><ion-label >Diplomas</ion-label></div> <div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <div> <!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex"> <div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -36,6 +37,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -91,6 +103,7 @@
<div class="main-content width-100 overflow-y-auto height-100"> <div class="main-content width-100 overflow-y-auto height-100">
<div class="width-100" [ngSwitch]="segment"> <div class="width-100" [ngSwitch]="segment">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])"> <div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">
@@ -31,9 +31,10 @@ export class DiplomasPage implements OnInit, OnDestroy {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
listDiplomasPorValidar = [] listDiplomasPorValidar = [];
listDiplomasAssinadosPR = [] listDiplomasAssinadosPR = [];
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old';
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
@@ -105,26 +106,42 @@ export class DiplomasPage implements OnInit, OnDestroy {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => { const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => { this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
} else { } else {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
} }
} }
@@ -10,7 +10,19 @@
<div class="header-title"> <div class="header-title">
<label>Eventos para Aprovação</label> <label>Eventos para Aprovação</label>
</div> </div>
<div style="float:right" *ngIf="showFilter"> <div style="float:right" *ngIf="showFilter" class="d-flex align-center">
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -48,6 +48,8 @@ export class EventListPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
private modalController: ModalController, private modalController: ModalController,
@@ -105,6 +107,14 @@ export class EventListPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
// this.dynamicSearch();
}
getEventToAproveFromDB() { getEventToAproveFromDB() {
@@ -10,8 +10,21 @@
<div class="header-title"> <div class="header-title">
<label>Expediente <span class="lowercase" *ngIf="filterName != 'Todos' ">{{ filterName }}</span></label> <label>Expediente <span class="lowercase" *ngIf="filterName != 'Todos' ">{{ filterName }}</span></label>
</div> </div>
<div class="btn-refresh"> <div class="btn-refresh d-flex align-center">
<!-- <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
<mat-option value="Para hoje" > <mat-option value="Para hoje" >
@@ -41,7 +54,8 @@
</mat-select> </mat-select>
</mat-form-field> -->
</mat-form-field>
<button class="btn-no-color" (click)="doRefresh($event)"> <button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon> <ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> </button>
@@ -62,7 +76,7 @@
<ion-list> <ion-list>
<div <div
class=" ion-no-padding ion-no-margin cursor-pointer" class=" ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of expedientegbstore.list" *ngFor = "let task of list"
(click)="goToExpediente(task.SerialNumber)" (click)="goToExpediente(task.SerialNumber)"
> >
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)"> <div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
@@ -39,6 +39,7 @@ export class ExpedientePage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos' filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
constructor( constructor(
@@ -88,17 +89,29 @@ export class ExpedientePage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const searchedList = this.expedientegbstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, searchedList)
} else { } else {
this.list = this.TaskService.AllProcess
const list = this.expedientegbstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -122,7 +135,7 @@ export class ExpedientePage implements OnInit {
this.taskslist = this.taskslist.filter(function(item) { this.taskslist = this.taskslist.filter(function(item) {
return item.activityInstanceName != 'Retificar Expediente' return item.activityInstanceName != 'Retificar Expediente'
}) })
this.listToPresent = this.sortService.sortDate(this.taskslist, 'taskStartDate') this.listToPresent = this.sortService.sortDate(this.taskslist, 'TaskStartDate').reverse()
this.expedientegbstore.reset(this.listToPresent); this.expedientegbstore.reset(this.listToPresent);
@@ -8,7 +8,17 @@
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div> <div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -40,6 +40,7 @@ export class ExpedientesPrPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -77,17 +78,26 @@ export class ExpedientesPrPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const list = this.expedienteGdStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.expedienteGdStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -11,9 +11,10 @@
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1"> <div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
<ion-progress-bar type="indeterminate" *ngIf="TaskService.showLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="TaskService.showLoader"></ion-progress-bar>
<div class="title-container"> <div class="title-container">
<div class="title"> <div class="title d-flex justify-center">
<ion-label *ngIf="hideRefreshBtn">Gabinete Digital</ion-label> <ion-label *ngIf="hideRefreshBtn">Gabinete Digital</ion-label>
<mat-form-field *ngIf="!hideRefreshBtn && segmentVista == 'listview' " class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <div class="d-flex align-center cursor" *ngIf="!hideRefreshBtn && segmentVista == 'listview' ">
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
<mat-option value="Para hoje" > <mat-option value="Para hoje" >
@@ -42,6 +43,17 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' && !hideRefreshBtn ">
<ion-icon class="ml-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' && !hideRefreshBtn ">
<ion-icon class="ml-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
</div> </div>
<button title="Atualizar" *ngIf="hideRefreshBtn && TaskService.loadCount" class="btn-no-color btn-refresh" (click)="doRefresh($event)"> <button title="Atualizar" *ngIf="hideRefreshBtn && TaskService.loadCount" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon> <ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
@@ -100,6 +100,7 @@ export class GabineteDigitalPage implements OnInit {
showSearch = true; showSearch = true;
searchSubject: string = ''; searchSubject: string = '';
AllProcess = [] AllProcess = []
ordinance: string = 'old'
constructor( constructor(
private processesbackend: ProcessesService, private processesbackend: ProcessesService,
@@ -120,12 +121,6 @@ export class GabineteDigitalPage implements OnInit {
public TaskService: TaskService public TaskService: TaskService
) { ) {
// this.workerList = new Worker(new URL('./list.worker.js', import.meta.url));
// this.workerList.onmessage = (oEvent) => {
// this.AllProcess = oEvent.data
// }
window.onresize = (event) => { window.onresize = (event) => {
// if not mobile remove all component // if not mobile remove all component
if (window.innerWidth < 701) { if (window.innerWidth < 701) {
@@ -139,14 +134,41 @@ export class GabineteDigitalPage implements OnInit {
this.checkRoutes(); this.checkRoutes();
// fix with many timeout
setTimeout(() => {
this.dynamicSearch()
}, 2000)
setTimeout(() => {
this.dynamicSearch()
}, 4000)
setTimeout(() => {
this.dynamicSearch()
}, 6000)
setTimeout(() => {
this.dynamicSearch()
}, 10000)
setTimeout(() => {
this.dynamicSearch()
}, 14000)
setTimeout(() => {
this.dynamicSearch()
}, 18000)
setTimeout(() => {
this.dynamicSearch()
this.TaskService.registerCallback({ this.TaskService.registerCallback({
id: import.meta.url, id: import.meta.url,
funx:() => { funx:() => {
this.dynamicSearch() this.dynamicSearch()
} }
}) })
}, 20000)
} }
closeAllDesktopComponent() { closeAllDesktopComponent() {
this.desktopComponent = { this.desktopComponent = {
showEventList: false, showEventList: false,
@@ -167,18 +189,40 @@ export class GabineteDigitalPage implements OnInit {
this.dynamicSearch() this.dynamicSearch()
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
const ordinance = this.ordinance
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.AllProcess = this.TaskService.AllProcess.filter((task) => { const AllProcess = this.TaskService.AllProcess.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
} else {
this.AllProcess = this.TaskService.AllProcess
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
} }
} else {
const AllProcess = this.TaskService.AllProcess
if(ordinance == this.ordinance) {
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
}
console.log('order', this.ordinance)
} }
ngOnInit() { ngOnInit() {
@@ -213,98 +257,8 @@ export class GabineteDigitalPage implements OnInit {
} }
}); });
this.hideRefreshButton(); this.hideRefreshButton();
// this.waitForDomService.selector({
// selector: 'app-gabinete-digital ion-content .aside-wrapper',
// callback: () => {
// // console.log('SECOND CALL')
// this.loadAllProcesses();
// }
// })
setTimeout(() => {
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
});
// this.NotificationsService.registerCallback({
// type:'despachos',
// funx:() => {
// // this.loadCount();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'*',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification *')
// }
// })
// this.NotificationsService.registerCallback({
// type:'despachos-pr',
// funx:() => {
// // this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'expediente',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'gabinete-digital',
// funx:() => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type:'parecer',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'deferimento',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas-assinar',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'diplomas',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
// this.NotificationsService.registerCallback({
// type: 'expedientes-pr',
// funx: () => {
// this.LoadCounts();
// console.log('refresh with notification')
// }
// })
}, 100);
} }
@@ -6,7 +6,17 @@
<app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss> <app-btn-modal-dismiss (click)="goBack()"></app-btn-modal-dismiss>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div> <div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -67,15 +77,40 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<div class="d-flex ion-justify-content-between ion-align-items-center" style="
width: 300px;
margin: 0px auto;
">
<div class="d-flex sort-by ion-justify-content-center">
<p>
<span class="order">Order por:</span>
<span *ngIf="ordinance == 'recent'" class="order-labal">Mais Recentes</span>
<span *ngIf="ordinance == 'old'" class="order-labal">Mais Antigos</span>
</p>
</div>
<div>
<div *ngIf="ordinance == 'old'" (click)="reorderList('recent')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-up.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-up.svg"></ion-icon>
</div>
<div *ngIf="ordinance == 'recent'" (click)="reorderList('old')">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-down-25.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-arrow-arrow-down.svg"></ion-icon>
</div>
</div>
</div>
<div class="width-100" [ngSwitch]="segment"> <div class="width-100" [ngSwitch]="segment">
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div *ngIf="pedidosstorage.listparecer"> <div *ngIf="listPedidosParecer">
<ion-list *ngSwitchCase="'parecer'"> <ion-list *ngSwitchCase="'parecer'">
<!-- *ngFor = "let task of pedidosstorage.listparecer; let i = index" <!-- *ngFor = "let task of listPedidosParecer; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)" --> (click)="viewExpedientDetail(task.SerialNumber)" -->
<div <div
class="ion-no-padding ion-no-margin cursor-pointer" class="ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of pedidosstorage.listparecer" *ngFor = "let task of listPedidosParecer"
(click)="goToPedido(task.SerialNumber)" (click)="goToPedido(task.SerialNumber)"
> >
<!-- (click)="viewExpedientDetail(task.SerialNumber)" --> <!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -111,11 +146,11 @@
</ion-list> </ion-list>
</div> </div>
<div *ngIf="pedidosstorage.listdeferimento"> <div *ngIf="listPedidosDeferimento">
<ion-list *ngSwitchCase="'deferimento'"> <ion-list *ngSwitchCase="'deferimento'">
<div <div
class="expediente ion-no-padding ion-no-margin cursor-pointer" class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of pedidosstorage.listdeferimento" *ngFor = "let task of listPedidosDeferimento"
(click)="goToPedido(task.SerialNumber)" (click)="goToPedido(task.SerialNumber)"
> >
<!-- (click)="viewExpedientDetail(task.SerialNumber)" --> <!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -155,7 +190,7 @@
<div [ngSwitch]="segment"> <div [ngSwitch]="segment">
<div *ngSwitchCase="'parecer'" class="centered-div d-flex height-100 align-center justify-content-center" > <div *ngSwitchCase="'parecer'" class="centered-div d-flex height-100 align-center justify-content-center" >
<div <div
*ngIf="pedidosstorage.listparecer.length == 0" *ngIf="listPedidosParecer.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center" class="empty-list d-flex height-100 align-center justify-content-center"
> >
<span>Lista vazia</span> <span>Lista vazia</span>
@@ -164,7 +199,7 @@
<div *ngSwitchCase="'deferimento'" class="centered-div d-flex height-100 align-center justify-content-center"> <div *ngSwitchCase="'deferimento'" class="centered-div d-flex height-100 align-center justify-content-center">
<div <div
*ngIf="pedidosstorage.listdeferimento.length == 0" *ngIf="listPedidosDeferimento.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center" class="empty-list d-flex height-100 align-center justify-content-center"
> >
<span>Lista vazia</span> <span>Lista vazia</span>
@@ -172,7 +207,7 @@
</div> </div>
</div> </div>
<div *ngIf="skeletonLoader && pedidosstorage.listdeferimento.length == 0 && skeletonLoader && pedidosstorage.listparecer.length == 0"> <div *ngIf="skeletonLoader && listPedidosDeferimento.length == 0 && skeletonLoader && listPedidosParecer.length == 0">
<ion-list> <ion-list>
<ion-item> <ion-item>
@@ -46,6 +46,10 @@ export class PedidosPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
listPedidosParecer = []
listPedidosDeferimento = []
constructor( constructor(
private router: Router, private router: Router,
@@ -98,17 +102,38 @@ export class PedidosPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const listPedidosParecer = this.pedidosstorage.listparecer.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, listPedidosParecer)
const listPedidosDeferimento = this.pedidosstorage.listdeferimento.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, listPedidosDeferimento)
} else { } else {
this.list = this.TaskService.AllProcess
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, this.pedidosstorage.listparecer)
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, this.pedidosstorage.listdeferimento)
} }
} }
@@ -7,7 +7,17 @@
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss> <app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Pendentes</ion-label></div> <div class="thetitle"><ion-label >Pendentes</ion-label></div>
<div class="theicon btn-refresh"> <div class="theicon btn-refresh d-flex align-center">
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -57,8 +67,9 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
<app-task-list class="height-100" <app-task-list class="height-100"
[taskList] = pendentesstore.list [taskList] = list
[skeletonLoader] = skeletonLoader [skeletonLoader] = skeletonLoader
(viewTaskDetail)="viewTaskDetails($event)" (viewTaskDetail)="viewTaskDetails($event)"
> </app-task-list> > </app-task-list>
@@ -18,6 +18,7 @@ import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.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({ @Component({
selector: 'app-pendentes', selector: 'app-pendentes',
@@ -44,6 +45,7 @@ export class PendentesPage implements OnInit {
showSearch = false showSearch = false
searchSubject = '' searchSubject = ''
list = [] list = []
ordinance: string = 'old'
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
@@ -57,7 +59,8 @@ export class PendentesPage implements OnInit {
private sortService: SortService, private sortService: SortService,
private storage: Storage, private storage: Storage,
private httpErroHandle: HttpErrorHandle, private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService public TaskService: TaskService,
public ThemeService: ThemeService,
) { ) {
this.loggeduser = SessionStore.user; this.loggeduser = SessionStore.user;
this.profile = 'mdgpr'; this.profile = 'mdgpr';
@@ -89,17 +92,27 @@ export class PendentesPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const list = this.pendentesstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.pendentesstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
+19 -3
View File
@@ -131,13 +131,22 @@ export class TaskService {
updateAllProcess = () => { updateAllProcess = () => {
this.AllProcess = this.sortArrayISODate(this.despachoprstore.list.concat(this.deplomasStore.diplomasAssinadoList as any).concat(this.deplomasStore.diplomasParaAssinarList as any).concat(this.deplomasStore.DiplomaGerarList as any).concat(this.deplomasStore.diplomasReviewList) this.AllProcess = this.sortArrayISODate(this.despachoprstore.list.concat(this.deplomasStore.diplomasAssinadoList as any).concat(this.deplomasStore.diplomasParaAssinarList as any).concat(this.deplomasStore.DiplomaGerarList as any).concat(this.deplomasStore.diplomasReviewList)
.concat(this.eventoaprovacaostore.contactList as any).concat(this.expedientegbstore.list as any).concat(this.despachoStore.list as any).concat(this.pedidosstore.listparecer as any).concat(this.pedidosstore.listdeferimento as any) .concat(this.eventoaprovacaostore.contactList as any).concat(this.expedientegbstore.list as any).concat(this.despachoStore.list as any).concat(this.pedidosstore.listparecer as any).concat(this.pedidosstore.listdeferimento as any)
.concat(this.pendentesstore.list as any)).reverse() .concat(this.pendentesstore.list as any))
} }
sortArrayISODate(myArray: any): any[] { sortArrayISODate(myArray: any): any[] {
return myArray.sort((a,b) => Date.parse(b.CreateDate || b.taskStartDate || b.TaskStartDate) - Date.parse(a.CreateDate || a.taskStartDate || a.TaskStartDate)) return myArray.sort((a,b) => Date.parse(b.TaskReceiveDate || b.taskReceiveDate || b.taskStartDate || b.TaskStartDate) - Date.parse(a.TaskReceiveDate || a.taskReceiveDate || a.taskStartDate || a.TaskStartDate))
}
reorderList(orderBy: string, list) {
if(orderBy == 'recent') {
return this.sortArrayISODate(list).reverse();
} else {
return this.sortArrayISODate(list)
}
} }
@@ -201,6 +210,8 @@ export class TaskService {
expedientes = expedientes.map((element) => this.expedienteTaskPipe.transform(element)); expedientes = expedientes.map((element) => this.expedienteTaskPipe.transform(element));
expedientes = this.sortArrayISODate(expedientes).reverse()
this.expedientegbstore.reset(expedientes); this.expedientegbstore.reset(expedientes);
} catch (error) { } catch (error) {
@@ -254,6 +265,8 @@ export class TaskService {
async loadEventosParaAprovacao() { async loadEventosParaAprovacao() {
// PR dont have event to approve
if(this.SessionStore.user.Profile != 'PR') {
try { try {
for(let calendar of this.eventService.calendarNamesAry) { for(let calendar of this.eventService.calendarNamesAry) {
if(calendar == 'Meu calendario') { if(calendar == 'Meu calendario') {
@@ -283,6 +296,7 @@ export class TaskService {
} catch (error) { } catch (error) {
} }
}
} }
@@ -321,7 +335,7 @@ export class TaskService {
diplomasList.push(task); diplomasList.push(task);
}); });
diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate') diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate').reverse()
this.deplomasStore.resetDiplomaGerar(diplomasList); this.deplomasStore.resetDiplomaGerar(diplomasList);
@@ -343,10 +357,12 @@ export class TaskService {
let diplomasAssinar: any = depachoAPI.filter(data => data.activityInstanceName == "Assinar Diploma"); let diplomasAssinar: any = depachoAPI.filter(data => data.activityInstanceName == "Assinar Diploma");
diplomasAssinar = diplomasAssinar.map((element) => this.expedienteTaskPipe.transform(element)) diplomasAssinar = diplomasAssinar.map((element) => this.expedienteTaskPipe.transform(element))
this.sortService.sortDate(diplomasAssinar, 'CreateDate') this.sortService.sortDate(diplomasAssinar, 'CreateDate')
diplomasAssinar = this.sortService.sortArrayISODate(diplomasAssinar)
this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar) this.deplomasStore.resetDiplomasParaAssinar(diplomasAssinar)
let diplomasAssinados: any = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado"); let diplomasAssinados: any = depachoAPI.filter(data => data.activityInstanceName == "Diploma Assinado");
diplomasAssinados = diplomasAssinados.map((element) => this.expedienteTaskPipe.transform(element)) diplomasAssinados = diplomasAssinados.map((element) => this.expedienteTaskPipe.transform(element))
diplomasAssinados = this.sortService.sortArrayISODate(diplomasAssinados)
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados) this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
} catch (error) { } catch (error) {
@@ -81,17 +81,19 @@ export class EventListPage implements OnInit {
} }
async LoadToApproveEvents() { async LoadToApproveEvents() {
if(SessionStore.user.Profile == 'PR') {
return false
}
this.showLoader = true; this.showLoader = true;
const segment: any = this.segment const segment: any = this.segment
if(this.segment == 'Meu calendario') { if(this.segment == 'Meu calendario') {
// color // color
if(SessionStore.user.Profile == 'PR') {
this.color = 'pr'
} else {
this.color = 'mdgpr' this.color = 'mdgpr'
}
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise() let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
try { try {
@@ -3,7 +3,7 @@
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div> <div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<div> <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex"> <div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -40,6 +40,18 @@
</div> </div>
</div> </div>
</div> </div>
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -27,6 +27,7 @@ export class AllProcessesPage implements OnInit {
}) })
AllProcess = [] AllProcess = []
ordinance: string = 'old'
constructor( constructor(
private router: Router, private router: Router,
@@ -71,30 +72,40 @@ export class AllProcessesPage implements OnInit {
} }
openSearch() { openSearch() {
this.dynamicSearch() // this.dynamicSearch()
} }
async closeSearch() { async closeSearch() {
this.searchSubject = '' this.searchSubject = ''
this.dynamicSearch() // this.dynamicSearch()
} }
async basicSearch() { async basicSearch() {
this.dynamicSearch() // this.dynamicSearch()
}
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
} }
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.AllProcess = this.TaskService.AllProcess.filter((task) => { const AllProcess = this.TaskService.AllProcess.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
} else {
this.AllProcess = this.TaskService.AllProcess
}
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
} else {
const AllProcess = this.TaskService.AllProcess
this.AllProcess = this.TaskService.reorderList(this.ordinance, AllProcess)
}
} }
checkFilter() { checkFilter() {
@@ -4,7 +4,7 @@
<div class="thetitle"> <div class="thetitle">
<ion-label >{{ environment.dispatchPR}}</ion-label> <ion-label >{{ environment.dispatchPR}}</ion-label>
</div> </div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center ">
<!-- <div> <!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
@@ -35,6 +35,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -32,6 +32,7 @@ export class DespachosPrPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor ( constructor (
private processes:ProcessesService, private processes:ProcessesService,
@@ -74,18 +75,27 @@ constructor (
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.despachosprstore.list.filter((task) => { const list = this.despachosprstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.despachosprstore.list const list = this.despachosprstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Despachos</ion-label></div> <div class="thetitle"><ion-label >Despachos</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()"> <!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon> <ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button> --> </button> -->
@@ -37,6 +37,18 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -18,6 +18,7 @@ export class DespachosPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor ( constructor (
private router: Router, private router: Router,
@@ -54,18 +55,28 @@ export class DespachosPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.TaskService.despachoStore.list.filter((task) => { const list = this.TaskService.despachoStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.TaskService.AllProcess const list = this.TaskService.despachoStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div> <div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <div> <!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex"> <div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -34,6 +34,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -26,6 +26,7 @@ export class DiplomasAssinarPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
@@ -54,18 +55,28 @@ export class DiplomasAssinarPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.deplomasStore.diplomasParaAssinarList.filter((task) => { const list = this.deplomasStore.diplomasParaAssinarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.deplomasStore.diplomasParaAssinarList
const list = this.deplomasStore.diplomasParaAssinarList
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -2,7 +2,19 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Diplomas por gerar</ion-label></div> <div class="thetitle"><ion-label >Diplomas por gerar</ion-label></div>
<div class="theicon"> <div class="theicon d-flex align-center">
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -59,7 +71,7 @@
<ion-list > <ion-list >
<div <div
class=" item-hover ion-no-padding ion-no-margin cursor-pointer" class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of deplomasStore.DiplomaGerarList" *ngFor = "let task of list"
(click)="goToDiploma(task.SerialNumber)" (click)="goToDiploma(task.SerialNumber)"
> >
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)"> <div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
@@ -22,7 +22,12 @@ export class DiplomasGerarPage implements OnInit {
deplomasStore = DeplomasStore deplomasStore = DeplomasStore
customTaskPipe = new CustomTaskPipe() customTaskPipe = new CustomTaskPipe()
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos' filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
//
showSearch = false
searchSubject = ''
list = []
hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -35,6 +40,7 @@ export class DiplomasGerarPage implements OnInit {
ngOnInit() { ngOnInit() {
this.LoadList() this.LoadList()
this.dynamicSearch()
} }
@@ -65,4 +71,34 @@ export class DiplomasGerarPage implements OnInit {
this.skeletonLoader = false; this.skeletonLoader = false;
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() {
if(this.showSearch && this.searchSubject) {
const list = this.deplomasStore.DiplomaGerarList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase())
})
this.list = this.TaskService.reorderList(this.ordinance, list)
} else {
const list = this.deplomasStore.DiplomaGerarList
this.list = this.TaskService.reorderList(this.ordinance, list)
}
}
} }
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Diplomas</ion-label></div> <div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <div> <!-- <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex"> <div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
@@ -33,6 +33,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -35,7 +35,7 @@ export class DiplomasPage implements OnInit {
listDiplomasPorValidar = [] listDiplomasPorValidar = []
listDiplomasAssinadosPR = [] listDiplomasAssinadosPR = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -65,27 +65,42 @@ export class DiplomasPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => { const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => { this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
} else { } else {
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
} }
} }
@@ -3,7 +3,7 @@
<div class="title width-100"> <div class="title width-100">
<div class="title-container d-flex justify-space-between"> <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> <span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
<div class="d-flex"> <div class="d-flex align-center">
<!-- <div> <!-- <div>
@@ -37,6 +37,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -44,7 +44,7 @@ export class EventsToApprovePage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -86,6 +86,14 @@ export class EventsToApprovePage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
// this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
@@ -125,13 +133,14 @@ export class EventsToApprovePage implements OnInit {
this.showLoader = true; this.showLoader = true;
const segment = this.segment const segment = this.segment
if(SessionStore.user.Profile == 'PR') {
return false
}
if(this.segment == 'Meu calendario') { if(this.segment == 'Meu calendario') {
// color // color
if(SessionStore.user.Profile == 'PR') {
this.color = 'pr'
} else {
this.color = 'mdgpr' this.color = 'mdgpr'
}
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise() let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
try { try {
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div> <div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon d-flex" (click)="refreshing()"> <div class="theicon d-flex align-center" (click)="refreshing()">
<!-- <div> <!-- <div>
@@ -35,6 +35,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -32,6 +32,7 @@ export class ExpedientesPrPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>(); @Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
@@ -67,17 +68,28 @@ export class ExpedientesPrPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.expedienteGdStore.list.filter((task) => { const list = this.expedienteGdStore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.expedienteGdStore.list const list = this.expedienteGdStore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Expediente</ion-label></div> <div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <!--
<div> <div>
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
@@ -35,6 +35,18 @@
</div> </div>
</div> </div>
--> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -29,6 +29,7 @@ export class ExpedientsPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private processes: ProcessesService, private processes: ProcessesService,
@@ -71,17 +72,30 @@ export class ExpedientsPage implements OnInit {
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.expedientegbstore.list.filter((task) => { const list = this.expedientegbstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.expedientegbstore.list const list = this.expedientegbstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div> <div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon btn-refresh d-flex"> <div class="theicon btn-refresh d-flex align-center">
<!-- <div> <!-- <div>
@@ -36,6 +36,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -46,6 +46,7 @@ export class PedidosPage implements OnInit {
listPedidosParecer = [] listPedidosParecer = []
listPedidosDeferimento = [] listPedidosDeferimento = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private router: Router, private router: Router,
@@ -81,28 +82,38 @@ export class PedidosPage implements OnInit {
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.listPedidosParecer = this.pedidosstore.listparecer.filter((task) => { const listPedidosParecer = this.pedidosstore.listparecer.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, listPedidosParecer)
this.listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
const listPedidosDeferimento = this.pedidosstore.listdeferimento.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, listPedidosDeferimento)
} else { } else {
this.listPedidosParecer = this.pedidosstore.listparecer this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listparecer)
this.listPedidosDeferimento = this.pedidosstore.listdeferimento this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listdeferimento)
} }
} }
@@ -145,7 +156,7 @@ export class PedidosPage implements OnInit {
} }
let allParecer = parecer.concat(parecerPr).reverse(); let allParecer = parecer.concat(parecerPr)
this.parecerList = new Array(); this.parecerList = new Array();
@@ -168,7 +179,7 @@ export class PedidosPage implements OnInit {
this.skeletonLoader = false this.skeletonLoader = false
this.deferimentoList = new Array(); this.deferimentoList = new Array();
let res = result.reverse().filter(data => data.workflowInstanceDataFields.Status == "Active") let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active")
res.forEach(element => { res.forEach(element => {
let task: customTask = this.customTaskPipe.transform(element); let task: customTask = this.customTaskPipe.transform(element);
@@ -2,7 +2,7 @@
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<div class="title"> <div class="title">
<div class="thetitle"><ion-label >Pendentes</ion-label></div> <div class="thetitle"><ion-label >Pendentes</ion-label></div>
<div class="theicon d-flex"> <div class="theicon d-flex align-center">
<!-- <div> <!-- <div>
@@ -35,6 +35,17 @@
</div> </div>
</div> --> </div> -->
<div>
<div class="d-flex" (click)="reorderList('old')" *ngIf="ordinance == 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/crescente.svg" ></ion-icon>
</div>
<div class="d-flex" (click)="reorderList('recent')" *ngIf="ordinance != 'recent' ">
<ion-icon class="mr-10 font-25" src="assets/images/theme/gov/decrescente.svg" ></ion-icon>
</div>
</div>
<div> <div>
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda"> <mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="filterName"> <mat-select [(value)]="filterName">
@@ -33,6 +33,7 @@ export class PendentesPage implements OnInit {
searchSubject = '' searchSubject = ''
list = [] list = []
hideSearchBtn: boolean = false; hideSearchBtn: boolean = false;
ordinance: string = 'old'
constructor( constructor(
private processes:ProcessesService, private processes:ProcessesService,
@@ -62,18 +63,29 @@ export class PendentesPage implements OnInit {
this.dynamicSearch() this.dynamicSearch()
} }
reorderList(orderBy: string) {
this.ordinance = orderBy;
this.dynamicSearch();
}
async dynamicSearch() { async dynamicSearch() {
if(this.showSearch && this.searchSubject) { if(this.showSearch && this.searchSubject) {
this.list = this.pendentesstore.list.filter((task) => { const list = this.pendentesstore.list.filter((task) => {
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
subject = subject.toLowerCase(); subject = subject.toLowerCase();
return subject.includes(this.searchSubject.toLowerCase()) return subject.includes(this.searchSubject.toLowerCase())
}) })
this.list = this.TaskService.reorderList(this.ordinance, list)
} else { } else {
this.list = this.pendentesstore.list const list = this.pendentesstore.list
this.list = this.TaskService.reorderList(this.ordinance, list)
} }
} }
@@ -0,0 +1,6 @@
<svg width="27" height="24" viewBox="0 0 27 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.375 20L15.375 6" stroke="#838383" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 7L15.5 4L19 7" stroke="#838383" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.375 4V18" stroke="#C5C5C5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 17L5.5 20L2 17" stroke="#C5C5C5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

@@ -0,0 +1,6 @@
<svg width="27" height="24" viewBox="0 0 27 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.375 20L15.375 6" stroke="#C5C5C5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 7L15.5 4L19 7" stroke="#C5C5C5" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.375 4V18" stroke="#838383" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 17L5.5 20L2 17" stroke="#838383" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "2def687fa", "shortSHA": "181a9dbd7",
"SHA": "2def687fa30799468fdda5ac5723462bddc164b9", "SHA": "181a9dbd768e46ac982079fdcc5178ad35ff050d",
"branch": "feature/gabinete-search", "branch": "feature/gabinete-search",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Fri May 19 13:01:10 2023 +0100'", "lastCommitTime": "'Fri May 19 15:02:02 2023 +0100'",
"lastCommitMessage": "alignmente", "lastCommitMessage": "fix",
"lastCommitNumber": "4938", "lastCommitNumber": "4939",
"change": "", "change": "",
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/login/login.page.scss", "changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas-gerar/diplomas-gerar.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/pages/gabinete-digital/diplomas/diplomas.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente.page.ts\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedidos.page.html\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedidos.page.ts\n\tmodified: src/app/pages/gabinete-digital/pendentes/pendentes.page.html\n\tmodified: src/app/pages/gabinete-digital/pendentes/pendentes.page.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.html\n\tmodified: src/app/shared/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.html\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas/diplomas.page.html\n\tmodified: src/app/shared/gabinete-digital/diplomas/diplomas.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.html\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.html\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.ts\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.html\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.ts\n\tmodified: src/app/shared/gabinete-digital/pendentes/pendentes.page.html\n\tmodified: src/app/shared/gabinete-digital/pendentes/pendentes.page.ts\n\tnew file: src/assets/images/theme/gov/crescente.svg\n\tnew file: src/assets/images/theme/gov/decrescente.svg",
"changeAuthor": "peter.maquiran" "changeAuthor": "peter.maquiran"
} }