diff --git a/TeamDBAwesome/TeamDBAwesome/js/homeController.js b/TeamDBAwesome/TeamDBAwesome/js/homeController.js index 2260504..265cb7d 100644 --- a/TeamDBAwesome/TeamDBAwesome/js/homeController.js +++ b/TeamDBAwesome/TeamDBAwesome/js/homeController.js @@ -1,7 +1,7 @@ angular.module('routerApp').controller('homeController', function ($scope, $http, urlService, $q, $state, $cookies, $rootScope, HolderService) { /* BEGIN FUNCTIONS FUNCTIONS */ - + console.log($cookies.get('userid')); // Function to register new users. $scope.createUser = function (newUser) { // TODO: Make Service fit into things. @@ -57,17 +57,23 @@ angular.module('routerApp').controller('homeController', function ($scope, $http } $scope.toUserPage = function (user) { - $http.get("http://localhost:50031/api/GetCustomer?PersonID=" + user.username) - .success(function (response) { - if (response.CustomerID == null) { - $scope.messages = 'You have entered an incorrect User'; - } - else { - $cookies.put("userid", user.username); - console.log($cookies.get('userid')); - $state.go('user-home'); - } - }) + if (!user.password) $scope.messages = "Please enter a password."; + else { + $http.get("http://localhost:50031/api/GetCustomer?PersonID=" + user.username) + .success(function (response) { + if (response.CustomerID == 0) { + $scope.messages = 'You have entered an incorrect User'; + } + else { + $cookies.put("userid", user.username); + console.log($cookies.get('userid')); + $state.go('user-home'); + } + }) + .error(function (error, status, headers, config) { + $scope.messages = 'We could not find that user in the database.'; + }); + } } /* BEGIN LOGIC */ diff --git a/TeamDBAwesome/TeamDBAwesome/pages/user-ordermodal.html b/TeamDBAwesome/TeamDBAwesome/pages/user-ordermodal.html index 66dbda3..9029680 100644 --- a/TeamDBAwesome/TeamDBAwesome/pages/user-ordermodal.html +++ b/TeamDBAwesome/TeamDBAwesome/pages/user-ordermodal.html @@ -1,16 +1,16 @@ 
-

Invoice ID : {{catcats.invoiceId}}

-

Invoice Date : {{catcats.invoiceDate}}

-

Invoice Address : {{catcats.address}} {{catcats.city}} {{catcats.state}}

-

Apple token : {{catcats.paymment.token}}

-

Email Address : {{catcats.payment.email}}

-

Card number : {{catcats.payment.cardnum}}

-

Card number : {{catcats.payment.expr_date}}

+ - - - + + + + + + + +
{{x.TrackName}}

Invoice ID

{{catcats.invoiceId}}

Invoice Address :

{{catcats.address}} {{catcats.city}} {{catcats.state}}

Apple token

{{catcats.paymment.token}}

Email Address

{{catcats.payment.email}}

Card number

{{catcats.payment.cardnum}}

Expiration Date

{{catcats.payment.expr_date}}

Invoice Total

{{catcats.total}}
-

+ +
\ No newline at end of file diff --git a/TeamDBAwesome/TeamDBAwesome/pages/user-orders.html b/TeamDBAwesome/TeamDBAwesome/pages/user-orders.html index d3354bb..108aef9 100644 --- a/TeamDBAwesome/TeamDBAwesome/pages/user-orders.html +++ b/TeamDBAwesome/TeamDBAwesome/pages/user-orders.html @@ -96,41 +96,24 @@

Choose your payment method

-
+
+
You have no payment method selected!
Please select a payment method or add one in Manage account.








- - - - Link to Order Screen that lets a customer select a playlist to order (from MyPlaylist - or Playlist) or as selected by track via the detailed searching of tracks by track name, - album name, artist name, composer name, genre name, and/or media name. The - Order screen is tied to a Shopping Cart.
- Pending/Completed Orders and Status Screen – this should drill down to one order in a read - only mode to view a specific order when reached from the selection on the Customer - Dashboard
Order Screen: A screen for that lets a customer select a playlist to order (from MyPlaylist or - Playlist) or as selected by track via the detailed searching of tracks by track name, album - name, artist name, composer name, genre name, and/or media name. The Order screen is - tied to a Shopping Cart. You need to decide the way for customers to select either playlists - (their own in MyPlaylists or in Playlists) or from tracks that are then included in a shopping - cart.
- - Shopping Cart Screen – to show the items that are being placed for potential order. Time - permitting, you should add the ability to edit the order (remove tracks) but this is not an - immediate initial features. - - - \ No newline at end of file