<html class="ng-scope" lang="en">
<head>
    <style type="text/css">
	hr {
		border-style: solid;
	}

    hr.faux-page-break {
        border-style: dashed;
        border-width: 2px;
        margin-bottom: 20px;
    }

    table {
        border-collapse: collapse;
        border: 0;
    }

    thead {
        page-break-inside: avoid;
    }
        
    th, td {
        text-align: left;
        padding: 3px;
    }

	td {
		page-break-inside: avoid;
	}

    th {
        page-break-inside: avoid;
    }

	span {
		page-break-inside: avoid;
	}

	h3 {
		page-break-inside: avoid;
		margin-top: -10px;
	}

	h4 {
		page-break-inside: avoid;
		margin-top: -10px;
	}
	div.subtextanswer {
		page-break-inside: avoid;
	}

    span.title {
		font-weight: bold;
		margin-top: 40px;
	}

	.subtext {
		font-weight: bold;
        margin-bottom: 5px;
	}

	.subtextanswer {
		font-weight: normal;
        margin-top: 0;
	}

	.row_greyed {
		background-color: #9F9F9F;
	}

	table .subtable {
		display: table;
		width: 100%;
		font-size: 14px;
	}

	table .subtable > div {
		display: table-cell;
		padding: 10px 5px;
		font-weight: 700;
	}

	table .subtable > div:not(:last-of-type) {
		border-right: 1px solid #212121;
	}

	table .subtable > div > div {
		margin-top: 4px;
		font-weight: 400;
	} 
    th .subtext {
        font-size: 11px;
        page-break-inside: avoid;
    }

	.employeeSubTable {
		width: 100%;
		border-bottom: 1px;
		border-top: 1px;
		border-bottom-style: solid;
		border-bottom-style: solid;
		margin-top: 20px;
	}

	div.accessibility-text {
		font-size: 10px;
		margin-bottom: 20px;
	}

	h3 + h4 {
		margin-top: -10px;
	}

    .work-site-break + .work-site-break {
        margin-top: 60px;
    }
	</style>
</head>
<body>
    <div class="admin-page">
        <h2>Work Sites & Employees</h2>
        <hr>
        <p>
            <span class="subtext">What is the total number of establishments and work sites to be covered by this certificate?</span>
            <div class="subtextanswer">{{ boolOrString TotalNumWorkSites }}</div>
        </p>

        <div class="table-responsive">
            <div>
                <h3>Work Site(s)</h3>

                {{#each WorkSites}}               
                <div class="work-site-break">
                    <hr class="faux-page-break"> 
                    <h3> Work Site Name: {{ Name }}</h3>
                    <h4>Number of Workers: {{ Employees.Count }}</h4>
                    <div worksites-sub="true" answer="WorkSites">
                        <div class="worksites-sub-field">
                            <p class="subtext">What type of establishment / work site is this?</p>
                            <p class="subtextanswer">{{ WorkSiteType.Display }}</p>
                        </div>

                        <div class="worksites-sub-field">
                            <p class="subtext">Name of establishment / work Site</p>
                            <p class="subtextanswer">{{ Name }}</p>
                        </div>

                        <div class="worksites-sub-field">
                            <p class="subtext">Address of establishment / work Site</p>
                            <p class="subtextanswer">{{ formatAddress Address }}</p>
                        </div>

                        <worksites-sub-sub-field answer="SCA">
                            <p class="subtext">Is Service Contract Act (SCA)-covered work performed at this establishment / work site?</p>
                            <p class="subtextanswer">{{ boolOrString SCA }}</p>
                        </worksites-sub-sub-field>

                        <div class="worksites-sub-field">
                            <p class="subtext">Is work performed at this establishment / work site pursuant to a Federal contract for services or concessions that was entered into on or after January 1, 2015, which indicates that the contract may be subject to Executive Order 13658 (Establishing a Minimum Wage for Contractors)?</p>
                            <p class="subtextanswer">{{ boolOrString FederalContractWorkPerformed }}</p>
                        </div>

                        <div class="worksites-sub-field">
                            <p class="subtext">Total number of employees who were employed at this establishment / work site at any time during the most recently completed fiscal quarter and received subminimum wages:</p>
                            <p class="subtextanswer">{{ NumEmployees }}</p>
                        </div>
                    </div>
                    
                   {{#if_eq ../ApplicationType.Display 'Renewal Application' }}
                    <div employee-sub="true" answer="WorkSites.Employee">
                        <h4>Employee(s)</h4>
                        <table cellpadding="0" cellspacing="0" border="1" style="width:100%">
                            <thead>
                                <tr>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Name of worker</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Type of work performed (for employees working more than one job, use job employee worked most hours at subminimum wage)</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Primary disability that affects productivity for job described above. Pick only one.</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>How many jobs did this worker perform at this work site?</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Average # of hours worked per week on all jobs at this work site?</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Average earnings per hour for all jobs at this work site</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Prevailing wage rate for job described above</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Productivity measure/rating for job described above</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Commensurate wage rate/average earnings per hour for job described above</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Total hours worked for job described above</span></th>
                                    <th scope="col" style="font-size:9px" valign="top"><span>Does worker perform work for this employer at any other work site?</span></th>
                                </tr>
                            </thead>
                            <tbody>
                                {{#each Employees }}
                                <tr>
                                    <td style="font-size:11px">{{ Name }}</td> 
                                    <td style="font-size:11px">{{ WorkType }}</td>
                                    <td style="font-size:11px">{{ PrimaryDisability.Display }}</td>
                                    <td style="font-size:11px">{{ NumJobs }}</td>
                                    <td style="font-size:11px">{{ AvgWeeklyHours }}</td>
                                    <td style="font-size:11px">{{ AvgHourlyEarnings }}</td>
                                    <td style="font-size:11px">{{ PrevailingWage }}</td>
                                    <td style="font-size:11px">{{ ProductivityMeasure }}</td>
                                    <td style="font-size:11px">{{ CommensurateWageRate }}</td>
                                    <td style="font-size:11px">{{ TotalHours }}</td>
                                    <td style="font-size:11px">{{ boolOrString WorkAtOtherSite }}</td>
                                </tr>
                                {{/each}}
                            </tbody>
                        </table>
                    </div>
                    {{/if_eq}}
                </div>
                {{/each}}
            </div>
        </div>
    </div>
</body>
</html>
