This commit is contained in:
tiago.kayaya
2021-10-09 12:15:46 +01:00
40 changed files with 879 additions and 582 deletions
@@ -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) {