Commit b58fdb10 authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Merge branch 'EDCAMPUS-56-afficher-les-offres-demploi' into 'master'

Edcampus 56 afficher les offres demploi

See merge request !25
parents 86e41e5b 56da27cd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* Controllers */ /* Controllers */
root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectFactory','$state','$companyFactory', function($scope,$http,$stateParams,$projectFactory,$state,$companyFactory) { root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectFactory','$state','$companyFactory','$universityFactory', function($scope,$http,$stateParams,$projectFactory,$state,$companyFactory,$universityFactory) {
$scope.offers = {elements:[]} $scope.offers = {elements:[]}
$scope.newOffer = {source:"waza"}; $scope.newOffer = {source:"waza"};
...@@ -68,8 +68,7 @@ root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectF ...@@ -68,8 +68,7 @@ root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectF
} }
$scope.init = function(){ $scope.init = function(){
$scope.newOffer = {source:"waza"}; $scope.newOffer = {source:"EDCampus"};
var session = $scope._getSession();
$companyFactory.getCompanyOffers($scope.entrepriseId,false,function(data) { $companyFactory.getCompanyOffers($scope.entrepriseId,false,function(data) {
if(data.status == "success"){ if(data.status == "success"){
$scope.offers.elements =data.details; $scope.offers.elements =data.details;
...@@ -84,7 +83,12 @@ root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectF ...@@ -84,7 +83,12 @@ root.controller('UnivCompanyOffers' ,['$scope','$http','$stateParams','$projectF
$companyFactory.addCompanyOffer($scope.entrepriseId,$scope.newOffer,function(data) { $companyFactory.addCompanyOffer($scope.entrepriseId,$scope.newOffer,function(data) {
if(data.status == "success"){ if(data.status == "success"){
var offerId = data.details; var offerId = data.details;
$companyFactory.addUniversityEntrepriseOffer($scope.campus.id,offerId,function(data) { var session = $scope._getSession();
$universityFactory.getMainUniversityByUser(session.user,function(univ){
$scope.univeristyId = univ;
})
$companyFactory.addUniversityEntrepriseOffer($scope.univeristyId,offerId,function(data) {
if(data.status == "success"){ if(data.status == "success"){
$scope.init(); $scope.init();
$scope.currentSection='listOffers'; $scope.currentSection='listOffers';
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="pull-right "> <div class="pull-right ">
<span><i class="fa fa-calendar"></i> {{offer.date | date:'dd/MM'}}</span> <span><i class="fa fa-calendar"></i> {{offer.date | date:'dd/MM'}}</span>
<i class="fa fa-bolt pointerOn" style="margin: 2px;margin-left:10px" ng-click="convertOffer(offer)" title="{{::_labels.convertToProjectBtn}}"></i> <i class="fa fa-bolt pointerOn hide" style="margin: 2px;margin-left:10px" ng-click="convertOffer(offer)" title="{{::_labels.convertToProjectBtn}}"></i>
<i class="fa fa-download hide pointerOn" style="margin: 2px;" ng-click="downloadOffer(offer)" title="{{::_labels.downloadBtn}}"></i> <i class="fa fa-download hide pointerOn" style="margin: 2px;" ng-click="downloadOffer(offer)" title="{{::_labels.downloadBtn}}"></i>
<i class="fa fa-eye hide" style="margin: 2px;" title="{{::_labels.seeDetailsBtn}}"></i> <i class="fa fa-eye hide" style="margin: 2px;" title="{{::_labels.seeDetailsBtn}}"></i>
<i class="fa fa-star-o hide" style="margin: 2px;" title="{{::_labels.setStarredBtn}}"></i> <i class="fa fa-star-o hide" style="margin: 2px;" title="{{::_labels.setStarredBtn}}"></i>
......
...@@ -74,7 +74,7 @@ function $companyFactory($rootScope,$serverFactory) { ...@@ -74,7 +74,7 @@ function $companyFactory($rootScope,$serverFactory) {
* @return {[type]} [description] * @return {[type]} [description]
*/ */
returns.getOffersAllKeywords=function(success, failure){ returns.getOffersAllKeywords=function(success, failure){
return $serverFactory.runCommand("getOffersAllKeywords", {},success,failure); return $serverFactory.runCommand("get_offer_keyword", {},success,failure);
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment