From 5957e25b73e3c67e63c95d816f0bdeeebf4a1937 Mon Sep 17 00:00:00 2001 From: Kyle Linden Date: Fri, 18 Nov 2016 14:24:08 -0500 Subject: [PATCH] admin view for wage data section --- .../answerField/answerFieldController.js | 12 +++ .../answerField/answerFieldDirective.js | 7 +- .../answerField/answerFieldTemplate.html | 5 +- .../modules/components/answerField/index.js | 1 + .../attachmentFieldDirective.js | 2 +- .../attachmentFieldTemplate.html | 2 +- .../src/modules/components/index.js | 1 + .../sectionAdminAssurancesTemplate.html | 2 +- .../adminWageDataPayTypeDirective.js | 17 +++ .../adminWageDataPayTypeTemplate.html | 97 +++++++++++++++++ .../components/sectionAdminWageData/index.js | 7 ++ .../sectionAdminWageDataController.js | 21 ++++ .../sectionAdminWageDataDirective.js | 15 +++ .../sectionAdminWageDataTemplate.html | 16 +++ DOL.WHD.Section14c.Web/src/styles/forms.scss | 102 +++++++++--------- 15 files changed, 250 insertions(+), 57 deletions(-) create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldController.js create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeDirective.js create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeTemplate.html create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/index.js create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataController.js create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataDirective.js create mode 100644 DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataTemplate.html diff --git a/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldController.js b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldController.js new file mode 100644 index 00000000..9ff28b2a --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldController.js @@ -0,0 +1,12 @@ +'use strict'; + +module.exports = function(ngModule) { + ngModule.controller('answerFieldController', function(apiService, stateService) { + 'ngInject'; + 'use strict'; + + var vm = this; + vm.attachmentApiURL = apiService.attachmentApiURL + stateService.ein; + vm.access_token = stateService.access_token; + }); +} \ No newline at end of file diff --git a/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldDirective.js b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldDirective.js index 5184e1b6..1b4a5594 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldDirective.js +++ b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldDirective.js @@ -11,8 +11,11 @@ module.exports = function(ngModule) { scope: { answer: '=', addressField: '=', - datefield: '=' - } + datefield: '=', + attachmentField: '=' + }, + controller: 'answerFieldController', + controllerAs: 'vm' } }); } diff --git a/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldTemplate.html b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldTemplate.html index 046aec7d..88da978b 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldTemplate.html +++ b/DOL.WHD.Section14c.Web/src/modules/components/answerField/answerFieldTemplate.html @@ -3,7 +3,7 @@
-
+
{{ answer === true ? 'Yes' : answer === false ? 'No' : answer }}
@@ -14,6 +14,9 @@
{{ answer | dateFilter }}
+
+ {{answer.originalFileName}} +
NOT PROVIDED diff --git a/DOL.WHD.Section14c.Web/src/modules/components/answerField/index.js b/DOL.WHD.Section14c.Web/src/modules/components/answerField/index.js index 145dab3a..19a92ce2 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/answerField/index.js +++ b/DOL.WHD.Section14c.Web/src/modules/components/answerField/index.js @@ -1,5 +1,6 @@ 'use strict'; module.exports = function(ngModule) { + require('./answerFieldController')(ngModule); require('./answerFieldDirective')(ngModule); }; diff --git a/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldDirective.js b/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldDirective.js index d4a939ff..b832b64f 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldDirective.js +++ b/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldDirective.js @@ -6,7 +6,7 @@ module.exports = function(ngModule) { 'use strict'; return { - restrict: 'EA', + restrict: 'E', template: require('./attachmentFieldTemplate.html'), controller: 'attachmentFieldController', scope: { diff --git a/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldTemplate.html b/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldTemplate.html index 88669cb4..aaeedaa2 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldTemplate.html +++ b/DOL.WHD.Section14c.Web/src/modules/components/attachmentField/attachmentFieldTemplate.html @@ -4,6 +4,6 @@
- {{attachmentName}} + {{attachmentName}}
\ No newline at end of file diff --git a/DOL.WHD.Section14c.Web/src/modules/components/index.js b/DOL.WHD.Section14c.Web/src/modules/components/index.js index 9df18cce..d3698c56 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/index.js +++ b/DOL.WHD.Section14c.Web/src/modules/components/index.js @@ -15,6 +15,7 @@ module.exports = function(ngModule) { require('./sectionAdminAppInfo')(ngModule); require('./sectionAdminAssurances')(ngModule); require('./sectionAdminEmployer')(ngModule); + require('./sectionAdminWageData')(ngModule); require('./sectionAdminWioa')(ngModule); require('./sectionAppInfo')(ngModule); require('./sectionAssurances')(ngModule); diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminAssurances/sectionAdminAssurancesTemplate.html b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminAssurances/sectionAdminAssurancesTemplate.html index e5d398a7..0d563def 100644 --- a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminAssurances/sectionAdminAssurancesTemplate.html +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminAssurances/sectionAdminAssurancesTemplate.html @@ -1,6 +1,6 @@

Assurances

- +

I certify that I have read this form and to the best of my knowledge and belief, all answers and information given in the application and attachments are true; that the representations set forth in support of this application diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeDirective.js b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeDirective.js new file mode 100644 index 00000000..ec073d0e --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeDirective.js @@ -0,0 +1,17 @@ +'use strict'; + +module.exports = function(ngModule) { + ngModule.directive('adminWageDataPayType', function() { + + 'use strict'; + + return { + restrict: 'EA', + template: require('./adminWageDataPayTypeTemplate.html'), + scope: { + paytype: '=', + data: '=' + } + }; + }); +} \ No newline at end of file diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeTemplate.html b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeTemplate.html new file mode 100644 index 00000000..d9086520 --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/adminWageDataPayTypeTemplate.html @@ -0,0 +1,97 @@ + + How many workers did the employer pay {{ paytype === $parent.$parent.$parent.constants.responses.payType.hourly ? 'hourly' : 'on a piece rate basis'}}? + + + + What was the job or contract on which the employer employed the largest number of workers at hourly subminimum wage rates + during the most recently completed fiscal quarter? + + + + Description of Work Performed + + + + Which method did the employer use to determine the Prevailing Wage for the job or contract identified above? + + + + Prevailing Wage Determined based on this survey + + +

Source Employers

+ +
+ + Source Employer Name + + + Address + + + Telephone Number + + + Full Name of Individual Contacted + + + Title of Individual Contacted + + + Date of Contact + + + Brief Description of Job/Task + + + Experience Worker Wage Provided + + + Basis for Conclusion Wage Rate is Not Based on Entry + +
+
+ + + Description of Work (include job classification code, if known) + + + + Alternate data source used + + + + Prevailing wage provided by source + + + + Date data retrieved + + + + Attach the applicable SCA Wage Determination + + + + Attach a work measurement or time study for ONE currently employed worker with a disability who is paid an hourly subminimum wage for the contract identified above. + + + + Descripton of Work + + + + Prevailing Wage Determined for This Job + + + + Standard Productivity + + + + Piece Rate Paid to Workers + + + + Attach all documents of the methods used to determine the standard productivity and the piece rate. + diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/index.js b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/index.js new file mode 100644 index 00000000..ce04ffd5 --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/index.js @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = function(ngModule) { + require('./adminWageDataPayTypeDirective')(ngModule); + require('./sectionAdminWageDataController')(ngModule); + require('./sectionAdminWageDataDirective')(ngModule); +}; diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataController.js b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataController.js new file mode 100644 index 00000000..fa9ab881 --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataController.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = function(ngModule) { + ngModule.controller('sectionAdminWageDataController', function($scope, $location, _constants) { + $scope.constants = _constants; + + let query = $location.search(); + + var vm = this; + vm.activeTab = query.t ? query.t : 1; + + vm.onTabClick = function(id) { + vm.activeTab = id; + } + + $scope.$on('$routeUpdate', function(){ + query = $location.search(); + vm.activeTab = query.t ? query.t : 1; + }); + }); +}; \ No newline at end of file diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataDirective.js b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataDirective.js new file mode 100644 index 00000000..881dba4b --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataDirective.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function(ngModule) { + ngModule.directive('sectionAdminWageData', function() { + + 'use strict'; + + return { + restrict: 'EA', + template: require('./sectionAdminWageDataTemplate.html'), + controller: 'sectionAdminWageDataController', + controllerAs: 'vm' + }; + }); +} diff --git a/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataTemplate.html b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataTemplate.html new file mode 100644 index 00000000..39970b38 --- /dev/null +++ b/DOL.WHD.Section14c.Web/src/modules/components/sectionAdminWageData/sectionAdminWageDataTemplate.html @@ -0,0 +1,16 @@ +
+

Wage Data

+
+ + + Pay Type + + +
+
1
Hourly
+
2
Piece Rate
+
+ + + +
\ No newline at end of file diff --git a/DOL.WHD.Section14c.Web/src/styles/forms.scss b/DOL.WHD.Section14c.Web/src/styles/forms.scss index 84e91cb1..a4ecf670 100644 --- a/DOL.WHD.Section14c.Web/src/styles/forms.scss +++ b/DOL.WHD.Section14c.Web/src/styles/forms.scss @@ -166,57 +166,6 @@ } } - // Custom form tabs (as seen in Wage Data section) - .form-tabbed-section { - @include clearfix; - - margin-top: 40px; - - .form-tab { - @include span(6); - - border-top: .6rem solid transparent; - padding: 1.4rem 2rem 2rem 2rem; - font-size: 2.4rem; - font-weight: 700; - cursor: pointer; - margin-right: 0px; - - - &:not(:first-of-type) { - border-left: 1px solid #aeb0b5; - } - - &.active { - border-top: .6rem solid $color-primary; - //padding-top: 2rem; - } - - &:not(.active) { - border-bottom: 1px solid #aeb0b5; - background-color: $color-gray-lightest; - - &:hover { - background-color: darken($color-gray-lightest, 5%); - } - } - - .circle { - display: inline-block; - font-size: 1.7rem; - width: 3rem; - height: 3rem; - border-radius: 50%; - background-color: $color-gray-darker; - color: $color-white; - text-align: center; - vertical-align: middle; - padding-top: .3rem; - margin-right: .7rem; - } - } - } - /* Form input sizing */ input.phoneno { max-width: 18.2rem; @@ -495,6 +444,57 @@ } } + // Custom form tabs (as seen in Wage Data section) + .form-tabbed-section { + @include clearfix; + + margin-top: 40px; + + .form-tab { + @include span(6); + + border-top: .6rem solid transparent; + padding: 1.4rem 2rem 2rem 2rem; + font-size: 2.4rem; + font-weight: 700; + cursor: pointer; + margin-right: 0px; + + + &:not(:first-of-type) { + border-left: 1px solid #aeb0b5; + } + + &.active { + border-top: .6rem solid $color-primary; + //padding-top: 2rem; + } + + &:not(.active) { + border-bottom: 1px solid #aeb0b5; + background-color: $color-gray-lightest; + + &:hover { + background-color: darken($color-gray-lightest, 5%); + } + } + + .circle { + display: inline-block; + font-size: 1.7rem; + width: 3rem; + height: 3rem; + border-radius: 50%; + background-color: $color-gray-darker; + color: $color-white; + text-align: center; + vertical-align: middle; + padding-top: .3rem; + margin-right: .7rem; + } + } + } + .form-content { div.usa-alert-error { @include clearfix;