viewer hot-fix

This commit is contained in:
Peter Maquiran
2021-10-08 19:29:21 +01:00
parent 405c989b87
commit 9ceb915fef
37 changed files with 708 additions and 360 deletions
@@ -63,7 +63,7 @@
<ion-item *ngFor="let attachment of fulltask.Documents"
class="ion-no-margin ion-no-padding cursor-pointer">
<ion-label
(click)="viewDocument(attachment.DocId)">
(click)="viewDocument(attachment.DocId, attachment)">
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
@@ -18,6 +18,7 @@ import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-opti
import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'
import { DespachoService } from 'src/app/Rules/despacho.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-despacho-pr',
@@ -145,13 +146,26 @@ export class DespachoPrPage implements OnInit {
});
}
viewDocument(docId:string){
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
console.log(res);
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(DocId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
openMenu() {
@@ -59,7 +59,7 @@
<ion-list>
<h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label>
@@ -17,6 +17,7 @@ import { Location } from '@angular/common'
import { fullTask } from 'src/app/models/dailyworktask.model';
import { AttachmentList } from 'src/app/models/Excludetask';
import { PermissionService } from 'src/app/services/worker/permission.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-despacho',
@@ -158,12 +159,26 @@ export class DespachoPage implements OnInit {
});
}
viewDocument(docId:string) {
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(docId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
openMenu() {
@@ -63,7 +63,7 @@
class="ion-no-margin ion-no-padding cursor-pointer"
>
<ion-label
(click)="viewDocument(attachment.DocId)"
(click)="viewDocument(attachment.DocId, attachment)"
>
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
@@ -13,6 +13,7 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-diploma-assinar',
@@ -134,13 +135,26 @@ export class DiplomaAssinarPage implements OnInit {
}
viewDocument(docId:string){
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
console.log(res);
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(DocId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
getDocumentDetails(forlderId:string, applicationId:string) {
@@ -63,7 +63,7 @@
class="ion-no-margin ion-no-padding cursor-pointer"
>
<ion-label
(click)="viewDocument(attachment.DocId)">
(click)="viewDocument(attachment.DocId, attachment)">
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
@@ -11,6 +11,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-diploma',
@@ -155,12 +156,26 @@ export class DiplomaPage implements OnInit {
}
viewDocument(docId:string){
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(DocId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
getDocumentDetails(forlderId:string, applicationId:string) {
@@ -103,9 +103,7 @@ export class ExpedientTaskModalPage implements OnInit {
private attachmentsService: AttachmentsService,
private navParams: NavParams,
private alertController: AlertService,
private authService: AuthService,
private userAuth: AuthService,
private animationController: AnimationController,
private toastService: ToastService,
private despachoService: DespachoService
) {
@@ -131,12 +129,7 @@ export class ExpedientTaskModalPage implements OnInit {
DeadlineType: '',
SubjectTypes: this.selectedTypes,
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
};
console.log('task 123123', this.task)
console.log('this.aplicationId', this.aplicationId)
this.postData.DispatchFolder = this.dispatchFolder;
this.postData.UsersSelected = this.participants;
@@ -547,28 +540,6 @@ export class ExpedientTaskModalPage implements OnInit {
this.taskParticipantsCc = taskParticipantsCc;
}
async distartExpedientModal() {
const modal = await this.modalController.create({
component: DiscartExpedientModalPage,
componentProps: {
serialNumber: this.task.serialNumber,
folderId: this.task.workflowInstanceDataFields.FolderID,
action: 'complete',
},
cssClass: 'discart-expedient-modal',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(res=>{
if(res['data']=='close'){
console.log('Expedient Discard closed');
this.modalController.dismiss(res['data'])
}
});
}
async setContact(data:EventPerson[]) {
if(this.adding == "intervenient"){
@@ -580,8 +551,6 @@ export class ExpedientTaskModalPage implements OnInit {
}
async closeComponent() {
this.showAttendees = false;
}
@@ -54,7 +54,7 @@
<ion-list>
<h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label>
@@ -23,6 +23,7 @@ import { expedienteTask } from 'src/app/models/dailyworktask.model';
import { TaskService } from 'src/app/Rules/task.service';
import { DocumentViewerPage } from 'src/app/modals/document-viewer/document-viewer.page';
import { PermissionService } from 'src/app/services/worker/permission.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
@@ -87,7 +88,7 @@ export class ExpedienteDetailPage implements OnInit {
}
showToast() {
this.toastService.presentToast('Não foi possível fazer login"');
this.toastService.presentToast('Não foi possível fazer login');
}
@@ -303,9 +304,27 @@ export class ExpedienteDetailPage implements OnInit {
}
async viewDocument(DocId:string) {
async viewDocument(DocId:string, Document) {
this.expedienteService.viewDocument({ApplicationId:'361', DocId})
// this.expedienteService.viewDocument({ApplicationId:'361', DocId})
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
@@ -65,7 +65,7 @@
<ion-list>
<h5>Documentos Anexados</h5>
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
</ion-label>
@@ -19,6 +19,7 @@ import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchList } from 'src/app/models/search-document';
import { Location } from '@angular/common';
import { AttachmentList } from 'src/app/models/Excludetask';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-expediente-pr',
@@ -195,14 +196,26 @@ export class ExpedientePrPage implements OnInit {
});
}
viewDocument(DocId:string) {
this.processes.GetDocumentUrl(DocId, this.task.FsId).subscribe(res=>{
console.log(res);
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(DocId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
attachDocument() {
@@ -65,7 +65,7 @@
class="ion-no-margin ion-no-padding cursor-pointer"
>
<ion-label
(click)="viewDocument(attachment.DocId)"
(click)="viewDocument(attachment.DocId, attachment)"
>
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
@@ -20,6 +20,7 @@ import { ForwardPage } from 'src/app/modals/forward/forward.page';
import { Location } from '@angular/common';
import { PedidoService } from 'src/app/Rules/pedido.service';
import { PermissionService } from 'src/app/services/worker/permission.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
@Component({
selector: 'app-pedido',
@@ -178,12 +179,26 @@ export class PedidoPage implements OnInit {
})
}
viewDocument(docId:string) {
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
browser.show();
async viewDocument(DocId:string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
openMenu() {