mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-searched-document-options',
|
||||
templateUrl: './searched-document-options.page.html',
|
||||
styleUrls: ['./searched-document-options.page.scss'],
|
||||
})
|
||||
export class SearchedDocumentOptionsPage implements OnInit {
|
||||
|
||||
task: any
|
||||
LoadedDocument: any
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private processes: ProcessesService,
|
||||
private toastService: ToastService,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
public p: PermissionService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.navParams.get('task');
|
||||
this.LoadedDocument = this.navParams.get('LoadedDocument')
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
let task;
|
||||
|
||||
if(folder.ApplicationID == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
Folio: folder.Assunto,
|
||||
FsId: folder.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: folder.ApplicationID,
|
||||
FolderID: null,
|
||||
DocId: folder.DispatchNumber,
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
Folio: document.Assunto,
|
||||
FsId: document.ApplicationID,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: document.DocID || document.DocId,
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
const task: ExpedientTaskModalPageNavParamsTask = this.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: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
document: this.LoadedDocument
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
this.modalController.dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
const task: ExpedientTaskModalPageNavParamsTask = this.task
|
||||
|
||||
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,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
this.modalController.dismiss();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any){}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user