Browse Source

Merge pull request #74 from ExtProjNomit/nimor-fixes

minor fixes
pull/146/head
francesca6431 7 years ago
committed by GitHub
parent
commit
26b55f97f7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions
  1. +2
    -2
      src/assets/scripts/ads-details/ads-details.html
  2. +2
    -2
      src/assets/scripts/ads/ads.html
  3. +7
    -5
      src/assets/scripts/dashboard/dashboard.controller.js

+ 2
- 2
src/assets/scripts/ads-details/ads-details.html View File

@ -58,7 +58,7 @@
</div>
<!-- ### Buttons ### -->
<div class=" m-auto btn-centered-container visible-user" ng-show="profile.role =='user'">
<div class=" m-auto btn-centered-container visible-user" ng-show="user.role == 'user'">
<button type="button" href="#" class="col-5 mr-1 btn btn-gradient btn-centered">Apply Now</button>
<button type="button" href="#" class="col-5 ml-1 btn btn-border btn-centered">Save</button>
@ -66,7 +66,7 @@
</div>
<div class="col-6">
<!-- ### Users cards ### only for the company whoi's published that ad, and nomit, referee and admin -->
<div class=" " style="margin-bottom:15px" ng-show="profile.role !='user'" ng-repeat="u in users">
<div class=" " style="margin-bottom:15px" ng-show="user.role != 'user'" ng-repeat="u in users">
<div class="card item-box layer w-100">
<div class="user-data-title container">
<img id="user{{$index}}" class="user-card-img rounded-circle" ng-src="{{avatar_user($index)}}" alt="" />


+ 2
- 2
src/assets/scripts/ads/ads.html View File

@ -15,14 +15,14 @@
<div class="masonry-sizer col-md-6"></div>
<!-- ============== ADS USERS ============== -->
<div class="masonry-item w-100" ng-show="user.role =='user'">
<div class="masonry-item w-100" ng-show="user.role == 'user'">
<!-- #First line ========= -->
<div class="row gap-30">
<!-- ============== Job Ad ============== -->
<div class='col-md-4 col-sm-12' ng-repeat="ad in ads | orderBy:'-matches'">
<div class="card item-box">
<img class="card-img-top" src="assets/static/images/bg.jpg" alt="Card image cap">
<img class="card-img-top" src="assets/static/images/ads-office-02.jpg" alt="Card image cap">
<div class="card-body">
<div class="card-title d-flex mx-2" style="justify-content:space-between; margin-bottom:0px; text-align: left;">
<h4> {{ ad.content.title }} </h4>


+ 7
- 5
src/assets/scripts/dashboard/dashboard.controller.js View File

@ -3,15 +3,17 @@ import chart from "../charts/chartJS";
import pieChart from "../charts/easyPieChart";
/** @ngInject */
const DashboardController = ($scope, AdsService, UserService) => {
const DashboardController = ($scope, AdsService, UserService, $location) => {
$scope.$on('loadUserSuccess', async function(event, user) {
$scope.user = user;
// load ads
await AdsService.fetchAdsService(user)
.then( (result) => { $scope.ads = result; })
.catch( (error) => { console.log(error); })
//await AdsService.fetchAdsService(user)
//.then( (result) => { $scope.ads = result; })
//.catch( (error) => { console.log(error); })
if ( user.role === 'user' || user.role === 'company' ){
$location.path( "/ads" );
}
// tutte le funzioni del controller
masonry();


Loading…
Cancel
Save