diff --git a/src/main/webapp/components/owners/OwnerController.js b/src/main/webapp/components/owners/OwnerController.js index d393b4263..d9306a7c2 100644 --- a/src/main/webapp/components/owners/OwnerController.js +++ b/src/main/webapp/components/owners/OwnerController.js @@ -1,4 +1,4 @@ -var OwnerController = ['$scope','Owner',function($scope,Owner) { +var OwnerController = ['$scope','$state','Owner',function($scope,$state,Owner) { $scope.$on('$viewContentLoaded', function(event){ $('html, body').animate({ scrollTop: $("#owners").offset().top @@ -6,4 +6,15 @@ var OwnerController = ['$scope','Owner',function($scope,Owner) { }); $scope.owners = Owner.query(); +}]; + +var OwnerDetailsController = ['$scope','$stateParams','Owner', function($scope,$stateParams,Owner) { + + var currentId = $stateParams.id; + var nextId = parseInt($stateParams.id) + 1; + var prevId = parseInt($stateParams.id) - 1; + + $scope.prevOwner = Owner.get({id:prevId}); + $scope.nextOwner = Owner.get({id:nextId}); + $scope.currentOwner = Owner.get($stateParams); }]; \ No newline at end of file diff --git a/src/main/webapp/components/owners/owner_details.html b/src/main/webapp/components/owners/owner_details.html new file mode 100644 index 000000000..0f5a39575 --- /dev/null +++ b/src/main/webapp/components/owners/owner_details.html @@ -0,0 +1,649 @@ + +
+
+
+
+ +
+
+
+
    +
  • {{currentOwner.pets.length || 0}}Pets
  • +
  • {{currentOwner.visits.length || 0}}Visits
  • +
+
+

+

Accountant, Ledger Associates

+

California, USA

+ +
+
+
+
+ + +
+
+
+
+ Edit Owner +

Owner Information

+
+
+

First Name

+

Maria

+
+
+

Last Name

+

Rodriguez

+
+
+

Address

+

345 Maple St.

+
+
+

City

+

Madison

+
+
+

Contact Number

+

6085557683

+
+
+
+
+

Owner Activities

+ +
    +
  • + + Next Appointment: None
  • +
  • + + Last Visited: 02 Feb 2015
  • +
  • + + Due Date: 14 Mar 2015
  • +
+
+
+
+
+ + +
+
+
+ + Add New Pet + +
+ View as + +
+
+

Owner's Pets

+
+
+
+ Generic placeholder image +
+

Basil

+

08 August 2012

+

Hamster

+
+ +
+
+
+
+
+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +