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:
@@ -3,15 +3,13 @@
|
||||
<div class="main-content d-flex height-100">
|
||||
<div *ngIf="LoadedDocument" class="content d-flex flex-column">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex">
|
||||
<div class="title-content width-100 d-flex align-center">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<div class="middle flex-grow-1">
|
||||
<ion-label class="title">{{LoadedDocument.Assunto}}</ion-label>
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-menu-button >
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,5 +104,4 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MenuController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
@@ -8,6 +8,7 @@ import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-se
|
||||
import { FromSearchDocument, SearchFolder } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
@@ -28,6 +29,8 @@ export class DocumentDetailPage implements OnInit {
|
||||
folder: SearchFolder
|
||||
document: FromSearchDocument
|
||||
|
||||
task: any = {}
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
private modalController: ModalController,
|
||||
@@ -36,13 +39,13 @@ export class DocumentDetailPage implements OnInit {
|
||||
private menu: MenuController,
|
||||
private iab: InAppBrowser,
|
||||
public p: PermissionService,
|
||||
private popoverController: PopoverController,
|
||||
) {
|
||||
this.docId = this.navParams.get('docId');
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadDocumentDetails();
|
||||
}
|
||||
|
||||
@@ -57,32 +60,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
console.log(res)
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.docId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
|
||||
@@ -115,6 +93,35 @@ export class DocumentDetailPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
this.task = task
|
||||
|
||||
}
|
||||
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.docId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
this.menu.open();
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
notImplemented() {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'modal modal-desktop'
|
||||
@@ -125,7 +132,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: task,
|
||||
task: this.task,
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -136,39 +143,6 @@ export class DocumentDetailPage implements OnInit {
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -178,7 +152,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
task: task,
|
||||
task: this.task,
|
||||
document: this.LoadedDocument
|
||||
},
|
||||
cssClass: classs,
|
||||
@@ -188,4 +162,15 @@ export class DocumentDetailPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
async openOptions() {
|
||||
const popover = await this.popoverController.create({
|
||||
component: SearchedDocumentOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -263,8 +263,8 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.documentService.setUpMeeting(data).toPromise()
|
||||
this.toastService.successMessage('Processo criado')
|
||||
|
||||
Reference in New Issue
Block a user