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:
@@ -53,12 +53,14 @@ export class DespachoPage implements OnInit {
|
|||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
this.activatedRoute.queryParams.subscribe(params => {
|
||||||
if(params["serialNumber"]) {
|
if(params["serialNumber"]) {
|
||||||
this.serialnumber = params["serialNumber"];
|
this.serialnumber = params["serialNumber"];
|
||||||
console.log(params["serialNumber"]);
|
console.log(params["serialNumber"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
|||||||
|
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
import { DespachoPage } from 'src/app/pages/gabinete-digital/despachos/despacho/despacho.page';
|
||||||
|
import { NavigationExtras, Router } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despachos',
|
selector: 'app-despachos',
|
||||||
@@ -49,6 +50,7 @@ export class DespachosPage implements OnInit {
|
|||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private alertService: AlertService,
|
private alertService: AlertService,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
|
private router: Router,
|
||||||
) {
|
) {
|
||||||
this.profile = 'mdgpr';
|
this.profile = 'mdgpr';
|
||||||
// alert('nice!')
|
// alert('nice!')
|
||||||
@@ -132,134 +134,17 @@ export class DespachosPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async viewExpedientDetail(serialNumber:any) {
|
async viewExpedientDetail(serialNumber:any) {
|
||||||
console.log(this.profile);
|
|
||||||
|
|
||||||
const modal = await this.modalController.create({
|
|
||||||
component: DespachoPage,
|
|
||||||
componentProps:{
|
|
||||||
enterAnimation: "",
|
|
||||||
serialNumber: serialNumber,
|
|
||||||
profile: this.profile,
|
|
||||||
},
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then((res)=>{
|
|
||||||
console.log('refresh list');
|
|
||||||
this.LoadList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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];
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
|
let navigationExtras: NavigationExtras = {
|
||||||
|
queryParams: {
|
||||||
|
"serialNumber": serialNumber,
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras);
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
docIndex(index: number) {
|
||||||
this.dicIndex = index;
|
this.dicIndex = index;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -303,6 +303,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
this.loadedAttachments = res;
|
this.loadedAttachments = res;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
|
|||||||
@@ -266,16 +266,16 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
openEventsToApprovePage(profile:any){
|
openEventsToApprovePage(profile:any) {
|
||||||
console.log(profile);
|
console.log(profile);
|
||||||
|
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800) {
|
||||||
//this.openEventsToApproveList(profile);
|
//this.openEventsToApproveList(profile);
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showEventsToApprove = true;
|
this.showEventsToApprove = true;
|
||||||
}
|
}
|
||||||
@@ -347,7 +347,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
|
|
||||||
openPedidosPage(segment:string){
|
openPedidosPage(segment:string){
|
||||||
this.closeAllDesktopComponents();
|
this.closeAllDesktopComponents();
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800) {
|
||||||
this.openPedidoList();
|
this.openPedidoList();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -461,7 +461,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
//if( window.innerWidth <= 1024){
|
//if( window.innerWidth <= 1024){
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: ExpedientePage,
|
component: ExpedientePage,
|
||||||
componentProps:{
|
componentProps: {
|
||||||
profile: this.profile,
|
profile: this.profile,
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
@@ -495,6 +495,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
component: DespachosPage,
|
component: DespachosPage,
|
||||||
componentProps:{
|
componentProps:{
|
||||||
profile: this.profile,
|
profile: this.profile,
|
||||||
|
serialNumber: this.serialNumber
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user