add attachmente

This commit is contained in:
Peter Maquiran
2023-08-30 19:59:39 +01:00
parent 3386c3e22c
commit 83dc37f4e2
21 changed files with 50 additions and 62 deletions
@@ -146,12 +146,12 @@
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="app-name">{{document.appName}}</span>
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left">{{( document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -105,6 +105,14 @@ export class CreateProcessPage implements OnInit {
this.task = this.navParams.get('task');
this.fulltask = this.navParams.get('fulltask');
console.log('this.fulltask', this.fulltask)
if(this.fulltask?.Documents) {
this.documents = this.fulltask.Documents
}
if (this.task.SerialNumber) {
this.task.serialNumber = this.task.SerialNumber
}
@@ -266,14 +274,14 @@ export class CreateProcessPage implements OnInit {
let docs = {
ProcessInstanceID: "",
ProcessInstanceID: this.fulltask?.workflowInstanceDataFields?.InstanceID,
Attachments: []
}
const DocumentToSave = this.documents.map((e) => {
const DocumentToSave = this.documents.map((e: any) => {
return {
ApplicationId: e.ApplicationType,
SourceId: e.Id
ApplicationId: e.ApplicationType || e.ApplicationId,
SourceId: e.Id || e.DocId || e.SourceId
}
});