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:
+10
-9
@@ -442,7 +442,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
if (res) {
|
if (res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
this.documents.push(data.selected);
|
this.documents.push(data.selected);
|
||||||
this.documents.forEach((element: any) => {
|
await this.documents.forEach( async (element: any) => {
|
||||||
|
|
||||||
let body = {
|
let body = {
|
||||||
"InstanceID": this.task.InstanceID,
|
"InstanceID": this.task.InstanceID,
|
||||||
@@ -457,16 +457,17 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
body.Attachments = Attachments;
|
body.Attachments = Attachments;
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
this.attachmentsService.AddAttachment(body).subscribe((res) => {
|
try {
|
||||||
this.toastService._successMessage()
|
|
||||||
}, () => {
|
|
||||||
this.toastService._badRequest()
|
|
||||||
}, () => {
|
|
||||||
loader.remove()
|
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