Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const infoQualificationForm = this.qualificationFormComponent.get();
- const updatedQualification = this.adminComponent.selectedQualification.data;
- Object.assign(updatedQualification, infoQualificationForm);
- this.adminService.updateQualification(updatedQualification).subscribe(_ => {
- if (updatedQualification.parent_qualification_id === null) {
- Object.assign(this.adminComponent.qualifications.find(qualification => qualification.qualification_id === updatedQualification.qualification_id), updatedQualification);
- } else {
- const parentQualification = this.adminComponent.qualifications.find(qualification => qualification.qualification_id === updatedQualification.parent_qualification_id);
- Object.assign(parentQualification.children.find(qualification => qualification.qualification_id === updatedQualification.qualification_id), updatedQualification);
- }
- // Object.assign(this.adminComponent.selectedQualification,updatedQualification);
- this.adminComponent.selectedQualification.data = updatedQualification;
- this.finishRequest(resolve);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement