Created
May 19, 2014 06:51
-
-
Save goooooouwa/7d221f7fec87fa86d0db to your computer and use it in GitHub Desktop.
render added style on added tenderers for the selected package. This feature is useless after package selection is replaced by company search bar, since no concept of selected package any more.
This file contains 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
$scope.companiesLoaded = function(){ | |
angular.forEach($scope.selectedPackage.tenderers, function(tenderer, key){ | |
var matchedCompanies = $.grep($scope.companies, function(company){ return (company.id == tenderer.company_id); }); | |
if( matchedCompanies.length > 0){ | |
matchedCompanies[0].selected = true; | |
matchedCompanies[0].added = true; | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment