Added clock stuff

This commit is contained in:
Dobie Wollert
2014-09-14 06:43:04 -04:00
parent ca587764cd
commit b949f6ff90
12 changed files with 384 additions and 4 deletions

View File

@ -78,6 +78,10 @@ angular.module('biomed', ['biomed.filters', 'biomed.services', 'biomed.directive
controller: biomed.UsersIndexCtrl,
reloadOnSearch: false
})
.when('/admin/users/:id', {
templateUrl: '/partials/users/clock.html',
controller: biomed.UserClockCtrl
})
.otherwise({
redirectTo: '/schedule'
});

View File

@ -172,6 +172,15 @@ biomed.UsersIndexCtrl = function($scope, $filter, $routeParams, $location, Users
};
};
biomed.UserClockCtrl = function($scope, $routeParams, Users) {
Users.index({userid: $routeParams.id}, function(result) {
console.log(result);
$scope.tech = result[0];
});
$scope.clocks = Users.clocks($routeParams);
};
biomed.ClientIndexCtrl = function($scope, $filter, $routeParams, Clients, LocationBinder) {
$scope.loading = true;

View File

@ -32,6 +32,7 @@ angular.module('biomed.services', [])
details: { method: 'GET', params: { cmd: 'details' }, isArray: true },
create: { method: 'POST', params: {} },
update: { method: 'POST', params: { id: 0 } },
clocks: { method: 'GET', params: { id: 0, cmd: 'clocks' }, isArray: true }
});
})
.factory("Schedule", function($resource) {