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:
@@ -66,7 +66,7 @@
|
||||
<div>
|
||||
<div class="file">
|
||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||
<div (click)="viewDocument(msg.file)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<div (click)="viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type">
|
||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||
|
||||
@@ -365,14 +365,14 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
};
|
||||
}
|
||||
|
||||
viewDocument(file:any){
|
||||
if(file.type == "file"){
|
||||
let fullUrl = "https://www.tabularium.pt" + file.title_link;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
viewDocument(file:any, url?:string){
|
||||
|
||||
if(file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
else{
|
||||
//this.fileService.viewDocumentByUrl(file.title_link);
|
||||
this.openViewDocumentModal(file);
|
||||
let fullUrl = "https://www.tabularium.pt" + url;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div>
|
||||
<div class="file">
|
||||
<!-- <canvas id="pdf_canvas"></canvas> -->
|
||||
<div (click)="docIndex(i); viewDocument(msg.file)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<div (click)="docIndex(i); viewDocument(msg.file, file.title_link)" class="file-details add-ellipsis cursor-pointer" *ngIf="msg.file">
|
||||
<span *ngIf="msg.file.type">
|
||||
<fa-icon *ngIf="msg.file.type == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
|
||||
<fa-icon *ngIf="msg.file.type == 'application/word'" icon="file-word" class="word-icon"></fa-icon>
|
||||
|
||||
@@ -282,16 +282,15 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(file:any){
|
||||
viewDocument(file:any, url?:string){
|
||||
console.log(file);
|
||||
|
||||
if(file.type == "file"){
|
||||
let fullUrl = "https://www.tabularium.pt" + file.title_link;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
if(file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
else{
|
||||
//this.fileService.viewDocumentByUrl(file.title_link);
|
||||
this.openViewDocumentModal(file);
|
||||
let fullUrl = "https://www.tabularium.pt" + url;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,8 +267,6 @@ export class FileService {
|
||||
modal.onDidDismiss().then(async res=>{
|
||||
const data = res.data;
|
||||
|
||||
alert('HERE')
|
||||
|
||||
if(data.selected){
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
@@ -277,14 +275,9 @@ export class FileService {
|
||||
console.log(res.data.selected.Id);
|
||||
console.log(res.data.selected.ApplicationType);
|
||||
|
||||
console.log('AQUIIIII');
|
||||
|
||||
alert('HERE 2')
|
||||
|
||||
let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise();
|
||||
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
console.log(url_no_options);
|
||||
console.log('Oie');
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
@@ -306,7 +299,6 @@ export class FileService {
|
||||
"ApplicationId": res.data.selected.ApplicationType,
|
||||
"DocId": res.data.selected.Id,
|
||||
"Assunto": res.data.selected.Assunto,
|
||||
"title_link": url_no_options,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,15 +608,14 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument(file:any){
|
||||
if(file.type == "file"){
|
||||
let fullUrl = "https://www.tabularium.pt" + file.title_link;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
else{
|
||||
//this.fileService.viewDocumentByUrl(file.title_link);
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
viewDocument(file:any, url?:string){
|
||||
if(file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
else{
|
||||
let fullUrl = "https://www.tabularium.pt" + url;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
async openViewDocumentModal(file:any){
|
||||
|
||||
@@ -242,17 +242,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
})
|
||||
}
|
||||
|
||||
viewDocument(file:any){
|
||||
if(file.type == "file"){
|
||||
let fullUrl = "https://www.tabularium.pt" + file.title_link;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
else{
|
||||
//this.fileService.viewDocumentByUrl(file.title_link);
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
viewDocument(file:any, url?:string){
|
||||
if(file.type == "application/webtrix") {
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
else{
|
||||
let fullUrl = "https://www.tabularium.pt" + url;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async openViewDocumentModal(file:any){
|
||||
let task = {
|
||||
serialNumber: '',
|
||||
|
||||
Reference in New Issue
Block a user