mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
24 lines
659 B
CoffeeScript
24 lines
659 B
CoffeeScript
Darkswarm.controller "DetailsCtrl", ($scope, $timeout, $http, CurrentUser, AuthenticationService, SpreeUser) ->
|
|
angular.extend(this, new FieldsetMixin($scope))
|
|
$scope.name = "details"
|
|
$scope.nextPanel = "billing"
|
|
|
|
$scope.login_or_next = (event) ->
|
|
event.preventDefault()
|
|
unless CurrentUser.id
|
|
$scope.ensureUserIsGuest($scope.next)
|
|
return
|
|
|
|
$scope.next()
|
|
|
|
$scope.summary = ->
|
|
[$scope.fullName(),
|
|
$scope.order.email,
|
|
$scope.order.bill_address.phone]
|
|
|
|
$scope.fullName = ->
|
|
[$scope.order.bill_address.firstname ? null,
|
|
$scope.order.bill_address.lastname ? null].join(" ").trim()
|
|
|
|
$timeout $scope.onTimeout
|