mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
save
This commit is contained in:
@@ -45,7 +45,8 @@ export class ViewDocumentPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=> {
|
||||
const link: string = res;
|
||||
console.log(res)
|
||||
const link: string = res.replace('//pdfjs/web/', '/pdfjs/web/')
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||
}, ()=>{
|
||||
this.close();
|
||||
|
||||
@@ -636,7 +636,7 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
clearInputRemetente(){
|
||||
clearInputRemetente() {
|
||||
this.searchSender = "";
|
||||
}
|
||||
|
||||
@@ -758,9 +758,11 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
|
||||
|
||||
if(ApplicationType == '8' || ApplicationType == '361') {
|
||||
|
||||
// 361
|
||||
if(ApplicationType == '8') {
|
||||
this.viewDocumentDetail(Id, ApplicationType);
|
||||
} else if (ApplicationType == '361') {
|
||||
this.viewDocumentModal(searchDocument)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -805,4 +807,44 @@ export class SearchPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async viewDocumentModal(LoadedDocument) {
|
||||
|
||||
console.log(LoadedDocument)
|
||||
const selectedDoc = LoadedDocument
|
||||
|
||||
let task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: LoadedDocument.SourceName || LoadedDocument.Assunto,
|
||||
SourceSecFsID: LoadedDocument.ApplicationId || LoadedDocument.ApplicationType,
|
||||
SourceType: 'DOC',
|
||||
SourceID: LoadedDocument.Id || LoadedDocument.Id,
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: LoadedDocument,
|
||||
applicationId: task.workflowInstanceDataFields.SourceSecFsID,
|
||||
docId: task.workflowInstanceDataFields.SourceID ,
|
||||
folderId: '',
|
||||
task: task
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -441,9 +441,15 @@ export class EventsService {
|
||||
for (let calendar of this.loggeduser.OwnerCalendars) {
|
||||
if (calendar.CalendarName == 'Oficial') {
|
||||
prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
|
||||
if(!Array.isArray(prO)) {
|
||||
prO = []
|
||||
}
|
||||
}
|
||||
if(calendar.CalendarName == 'Pessoal') {
|
||||
prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
|
||||
if(!Array.isArray(prP)) {
|
||||
prP = []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,10 +468,16 @@ export class EventsService {
|
||||
|
||||
if(this.hasOwnOficial) {
|
||||
ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise();
|
||||
if(!Array.isArray(ownO)) {
|
||||
ownO = []
|
||||
}
|
||||
}
|
||||
|
||||
if(this.hasOwnPessoal) {
|
||||
ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise();
|
||||
if(!Array.isArray(ownP)) {
|
||||
ownP = []
|
||||
}
|
||||
}
|
||||
|
||||
const resFinal = ownO.concat(ownP);
|
||||
|
||||
@@ -134,7 +134,7 @@ export class NewActionPage implements OnInit {
|
||||
this.getActions.emit()
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
||||
} finally {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user