mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
bug fix on task filter
This commit is contained in:
@@ -8,12 +8,37 @@ import { AllProcessesPageRoutingModule } from './all-processes-routing.module';
|
||||
|
||||
import { AllProcessesPage } from './all-processes.page';
|
||||
|
||||
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
|
||||
import {
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
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';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
AllProcessesPageRoutingModule
|
||||
AllProcessesPageRoutingModule,
|
||||
//
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
exports: [AllProcessesPage],
|
||||
declarations: [AllProcessesPage]
|
||||
|
||||
@@ -2,11 +2,39 @@
|
||||
<!-- <ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar> -->
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
|
||||
<!-- <div class="theicon">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
|
||||
<div class="theicon">
|
||||
<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="Todos" >
|
||||
Todos
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div> -->
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
@@ -28,54 +56,59 @@
|
||||
<div class="listview">
|
||||
<ion-list *ngIf="AllProcess">
|
||||
<div
|
||||
class="item-wrapper item-hover ion-no-padding cursor-pointer"
|
||||
class="item-hover ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of AllProcess"
|
||||
(click)="goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName|| task.workflowDisplayName , task.activityInstanceName)">
|
||||
<div class="item width-100">
|
||||
<div class="item-top-detail">
|
||||
<div class="item-subject">
|
||||
|
||||
<!-- {{ task.SerialNumber || task.serialNumber}} {{ task.WorkflowName || task.workflowName || task.workflowDisplayName }} {{ task.activityInstanceName }} -->
|
||||
|
||||
<ion-label>{{ task.Folio || task.Subject || task.workflowInstanceDataFields.Subject}}</ion-label>
|
||||
<div class="item-wrapper" *ngIf="TaskService.filter(task, filterName)">
|
||||
<div class="item width-100 " >
|
||||
<div class="item-top-detail">
|
||||
<div class="item-subject d-flex">
|
||||
|
||||
<!-- {{ task.SerialNumber || task.serialNumber}} {{ task.WorkflowName || task.workflowName || task.workflowDisplayName }} {{ task.activityInstanceName }} -->
|
||||
|
||||
<ion-label [class.gb-seen]="TaskService.seen(task)">{{ task.Folio || task.Subject || task.workflowInstanceDataFields.Subject}}</ion-label>
|
||||
<span class="dead-line ml-10" *ngIf="TaskService.deadlineIsToday(task.Deadline || task.deadline)">Para hoje</span>
|
||||
<span class="new-task ml-10" *ngIf="TaskService.lessThen24Hours(task.TaskStartDate || task.taskStartDate)">Nova</span>
|
||||
</div>
|
||||
<div *ngIf="task.DocumentsQty != 0" class="item-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>{{task.DocumentsQty || task.totalDocuments}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.DocumentsQty != 0" class="item-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>{{task.DocumentsQty || task.totalDocuments}}</label>
|
||||
<div class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label *ngIf="task.Senders">{{task.Senders }}</ion-label>
|
||||
<ion-label *ngIf="task.workflowInstanceDataFields">{{ task.workflowInstanceDataFields.Sender }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label *ngIf="task.Senders">{{task.Senders }}</ion-label>
|
||||
<ion-label *ngIf="task.workflowInstanceDataFields">{{ task.workflowInstanceDataFields.Sender }}</ion-label>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label>{{task.customDate}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail">
|
||||
<div class="item-remetente">
|
||||
<ion-label>{{task.customDate}}</ion-label>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
|
||||
<div class="item-middle-detail-extra-text">
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
|
||||
<!-- Agenda {{task.Agenda}} do Presidente da República -->
|
||||
Agenda {{task.Agenda}} do Titular
|
||||
</ion-label>
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
|
||||
A sua agenda {{task.Agenda}}
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.Agenda" class="item-middle-detail-extra">
|
||||
<div class="item-middle-detail-extra-text">
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
|
||||
<!-- Agenda {{task.Agenda}} do Presidente da República -->
|
||||
Agenda {{task.Agenda}} do Titular
|
||||
</ion-label>
|
||||
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
|
||||
A sua agenda {{task.Agenda}}
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-bottom-detail d-flex align-items-center">
|
||||
<div class="item-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="item-date">
|
||||
<ion-label>{{ task.CreateDate || task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
<div class="item-bottom-detail d-flex align-items-center">
|
||||
<div class="item-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="item-date">
|
||||
<ion-label>{{ task.CreateDate || task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -164,3 +164,7 @@ ion-list{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.new-task {
|
||||
height: 23px;
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
import { PedidosStore } from 'src/app/store/pedidos-store.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-all-processes',
|
||||
@@ -35,10 +35,12 @@ export class AllProcessesPage implements OnInit {
|
||||
deplomasStore = DeplomasStore
|
||||
|
||||
AllProcess = []
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'Todos' = 'Todos'
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
public TaskService: TaskService
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user