-
-
+
+
+
+
+ | Timestamp | |
+
+
+ | Go to Failure | |
+
+
+ | Performance | |
+
+
+ | Out of Sequence | |
+
+
+
+
+
+
+
+ | Current Weight | |
+
+
+ | Net Change Weight | |
+
+
+ | Time Under Load | |
+
+
+ | Range of Motion | |
+
+
+
+
\ No newline at end of file
diff --git a/app/js/clients/styles/exercises.less b/app/js/clients/styles/exercises.less
index bf688b3..ce7ecc4 100644
--- a/app/js/clients/styles/exercises.less
+++ b/app/js/clients/styles/exercises.less
@@ -1,31 +1,111 @@
#exercises {
margin:10px;
-}
-
-.exerciseName {
- float: left;
- width: 100px;
- height: 75px;
- border:1px solid gray;
- text-align: center;
- padding:5px;
- &:hover {
- background: gray;
- cursor: pointer;
+ table {
+ margin:10px 0;
+ }
+
+ td:not(:first-child) {
+ text-align: center;
+ font-size: 9pt;
+ font-weight: bold;
+ }
+
+ .topTable {
+ tr:first-child td:not(:first-child) {
+ border-top: 1px black solid;
+ background-color: #FCF99F;
+ }
+ tr:nth-child(2) td:not(:first-child){
+ background-color: #B6E494;
+ }
+ tr:nth-child(3) td:not(:first-child){
+ background-color: #9CE05A;
+ }
+ tr:nth-child(4) td:not(:first-child){
+ background-color: #FDA18B;
+ }
+ td {
+ width: 65px;
+ white-space: nowrap;
+ }
+ td:first-child {
+ border:none;
+ font-size: 12pt;
+ }
+
+ td:nth-child(2) {
+ border-left: 1px lightgray dashed;
+ }
+ td {
+ border: 1px black dashed;
+ }
+ td:last-child {
+ border-right: 1px lightgray dashed;
+ }
+ }
+
+ .bottomTable {
+ tr:first-child td:not(:first-child) {
+ border-top: none;
+ background-color: white;
+ }
+ tr:nth-child(2) td:not(:first-child){
+ background-color: #ADBB8C;
+ }
+ tr:nth-child(3) td:not(:first-child){
+ background-color: white;
+ }
+ tr:nth-child(4) td:not(:first-child){
+ background-color: #A0EEEA;
+ }
+ td {
+ width: 65px;
+ white-space: nowrap;
+ }
+ td:first-child {
+ border:none;
+ font-size: 12pt;
+ }
+
+ /*td:nth-child(2) {
+ border-left: 1px lightgray dashed;
+ }*/
+ td {
+ border: 1px lightgray solid;
+ }
+ td:last-child {
+ border-right: 1px lightgray dashed;
+ }
}
-}
-.reportHeader {
- text-align: center;
- li {
- text-align: left;
+ .exerciseName {
+ float: left;
+ width: 100px;
+ height: 60px;
+ border:1px solid gray;
+ text-align: center;
+ padding:5px;
+
+ &:hover, &.active {
+ background: gray;
+ cursor: pointer;
+ }
+
+ }
+
+ .reportHeader {
+ text-align: center;
+
+ li {
+ text-align: left;
+ }
}
-}
-.exercisesError {
- text-align: center;
- color:black;
+ .exercisesError {
+ text-align: center;
+ color:black;
+ }
}
\ No newline at end of file
diff --git a/app/js/loginController.js b/app/js/loginController.js
index 96191d9..d094c0d 100755
--- a/app/js/loginController.js
+++ b/app/js/loginController.js
@@ -16,10 +16,16 @@ define([], function() {
});
$scope.login = function(username, password) {
+ setSession(username, password);
$http.defaults.headers.common.Authorization = 'Basic ' + btoa(username + ':' + password);
$location.path('/clients');
};
+ function setSession(username, password) {
+ sessionStorage.setItem("username", username);
+ sessionStorage.setItem("password", password);
+ }
+
function showErrorMessage(message) {
$scope.errorMessage = message;
diff --git a/app/js/main.js b/app/js/main.js
index 9e289aa..8acff17 100644
--- a/app/js/main.js
+++ b/app/js/main.js
@@ -42,14 +42,13 @@ require([
], function(angular, app, routes, mockBackend) {
var isDevMode = false;
-
+
$(function() {
- if(isDevMode){
- angular.bootstrap($('#myApp'), ['myApp', mockBackend]);
- }
- else {
- angular.bootstrap($('#myApp'), ['myApp']);
- }
+ var appModules = ['myApp'];
+ if (isDevMode) {
+ appModules.push(mockBackend);
+ }
+ angular.bootstrap($('#myApp'), appModules);
});
-
+
});
\ No newline at end of file
diff --git a/app/js/mockBackend/exerciseReport.js b/app/js/mockBackend/exerciseReport.js
new file mode 100644
index 0000000..1193830
--- /dev/null
+++ b/app/js/mockBackend/exerciseReport.js
@@ -0,0 +1,119 @@
+define([], function() {
+ return {
+ "data": [
+ {
+ "Timestamp": "11\/26\/2012 15:29:19",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "",
+ "Current Weight": "170",
+ "performanceView": "D",
+ "Date": "11\/26\/2012",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:02:26",
+ "Current Range": "",
+ "dayOfWeek": "Mon",
+ "hourOfDay": "3 PM"
+ }, {
+ "Timestamp": "12\/10\/2012 15:31:34",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "",
+ "Current Weight": "170",
+ "performanceView": "D",
+ "Date": "12\/10\/2012",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:02:23",
+ "Current Range": "",
+ "dayOfWeek": "Mon",
+ "hourOfDay": "3 PM"
+ },
+ {
+ "Timestamp": "09\/11\/2013 13:58:26",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "-13",
+ "Current Weight": "150",
+ "performanceView": "D",
+ "Date": "09\/11\/2013",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:03:15",
+ "Current Range": "",
+ "dayOfWeek": "Wed",
+ "hourOfDay": "1 PM"
+ }, {
+ "Timestamp": "09\/16\/2013 14:29:29",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "3",
+ "Current Weight": "155",
+ "performanceView": "D",
+ "Date": "09\/16\/2013",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:03:14",
+ "Current Range": "",
+ "dayOfWeek": "Mon",
+ "hourOfDay": "2 PM"
+ }, {
+ "Timestamp": "09\/18\/2013 14:24:09",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "1",
+ "Current Weight": "157",
+ "performanceView": "D",
+ "Date": "09\/18\/2013",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:03:11",
+ "Current Range": "",
+ "dayOfWeek": "Wed",
+ "hourOfDay": "2 PM"
+ }, {
+ "Timestamp": "09\/23\/2013 14:32:03",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "",
+ "Current Weight": "157",
+ "performanceView": "D",
+ "Date": "09\/23\/2013",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:03:10",
+ "Current Range": "",
+ "dayOfWeek": "Mon",
+ "hourOfDay": "2 PM"
+ }, {
+ "Timestamp": "09\/25\/2013 14:24:38",
+ "oosView": "",
+ "Exercise Name": "Leg Press",
+ "fkClientID": "client506",
+ "Exercise ID": "exercise145",
+ "fk Studio ID": "studio13",
+ "netChangeWeight": "5",
+ "Current Weight": "165",
+ "performanceView": "D",
+ "Date": "09\/25\/2013",
+ "fk Client Name": "Blaine Hart",
+ "Total Time": "00:03:07",
+ "Current Range": "",
+ "dayOfWeek": "Wed",
+ "hourOfDay": "2 PM"
+ }]
+ };
+});
\ No newline at end of file
diff --git a/app/js/mockBackend/mockBackendRunner.js b/app/js/mockBackend/mockBackendRunner.js
index a36d9df..5ee20a4 100644
--- a/app/js/mockBackend/mockBackendRunner.js
+++ b/app/js/mockBackend/mockBackendRunner.js
@@ -3,21 +3,27 @@ define([
'app',
'mockBackend/clientList',
'mockBackend/clientExercises',
+ 'mockBackend/reportingPeriods',
+ 'mockBackend/exerciseReport',
'angularMocks'
-], function(angular, app, clients, clientExercises) {
+], function(angular, app, clients, clientExercises, reportingPeriods, exerciseReport) {
var mockBackendRunner = function($httpBackend) {
- var BASE_URL = 'http://pt.trackformance.com/RESTfm/PT_Demo/script/';
- var clientListURL = BASE_URL + 'listClientsForLoggedInUser/json-user/.json';
- var clientURL = BASE_URL + 'listUser/json-user/.json?'
- +'RFMscriptParam=client39';
- var clientExercisesURL = BASE_URL + 'listExercisesForClient/json-exerciseList/.json?'
- + 'RFMscriptParam=client39';
+
+ var clientListURL = /listClientsForLoggedInUser\/json-user/;
+ var clientURL = /listUser\/json-user/;
+ var clientExercisesURL = /listExercisesForClient\/json-exerciseList/;
+ var reportingPeriodsURL = /listReportPeriodOptions\/ReportingPeriods/;
+ var exerciseReportURL = /listHistoryForClientForExercise\/json-history/;
+ var templateUrl = /partials\//;
+
$httpBackend.whenGET(clientExercisesURL).respond(clientExercises);
$httpBackend.whenGET(clientURL).respond(clients);
$httpBackend.whenGET(clientListURL).respond(clients);
- $httpBackend.whenGET(/partials\//).passThrough();
-
+ $httpBackend.whenGET(reportingPeriodsURL).respond(reportingPeriods);
+ $httpBackend.whenGET(exerciseReportURL).respond(exerciseReport);
+
+ $httpBackend.whenGET(templateUrl).passThrough();
};
return ['$httpBackend', mockBackendRunner];
diff --git a/app/js/mockBackend/reportingPeriods.js b/app/js/mockBackend/reportingPeriods.js
new file mode 100644
index 0000000..b61e902
--- /dev/null
+++ b/app/js/mockBackend/reportingPeriods.js
@@ -0,0 +1,11 @@
+define([], function() {
+ return {
+ "data": [{
+ "PeriodName": "Lifetime",
+ "PeriodValueDays": "0"
+ }, {
+ "PeriodName": "Previous 3 Months",
+ "PeriodValueDays": "90"
+ }]
+ };
+});
\ No newline at end of file