mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Update attachment list
This commit is contained in:
+8
-7
@@ -442,7 +442,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
if (res) {
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
this.documents.forEach((element: any) => {
|
||||
await this.documents.forEach( async (element: any) => {
|
||||
|
||||
let body = {
|
||||
"InstanceID": this.task.InstanceID,
|
||||
@@ -458,15 +458,16 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res) => {
|
||||
this.toastService._successMessage()
|
||||
}, () => {
|
||||
this.toastService._badRequest()
|
||||
}, () => {
|
||||
try {
|
||||
loader.remove()
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
} catch(e) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user