mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -14,6 +14,7 @@ import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||
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';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -50,14 +51,14 @@ export class AllProcessesPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.loadAllProcesses();
|
||||
// this.loadAllProcesses();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/gabinete-digital')) {
|
||||
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing();
|
||||
} else {
|
||||
this.loadAllProcesses();
|
||||
// this.loadAllProcesses();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -66,7 +67,7 @@ export class AllProcessesPage implements OnInit {
|
||||
doRefresh() {
|
||||
|
||||
setTimeout(() => {
|
||||
this.loadAllProcesses();
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
@@ -77,62 +78,11 @@ export class AllProcessesPage implements OnInit {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
async loadAllProcesses() {
|
||||
let allProcessesList = await this.processesService.GetTasksList("", false).toPromise();
|
||||
//
|
||||
allProcessesList = allProcessesList || [];
|
||||
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Conhecimento')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Revisar Diploma')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Gerar Diploma')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Gerar Diploma')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Prorrogar prazo')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Concluir Despacho por Delegação')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Tarefa de Despacho por Delegação')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Reexecutar Despacho por Delegação')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Editar Evento')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Retificar Expediente')
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Agendar Reunião para o Ministro e Director')
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
this.allProcessesList = [];
|
||||
|
||||
allProcessesList.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": new Date(element.taskStartDate),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": element.totalDocuments,
|
||||
"DocId": element.workflowInstanceDataFields.DispatchDocId,
|
||||
"FolderID": element.workflowInstanceDataFields.FolderID,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
"Status": element.workflowInstanceDataFields.Status,
|
||||
"Agenda": element.workflowInstanceDataFields.Agenda,
|
||||
"customDate": this.setFormatDate(new Date(element.workflowInstanceDataFields.StartDate), new Date(element.workflowInstanceDataFields.EndDate), element.workflowInstanceDataFields.IsAllDayEvent),
|
||||
}
|
||||
|
||||
this.allProcessesList.push(task);
|
||||
this.allProcessesList = removeDuplicate(this.allProcessesList)
|
||||
|
||||
this.allProcessesList = this.sortService.sortDate(this.allProcessesList, 'CreateDate');
|
||||
|
||||
});
|
||||
|
||||
this.skeletonLoader = false;
|
||||
}
|
||||
|
||||
get AllProcess() {
|
||||
return this.expedientegbstore.list.concat(this.pedidosstore.listparecer).concat(this.pedidosstore.listdeferimento)
|
||||
.concat(this.despachoprstore.list).concat(this.eventoaprovacaostore.listmd).concat(this.eventoaprovacaostore.listpr)
|
||||
.concat(this.deplomasStore.diplomasList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
|
||||
.concat(this.deplomasStore.diplomasParaAssinarList).concat(this.deplomasStore.diplomasAssinadoList).concat(this.despachoStore.list)
|
||||
}
|
||||
|
||||
get getAllProcessCount() {
|
||||
@@ -147,9 +97,6 @@ export class AllProcessesPage implements OnInit {
|
||||
|
||||
setFormatDate(start: any, end: any, allday: boolean) {
|
||||
let customDate;
|
||||
/* start = new Date();
|
||||
end= new Date("2021-08-04T18:01:04.753Z"); */
|
||||
//end = new Date("2021-09-04T18:01:04.753Z");
|
||||
|
||||
const totalSeconds = Math.floor((end - (start)) / 1000);;
|
||||
const totalMinutes = Math.floor(totalSeconds / 60);
|
||||
@@ -160,8 +107,6 @@ export class AllProcessesPage implements OnInit {
|
||||
const minutes = totalMinutes - (totalDays * 24 * 60) - (hours * 60);
|
||||
const seconds = totalSeconds - (totalDays * 24 * 60 * 60) - (hours * 60 * 60) - (minutes * 60);
|
||||
|
||||
let diffDays = totalDays;
|
||||
let diffMinutes = minutes;
|
||||
|
||||
if (totalDays == 0) {
|
||||
if (allday) {
|
||||
@@ -193,6 +138,8 @@ export class AllProcessesPage implements OnInit {
|
||||
}
|
||||
|
||||
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||
|
||||
|
||||
if (workflowName == 'Despacho') {
|
||||
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
|
||||
@@ -207,6 +154,8 @@ export class AllProcessesPage implements OnInit {
|
||||
}
|
||||
else if (activityName == 'Diploma Assinado') {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']);
|
||||
} else {
|
||||
alert('Bug!');
|
||||
}
|
||||
}
|
||||
else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') {
|
||||
@@ -221,9 +170,6 @@ export class AllProcessesPage implements OnInit {
|
||||
else if (workflowName == "Pedido de Parecer do Presidente") {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
/* else if (workflowName == "Expediente") {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
} */
|
||||
else if (workflowName == 'Agenda Pessoal PR' || workflowName == 'Agenda Oficial PR' || workflowName == 'Agenda Oficial MDGPR' || workflowName == 'Agenda Pessoal MDGPR') {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list/approve-event', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -57,10 +57,9 @@ constructor (
|
||||
|
||||
let despachosPr;
|
||||
|
||||
|
||||
if(this.loggeduser.Profile != 'PR') {
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Tarefa de Despacho");
|
||||
} else if(this.loggeduser.Profile != 'PR') {
|
||||
} else if(this.loggeduser.Profile == 'PR') {
|
||||
despachosPr = result.reverse().filter(data => data.activityInstanceName == "Concluir Despacho");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="thetitle"><ion-label >Diplomas para assinar</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
@@ -30,7 +30,7 @@
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of deplomasStore.diplomasAssinadoList"
|
||||
*ngFor = "let task of deplomasStore.diplomasParaAssinarList"
|
||||
(click)="goToDiploma(task.SerialNumber)"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
|
||||
@@ -75,7 +75,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
this.diplomasList = this.sortService.sortDate(this.diplomasList, 'CreateDate')
|
||||
|
||||
|
||||
this.deplomasStore.resetDiplomasList(this.diplomasList);
|
||||
this.deplomasStore.resetDiplomasParaAssinar(this.diplomasList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DiplomasGerarPage } from './diplomas-gerar.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: DiplomasGerarPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class DiplomasGerarPageRoutingModule {}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DiplomasGerarPageRoutingModule } from './diplomas-gerar-routing.module';
|
||||
|
||||
import { DiplomasGerarPage } from './diplomas-gerar.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DiplomasGerarPageRoutingModule
|
||||
],
|
||||
declarations: [DiplomasGerarPage],
|
||||
exports: [DiplomasGerarPage]
|
||||
})
|
||||
export class DiplomasGerarPageModule {}
|
||||
@@ -0,0 +1,100 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<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">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="doRefresh()">
|
||||
<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()">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<div class="main-container width-100 overflow-y-auto height-100">
|
||||
|
||||
<div *ngIf="diplomasList.length >= 1">
|
||||
|
||||
|
||||
<ion-list >
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of deplomasStore.DiplomaGerarList"
|
||||
(click)="goToDiploma(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</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 && diplomasList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && diplomasList.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>
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
/* :host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
border: 1px solid red;
|
||||
} */
|
||||
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
|
||||
.thetitle{
|
||||
width: fit-content;
|
||||
float: left;
|
||||
}
|
||||
.theicon{
|
||||
width: fit-content;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.bottom-title{
|
||||
width: calc(100% - 40px);
|
||||
margin-left: 20px !important;
|
||||
margin-right: 20px !important;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 5px solid #42b9fe;
|
||||
|
||||
.bottom-text{
|
||||
font-size: 15px !important;
|
||||
font-family: Roboto !important;
|
||||
color: #0d89d1 !important;
|
||||
}
|
||||
}
|
||||
.main-container{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
color:#000;
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
//DIV
|
||||
ion-item{
|
||||
--background: none;
|
||||
}
|
||||
.item {
|
||||
//background-color: var(--white);
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.div-content-expediente{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #dae3f3;
|
||||
padding:5px 5px 15px 5px;
|
||||
margin: 10px 0 10px 0;
|
||||
background: #dae3f3;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.div-content-pendentes{
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-left: 3px solid #d9d9d9;
|
||||
padding: 5px;
|
||||
}
|
||||
.div-content-expediente h3, .div-content-pendentes h3{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14pt;
|
||||
width: 100%;
|
||||
}
|
||||
.div-icon{
|
||||
width: 10%;
|
||||
font-size: 20px;
|
||||
float: left;
|
||||
color: #808080;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: 14pt;
|
||||
color: rgb(94, 92, 92);
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.span-left{
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.span-right{
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
|
||||
/* New CSS */
|
||||
.expediente{
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
border:1px solid #e9e9e9 !important;
|
||||
background-color: var(--white);
|
||||
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: #ffb703;
|
||||
/* 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;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { DiplomasGerarPage } from './diplomas-gerar.page';
|
||||
|
||||
describe('DiplomasGerarPage', () => {
|
||||
let component: DiplomasGerarPage;
|
||||
let fixture: ComponentFixture<DiplomasGerarPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DiplomasGerarPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DiplomasGerarPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas-gerars',
|
||||
templateUrl: './diplomas-gerar.page.html',
|
||||
styleUrls: ['./diplomas-gerar.page.scss'],
|
||||
})
|
||||
export class DiplomasGerarPage implements OnInit {
|
||||
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
serialNumber:string;
|
||||
skeletonLoader = true
|
||||
|
||||
deplomasStore = DeplomasStore
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private router: Router,
|
||||
private sortService: SortService,
|
||||
public ThemeService: ThemeService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList()
|
||||
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-gerar', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
|
||||
|
||||
|
||||
this.skeletonLoader = true
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -23,11 +23,11 @@
|
||||
|
||||
<div class="main-container width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
|
||||
<div *ngIf="deplomasStore.diplomasList.length >= 1 && p.userPermission([p.permissionList.Gabinete.md_tasks])">
|
||||
<div *ngIf="deplomasStore.diplomasReviewList.length >= 1 && p.userPermission([p.permissionList.Gabinete.md_tasks])">
|
||||
<ion-list *ngSwitchCase="'validar'">
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of deplomasStore.diplomasList"
|
||||
*ngFor = "let task of deplomasStore.diplomasReviewList"
|
||||
(click)="goToDiploma(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
@@ -97,13 +97,13 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && deplomasStore.diplomasList.length == 0 && deplomasStore.diplomasAssinadoList.length == 0"
|
||||
*ngIf="!skeletonLoader && deplomasStore.diplomasReviewList.length == 0 && deplomasStore.diplomasAssinadoList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && deplomasStore.diplomasAssinadoList.length == 0 && skeletonLoader && deplomasStore.diplomasList.length == 0">
|
||||
<div *ngIf="skeletonLoader && deplomasStore.diplomasAssinadoList.length == 0 && skeletonLoader && deplomasStore.diplomasReviewList.length == 0">
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
|
||||
@@ -14,26 +14,26 @@ import { PermissionService } from 'src/app/services/permission.service';
|
||||
styleUrls: ['./diplomas.page.scss'],
|
||||
})
|
||||
export class DiplomasPage implements OnInit {
|
||||
//profile:string;
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
diplomasAssinadoList:DailyWorkTask[] = [];
|
||||
showLoader: boolean;
|
||||
serialNumber:string;
|
||||
skeletonLoader = false
|
||||
|
||||
@Input() segment:string;
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
diplomasAssinadoList:DailyWorkTask[] = [];
|
||||
showLoader: boolean;
|
||||
serialNumber:string;
|
||||
skeletonLoader = false
|
||||
|
||||
@Input() segment:string;
|
||||
|
||||
|
||||
deplomasStore = DeplomasStore
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
deplomasStore = DeplomasStore
|
||||
customTaskPipe = new CustomTaskPipe()
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
public p: PermissionService,
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
public p: PermissionService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -69,18 +69,20 @@ constructor(
|
||||
this.diplomasList = [];
|
||||
let diplomasList = [];
|
||||
|
||||
let diplomasValidar = diplomas.filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
diplomasValidar.forEach(element => {
|
||||
// let diplomasReview = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
|
||||
diplomas.forEach(element => {
|
||||
|
||||
let task = this.pipeTask(element)
|
||||
diplomasList.push(task);
|
||||
});
|
||||
|
||||
this.diplomasList = this.sortService.sortDate(diplomasList, 'CreateDate')
|
||||
this.deplomasStore.resetDiplomasList(this.diplomasList)
|
||||
this.deplomasStore.resetDiplomasReview(this.diplomasList)
|
||||
|
||||
let diplomasAssinadoList = []
|
||||
let diplomasAssinados = diplomas.reverse().filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
|
||||
diplomasAssinados.forEach(async element => {
|
||||
|
||||
let task = this.pipeTask(element)
|
||||
|
||||
@@ -131,6 +131,10 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class width-100">
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> secrete-group
|
||||
|
||||
<mat-form-field appearance="none"
|
||||
class="width-100 date-hour-picker">
|
||||
|
||||
Reference in New Issue
Block a user