mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
changes
This commit is contained in:
@@ -93,6 +93,7 @@ export class ApproveEventPage implements OnInit {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.modalController.dismiss(serialNumber);
|
||||
this.httpErroHandle.httpsSucessMessagge('Aprovar')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
@@ -112,6 +113,7 @@ export class ApproveEventPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Rejeitar');
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
|
||||
@@ -201,6 +203,7 @@ export class ApproveEventPage implements OnInit {
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
this.httpErroHandle.httpsSucessMessagge('Rever')
|
||||
this.TaskService.loadEventosParaAprovacao();
|
||||
this.close();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
@@ -213,6 +216,8 @@ export class ApproveEventPage implements OnInit {
|
||||
this.toastService._badRequest('É necessário adicionar uma nota');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
@@ -81,17 +81,19 @@ export class EventListPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadToApproveEvents() {
|
||||
|
||||
|
||||
if(SessionStore.user.Profile == 'PR') {
|
||||
return false
|
||||
}
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
const segment: any = this.segment
|
||||
|
||||
if(this.segment == 'Meu calendario') {
|
||||
// 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()
|
||||
try {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<div class="btn-modal-dismiss">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<div class="main-content">
|
||||
|
||||
<ion-virtual-scroll [items]="ChatSystemService.users | filter:textSearch: 'name'" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
<ion-virtual-scroll [items]="userList" approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
|
||||
<div class="item-divider" *virtualHeader="let header">
|
||||
<ion-label>{{header}}</ion-label>
|
||||
|
||||
@@ -28,6 +28,9 @@ export class ContactsPage implements OnInit {
|
||||
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
||||
userList = this.ChatSystemService.users
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
@@ -46,7 +49,14 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
onChange(event) {
|
||||
this.textSearch = event.detail.value;
|
||||
|
||||
this.textSearch = event.detail.value.toLowerCase();
|
||||
|
||||
this.userList = this.ChatSystemService.users.filter((e) => {
|
||||
const username = e.name.toLowerCase()
|
||||
return username.includes(this.textSearch)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
openMessagesPage(username:string) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="title">
|
||||
<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 title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
|
||||
@@ -40,6 +40,18 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -27,6 +27,7 @@ export class AllProcessesPage implements OnInit {
|
||||
}) */
|
||||
|
||||
AllProcess = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -71,30 +72,40 @@ export class AllProcessesPage implements OnInit {
|
||||
}
|
||||
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
// this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
// this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
// this.dynamicSearch()
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.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() {
|
||||
|
||||
@@ -19,11 +19,11 @@ import {
|
||||
NgxMatTimepickerModule
|
||||
} from '@angular-material-components/datetime-picker';
|
||||
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
import { TaskListHeaderPageModule } from '../generic/task-list-header/task-list-header.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -32,6 +32,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DespachosPrPageRoutingModule,
|
||||
TaskListHeaderPageModule,
|
||||
// entryComponents
|
||||
TaskListPageModule,
|
||||
//
|
||||
|
||||
@@ -1,77 +1,14 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="main-header">
|
||||
<div class="thetitle">
|
||||
<ion-label >{{ environment.dispatchPR}}</ion-label>
|
||||
</div>
|
||||
<div class="theicon d-flex">
|
||||
|
||||
<!-- <div>
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src='assets/images/icons-search.svg'></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<button title="Fechar" class="btn-no-color d-flex" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-35" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<div *ngIf="showSearch">
|
||||
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch">
|
||||
<div class="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 (click)="basicSearch()" class="d-flex align-center icon">
|
||||
|
||||
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
<mat-option value="Para hoje" >
|
||||
Para hoje
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="Novos" >
|
||||
Novos
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="Lidos" >
|
||||
Lidos
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="Não lidos" >
|
||||
Não lidos
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="OverdueTasks">
|
||||
Em atraso
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="Todos" >
|
||||
Todos
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<!-- <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> -->
|
||||
</div>
|
||||
</div>
|
||||
<app-task-list-header
|
||||
class="width-100 height-100"
|
||||
[goBackButton] = false
|
||||
[headerName] = environment.dispatchPR
|
||||
[ordinance] = ordinance
|
||||
[loading] = skeletonLoader
|
||||
[loaderTop] = true
|
||||
(reorderList) = reorderList($event)
|
||||
(changeFilterName) = changeFilterName($event)
|
||||
></app-task-list-header>
|
||||
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
@@ -32,6 +32,7 @@ export class DespachosPrPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor (
|
||||
private processes:ProcessesService,
|
||||
@@ -64,6 +65,10 @@ constructor (
|
||||
|
||||
}
|
||||
|
||||
changeFilterName(filterName) {
|
||||
this.filterName = filterName
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
|
||||
this.skeletonLoader = true;
|
||||
@@ -74,18 +79,27 @@ constructor (
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} 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>
|
||||
<div class="title">
|
||||
<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()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button> -->
|
||||
@@ -37,6 +37,18 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -18,6 +18,7 @@ export class DespachosPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor (
|
||||
private router: Router,
|
||||
@@ -54,18 +55,28 @@ export class DespachosPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.TaskService.AllProcess
|
||||
const list = this.TaskService.despachoStore.list
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { DiplomasAssinarPageRoutingModule } from './diplomas-assinar-routing.module';
|
||||
|
||||
import { DiplomasAssinarPage } from './diplomas-assinar.page';
|
||||
import { TaskListPageModule } from 'src/app/shared/gabinete-digital/generic/task-list/task-list.module'
|
||||
|
||||
|
||||
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
@@ -29,6 +32,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DiplomasAssinarPageRoutingModule,
|
||||
TaskListPageModule,
|
||||
//
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
|
||||
<div class="theicon d-flex">
|
||||
<div class="theicon d-flex align-center">
|
||||
<!-- <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">
|
||||
@@ -34,6 +34,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
@@ -83,88 +94,13 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<div class="main-container width-100 overflow-y-auto height-100">
|
||||
|
||||
<div *ngIf="list.length >= 1">
|
||||
|
||||
|
||||
<ion-list >
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<div
|
||||
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of list"
|
||||
(click)="goToDiploma(task.SerialNumber)"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject d-flex">
|
||||
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Folio || task.workflowInstanceDataFields.Subject }}</ion-label>
|
||||
<span class="dead-line ml-10" *ngIf="TaskService.deadlineIsToday(task.Deadline)">Para hoje</span>
|
||||
<span class="new-task ml-10" *ngIf="TaskService.lessThen24Hours(task.TaskReceiveDate)">Nova</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && list.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-task-list
|
||||
[taskList] = list
|
||||
[skeletonLoader] = skeletonLoader
|
||||
(viewTaskDetail)="goToDiploma($event)"
|
||||
[filterName]="filterName"
|
||||
>
|
||||
</app-task-list>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
ordinance: string = 'old'
|
||||
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -54,18 +55,28 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.deplomasStore.diplomasParaAssinarList
|
||||
|
||||
const list = this.deplomasStore.diplomasParaAssinarList
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -84,8 +95,8 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',serialNumber,'gabinete-digital']);
|
||||
goToDiploma({SerialNumber}){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar',SerialNumber,'gabinete-digital']);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
|
||||
@@ -2,7 +2,19 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<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-select [(value)]="filterName">
|
||||
|
||||
@@ -59,7 +71,7 @@
|
||||
<ion-list >
|
||||
<div
|
||||
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)"
|
||||
>
|
||||
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
|
||||
|
||||
@@ -22,7 +22,12 @@ export class DiplomasGerarPage implements OnInit {
|
||||
deplomasStore = DeplomasStore
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
//
|
||||
showSearch = false
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -35,6 +40,7 @@ export class DiplomasGerarPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList()
|
||||
this.dynamicSearch()
|
||||
|
||||
}
|
||||
|
||||
@@ -65,4 +71,34 @@ export class DiplomasGerarPage implements OnInit {
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100" >
|
||||
<div >
|
||||
|
||||
<ion-list *ngIf="expedientegbstore.list.length >=0">
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of expedientegbstore.list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject d-flex">
|
||||
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Subject }}</ion-label>
|
||||
<span class="dead-line ml-10" *ngIf="TaskService.deadlineIsToday(task.Deadline)">Para hoje</span>
|
||||
<span class="new-task ml-10" *ngIf="TaskService.lessThen24Hours(task.TaskReceiveDate)">Nova</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedientegbstore.list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && expedientegbstore.list.length == 0">
|
||||
|
||||
<ion-list >
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
@import '~src/function.scss';
|
||||
//CONTENT
|
||||
:host{
|
||||
margin: 0;
|
||||
}
|
||||
.title{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
//DIV
|
||||
ion-item{
|
||||
--background: none;
|
||||
}
|
||||
.item {
|
||||
//border-radius: 15px;
|
||||
//box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
//Sborder: solid 1px #e9e9e9;
|
||||
//background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
//padding: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* New CSS */
|
||||
.content{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
}
|
||||
.expediente{
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
border:1px solid #e9e9e9 !important;
|
||||
//background-color: transparent;
|
||||
margin-bottom: 10px !important;
|
||||
padding: 15px;
|
||||
}
|
||||
.exp-list-item{
|
||||
//width: 368px;
|
||||
overflow: auto;
|
||||
//border-bottom: 1px solid gray;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.exp-top-detail{
|
||||
width: 100%;
|
||||
float: left;
|
||||
font-family: Roboto;
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
color: var(--title-text-color);
|
||||
padding-left: 3px;
|
||||
|
||||
.subject{
|
||||
width: 84%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.exp-icon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
//font-size: 13px;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
|
||||
ion-icon{
|
||||
font-size: 12pt;
|
||||
color: #42b9fe;
|
||||
float: left;
|
||||
}
|
||||
label{
|
||||
font-size: 10pt;
|
||||
}
|
||||
}
|
||||
}
|
||||
.exp-middle-detail, .exp-bottom-detail{
|
||||
margin-bottom: 5px;
|
||||
|
||||
}
|
||||
.exp-middle-detail{
|
||||
font-size: 12pt;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
|
||||
.exp-workflow{
|
||||
float: left;
|
||||
margin: 0 !important;
|
||||
|
||||
.label{
|
||||
border-radius: 15px;
|
||||
background: var(--label-bg-color);
|
||||
//font-size: 12px;
|
||||
float: right;
|
||||
padding: 2.5px 13.5px 2.5px 13.5px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.exp-date{
|
||||
width: auto;
|
||||
font-family: Roboto;
|
||||
font-size: 10pt;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #797979;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.exp-bottom-detail{
|
||||
font-size: 8pt;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
padding-left: 3px;
|
||||
|
||||
.exp-remetente{
|
||||
//width: 200px;
|
||||
font-family: Roboto;
|
||||
//font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
float: left;
|
||||
//border: 1px solid red;
|
||||
}
|
||||
}
|
||||
.div-top-header{
|
||||
width: 400px;
|
||||
margin: 6px auto;
|
||||
background-color: #0782c9;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-search{
|
||||
font-size: 45px;
|
||||
float: left;
|
||||
margin: 0 0 0 10px
|
||||
}
|
||||
.div-logo{
|
||||
background: transparent;
|
||||
width: 150px;
|
||||
margin: 2.5px 0 2.5px 71px;
|
||||
float: left;
|
||||
}
|
||||
.div-logo img{
|
||||
width: 100%;
|
||||
}
|
||||
.div-profile{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-expedients',
|
||||
templateUrl: './expedients.page.html',
|
||||
styleUrls: ['./expedients.page.scss'],
|
||||
})
|
||||
export class ExpedientsPage implements OnInit {
|
||||
segment: string;
|
||||
|
||||
serialNumber: string;
|
||||
|
||||
@Input() profile: string;
|
||||
skeletonLoader = true
|
||||
expedientegbstore = ExpedienteGdStore
|
||||
|
||||
expedienteTaskPipe = new ExpedienteTaskPipe()
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
private storage: Storage,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "expedientes";
|
||||
this.LoadList()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?expedientes=true')) {
|
||||
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.LoadList()
|
||||
} else {
|
||||
this.LoadList()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
segmentChanged() {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
LoadList() {
|
||||
|
||||
this.skeletonLoader = true
|
||||
|
||||
this.processes.GetTaskListExpediente(false).subscribe(result => {
|
||||
let taskslist = [];
|
||||
|
||||
let res = result.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
res.forEach(element => {
|
||||
let task = this.expedienteTaskPipe.transform(element)
|
||||
taskslist.push(task);
|
||||
|
||||
});
|
||||
taskslist = this.sortService.sortDate(taskslist, 'CreateDate')
|
||||
// this.addProcessTODb(taskslist);
|
||||
taskslist = taskslist.filter(function(item) {
|
||||
return item.activityInstanceName != 'Retificar Expediente'
|
||||
})
|
||||
this.expedientegbstore.reset(taskslist);
|
||||
|
||||
}, (error) => {
|
||||
this.skeletonLoader = false
|
||||
//this.getEventsFromLocalDb();
|
||||
console.log('stop')
|
||||
}, () =>{
|
||||
this.skeletonLoader = false
|
||||
});
|
||||
}
|
||||
|
||||
// addProcessTODb(task) {
|
||||
// this.storage.set('gabinete-expediente', task).then(() => {
|
||||
|
||||
// })
|
||||
// }
|
||||
|
||||
// getEventsFromLocalDb() {
|
||||
// this.storage.get('gabinete-expediente').then((expediente) => {
|
||||
// taskslist = expediente
|
||||
// })
|
||||
// }
|
||||
|
||||
doRefresh(event) {
|
||||
if (event) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
event?.target?.complete();
|
||||
} catch(error) {}
|
||||
}, 2000);
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber: any) {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,6 +22,8 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
import { TaskListPageModule } from 'src/app/shared/gabinete-digital/generic/task-list/task-list.module'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +33,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DiplomasPageRoutingModule,
|
||||
TaskListPageModule,
|
||||
//
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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 d-flex">
|
||||
<div class="theicon d-flex align-center">
|
||||
<!-- <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">
|
||||
@@ -32,7 +32,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -35,7 +35,7 @@ export class DiplomasPage implements OnInit {
|
||||
listDiplomasPorValidar = []
|
||||
listDiplomasAssinadosPR = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -65,27 +65,42 @@ export class DiplomasPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
|
||||
this.listDiplomasAssinadosPR = this.TaskService.reorderList(this.ordinance, listDiplomasAssinadosPR)
|
||||
|
||||
|
||||
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
|
||||
const listDiplomasPorValidar = this.deplomasStore.diplomasReviewList.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.listDiplomasPorValidar = this.TaskService.reorderList(this.ordinance, listDiplomasPorValidar)
|
||||
|
||||
} else {
|
||||
|
||||
this.listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
|
||||
this.listDiplomasPorValidar = this.deplomasStore.diplomasReviewList
|
||||
const listDiplomasAssinadosPR = this.deplomasStore.diplomasAssinadoList
|
||||
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-container d-flex justify-space-between">
|
||||
<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>
|
||||
@@ -36,6 +36,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
|
||||
@@ -4,7 +4,6 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
@@ -44,7 +43,7 @@ export class EventsToApprovePage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -86,18 +85,30 @@ export class EventsToApprovePage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
// this.dynamicSearch();
|
||||
}
|
||||
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.list = this.eventoaprovacaostore.get(this.segment).filter((task) => {
|
||||
const list = this.eventoaprovacaostore.get(this.segment).filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.eventoaprovacaostore.get(this.segment)
|
||||
const list = this.eventoaprovacaostore.get(this.segment)
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -125,13 +136,14 @@ export class EventsToApprovePage implements OnInit {
|
||||
this.showLoader = true;
|
||||
const segment = this.segment
|
||||
|
||||
if(SessionStore.user.Profile == 'PR') {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if(this.segment == 'Meu calendario') {
|
||||
// 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()
|
||||
try {
|
||||
|
||||
@@ -22,6 +22,8 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
import { TaskListPageModule } from 'src/app/shared/gabinete-digital/generic/task-list/task-list.module'
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -30,6 +32,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ExpedientesPrPageRoutingModule,
|
||||
TaskListPageModule,
|
||||
//
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon d-flex" (click)="refreshing()">
|
||||
<div class="theicon d-flex align-center" (click)="refreshing()">
|
||||
|
||||
|
||||
<!-- <div>
|
||||
@@ -35,6 +35,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
@@ -77,78 +88,13 @@
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100">
|
||||
|
||||
<ion-list *ngIf="list.length >= 1">
|
||||
<div
|
||||
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject d-flex">
|
||||
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Subject }}</ion-label>
|
||||
<span class="dead-line ml-10" *ngIf="TaskService.deadlineIsToday(task.Deadline)">Para hoje</span>
|
||||
<span class="new-task ml-10" *ngIf="TaskService.lessThen24Hours(task.TaskReceiveDate)">Nova</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default'" src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov'" src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && list.length == 0 && list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && list.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<app-task-list
|
||||
[taskList] = list
|
||||
[skeletonLoader] = skeletonLoader
|
||||
(viewTaskDetail)="goToExpediente($event)"
|
||||
[filterName]="filterName"
|
||||
>
|
||||
</app-task-list>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
@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() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.expedienteGdStore.list
|
||||
const list = this.expedienteGdStore.list
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -138,9 +150,9 @@ export class ExpedientesPrPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber:any){
|
||||
goToExpediente({SerialNumber}){
|
||||
/* this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']); */
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
import { TaskListPageModule } from 'src/app/shared/gabinete-digital/generic/task-list/task-list.module'
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -30,6 +32,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ExpedientsPageRoutingModule,
|
||||
TaskListPageModule,
|
||||
//
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon d-flex">
|
||||
<div class="theicon d-flex align-center">
|
||||
<!--
|
||||
<div>
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
@@ -35,6 +35,18 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
@@ -55,7 +67,6 @@
|
||||
Não lidos
|
||||
</mat-option>
|
||||
|
||||
|
||||
<mat-option value="OverdueTasks">
|
||||
Em atraso
|
||||
</mat-option>
|
||||
@@ -84,78 +95,13 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100" >
|
||||
<div >
|
||||
|
||||
<ion-list *ngIf="list.length >=0">
|
||||
<div
|
||||
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100 expediente" *ngIf="TaskService.filter(task, filterName)">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subjectc d-flex">
|
||||
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Subject }}</ion-label>
|
||||
<span class="dead-line ml-10" *ngIf="TaskService.deadlineIsToday(task.Deadline)">Para hoje</span>
|
||||
<span class="new-task ml-10" *ngIf="TaskService.lessThen24Hours(task.TaskReceiveDate)">Nova</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && list.length == 0">
|
||||
<ion-list *ngIf="list.length == 0">
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></h3>
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
<p><ion-skeleton-text animated style="width: 60%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<app-task-list
|
||||
[taskList] = list
|
||||
[skeletonLoader] = skeletonLoader
|
||||
(viewTaskDetail)="goToExpediente($event)"
|
||||
[filterName]="filterName"
|
||||
>
|
||||
</app-task-list>
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ export class ExpedientsPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -71,17 +72,30 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.expedientegbstore.list
|
||||
const list = this.expedientegbstore.list
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -133,17 +147,6 @@ export class ExpedientsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// addProcessTODb(task) {
|
||||
// this.storage.set('gabinete-expediente', task).then(() => {
|
||||
|
||||
// })
|
||||
// }
|
||||
|
||||
// getEventsFromLocalDb() {
|
||||
// this.storage.get('gabinete-expediente').then((expediente) => {
|
||||
// this.taskslist = expediente
|
||||
// })
|
||||
// }
|
||||
|
||||
doRefresh(event) {
|
||||
if (event) {
|
||||
@@ -160,8 +163,8 @@ export class ExpedientsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
goToExpediente(serialNumber: any) {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||
goToExpediente({SerialNumber}) {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', SerialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { ExpedientsPage } from './expedients.page';
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: ExpedientsPage
|
||||
component: TaskListHeaderPage
|
||||
}
|
||||
];
|
||||
|
||||
@@ -14,4 +14,4 @@ const routes: Routes = [
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class ExpedientsPageRoutingModule {}
|
||||
export class TaskListHeaderPageRoutingModule {}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListHeaderPageRoutingModule } from './task-list-header-routing.module';
|
||||
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TaskListHeaderPageRoutingModule,
|
||||
//
|
||||
MatSelectModule,
|
||||
BtnModalDismissPageModule
|
||||
],
|
||||
declarations: [TaskListHeaderPage],
|
||||
exports: [TaskListHeaderPage]
|
||||
})
|
||||
export class TaskListHeaderPageModule {}
|
||||
@@ -0,0 +1,92 @@
|
||||
<div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="loading && loaderTop"></ion-progress-bar>
|
||||
<div class="px-20 pt-30 d-flex justify-space-between">
|
||||
<div class="d-flex align-center pointer">
|
||||
<div class="font-35 d-flex" *ngIf="goBackButton" (click)="goBack.emit()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="end" src='assets/images/theme/{{ThemeService.currentTheme}}/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<ion-label class="font-25" >{{ headerName }}</ion-label>
|
||||
</div>
|
||||
<div class="d-flex align-center ">
|
||||
|
||||
<!-- <div>
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
<div (click)="openSearch();showSearch=true" *ngIf="!showSearch" class="d-flex">
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-35" src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src='assets/images/icons-search.svg'></ion-icon>
|
||||
<ion-icon title="Perfil" *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src='assets/images/theme/gov/icons-search.svg'></ion-icon>
|
||||
</div>
|
||||
<button title="Fechar" class="btn-no-color d-flex" (click)="closeSearch();showSearch=false;searchSubject=''" *ngIf="showSearch">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-35" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<div *ngIf="showSearch">
|
||||
<div class="d-flex search-input-container ml-10 justify-between" *ngIf="showSearch">
|
||||
<div class="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 (click)="basicSearch()" class="d-flex align-center icon">
|
||||
|
||||
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/search.svg"></ion-icon>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<div class="d-flex" (click)="reorderList.emit('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.emit('recent')" *ngIf="ordinance != 'recent' ">
|
||||
<ion-icon class="mr-10 font-25" 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-select [(value)]="filterName" (valueChange)="changeFilterName.emit(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> -->
|
||||
</div>
|
||||
</div>
|
||||
<ion-progress-bar class="px-20" type="indeterminate" *ngIf="loading && loaderBottom"></ion-progress-bar>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
.main-header{
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -1,19 +1,19 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ExpedientsPage } from './expedients.page';
|
||||
import { TaskListHeaderPage } from './task-list-header.page';
|
||||
|
||||
describe('ExpedientsPage', () => {
|
||||
let component: ExpedientsPage;
|
||||
let fixture: ComponentFixture<ExpedientsPage>;
|
||||
describe('TaskListHeaderPage', () => {
|
||||
let component: TaskListHeaderPage;
|
||||
let fixture: ComponentFixture<TaskListHeaderPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ExpedientsPage ],
|
||||
declarations: [ TaskListHeaderPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ExpedientsPage);
|
||||
fixture = TestBed.createComponent(TaskListHeaderPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-list-header',
|
||||
templateUrl: './task-list-header.page.html',
|
||||
styleUrls: ['./task-list-header.page.scss'],
|
||||
})
|
||||
export class TaskListHeaderPage implements OnInit {
|
||||
|
||||
@Input() headerName = 'name'
|
||||
@Input() goBackButton = false
|
||||
@Input() loading = true
|
||||
@Input() loaderTop = false;
|
||||
@Input() loaderBottom = false;
|
||||
@Output() goBack = new EventEmitter<any>();
|
||||
@Output() reorderList = new EventEmitter<any>();
|
||||
@Output() changeFilterName = new EventEmitter<any>();
|
||||
|
||||
environment = environment
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
@Input() ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
public ThemeService: ThemeService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<ion-content>
|
||||
<div class="overflow-y-auto height-100 width-100 px-20">
|
||||
<div class="overflow-y-auto height-100 width-100 px-20 d-flex task-list-com">
|
||||
|
||||
<div *ngIf="taskList.length >= 0">
|
||||
<ion-list part="divo">
|
||||
<div *ngIf="taskList.length >= 1" class="width-100">
|
||||
<ion-list part="divo" class="width-100">
|
||||
<div
|
||||
class=" item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of taskList; let i = index"
|
||||
@@ -43,12 +43,12 @@
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && taskList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
class="empty-list d-flex height-100 width-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && taskList.length == 0">
|
||||
<div class="width-100" *ngIf="skeletonLoader && taskList.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
||||
@@ -18,9 +18,7 @@ export class TaskListPage implements OnInit {
|
||||
constructor(
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TaskListtHeaderPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TaskListtHeaderPageRoutingModule {}
|
||||
+5
-6
@@ -4,18 +4,17 @@ import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ExpedientsPageRoutingModule } from './expedients-routing.module';
|
||||
import { TaskListtHeaderPageRoutingModule } from './task-listt-header-routing.module';
|
||||
|
||||
import { ExpedientsPage } from './expedients.page';
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
ExpedientsPageRoutingModule
|
||||
TaskListtHeaderPageRoutingModule
|
||||
],
|
||||
exports: [ExpedientsPage],
|
||||
declarations: [ExpedientsPage]
|
||||
declarations: [TaskListtHeaderPage]
|
||||
})
|
||||
export class ExpedientsPageModule {}
|
||||
export class TaskListtHeaderPageModule {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>taskListtHeader</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { TaskListtHeaderPage } from './task-listt-header.page';
|
||||
|
||||
describe('TaskListtHeaderPage', () => {
|
||||
let component: TaskListtHeaderPage;
|
||||
let fixture: ComponentFixture<TaskListtHeaderPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TaskListtHeaderPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TaskListtHeaderPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-listt-header',
|
||||
templateUrl: './task-listt-header.page.html',
|
||||
styleUrls: ['./task-listt-header.page.scss'],
|
||||
})
|
||||
export class TaskListtHeaderPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon btn-refresh d-flex">
|
||||
<div class="theicon btn-refresh d-flex align-center">
|
||||
|
||||
|
||||
<!-- <div>
|
||||
@@ -36,6 +36,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="filterName">
|
||||
|
||||
@@ -46,6 +46,7 @@ export class PedidosPage implements OnInit {
|
||||
listPedidosParecer = []
|
||||
listPedidosDeferimento = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -81,28 +82,38 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.listPedidosDeferimento = this.TaskService.reorderList(this.ordinance, listPedidosDeferimento)
|
||||
|
||||
} else {
|
||||
|
||||
this.listPedidosParecer = this.pedidosstore.listparecer
|
||||
this.listPedidosDeferimento = this.pedidosstore.listdeferimento
|
||||
|
||||
this.listPedidosParecer = this.TaskService.reorderList(this.ordinance, this.pedidosstore.listparecer)
|
||||
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();
|
||||
|
||||
@@ -168,7 +179,7 @@ export class PedidosPage implements OnInit {
|
||||
this.skeletonLoader = false
|
||||
|
||||
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 => {
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
|
||||
<div class="theicon d-flex">
|
||||
<div class="theicon d-flex align-center">
|
||||
|
||||
|
||||
<!-- <div>
|
||||
@@ -34,6 +34,17 @@
|
||||
</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>
|
||||
<mat-form-field class="task-filter-input" appearance="none" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
|
||||
@@ -33,6 +33,7 @@ export class PendentesPage implements OnInit {
|
||||
searchSubject = ''
|
||||
list = []
|
||||
hideSearchBtn: boolean = false;
|
||||
ordinance: string = 'old'
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
@@ -62,18 +63,29 @@ export class PendentesPage implements OnInit {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
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
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
this.list = this.pendentesstore.list
|
||||
const list = this.pendentesstore.list
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ font-size: 25px;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
margin: 0px auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ion-icon-class{
|
||||
width: 45px;
|
||||
|
||||
Reference in New Issue
Block a user