fix error

This commit is contained in:
Peter Maquiran
2023-02-14 16:28:27 +01:00
parent 225e050df3
commit 3b41314b65
2 changed files with 39 additions and 38 deletions
@@ -122,6 +122,7 @@ export class EditEventPage implements OnInit {
}
this.initCalendarName = this.postEvent.CalendarName;
this.getRecurrenceTypes();
setTimeout(() => {
@@ -469,43 +470,43 @@ export class EditEventPage implements OnInit {
}
// async getDoc() {
async getDoc() {
// const modal = await this.modalController.create({
// component: SearchPage,
// cssClass: 'modal-width-100-width-background modal',
// componentProps: {
// type: 'AccoesPresidenciais & ArquivoDespachoElect',
// showSearchInput: true,
// select: true,
// }
// });
// await modal.present();
// modal.onDidDismiss().then( async (res)=>{
// if(res){
// const data = res.data;
const modal = await this.modalController.create({
component: SearchPage,
cssClass: 'modal-width-100-width-background modal',
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true,
select: true,
}
});
await modal.present();
modal.onDidDismiss().then( async (res)=>{
if(res){
const data = res.data;
// const ApplicationIdDocumentToSave: any = {
// SourceName: data.selected.Assunto,
// ParentId: this.postEvent.EventId,
// SourceId: data.selected.Id,
// Stakeholders: data.selected.Stakeholders | data.selected.EntidadeOrganicaNome,
// ApplicationId: data.selected.ApplicationType.toString(),
// CreateDate: data.selected.Data,
// // needed to attach this document
// Id: 'add',
// SourceTitle: data.selected.Assunto,
// Source: '1',
// Link: '',
// SerialNumber: '',
// }
const ApplicationIdDocumentToSave: any = {
SourceName: data.selected.Assunto,
ParentId: this.postEvent.EventId,
SourceId: data.selected.Id,
Stakeholders: data.selected.Stakeholders | data.selected.EntidadeOrganicaNome,
ApplicationId: data.selected.ApplicationType.toString(),
CreateDate: data.selected.Data,
// needed to attach this document
Id: 'add',
SourceTitle: data.selected.Assunto,
Source: '1',
Link: '',
SerialNumber: '',
}
// this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
// }
// });
// }
}
});
}
}