mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header > </app-header>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
<div class="main-header">
|
||||
<div class="thetitle">
|
||||
<ion-label *ngIf="loggeduser.Profile =='MDGPR'" >Despachos Presidenciais</ion-label>
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
@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;
|
||||
}
|
||||
|
||||
.main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
|
||||
@@ -53,12 +53,11 @@ export class DespachosPrPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private authService: AuthService,
|
||||
private navParams: NavParams,
|
||||
private router: Router,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.profile = this.navParams.get('profile') || 'mdgpr';
|
||||
this.profile = 'mdgpr';
|
||||
|
||||
}
|
||||
|
||||
@@ -68,10 +67,10 @@ export class DespachosPrPage implements OnInit {
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -81,7 +80,7 @@ export class DespachosPrPage implements OnInit {
|
||||
goToDespachoPr(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras);
|
||||
@@ -142,12 +141,12 @@ export class DespachosPrPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
sortArrayISODate(myArray: any){
|
||||
return myArray.sort(function(a, b) {
|
||||
return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
|
||||
});
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.LoadList();
|
||||
|
||||
@@ -182,120 +181,119 @@ export class DespachosPrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// old
|
||||
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'
|
||||
}
|
||||
// old
|
||||
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 doc = this.loadedAttachments[ this.dicIndex];
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
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();
|
||||
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 openBookMeetingModal(task: any) {
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
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: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
|
||||
console.log(doc, this.dicIndex, this.taskList)
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: doc.serialNumber,
|
||||
folderId: doc.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(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal(task: any) {
|
||||
|
||||
const doc = this.loadedAttachments[ this.dicIndex];
|
||||
|
||||
task = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
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: task,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
async distartExpedientModal() {
|
||||
|
||||
const doc = this.taskList[ this.dicIndex];
|
||||
|
||||
console.log(doc, this.dicIndex, this.taskList)
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: doc.serialNumber,
|
||||
folderId: doc.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(); */
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
|
||||
@@ -13,6 +13,7 @@ ion-content, .header-2, .main-content{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
</ion-list>
|
||||
|
||||
</div>
|
||||
<div *ngIf="">
|
||||
<div *ngIf="diplomasList">
|
||||
<ion-list *ngSwitchCase="'assinados'">
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, 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';
|
||||
@@ -27,7 +27,8 @@ constructor(
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
) {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
this.segment = 'validar'
|
||||
}
|
||||
@@ -35,6 +36,18 @@ constructor(
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = 'validar';
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
|
||||
if(params['segment'] == 'validar') {
|
||||
this.segment = 'validar';
|
||||
} else if (params['segment'] == 'assinados') {
|
||||
this.segment = 'assinados';
|
||||
}
|
||||
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -42,12 +55,12 @@ constructor(
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goToDiploma(serialNumber:any){
|
||||
goToDiploma(serialNumber:any) {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas/diploma'], navigationExtras);
|
||||
}
|
||||
|
||||
@@ -61,7 +74,8 @@ constructor(
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
|
||||
console.log(diplomas);
|
||||
console.log('diplomas', diplomas);
|
||||
|
||||
switch (this.segment) {
|
||||
case 'validar':
|
||||
let diplomasValidar = diplomas.reverse().filter(data => data.activityInstanceName == "Revisar Diploma");
|
||||
@@ -86,7 +100,7 @@ constructor(
|
||||
}
|
||||
this.diplomasList.push(task);
|
||||
},
|
||||
(error)=>{
|
||||
(error)=> {
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
"Folio": element.workflowInstanceDataFields.Subject,
|
||||
@@ -105,7 +119,6 @@ constructor(
|
||||
this.showLoader = false;
|
||||
break;
|
||||
case 'assinados':
|
||||
console.log('Assinados');
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -140,5 +153,5 @@ constructor(
|
||||
goBack(){
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -352,11 +352,12 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
openPedidosPage(segment:string){
|
||||
openPedidosPage(segment:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800) {
|
||||
//this.openPedidoList();
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"deferimento": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
this.segment = segment;
|
||||
@@ -366,7 +367,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
openDespachosPage(segment:string){
|
||||
openDespachosPage(segment:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDespachoList();
|
||||
@@ -423,7 +424,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas']);
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
this.segment = segment;
|
||||
@@ -437,7 +439,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 800){
|
||||
//this.openDeploma();
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"diplomasassinar": true,}};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
@@ -37,10 +37,11 @@ export class PedidosPage implements OnInit {
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private router: Router,
|
||||
private processes:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
this.profile = 'mdgpr';
|
||||
}
|
||||
@@ -48,11 +49,21 @@ export class PedidosPage implements OnInit {
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = 'parecer';
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(params['deferimento'] == 'true') {
|
||||
this.segment = 'deferimento';
|
||||
} else if (params['parecer'] == 'true') {
|
||||
this.segment = 'parecer';
|
||||
}
|
||||
|
||||
this.LoadList();
|
||||
});
|
||||
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goBack(){
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
@@ -63,7 +74,7 @@ export class PedidosPage implements OnInit {
|
||||
goToPedido(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
|
||||
Reference in New Issue
Block a user