angular.module('servicesService',[]).factory('Services',function($http){
	return {
		getPaging:function(filter){
			return $http({method:'POST',url:url_server + 'servicespaging',data:filter});
		},
		getSelect:function(){
			return $http({method:'POST',url:url_server + 'services/getall'});
		},
		getchecklist:function(){
			return '{"data":[{"id":"1","label":"Repair Work"},{"id":"2","label":"Door Installation"},{"id":"3","label":"Section Replacement"},{"id":"4","label":"Commercial"}]}';
		}
		,
		getSelect2:function(filter){
			return $http({method:'POST',url:url_server + 'services/search',data:filter});
		},
		show:function(id){
			return $http.get(url_server+ 'services/'+id);
		},
		save:function(servicesData){
			return $http({method:'POST',
							url:url_server+'services',
							data:servicesData});
		},
		update:function(id, servicesData){
			return $http.put(url_server+'services/'+id,servicesData);
		},
		destroy:function(id){
			return $http.delete(url_server + 'services/'+id);
		}
	};
});
