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 @@
- -
-
- Card image cap -
-
-
Adv title
-
-
Adv title
-

Some quick example text to build on the card title and make up the bulk of the - card's content.

-
- -
- VIEW MORE -
-
-
-
- - -
-
- Card image cap -
-
-
Adv title
-
-
Adv title
-

Some quick example text to build on the card title and make up the bulk of the - card's content.

-
- -
- VIEW MORE + +
+
+ Card image cap +
+ +

{{ ad.description }}

+
TBD
+

{{ ad.companyintro }}

- -
-
- -
-
- Card image cap -
-
-
Adv title
-
-
Adv title
-

Some quick example text to build on the card title and make up the bulk of the - card's content.

+ +
+ VIEW MORE +
+
- -
- VIEW MORE -
-
-
+
+ +
@@ -269,74 +238,35 @@
- -
-
- Card image cap -
-
-
Adv title
-
- -
-
-
Adv title
-

Some quick example text to build on the card title and make up the bulk of the - card's content.

-
- -
- VIEW MORE -
-
-
-
- - -
-
- Card image cap -
-
-
Adv title
-
- + +
+
+ Card image cap +
+
+

{{ ad.title }}

+
+ + + +
-
-
Adv title
-

Some quick example text to build on the card title and make up the bulk of the - card's content.

-
- -
- VIEW MORE +

{{ ad.description }}

+
TBD
+

{{ ad.companyintro }}

-
-
-
- - +
+ + +
diff --git a/src/assets/scripts/nwSidebar/nwSidebar.html b/src/assets/scripts/nwSidebar/nwSidebar.html index aead209..04c6f16 100644 --- a/src/assets/scripts/nwSidebar/nwSidebar.html +++ b/src/assets/scripts/nwSidebar/nwSidebar.html @@ -238,7 +238,9 @@ -