all files / js/form/ form.service.js

64.71% Statements 11/17
100% Branches 0/0
25% Functions 2/8
64.71% Lines 11/17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38                                                     
/**
 * Created by cklimkowsky on 2/25/15.
 */
angular.module('coopEval').service('formService', formService);
 
function formService($http) {
 
  var urlBase = 'services/EvaluationService';
 
  this.getStudentWorkReport = function (id) {
    return $http.get(urlBase + '/getStudentEval?placementId=' + id)
  };
 
  this.getEmployerEvaluation = function (id) {
    return $http.get(urlBase + '/getEmployerEval?placementId=' + id)
  };
 
  this.submitForm = function (evaluation) {
    return $http.put(urlBase + '/submitEval', evaluation)
  };
 
  this.saveForm = function (evaluation) {
    return $http.put(urlBase + '/saveEval', evaluation)
  };
 
  this.approveEvaluation = function (evaluation) {
    return $http.put(urlBase + '/approveEval', evaluation)
  };
 
  this.rejectEvaluation = function (evaluation) {
    return $http.put(urlBase + '/rejectEval', evaluation)
  };
 
  this.getDepartmentForms = function () {
    return $http.get('api/forms/department');
  };
}