mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Save
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
@Component({
|
||||
selector: 'app-despachos-pr',
|
||||
templateUrl: './despachos-pr.page.html',
|
||||
@@ -7,9 +8,29 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class DespachosPrPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
task: any;
|
||||
attachments:any;
|
||||
fulltask: any;
|
||||
|
||||
constructor(public popoverController: PopoverController) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: OptsExpedientePage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask,
|
||||
taskAction:taskAction,
|
||||
showEnviarPendentes: false
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,10 +46,11 @@
|
||||
<div class="middle">
|
||||
<ion-label class="title">{{ task.Folio}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-menu-button autoHide="false">
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<!-- <ion-menu-button autoHide="false">
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
</ion-menu-button> -->
|
||||
<ion-icon class="font-25 cursor-pointer" name="ellipsis-vertical-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../../../../models/event.model';
|
||||
import { MenuController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||
import { momentG } from 'src/plugin/momentG'
|
||||
@@ -17,6 +17,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
|
||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -47,7 +48,8 @@ export class DespachoPage implements OnInit {
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private alertService: AlertService) {
|
||||
private alertService: AlertService,
|
||||
public popoverController: PopoverController) {
|
||||
this.serialnumber = this.navParams.get('serialNumber');
|
||||
this.profile = this.navParams.get('profile');
|
||||
}
|
||||
@@ -299,4 +301,20 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openOptions(taskAction?: any) {
|
||||
const popover = await this.popoverController.create({
|
||||
component: OptsExpedientePage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
fulltask: this.fulltask,
|
||||
taskAction:taskAction,
|
||||
showEnviarPendentes: false
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,8 +132,6 @@ doRefresh(event) {
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DespachoPage,
|
||||
componentProps:{
|
||||
@@ -163,15 +161,15 @@ async viewExpedientDetail(serialNumber: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
|
||||
},
|
||||
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({
|
||||
@@ -261,7 +259,7 @@ async viewExpedientDetail(serialNumber:any) {
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div [class.active]="selectedElement == 'approval'" (click)="openEventsToApprovePage('MDGPR');selectedElement='approval'" class="exp-card d-flex flex-column" >
|
||||
<div [class.active]="selectedElement == 'approval'" (click)="openEventsToApprovePage('MDGPR');selectedElement='approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,8 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { DespachosPage } from './despachos/despachos.page';
|
||||
import { PedidosPage } from './pedidos/pedidos.page';
|
||||
import { PendentesPage } from './pendentes/pendentes.page';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -16,7 +18,7 @@ import { PendentesPage } from './pendentes/pendentes.page';
|
||||
})
|
||||
|
||||
export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
segment:string;
|
||||
showLoader: boolean;
|
||||
public profile:string;
|
||||
@@ -57,14 +59,19 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
serialNumber:string;
|
||||
|
||||
loggeduser: User;
|
||||
|
||||
constructor(
|
||||
private processesbackend:ProcessesService,
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
authService: AuthService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 800){
|
||||
@@ -89,7 +96,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='RequestsForOpinion'
|
||||
|
||||
}
|
||||
else if (window.innerWidth >= 800) {
|
||||
else if (window.innerWidth >= 800 && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.openEventsToApprovePage('MDGPR');
|
||||
this.selectedElement='approval'
|
||||
}
|
||||
@@ -133,7 +140,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.showEmptyContainer = false;
|
||||
this.showEventsToApprove = false;
|
||||
this.showExpedients = false;
|
||||
this.showExpedients = false;
|
||||
this.showPedidos = false;
|
||||
this.showDespachos = false;
|
||||
this.showDespachosPr = false;
|
||||
@@ -247,6 +253,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.openExpedientList();
|
||||
}
|
||||
else{
|
||||
this.selectedElement='Correspondence'
|
||||
this.showExpedients = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = 'parecer';
|
||||
//Inicializar segment
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ export class AuthService {
|
||||
|
||||
if (result) {
|
||||
|
||||
if( response.RoleID == 100000014){
|
||||
if( response.RoleID == 100000014) {
|
||||
response.Profile = 'PR'
|
||||
} else if(response.RoleID == 100000011) {
|
||||
response.Profile = 'MDGPR'
|
||||
response.Profile = 'PR'
|
||||
}
|
||||
response.BasicAuthKey = user.BasicAuthKey
|
||||
this.ValidatedUser = response;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" full class="btn-ok" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal()" full class="btn-ok" shape="round" >Marcar reunião</button>
|
||||
<button (click)="distartExpedientModal(fulltask)" full class="btn-ok" shape="round" >Descartar</button>
|
||||
<button (click)="sendExpedienteToPending()" full class="btn-ok" shape="round" >Enviar para pendentes</button>
|
||||
<button (click)="sendExpedienteToPending()" full class="btn-ok" shape="round" *ngIf="showEnviarPendentes" >Enviar para pendentes</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,8 @@ export class OptsExpedientePage implements OnInit {
|
||||
fulltask: any;
|
||||
profile:string;
|
||||
|
||||
showEnviarPendentes = false
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -23,6 +25,11 @@ export class OptsExpedientePage implements OnInit {
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
this.showEnviarPendentes = this.navParams.get('showEnviarPendentes');
|
||||
|
||||
if(!this.showEnviarPendentes) this.showEnviarPendentes = false
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
Reference in New Issue
Block a user