From f13d1c5f444489f485cc423ee1670587d2b86414 Mon Sep 17 00:00:00 2001 From: Francesca Sperati <6431@ait.nsw.edu.au> Date: Wed, 13 Feb 2019 11:24:44 +1100 Subject: [PATCH] minor fixes --- .../scripts/dashboard/dashboard.controller.js | 15 +- src/assets/scripts/dashboard/dashboard.html | 164 +++++------------- src/assets/scripts/nwSidebar/nwSidebar.html | 4 +- src/assets/styles/nomit.scss | 2 +- .../styles/spec/components/pageContainer.scss | 2 +- 5 files changed, 65 insertions(+), 122 deletions(-) diff --git a/src/assets/scripts/dashboard/dashboard.controller.js b/src/assets/scripts/dashboard/dashboard.controller.js index a6e87f8..14d06ce 100644 --- a/src/assets/scripts/dashboard/dashboard.controller.js +++ b/src/assets/scripts/dashboard/dashboard.controller.js @@ -3,10 +3,20 @@ import chart from "../charts/chartJS"; import pieChart from "../charts/easyPieChart"; /** @ngInject */ -const DashboardController = ($scope, UserService) => { +const DashboardController = ($scope, AdsService, UserService) => { $scope.$on('loadUserSuccess', function(event, user) { $scope.user = user; }); + + //link al ad-detail + $scope.$on('loadUserSuccess', async (event, user) => { + await AdsService.fetchAdsService() + .then( (result) => { $scope.ads = result; }) + .catch( (error) => { console.log(error); }) + }); + + + // tutte le funzioni del controller UserService.loadUser(); @@ -15,4 +25,5 @@ const DashboardController = ($scope, UserService) => { pieChart(); } -export default DashboardController; \ No newline at end of file +export default DashboardController; + diff --git a/src/assets/scripts/dashboard/dashboard.html b/src/assets/scripts/dashboard/dashboard.html index a6c280e..e1d52d0 100644 --- a/src/assets/scripts/dashboard/dashboard.html +++ b/src/assets/scripts/dashboard/dashboard.html @@ -202,65 +202,34 @@
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
+
-
-
- Some quick example text to build on the card title and make up the bulk of the - card's content.
+ +
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
-
+ Some quick example text to build on the card title and make up the bulk of the - card's content.
-{{ ad.description }}
+ +{{ ad.companyintro }}