| | |
| | | idList.push(item.pageObject.PricebookEntry.Product2Id); |
| | | }); |
| | | addOptions({idList: idList}).then(result=>{ |
| | | console.log('result'); |
| | | this.addOptionsLogic(JSON.parse(JSON.stringify(result))); |
| | | this.addOptionsLogic(result); |
| | | if(alertExp){ |
| | | this.Alert(alertExp,'error'); |
| | | } |
| | |
| | | } |
| | | } |
| | | addOptionsLogic(result){ |
| | | const options = Object.entries(result).map(([key, value]) => ({ |
| | | label: key, |
| | | value: value |
| | | })); |
| | | this.jzDataToBeproduct.forEach(item=>{ |
| | | console.log(result); |
| | | if(result){ |
| | | item.Learning_CommunityOptions = result.get(item.pageObject.PricebookEntry.Product2Id); |
| | | item.Learning_CommunityOptions = options.get(item.pageObject.PricebookEntry.Product2Id); |
| | | } |
| | | }); |
| | | } |