activity-card.js

angular.module('homepage').
directive('activityCard', function () {
    return {
		restrict: 'E',
		replace: true,
		scope: {
			data: '='
		},
		transclude: true,
		templateUrl: 'components/feature-components/activity/activity-card.html'
	};
}).
filter('activityicon', function () {
	return function (code) {
		var name = 'slack';
		switch (code) {
			case 'ATNDG': name = 'briefcase'; break;
			case 'CLBTG': name = 'birthday-cake'; break;
			case 'DRNKG': name = 'beer'; break;
			case 'DRVNG': name = 'automobile'; break;
			case 'EATNG': name = 'cutlery'; break;
			case 'LSTNG': name = 'music'; break;
			case 'METNG': name = 'calendar-check-o'; break;
			case 'PLYNG': name = 'futbol-o'; break;
			case 'REDNG': name = 'book'; break;
			case 'RSTNG': name = 'bed'; break;
			case 'RIDNG': name = 'motorcycle'; break;
			case 'SHPNG': name = 'shopping-bag'; break;
			case 'SNGNG': name = 'microphone'; break;
			case 'SLPNG': name = 'bed'; break;
			case 'THKNG': name = 'comment-o'; break;
			case 'TRVLG': name = 'plane'; break;
			case 'WTCNG': name = 'television'; break;
			case 'WRKNG': name = 'briefcase'; break;
		}
		return name;
	};
});