| | |
| | | idList.push(item.pageObject.PricebookEntry.Product2Id); |
| | | }); |
| | | addOptions({idList: idList}).then(result=>{ |
| | | console.log('result'); |
| | | this.addOptionsLogic(result); |
| | | if(alertExp){ |
| | | this.Alert(alertExp,'error'); |
| | |
| | | } |
| | | } |
| | | addOptionsLogic(result){ |
| | | console.log(result); |
| | | var Setmap = new Map() |
| | | var key = Object.keys(result) |
| | | key.forEach(item=>{ |
| | | Setmap.set(item,result[item]); |
| | | }); |
| | | this.jzDataToBeproduct.forEach(item=>{ |
| | | var e = result.get(item.pageObject.PricebookEntry.Product2Id); |
| | | console.log(e); |
| | | if(e){ |
| | | item.Learning_CommunityOptions = result.get(item.pageObject.PricebookEntry.Product2Id); |
| | | if(result){ |
| | | item.Learning_CommunityOptions = Setmap.get(item.pageObject.PricebookEntry.Product2Id); |
| | | } |
| | | }); |
| | | } |