fix notification remove, create event of task from attachment

This commit is contained in:
Peter Maquiran
2023-11-01 12:24:34 +01:00
parent a6517da1e0
commit f3efe630c8
5 changed files with 43 additions and 40 deletions
@@ -124,35 +124,28 @@ export class ExpedientTaskModalPage implements OnInit {
this.SearchFolder = this.navParams.get('SearchFolder');
this.aplicationId = this.navParams.get('aplicationId')
// this.document = this.navParams.get('document')
this.document = this.navParams.get('document')
this.taskType = this.navParams.get('taskAction');
// if(this.document) {
// const doc: any = this.document
// this.documents.push({
// ApplicationId: (doc.ApplicationType || doc.ApplicationId),
// ApplicationType: (doc.ApplicationType || doc.ApplicationId),
// SourceId: (doc.Id || doc.DocId || doc.SourceId),
// Id: (doc.Id || doc.DocId || doc.SourceId),
// EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
// Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
// Data: (doc.DocDate || doc.Data),
// DocDate: (doc.DocDate || doc.Data),
// Assunto: doc.Assunto,
// } as any)
// }
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
SourceId: e.Id
try {
if(this.document) {
const doc: any = this.document
this.documents.push({
ApplicationId: (doc.ApplicationType || doc.ApplicationId),
ApplicationType: (doc.ApplicationType || doc.ApplicationId),
SourceId: (doc.Id || doc.DocId || doc.SourceId),
Id: (doc.Id || doc.DocId || doc.SourceId),
EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Data: (doc.DocDate || doc.Data),
DocDate: (doc.DocDate || doc.Data),
Assunto: doc.Assunto,
} as any)
}
});
} catch (error) {
console.log(error)
}
console.log('this.document', this.document)