Commit 84919dc52626dfadb5697819e8914df07efc35fd
1 parent
1ca67421a5
Exists in
develop
Fix
Al asignar sinonimos
Showing
1 changed file
with
3 additions
and
8 deletions
Show diff stats
src/app/shared/sinonimo/sinonimo.component.ts
| ... | ... | @@ -58,19 +58,14 @@ export class SinonimoComponent implements OnInit { |
| 58 | 58 | |
| 59 | 59 | for (const articulo of this.articulosSelected) { |
| 60 | 60 | ID_SINS.push(articulo.ID_SIN); |
| 61 | - } | |
| 62 | - | |
| 63 | - for (const articulo of this.articulosSelected) { | |
| 64 | 61 | observables.push(this.articuloService.getById(articulo.id)); |
| 65 | 62 | } |
| 66 | 63 | |
| 67 | 64 | forkJoin(observables) |
| 68 | 65 | .subscribe((res: IArticulo[]) => { |
| 69 | - for (const articulo of res) { | |
| 70 | - for (const ID_SIN of ID_SINS) { | |
| 71 | - articulo.ID_SIN = ID_SIN; | |
| 72 | - } | |
| 73 | - } | |
| 66 | + res.forEach((articulo, i) => { | |
| 67 | + articulo.ID_SIN = ID_SINS[i]; | |
| 68 | + }); | |
| 74 | 69 | this.modalRef.hide(); |
| 75 | 70 | this.onClose.next({ |
| 76 | 71 | articulos: res, |