mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Improve edit event to approve
This commit is contained in:
@@ -19,7 +19,7 @@ import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||
export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
serialNumber: string
|
||||
loadedAttachments: Attachment[]
|
||||
loadedAttachments: Attachment[]= []
|
||||
|
||||
|
||||
eventProcess = {
|
||||
@@ -258,8 +258,10 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
this.loadedAttachments.forEach((document:any)=>{
|
||||
if(document['action'] == 'add'){
|
||||
delete document.action
|
||||
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{});
|
||||
} else if(document['action'] == 'delete') {
|
||||
delete document.action
|
||||
this.attachmentsService.deleteEventAttachmentById(document).subscribe( res=>{})
|
||||
}
|
||||
|
||||
@@ -382,6 +384,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
|
||||
this.loadedAttachments.push(DocumentToSave)
|
||||
console.log('push', DocumentToSave)
|
||||
|
||||
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||
// this.getAttachments();
|
||||
|
||||
Reference in New Issue
Block a user