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 #159 from AppliedIS/feature-adminwagedata
Browse files Browse the repository at this point in the history
admin view for wage data section
  • Loading branch information
jefferey committed Nov 18, 2016
2 parents f03706b + 5957e25 commit d71f724
Show file tree
Hide file tree
Showing 15 changed files with 250 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -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;
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ module.exports = function(ngModule) {
scope: {
answer: '=',
addressField: '=',
datefield: '='
}
datefield: '=',
attachmentField: '='
},
controller: 'answerFieldController',
controllerAs: 'vm'
}
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ng-transclude></ng-transclude>
</div>
<div class="answer-answer" ng-show="answer !== undefined">
<div ng-show="!addressField && !datefield">
<div ng-show="!addressField && !datefield && !attachmentField">
{{ answer === true ? 'Yes' : answer === false ? 'No' : answer }}
</div>
<div ng-show="addressField">
Expand All @@ -14,6 +14,9 @@
<div ng-show="datefield">
{{ answer | dateFilter }}
</div>
<div ng-show="attachmentField">
<a ng-href="{{vm.attachmentApiURL}}/{{answer.id}}?access_token={{vm.access_token}}"><span>{{answer.originalFileName}}</span></a>
</div>
</div>
<div class="answer-answer" ng-show="answer === undefined">
NOT PROVIDED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

