Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CommentsFromTom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Organization - Overall, I'm a big fan of of the fact that you structured the front-end based on component. Great job :)

Readability - There's a lot of inconsistency with spaces throughout (4 spaces vs 2 spaces) - you'll be happier in yourcapstones if you all agree to use the same spaces. Seems like a small things, but you'd be surprised how it can get in the way in the long run

Factories - try implementing a front end data cache in the future - it can help save you http requests and make your app faster! Let me know if you want to see an example of how to do this.

Security - Your secrets.json is in plain view! Make sure you remove it!
6 changes: 5 additions & 1 deletion browser/js/checkout/checkout.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ app.controller('CheckoutCtrl', function($scope, $uibModal, $state, OrderFactory,
}, 0);

// add error handling

/*
TMK: why not put this in a resolve block?
*/
AuthService.getLoggedInUser()
.then(function(user) {
if (user) {
$scope.newOrder.user = user; // if user is not logged in there will be no user on the order
$scope.newOrder.shippingEmail = user.email;
$scope.newOrder.streetAddress = user.streetAddress;
$scope.newOrder.streetAddress = user.streetAddress;
$scope.newOrder.city = user.city;
$scope.newOrder.state = user.state;
$scope.newOrder.zipCode = user.zipCode;
Expand Down