{I" class:ETI"ProcessedAsset;FI"logical_path;TI":sprangular/controllers/checkout/deliveryAndPayment.js;FI" pathname;TI"{/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/controllers/checkout/deliveryAndPayment.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+Ü•%UI" length;TiŒI" digest;TI"%19586b5a9ae07aa514b022b4249b29fb;FI" source;TI"Œ(function() { Sprangular.controller('CheckoutDeliveryAndPaymentCtrl', function($scope, Account, Cart, Checkout) { $scope.order = Cart.current; $scope.processing = false; $scope.user = Account.user; $scope.submitted = false; $scope.$watch('order.state', function(state) { $scope.done = state === 'confirm'; return $scope.active = _.contains(['delivery', 'payment'], state); }); $scope.edit = function() { var creditCard, order; order = $scope.order; creditCard = order.creditCard; if (creditCard.id == null) { order.creditCard = new Sprangular.CreditCard; } return order.state = 'delivery'; }; return $scope.advance = function() { var order; order = $scope.order; $scope.submitted = true; if (!((order.creditCard.id != null) || order.creditCard.isValid())) { return; } $scope.processing = true; return Checkout.setPayment().then(function() { $scope.processing = false; return $scope.submitted = false; }, function() { return $scope.processing = false; }); }; }); }).call(this); ;TI"dependency_digest;TI"%e3d647e6dee81a4d8ba05b1cfcfd2917;FI"required_paths;T[I"{/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/controllers/checkout/deliveryAndPayment.coffee;FI"dependency_paths;T[{I" path;TI"{/home/josh/Projects/Dynamo/sprangular/app/assets/javascripts/sprangular/controllers/checkout/deliveryAndPayment.coffee;FI" mtime;TI"2015-04-08T16:55:56-04:00;TI" digest;TI"%8d4014d479a86f96f1d6e57efee7e55a;FI" _version;TI"%64e62ddc273c2f5847f30d698ca14b67;F