Created
August 8, 2016 08:42
-
-
Save nicopenaredondo/4c525569ea4b8f6d7bfec8e3b3196520 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_processInstructionItems(employerId, programs) | |
{ | |
return new Promise((resolve, reject) => { | |
let self = this; | |
let listOfPrograms = []; | |
_.forEach(programs, item => { | |
Program.find(item.id).then(programData => { | |
this._processProgramItemCode(employerId, item, programData).then(programItem => { | |
listOfPrograms.push(programItem) | |
}) | |
}).catch(err => { | |
console.log(err); | |
}) | |
}) | |
resolve(listOfPrograms) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment