This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
forked from 18F/dol-whd-14c
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from AppliedIS/feature-ui
Front-end updates for validation...
- Loading branch information
Showing
22 changed files
with
990 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
DOL.WHD.Section14c.Web/src/modules/components/sectionAppInfo/sectionAppInfoController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
'use strict'; | ||
|
||
module.exports = function(ngModule) { | ||
ngModule.controller('sectionAppInfoController', function($scope, stateService, responsesService) { | ||
ngModule.controller('sectionAppInfoController', function($scope, stateService, responsesService, validationService) { | ||
'ngInject'; | ||
'use strict'; | ||
|
||
$scope.formData = stateService.formData; | ||
$scope.validate = validationService.getValidationErrors; | ||
|
||
if(!$scope.formData.establishmentType) $scope.formData.establishmentType = []; | ||
if (!$scope.formData.establishmentType) { | ||
$scope.formData.establishmentType = []; | ||
} | ||
|
||
// multiple choice responses | ||
let questionKeys = [ 'ApplicationType', 'EstablishmentType' ]; | ||
responsesService.getQuestionResponses(questionKeys).then((responses) => { $scope.responses = responses; }); | ||
|
||
$scope.toggleEstablishmentType = function(id) { | ||
var idx = $scope.formData.establishmentType.indexOf(id); | ||
if (idx > -1) { | ||
$scope.formData.establishmentType.splice(idx, 1); | ||
let vm = this; | ||
|
||
this.toggleEstablishmentType = function(id) { | ||
let index = $scope.formData.establishmentType.indexOf(id); | ||
if (index > -1) { | ||
$scope.formData.establishmentType.splice(index, 1); | ||
} | ||
else { | ||
$scope.formData.establishmentType.push(id); | ||
} | ||
} | ||
|
||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.