angular.module('skillsService',[]).factory('Skills',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'skillspaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'skills/getall'});
		},
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'skills/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'skills/'+id);
		},
		save:function(skillsData){
			return $http({method:'POST',
							url:url_server+'skills',
							data:skillsData});
		},
		update:function(id, skillsData){
			return $http.put(url_server+'skills/'+id,skillsData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'skills/'+id);
		},
		getListSkill:function(id){
			
			return $http({method:'GET',
				headers:headers,
				url:url_server + 'skills/getListSkill/' + id,
				withCredentials: true});
			// return $http.get(url_server+ 'skills/getListSkill/'+id);
		},
		getListSkillEdtit:function(id){
			
			return $http({method:'GET',
				headers:headers,
				url:url_server + 'skills/getListSkillEdtit/' + id,
				withCredentials: true});
			return $http.get(url_server+ 'skills/getListSkillEdtit/'+id);
		}
	};
});
