mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -81,12 +81,14 @@ export class DespachoPrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"despachospr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "despachospr": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
window.history.back()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<app-header > </app-header>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<div class="main-header">
|
||||
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
|
||||
<div class="thetitle">
|
||||
<ion-label *ngIf="loggeduser.Profile =='MDGPR'" >Despachos Presidenciais</ion-label>
|
||||
<ion-label *ngIf="loggeduser.Profile =='PR'" >Despachos</ion-label>
|
||||
|
||||
@@ -25,7 +25,7 @@ ion-content, .header-2, .main-content{
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
overflow: auto;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
// padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
|
||||
.thetitle{
|
||||
|
||||
@@ -74,6 +74,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -297,7 +298,7 @@ export class DespachosPrPage implements OnInit {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
goBack(){
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,13 +83,23 @@ export class DespachoPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"despachos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
goBack() {
|
||||
|
||||
// this.activatedRoute.queryParams.subscribe(params => {
|
||||
// if(params["from"] == 'pendentes') {
|
||||
// this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
// } else {
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "despachos": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital/despachos'], navigationExtras);
|
||||
// }
|
||||
// });
|
||||
|
||||
window.history.back()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -293,7 +303,7 @@ export class DespachoPage implements OnInit {
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
|
||||
|
||||
<div class="title">
|
||||
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
|
||||
|
||||
|
||||
@@ -69,16 +69,13 @@ export class DespachosPage implements OnInit {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
openExpedientDetailPage(data){
|
||||
console.log(data);
|
||||
openExpedientDetailPage(data) {
|
||||
this.openExpedientDetail.emit(data);
|
||||
}
|
||||
|
||||
@@ -145,7 +142,7 @@ export class DespachosPage implements OnInit {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -156,5 +153,13 @@ export class DespachosPage implements OnInit {
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
goToList() {
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -19,4 +19,5 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
||||
],
|
||||
declarations: [DiplomaAssinarPage]
|
||||
})
|
||||
|
||||
export class DiplomaAssinarPageModule {}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
<app-header > </app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
+19
@@ -1,4 +1,23 @@
|
||||
@import '~src/function.scss';
|
||||
|
||||
:host{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header-2 {
|
||||
border-top-right-radius: 24px;
|
||||
border-top-left-radius: 24px;
|
||||
}
|
||||
|
||||
ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
.main-content{
|
||||
background-color: #fff !important;
|
||||
border-top-left-radius: 25px;
|
||||
|
||||
+1
-10
@@ -52,16 +52,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomasassinar": true,
|
||||
}
|
||||
};
|
||||
if( window.innerWidth < 801){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
} else {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
window.history.back()
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
@@ -7,13 +7,15 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { DiplomasAssinarPageRoutingModule } from './diplomas-assinar-routing.module';
|
||||
|
||||
import { DiplomasAssinarPage } from './diplomas-assinar.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
DiplomasAssinarPageRoutingModule
|
||||
DiplomasAssinarPageRoutingModule,
|
||||
SharedModule
|
||||
],
|
||||
declarations: [DiplomasAssinarPage]
|
||||
})
|
||||
|
||||
@@ -1,9 +1,94 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>diplomas-assinar</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header > </app-header>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh($event)">
|
||||
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="bottom-title d-flex"><h3 class="bottom-text">Diplomas por Assinar</h3></div>
|
||||
</div>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
<div class="main-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="width-100">
|
||||
<div *ngIf="diplomasList">
|
||||
<ion-list >
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of diplomasList"
|
||||
(click)="goToDiploma(task.SerialNumber)"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Remetente}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!diplomasList">
|
||||
|
||||
<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,198 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header-2 {
|
||||
border-top-right-radius: 24px;
|
||||
border-top-left-radius: 24px;
|
||||
}
|
||||
|
||||
ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
|
||||
.title{
|
||||
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;
|
||||
}
|
||||
}
|
||||
.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;
|
||||
margin-bottom: 10px;
|
||||
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{
|
||||
padding-top: 10px;
|
||||
}
|
||||
.exp-list-item{
|
||||
overflow: auto;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.exp-top-detail{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.exp-date{
|
||||
width: auto;
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-style: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: normal;
|
||||
color: #797979;
|
||||
float: left;
|
||||
}
|
||||
.exp-remetente{
|
||||
font-family: Roboto;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: #000000;
|
||||
float: left;
|
||||
margin-left: 16px;
|
||||
|
||||
}
|
||||
.exp-icon{
|
||||
width: 45px;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
}
|
||||
.exp-icon ion-icon{
|
||||
font-size: 25px;
|
||||
color: #42b9fe;
|
||||
}
|
||||
.exp-bottom-detail{
|
||||
float: left;
|
||||
font-family: Roboto;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #0d89d1;
|
||||
}
|
||||
.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,4 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diplomas-assinar',
|
||||
@@ -6,10 +13,93 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./diplomas-assinar.page.scss'],
|
||||
})
|
||||
export class DiplomasAssinarPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
//profile:string;
|
||||
diplomasList:DailyWorkTask[] = [];
|
||||
showLoader: boolean;
|
||||
totalDocs:any;
|
||||
serialNumber:string;
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() segment:string;
|
||||
|
||||
constructor(
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log(diplomas);
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar diploma");
|
||||
console.log(diplomasAssinar);
|
||||
diplomasAssinar.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
let ApplicationId = element.workflowInstanceDataFields.ApplicationId;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": formatDate(new Date(element.taskStartDate), 'yyyy-MM-dd HH:mm', 'pt'),
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
});
|
||||
});
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
// window.history.back()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,12 +53,14 @@ export class DiplomaPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"diplomas": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "diplomas": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
window.history.back()
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
|
||||
@@ -52,7 +52,18 @@ constructor(
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
if (this.segment == 'assinados') {
|
||||
navigationExtras= { queryParams: {"assinados": true,}};
|
||||
} else if (this.segment == 'validar') {
|
||||
navigationExtras = { queryParams: {"validar": true,}};
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
|
||||
// this.LoadList();
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any) {
|
||||
@@ -160,8 +171,9 @@ constructor(
|
||||
});
|
||||
}
|
||||
|
||||
goBack(){
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
// window.history.back()
|
||||
}
|
||||
|
||||
}
|
||||
+5
@@ -296,6 +296,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
this.goToGabinete()
|
||||
},3000)
|
||||
|
||||
}
|
||||
@@ -316,5 +317,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
},3000)
|
||||
}
|
||||
|
||||
goToGabinete() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -84,13 +84,16 @@ export class ExpedientePrPage implements OnInit {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"expedientes-pr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
goBack() {
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "expedientes-pr": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
window.history.back();
|
||||
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
|
||||
@@ -149,8 +149,16 @@ export class ExpedientesPrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
goBack() {
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "expedientes-pr": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
window.history.back();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -356,7 +356,15 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
//this.openPedidoList();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"deferimento": true,}};
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
if (segment == 'deferimento') {
|
||||
navigationExtras= { queryParams: {"deferimento": true,}};
|
||||
} else if (segment == 'parecer') {
|
||||
navigationExtras = { queryParams: {"parecer": true,}};
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
@@ -421,7 +429,9 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
|
||||
openDiplomasPage(segment:string) {
|
||||
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
|
||||
@@ -437,16 +447,32 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
openDiplomasAssinarPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showDiplomasAssinar = true;
|
||||
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
} else {
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showDiplomasAssinar = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
openSignedDiploma(segment:string) {
|
||||
|
||||
@@ -63,15 +63,6 @@ export class PedidoPage implements OnInit {
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
}
|
||||
|
||||
goBack(){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"pedidos": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
@@ -402,4 +393,10 @@ export class PedidoPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
window.history.back();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,17 +68,28 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
if (this.segment == 'deferimento') {
|
||||
navigationExtras= { queryParams: {"deferimento": true,}};
|
||||
} else if (this.segment == 'parecer') {
|
||||
navigationExtras = { queryParams: {"parecer": true,}};
|
||||
}
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
|
||||
//this.LoadList();
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
}
|
||||
goToPedido(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
@@ -164,24 +175,34 @@ export class PedidosPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: PedidoPage,
|
||||
componentProps:{
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
console.log('refresh list');
|
||||
this.LoadList();
|
||||
});
|
||||
}
|
||||
// const modal = await this.modalController.create({
|
||||
// component: PedidoPage,
|
||||
// componentProps:{
|
||||
// enterAnimation: "",
|
||||
// serialNumber: serialNumber,
|
||||
// profile: this.profile,
|
||||
// },
|
||||
// cssClass: 'modal modal-desktop',
|
||||
// });
|
||||
// await modal.present();
|
||||
// modal.onDidDismiss().then((res)=>{
|
||||
// console.log('refresh list');
|
||||
// this.LoadList();
|
||||
// });
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
profile: this.profile,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ export class PendentesPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
@@ -66,41 +67,20 @@ export class PendentesPage implements OnInit {
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
this.processes.GetTasksList("Despacho", false).subscribe(despachos => {
|
||||
//ParecerList
|
||||
this.processes.GetTasksList("Pedido de Parecer", false).subscribe(pareceres => {
|
||||
//DeferimentoList
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(deferimentos => {
|
||||
this.pendentesList = new Array();
|
||||
//PendentesList
|
||||
let pendentes = despachos.concat(pareceres, deferimentos).reverse().filter(data => data.workflowInstanceDataFields.Status == "Pending");
|
||||
pendentes.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
|
||||
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();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": this.totalDocs,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.pendentesList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
this.processes.GetTasksList("Despacho", false).subscribe(despachos => {
|
||||
//ParecerList
|
||||
this.processes.GetTasksList("Pedido de Parecer", false).subscribe(pareceres => {
|
||||
//DeferimentoList
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(deferimentos => {
|
||||
this.pendentesList = new Array();
|
||||
//PendentesList
|
||||
let pendentes = despachos.concat(pareceres, deferimentos).reverse().filter(data => data.workflowInstanceDataFields.Status == "Pending");
|
||||
pendentes.forEach(element => {
|
||||
let DocId = element.workflowInstanceDataFields.FolderID;
|
||||
this.processes.GetDocumentDetails(DocId, '361').subscribe(res=>{
|
||||
this.totalDocs = res.DocumentsTotal;
|
||||
console.log(res.DocumentsTotal);
|
||||
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();
|
||||
|
||||
@@ -116,14 +96,33 @@ export class PendentesPage implements OnInit {
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.pendentesList.push(task);
|
||||
});
|
||||
this.pendentesList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
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();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
"Senders": element.workflowInstanceDataFields.Sender,
|
||||
"CreateDate": taskDate,
|
||||
"DocumentURL": element.workflowInstanceDataFields.ViewerRequest,
|
||||
"Remetente": element.workflowInstanceDataFields.Remetente,
|
||||
"DocumentsQty": 0,
|
||||
"DocId": element.workflowInstanceDataFields.DocId,
|
||||
"WorkflowName": element.workflowDisplayName,
|
||||
"activityInstanceName": element.activityInstanceName,
|
||||
}
|
||||
this.pendentesList.push(task);
|
||||
});
|
||||
console.log(pendentes);
|
||||
console.log(this.pendentesList);
|
||||
});//Fim deferimento
|
||||
});//Fim parecer
|
||||
});//Fim despacho
|
||||
});
|
||||
console.log(pendentes);
|
||||
console.log(this.pendentesList);
|
||||
});//Fim deferimento
|
||||
});//Fim parecer
|
||||
});//Fim despacho
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
@@ -151,17 +150,19 @@ export class PendentesPage implements OnInit {
|
||||
|
||||
goToDespacho(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"from": "pendentes"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
goToPedido(serialNumber:any) {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"from": "pendentes"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
@@ -171,6 +172,7 @@ export class PendentesPage implements OnInit {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"from": "pendentes"
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/expediente/expediente-detail'], navigationExtras);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { OptsExpedientePrPage } from './opts-expediente-pr.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: OptsExpedientePrPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class OptsExpedientePrPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { OptsExpedientePrPageRoutingModule } from './opts-expediente-pr-routing.module';
|
||||
|
||||
import { OptsExpedientePrPage } from './opts-expediente-pr.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
OptsExpedientePrPageRoutingModule
|
||||
],
|
||||
declarations: [OptsExpedientePrPage]
|
||||
})
|
||||
export class OptsExpedientePrPageModule {}
|
||||
@@ -0,0 +1,30 @@
|
||||
<ion-content class="container">
|
||||
|
||||
<div class="arrow-right" (click)="close()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task">
|
||||
<div *ngIf="loggeduser.Profile =='MDGPR' " class="buttons">
|
||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
</div>
|
||||
<div *ngIf="loggeduser.Profile =='PR' " class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-ok" shape="round" >Marcar para Despacho</button>
|
||||
<button (click)="distartExpedientModal(fulltask)" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
@@ -0,0 +1,56 @@
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { OptsExpedientePrPage } from './opts-expediente-pr.page';
|
||||
|
||||
describe('OptsExpedientePrPage', () => {
|
||||
let component: OptsExpedientePrPage;
|
||||
let fixture: ComponentFixture<OptsExpedientePrPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ OptsExpedientePrPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(OptsExpedientePrPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,306 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { BadRequestComponent } from '../bad-request/bad-request.component';
|
||||
import { SuccessMessageComponent } from '../success-message/success-message.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
templateUrl: './opts-expediente-pr.page.html',
|
||||
styleUrls: ['./opts-expediente-pr.page.scss'],
|
||||
})
|
||||
export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
customDate:any;
|
||||
|
||||
task: any;
|
||||
fulltask: any;
|
||||
eventsList: Event[];
|
||||
serialnumber: string;
|
||||
profile: string;
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private processes: ProcessesService,
|
||||
private attachments: AttachmentsService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private userAuth: AuthService,
|
||||
private navParams: NavParams,
|
||||
) {
|
||||
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
this.profile = "mdgpr";
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
console.log(res);
|
||||
if(res.data){
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
if(actionName == 'Aprovar'){
|
||||
this.approve(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Revisão'){
|
||||
this.sendToReview(res.data.note, docs);
|
||||
}
|
||||
this.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async approve(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Aprovar",
|
||||
"ActionTypeId": 100000004 ,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch(error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any) {
|
||||
console.log(this.fulltask);
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']== 'Yes'){
|
||||
this.processes.CompleteTask(body);
|
||||
this.goBack();
|
||||
}
|
||||
else if(res['data'] == 'No'){
|
||||
let otherbody = {
|
||||
"serialNumber": body.serialNumber,
|
||||
"action": "Passivo",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
this.processes.CompleteTask(otherbody);
|
||||
}
|
||||
//Volta na lista principal
|
||||
this.goBack();
|
||||
this.modalController.dismiss();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async sendToReview(note:string, documents:any){
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Retificar",
|
||||
"ActionTypeId": 99999877,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
this.successMessage()
|
||||
} catch(error) {
|
||||
this.badRequest()
|
||||
}
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
let body = res['data'];
|
||||
// alert('close '+ res['data'])
|
||||
if(res['data']){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal(body);
|
||||
|
||||
}
|
||||
else{
|
||||
console.log('Not open');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
close() {
|
||||
if( window.innerWidth <= 1024) {
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
goBack() {
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "expedientes-pr": true,
|
||||
// }
|
||||
// };
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
window.history.back();
|
||||
|
||||
}
|
||||
|
||||
|
||||
async successMessage(message?: string) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: SuccessMessageComponent,
|
||||
componentProps: {
|
||||
message: message || 'Processo efetuado' ,
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},3000)
|
||||
|
||||
}
|
||||
|
||||
async badRequest() {
|
||||
const modal = await this.modalController.create({
|
||||
component: BadRequestComponent,
|
||||
componentProps: {
|
||||
message: 'hello',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
|
||||
modal.present()
|
||||
|
||||
setTimeout(()=>{
|
||||
modal.dismiss()
|
||||
},1000)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { RequestOptionsPage } from './request-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: RequestOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class RequestOptionsPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { RequestOptionsPageRoutingModule } from './request-options-routing.module';
|
||||
|
||||
import { RequestOptionsPage } from './request-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RequestOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [RequestOptionsPage]
|
||||
})
|
||||
export class RequestOptionsPageModule {}
|
||||
@@ -0,0 +1,54 @@
|
||||
<ion-content class="container">
|
||||
<div class="arrow-right" (click)="close()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Reapreciar Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Deferimento'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openAddNoteModal('Solicitar Reapreciação')" class="btn-cancel" shape="round" >Solicitar Reapreciação</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer'">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Parecer'">
|
||||
<button (click)="openDarParecer(task)" class="btn-cancel" shape="round" >Dar o meu Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,56 @@
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
display: none;
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { RequestOptionsPage } from './request-options.page';
|
||||
|
||||
describe('RequestOptionsPage', () => {
|
||||
let component: RequestOptionsPage;
|
||||
let fixture: ComponentFixture<RequestOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ RequestOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(RequestOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,268 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
|
||||
import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-request-options',
|
||||
templateUrl: './request-options.page.html',
|
||||
styleUrls: ['./request-options.page.scss'],
|
||||
})
|
||||
export class RequestOptionsPage implements OnInit {
|
||||
|
||||
task:any;
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
serialnumber : string
|
||||
showEnviarPendentes = false
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params["serialNumber"]) {
|
||||
this.serialnumber = params["serialNumber"];
|
||||
// console.log(params["serialNumber"]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.showEnviarPendentes = this.navParams.get('showEnviarPendentes');
|
||||
|
||||
if(!this.showEnviarPendentes) this.showEnviarPendentes = false
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.task);
|
||||
this.profile = "mdgpr";
|
||||
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth >= 800){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
close(){
|
||||
if( window.innerWidth <= 1024){
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
else{
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
sendExpedienteToPending(){
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: BookMeetingModalPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
//this.modalController.dismiss();
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
profile: this.profile,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
if(res['data']=='openDiscart'){
|
||||
console.log('open discart');
|
||||
|
||||
this.distartExpedientModal();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
console.log(this.fulltask);
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.fulltask.serialNumber,
|
||||
folderId: this.fulltask.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
this.close();
|
||||
/* console.log('2Expedient Discard closed2');
|
||||
this.close();
|
||||
this.openMenu(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
repreciar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Reapreciação",
|
||||
"ActionTypeId": 100000009,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
}
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: AddNotePage,
|
||||
componentProps:{
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: true
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(res => {
|
||||
|
||||
|
||||
const DocumentToSave = res.data.documents.map((e) => {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType,
|
||||
SourceId: e.Id,
|
||||
}
|
||||
});
|
||||
|
||||
let docs = {
|
||||
ProcessInstanceID: "",
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
|
||||
if(res.data){
|
||||
if(actionName == 'Solicitar Reapreciação') {
|
||||
|
||||
this.repreciar(res.data.note, docs);
|
||||
}
|
||||
else if(actionName == 'Arquivar'){
|
||||
this.arquivar(res.data.note, docs);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
arquivar(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Arquivo",
|
||||
"ActionTypeId": 95,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
this.processes.CompleteTask(body);
|
||||
this.close();
|
||||
}
|
||||
|
||||
async openDarParecer(task: any) {
|
||||
console.log(task);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DarParecerPage,
|
||||
componentProps: {
|
||||
serialNumber: this.task.SerialNumber,
|
||||
ProcessInstanceID: this.task.ProcessInstanceID,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openDelegarModal(task: any) {
|
||||
console.log(task);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DelegarPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user