mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix update
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="theicon d-flex">
|
||||
<div>
|
||||
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="mr-20 d-flex align-center cursor-pointer">
|
||||
<div style="padding-top: 5px;" (click)="openSearch();showSearch=true" *ngIf="!showSearch">
|
||||
<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>
|
||||
@@ -91,13 +91,13 @@
|
||||
|
||||
<div class="overflow-y-auto height-100 width-100">
|
||||
|
||||
<div *ngIf="TaskService.AllProcess.length >= 0">
|
||||
<div *ngIf="AllProcess.length >= 0">
|
||||
<ion-item-sliding class="overflow-y-auto height-100">
|
||||
<div class="listview">
|
||||
<ion-list *ngIf="TaskService.AllProcess">
|
||||
<ion-list *ngIf="AllProcess">
|
||||
<div
|
||||
class="item-hover ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of TaskService.AllProcess"
|
||||
*ngFor = "let task of AllProcess"
|
||||
(click)="goToProcess(task.SerialNumber || task.serialNumber, task.WorkflowName || task.workflowName|| task.workflowDisplayName , task.activityInstanceName)">
|
||||
<div class="item-wrapper" *ngIf="TaskService.filter(task, filterName)">
|
||||
<div class="item width-100 " >
|
||||
@@ -156,13 +156,13 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!TaskService.showLoader && TaskService.AllProcess.length == 0"
|
||||
*ngIf="!TaskService.showLoader && AllProcess.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="TaskService.showLoader && TaskService.AllProcess.length == 0">
|
||||
<div *ngIf="TaskService.showLoader && AllProcess.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
||||
@@ -25,6 +25,8 @@ export class AllProcessesPage implements OnInit {
|
||||
fields: ['Folio', 'Senders'], // fields to index for full-text search
|
||||
idField: 'DocId'
|
||||
})
|
||||
|
||||
AllProcess = []
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -55,16 +57,36 @@ export class AllProcessesPage implements OnInit {
|
||||
this.TaskService.registerCallback({
|
||||
id: import.meta.url,
|
||||
funx:() => {
|
||||
|
||||
this.dynamicSearch()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
openSearch() {}
|
||||
async closeSearch() {}
|
||||
async basicSearch() {}
|
||||
async dynamicSearch() {}
|
||||
openSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
async closeSearch() {
|
||||
this.searchSubject = ''
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
this.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
|
||||
}
|
||||
}
|
||||
|
||||
checkFilter() {
|
||||
if(this.router.url.includes('ForToDay')) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr',
|
||||
@@ -30,6 +31,7 @@ constructor (
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
private sortService: SortService,
|
||||
public TaskService: TaskService,
|
||||
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -55,29 +57,7 @@ constructor (
|
||||
async LoadList() {
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
let result = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
let despachoList = [];
|
||||
|
||||
let despachosPr;
|
||||
|
||||
if(this.loggeduser.Profile != 'PR') {
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||
} else if(this.loggeduser.Profile == 'PR') {
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||
}
|
||||
|
||||
despachosPr = despachosPr.filter(data => data.workflowInstanceDataFields.Status == "Active");
|
||||
|
||||
despachosPr.forEach( (element, index) => {
|
||||
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
|
||||
despachoList.push(task);
|
||||
});
|
||||
|
||||
despachoList = this.sortService.sortDate(despachoList, 'CreateDate')
|
||||
this.despachosprstore.reset(despachoList);
|
||||
await this.TaskService.loadDiplomas()
|
||||
this.skeletonLoader = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -70,19 +70,8 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
|
||||
this.skeletonLoader = true
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
await this.TaskService.loadDiplomas()
|
||||
this.skeletonLoader = false
|
||||
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
|
||||
this.diplomasList = diplomasAssinar.map(element => {
|
||||
return this.customTaskPipe.transform(element)
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
|
||||
|
||||
this.deplomasStore.resetDiplomasParaAssinar(this.diplomasList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,21 +60,9 @@ export class DiplomasGerarPage implements OnInit {
|
||||
|
||||
this.skeletonLoader = true
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
this.TaskService.loadDiplomas()
|
||||
|
||||
this.skeletonLoader = false;
|
||||
|
||||
let gerarDiploma = diplomas.reverse().filter(data => data.activityInstanceName == "Gerar Diploma" || data.activityInstanceName == "Retificar Diploma");
|
||||
|
||||
gerarDiploma.forEach(element => {
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
|
||||
|
||||
this.deplomasStore.resetDiplomaGerar(this.diplomasList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,59 +66,12 @@ export class DiplomasPage implements OnInit {
|
||||
async LoadList() {
|
||||
this.skeletonLoader = true;
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
this.diplomasList = [];
|
||||
|
||||
// let diplomasReview = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
|
||||
let diplomasList = diplomas.map(element => {
|
||||
return this.pipeTask(element)
|
||||
});
|
||||
|
||||
diplomasList = diplomasList.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate')
|
||||
|
||||
this.deplomasStore.resetDiplomasReview(this.diplomasList)
|
||||
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
|
||||
let diplomasAssinadoList = diplomasAssinados.map(element => {
|
||||
return this.pipeTask(element)
|
||||
});
|
||||
|
||||
this.diplomasAssinadoList = this.sortService.sortDate(diplomasAssinadoList, 'CreateDate')
|
||||
this.deplomasStore.resetDiplomasAssinadoList(this.diplomasAssinadoList)
|
||||
await this.TaskService.loadDiplomas()
|
||||
|
||||
this.showLoader = false;
|
||||
this.skeletonLoader = false
|
||||
}
|
||||
|
||||
pipeTask(element) {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
return {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DocIdDiferimento,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
"Deadline": element.deadline,
|
||||
"TaskStartDate": element.taskStartDate,
|
||||
"TaskStatus": element.taskStatus,
|
||||
"TaskReceiveDate": element.taskReceiveDate
|
||||
}
|
||||
}
|
||||
|
||||
async refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
|
||||
Reference in New Issue
Block a user