|
//functionality for DEBT NEEDED-BY pop-out calendar |
|
//$scope.debtNeededOpened = false; //status of pop-out calendar |
|
//$scope.debtNeededMin = new Date(); //earliest debt request is today |
|
//var max = new Date(); |
|
//$scope.debtNeededMax = max.setDate(max.getDate() + 7*4); //latest debt request is 1 months from now |
|
|
|
//$scope.debtNeededBySelected = false; // |
|
/*$scope.$watch('loan.date.neededBy', function(neededBy){ |
|
//if neededBy is cleared, reset payback date |
|
if(neededBy === null) { |
|
$scope.debtNeededBySelected = false; |
|
$scope.debtDueSelection = null; |
|
} else { |
|
$scope.debtNeededBySelected = true; |
|
} |
|
}, true)*/ |
|
|
|
//pop-out on glyphicon-calendar |
|
/*$scope.openDebtNeeded = function($event) { |
|
$event.preventDefault(); |
|
$event.stopPropagation(); |
|
$scope.debtNeededOpened = true; |
|
};*/ |
|
|
|
//map drop down list selection to number of days |
|
/*var optionsToDays = { |
|
'One Week' : 7, |
|
'Two Weeks' : 14, |
|
'Three Weeks' : 21, |
|
'One Month' : 28, |
|
'Two Months' : 56, |
|
'Three Months' : 84 |
|
}; |
|
|
|
var daysToOptions = { |
|
7 : 'One Week', |
|
14 : 'Two Weeks', |
|
21 : 'Three Weeks', |
|
28 : 'One Month', |
|
56 : 'Two Months', |
|
84 : 'Three Months' |
|
}*/ |
|
|
|
//functionality for DEBT PAYBACK drop down menu |
|
/*if($scope.loan.paybackDays === null) { |
|
$scope.debtDueSelection = null; //drop down list selection |
|
$scope.otherDebtDueSelected = false; //"is Other" option on drop down list selected? |
|
} else if($scope.loan.paybackDays in daysToOptions) { |
|
$scope.debtDueSelection = daysToOptions[$scope.loan.paybackDays]; |
|
} else { |
|
$scope.debtDueSelection = 'Other (Enter # of days)'; |
|
} |
|
|
|
$scope.$watch('debtDueSelection', function(selection){ |
|
if(selection === 'Other (Enter # of days)') { |
|
$scope.otherDebtDueSelected = true; //'Other' option selected, display manual input box for # of days |
|
} else { |
|
$scope.otherDebtDueSelected = false; |
|
$scope.loan.paybackDays = optionsToDays[selection]; |
|
} |
|
}, true);*/ |
Overall, great work! My comments are mostly cosmetic, except the ones marked MAJOR.
copia/server.js
Lines 32 to 54 in 2f0dcf2
<br>s:copia/public/views/index.html
Line 6 in 2f0dcf2
copia/public/views/borrow.html
Line 4 in 2f0dcf2
copia/public/views/borrowConfirm.html
Line 10 in 2f0dcf2
copia/public/views/lend.html
Line 11 in 2f0dcf2
copia/public/views/loanDetails.html
Lines 48 to 70 in 2f0dcf2
copia/public/js/filters.js
Line 6 in 2f0dcf2
copia/public/js/filters.js
Lines 7 to 13 in 2f0dcf2
copia/public/js/directives.js
Lines 32 to 33 in 2f0dcf2
ngModel.$setValidity('paybackThreshold', loanAmt !== null && loanAmt <= paybackAmt);copia/public/js/directives.js
Lines 32 to 33 in 2f0dcf2
copia/public/js/services/borrowService.js
Lines 6 to 23 in 2f0dcf2
copia/public/js/services/borrowService.js
Lines 31 to 38 in 2f0dcf2
self=thisconvention -- make sure you're consistent. example unusedself:copia/public/js/services/cookieService.js
Line 7 in 2f0dcf2
promisify_http(d, $http.get(...))in place of these chunks:copia/public/js/services/lendService.js
Lines 14 to 20 in 2f0dcf2
copia/public/js/services/lendService.js
Lines 28 to 34 in 2f0dcf2
if(isArr(object[key]))copia/public/js/services/sanitize.js
Line 11 in 2f0dcf2
copia/public/js/services/sanitize.js
Line 13 in 2f0dcf2
copia/public/js/controllers/borrow.js
Lines 64 to 124 in 2f0dcf2
copia/public/js/controllers/dashboard.js
Line 20 in 2f0dcf2
copia/public/js/controllers/dashboard.js
Lines 21 to 36 in 2f0dcf2
copia/public/js/controllers/dashboard.js
Line 46 in 2f0dcf2
copia/public/js/controllers/index.js
Lines 7 to 13 in 2f0dcf2
copia/public/js/controllers/loan.js
Lines 54 to 56 in 2f0dcf2
copia/public/js/controllers/signin.js
Lines 21 to 25 in 2f0dcf2
copia/app/controllers/loans.js
Line 48 in 2f0dcf2
copia/app/controllers/transactions.js
Line 45 in 2f0dcf2
}, cb);--copia/app/lib/venmoAPI.js
Lines 18 to 20 in 2f0dcf2
copia/app/models/transaction.js
Line 66 in 2f0dcf2