module.exports = function(ngModule) {
require('./answerFieldController')(ngModule);
require('./answerFieldDirective')(ngModule);
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function(ngModule) {
'use strict';

return {
restrict: 'EA',
restrict: 'E',
template: require('./attachmentFieldTemplate.html'),
controller: 'attachmentFieldController',
scope: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<label class="underlabel" for="{{::$id}}">File types accepted: PDF, Word, Excel, JPG, PNG</label>
</div>
<div ng-show="attachmentId != undefined">
<a ng-href="{{vm.attachmentApiURL}}/{{scaAttachmentId}}?access_token={{vm.access_token}}" id="{{scaAttachmentId}}"><span>{{attachmentName}}</span></a>
<a ng-href="{{vm.attachmentApiURL}}/{{attachmentId}}?access_token={{vm.access_token}}" id="{{attachmentId}}"><span>{{attachmentName}}</span></a>
<button class="usa-button-secondary" ng-click="vm.deleteAttachment(attachmentId)">Delete</button>
</div>
1 change: 1 addition & 0 deletions DOL.WHD.Section14c.Web/src/modules/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="admin-page">
<h1>Assurances</h1>

<hr>
<div class="usa-content">
<p>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
Expand Down
Original file line number Diff line number Diff line change
@@ -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: '='
}
};
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<answer-field answer="data.numWorkers">
How many workers did the employer pay {{ paytype === $parent.$parent.$parent.constants.responses.payType.hourly ? 'hourly' : 'on a piece rate basis'}}?
</answer-field>

<answer-field answer="data.jobName">
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?
</answer-field>

<answer-field answer="data.jobDescription">
Description of Work Performed
</answer-field>

<answer-field answer="data.prevailingWageMethod.display">
Which method did the employer use to determine the Prevailing Wage for the job or contract identified above?
</answer-field>

<answer-field answer="data.mostRecentPrevailingWageSurvey.prevailingWageDetermined" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.survey">
Prevailing Wage Determined based on this survey
</answer-field>

<h3 ng-show="data.mostRecentPrevailingWageSurvey.sourceEmployers.length">Source Employers</h3>

<div ng-repeat="employer in data.mostRecentPrevailingWageSurvey.sourceEmployers" ng-show="data.mostRecentPrevailingWageSurvey.sourceEmployers.length">
<answer-field answer="employer.employerName">
Source Employer Name
</answer-field>
<answer-field answer="employer.address" address-field="true">
Address
</answer-field>
<answer-field answer="employer.phone">
Telephone Number
</answer-field>
<answer-field answer="employer.contactName">
Full Name of Individual Contacted
</answer-field>
<answer-field answer="employer.contactTitle">
Title of Individual Contacted
</answer-field>
<answer-field answer="employer.contactDate" datefield="true">
Date of Contact
</answer-field>
<answer-field answer="employer.jobDescription">
Brief Description of Job/Task
</answer-field>
<answer-field answer="employer.experiencedWorkerWageProvided">
Experience Worker Wage Provided
</answer-field>
<answer-field answer="employer.conclusionWageRateNotBasedOnEntry">
Basis for Conclusion Wage Rate is Not Based on Entry
</answer-field>
<hr>
</div>

<answer-field answer="data.alternateWageData.alternateWorkDescription" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.alternate">
Description of Work (include job classification code, if known)
</answer-field>

<answer-field answer="data.alternateWageData.alternateDataSourceUsed" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.alternate">
Alternate data source used
</answer-field>

<answer-field answer="data.alternateWageData.prevailingWageProvidedBySource" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.alternate">
Prevailing wage provided by source
</answer-field>

<answer-field answer="data.alternateWageData.dataRetrieved" datefield="true" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.alternate">
Date data retrieved
</answer-field>

<answer-field answer="data.scaWageDeterminationAttachment" attachment-field="true" ng-show="data.prevailingWageMethodId === $parent.constants.responses.prevailingWageMethod.sca">
Attach the applicable SCA Wage Determination
</answer-field>

<answer-field answer="data.attachment" attachment-field="true" ng-show="paytype == $parent.constants.responses.payType.hourly">
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.
</answer-field>

<answer-field answer="data.pieceRateWorkDescription" ng-show="paytype == $parent.constants.responses.payType.pieceRate">
Descripton of Work
</answer-field>

<answer-field answer="data.prevailingWageDeterminedForJob" ng-show="paytype == $parent.constants.responses.payType.pieceRate">
Prevailing Wage Determined for This Job
</answer-field>

<answer-field answer="data.standardProductivity" ng-show="paytype == $parent.constants.responses.payType.pieceRate">
Standard Productivity
</answer-field>

<answer-field answer="data.pieceRatePaidToWorkers" ng-show="paytype == $parent.constants.responses.payType.pieceRate">
Piece Rate Paid to Workers
</answer-field>

<answer-field answer="data.attachment" attachment-field="true" ng-show="paytype == $parent.constants.responses.payType.pieceRate">
Attach all documents of the methods used to determine the standard productivity and the piece rate.
</answer-field>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

module.exports = function(ngModule) {
require('./adminWageDataPayTypeDirective')(ngModule);
require('./sectionAdminWageDataController')(ngModule);
require('./sectionAdminWageDataDirective')(ngModule);
};
Original file line number Diff line number Diff line change
@@ -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;
});
});
};
Original file line number Diff line number Diff line change
@@ -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'
};
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div class="admin-page">
<h1>Wage Data</h1>
<hr>

<answer-field answer="appData.payType.display">
Pay Type
</answer-field>

<div class="form-tabbed-section" ng-show="appData.payTypeId === constants.responses.payType.both">
<div class="form-tab {{ vm.activeTab === 1 ? 'active' : '' }}" ng-click="vm.onTabClick(1)"><div class="circle">1</div> Hourly</div>
<div class="form-tab {{ vm.activeTab === 2 ? 'active' : '' }}" ng-click="vm.onTabClick(2)"><div class="circle">2</div> Piece Rate</div>
</div>

<admin-wage-data-pay-type paytype="constants.responses.payType.hourly" data="appData.hourlyWageInfo" ng-show="appData.payTypeId === constants.responses.payType.hourly || (appData.payTypeId === constants.responses.payType.both && vm.activeTab !== 2)"></admin-wage-data-pay-type>
<admin-wage-data-pay-type paytype="constants.responses.payType.pieceRate" data="appData.pieceRateWageInfo" ng-show="appData.payTypeId === constants.responses.payType.pieceRate || (appData.payTypeId === constants.responses.payType.both && vm.activeTab === 2)"></admin-wage-data-pay-type>
</div>
102 changes: 51 additions & 51 deletions DOL.WHD.Section14c.Web/src/styles/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d71f724

Please sign in to comment.