Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #128 from AppliedIS/sprint3-fixes
Browse files Browse the repository at this point in the history
Linter rule fixes.
  • Loading branch information
klinden committed Nov 10, 2016
2 parents 72f1727 + ec17dac commit e311a2b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 1 addition & 2 deletions DOL.WHD.Section14c.Web/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# ignore validationService
src/modules/services/validationService.js

2 changes: 1 addition & 1 deletion DOL.WHD.Section14c.Web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = {
//Best Practices
"accessor-pairs": 2,
"block-scoped-var": 0,
"complexity": [2, 12],
"complexity": [2, 6],
"consistent-return": 0,
"curly": 0,
"default-case": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ module.exports = function(ngModule) {
vm.emailVerificationError = true;
console.log(error.statusText + (error.data && error.data.error ? ': ' + error.data.error + ' - ' + error.data.error_description : ''));
});
}
}

$scope.onSubmitClick = function() {
vm.resetErrors();
vm.registerdEmail = ''
vm.submittingForm = true;

/* eslint-disable complexity */
apiService.userRegister($scope.formVals.ein, $scope.formVals.email, $scope.formVals.pass, $scope.formVals.confirmPass, $scope.regResponse, vm.emailVerificationUrl).then(function (result) {
$scope.resetRegCaptcha();
vm.registerdEmail = $scope.formVals.email
Expand All @@ -106,14 +108,15 @@ module.exports = function(ngModule) {
} else {
vm.generalRegistrationError = true;
}

console.log(error.statusText + (error.data && error.data.error ? ': ' + error.data.error + ' - ' + error.data.error_description : ''));
$scope.resetRegCaptcha();
vm.submittingForm = false;
$location.path("/");
});
/* eslint-enable complexity */
}

$scope.regResponse = null;
$scope.regWidgetId = null;
$scope.model = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ module.exports = function(ngModule) {
}
}

/* eslint-disable complexity */
this.checkRequiredNumber = function(propPath, msg, min, max) {
let val = this.checkRequiredValue(propPath);
if (isNumber(val)) {
Expand All @@ -126,6 +127,7 @@ module.exports = function(ngModule) {
this.setValidationError(propPath, msg ? msg : "Please enter a valid numerical value");
return undefined;
}
/* eslint-enable complexity */

this.checkRequiredMultipleChoice = function(propPath, msg) {
return this.checkRequiredValue(propPath, msg ? msg : "Please select a value");
Expand Down Expand Up @@ -185,6 +187,7 @@ module.exports = function(ngModule) {


// methods for validating each section (primarily used internally)

this.validateAssurances = function() {
section = "__assurances";

Expand All @@ -194,6 +197,7 @@ module.exports = function(ngModule) {
this.checkRequiredDateComponent("signature.date", "Please enter today's date");
}

/* eslint-disable complexity */
this.validateAppInfo = function() {
section = "__appinfo";

Expand Down Expand Up @@ -467,6 +471,8 @@ module.exports = function(ngModule) {
section = undefined;
}

/* eslint-enable complexity */

this.validateWIOA = function() {
section = "__wioa";

Expand Down

0 comments on commit e311a2b

Please sign in to comment.