mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add document viewer in chat
This commit is contained in:
@@ -248,22 +248,58 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
}
|
||||
else{
|
||||
this.fileService.viewDocumentByUrl(file.title_link);
|
||||
//this.openViewDocumentModal(file);
|
||||
//this.fileService.viewDocumentByUrl(file.title_link);
|
||||
this.openViewDocumentModal(file);
|
||||
}
|
||||
}
|
||||
|
||||
async openViewDocumentModal(file:any){
|
||||
let task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: file.Assunto,
|
||||
SourceSecFsID: file.ApplicationId,
|
||||
SourceType: 'DOC',
|
||||
SourceID: file.DocId,
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
let doc = {
|
||||
"Id": "",
|
||||
"ParentId": "",
|
||||
"Source": 1,
|
||||
"ApplicationId": file.ApplicationId,
|
||||
"CreateDate": "",
|
||||
"Data": null,
|
||||
"Description":"",
|
||||
"Link": null,
|
||||
"SourceId": file.DocId,
|
||||
"SourceName": file.Assunto,
|
||||
"Stakeholders": "",
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
file: file,
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: file.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: doc,
|
||||
applicationId: file.ApplicationId,
|
||||
docId: file.DocId,
|
||||
folderId: '',
|
||||
task: task
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
getChatMembers() {
|
||||
|
||||
Reference in New Issue
Block a user