mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -15,9 +15,6 @@ import { Location } from '@angular/common'
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { synchro } from '../../../services/socket/synchro.service';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
@@ -297,70 +294,43 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
const docId = this.loadedEvent.Attachments[ this.dicIndex].SourceId
|
||||
const applicationId: any = this.loadedEvent.Attachments[ this.dicIndex].ApplicationId
|
||||
const selectedDoc = this.loadedEvent.Attachments[ this.dicIndex]
|
||||
|
||||
this.processes.GetDocumentDetails(docId, applicationId).subscribe( async(res)=> {
|
||||
|
||||
this.LoadedDocument = res;
|
||||
this.LoadedDocument.Subject = this.LoadedDocument.Assunto
|
||||
console.log('selectedDoc', selectedDoc)
|
||||
|
||||
let thedate = new Date(this.LoadedDocument.DateDispatch || this.LoadedDocument.DocDate);
|
||||
this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
let document: SearchDocumentDetails = this.LoadedDocument
|
||||
let folder: SearchFolderDetails = this.LoadedDocument
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: folder['FolderId'] || folder['FolderID'] || folder.folderId,
|
||||
Subject: folder.Assunto,
|
||||
SourceSecFsID: folder.ApplicationID || folder['ApplicationId'],
|
||||
SourceType: 'FOLDER',
|
||||
SourceID: folder.folderId,
|
||||
DispatchNumber: folder.DispatchNumber
|
||||
},
|
||||
}
|
||||
} else if (document.ApplicationID == 8 || document.ApplicationId == 8) {
|
||||
task = {
|
||||
serialNumber: document.DocId,
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: null,
|
||||
Subject: document.Assunto,
|
||||
DispatchNumber: null,
|
||||
SourceSecFsID: document.ApplicationID || document.ApplicationId,
|
||||
SourceType: 'DOC',
|
||||
SourceID: document.DocId,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('unexpected ApplicationID')
|
||||
this.task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: selectedDoc.SourceName,
|
||||
SourceSecFsID: selectedDoc.ApplicationId || selectedDoc['ApplicationID'],
|
||||
SourceType: 'DOC',
|
||||
SourceID: selectedDoc.SourceId,
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: this.LoadedDocument,
|
||||
applicationId: document.ApplicationID || document.ApplicationId,
|
||||
docId: document.ApplicationID || document.ApplicationId,
|
||||
folderId: folder['FolderId'] || folder['FolderID'] || folder.folderId
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: this.task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
Document: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
applicationId: this.task.workflowInstanceDataFields.SourceSecFsID,
|
||||
docId: selectedDoc.SourceId,
|
||||
folderId: '',
|
||||
task: this.task
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
Reference in New Issue
Block a user