Added additional stats and ticket printing to all time tickets screen BOD-191

This commit is contained in:
Patrick Fic
2020-07-20 11:29:06 -07:00
parent f187a2106c
commit e6865a4bfc
19 changed files with 324 additions and 92 deletions

View File

@@ -0,0 +1,25 @@
query REPORT_TIME_TICKETS_IN_RANGE($id: uuid!, $start: date!, $end: date!) {
employees_by_pk(id: $id) {
id
first_name
last_name
employee_number
timetickets(where: { date: { _gte: $start, _lte: $end } }) {
actualhrs
ciecacode
clockoff
clockon
cost_center
created_at
date
id
rate
productivehrs
memo
job {
id
ro_number
}
}
}
}

View File

@@ -0,0 +1,55 @@
<div style="font-family: Arial, Helvetica, sans-serif;">
<h1 style="text-align: center;"><span><strong>Employee Time Tickets</strong></span></h1>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 33.3333%; vertical-align: top;"><strong>Employee:</strong> {{employees_by_pk.first_name}} {{employees_by_pk.last_name}}</td>
<td style="width: 35.2832%; vertical-align: top;">&nbsp;</td>
<td style="width: 31.3834%; vertical-align: top;">
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<h2 style="text-align: center;"><span>Time Tickets</span></h2>
<table style="border-collapse: collapse; width: 100%; height: 88px;" border="1">
<tbody>
<tr style="height: 22px;">
<td style="width: 14.2857%; text-align: center; height: 22px;"><strong>Date</strong></td>
<td style="width: 14.2857%; text-align: center; height: 22px;"><strong>Cost Center</strong></td>
<td style="width: 14.2857%; text-align: center; height: 22px;"><strong>Actual Hrs</strong></td>
<td style="width: 14.2857%; text-align: center; height: 22px;"><strong>Productive Hrs</strong></td>
<td style="width: 14.2857%; text-align: center; height: 22px;"><strong>Shift Clock On</strong></td>
<td style="width: 7.14285%; text-align: center; height: 22px;"><strong>Shift Clock Off</strong></td>
<td style="width: 7.14285%; text-align: center;"><strong>Shift Time</strong></td>
</tr>
<tr style="height: 22px; display: none;">
<td style="width: 14.2857%; height: 22px;"><span>{{#each employees_by_pk.timetickets}}</span></td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 7.14285%;">&nbsp;</td>
<td style="width: 7.14285%;">&nbsp;</td>
</tr>
<tr style="height: 22px;">
<td style="width: 14.2857%; height: 22px; text-align: justify;">{{this.date}}</td>
<td style="width: 14.2857%; height: 22px; text-align: justify;">{{this.cost_center}}</td>
<td style="width: 14.2857%; height: 22px; text-align: justify;">{{this.actualhrs}}</td>
<td style="width: 14.2857%; height: 22px; text-align: justify;">{{this.productivehrs}}</td>
<td style="width: 14.2857%; height: 22px; text-align: justify;">{{moment this.clockon format="MM/DD/YYYY @ hh:mm:ss"}}</td>
<td style="width: 7.14285%; height: 22px; text-align: justify;">{{moment this.clockoff format="MM/DD/YYYY @ hh:mm:ss"}}</td>
<td style="width: 7.14285%; text-align: justify;">{{moment this.clockoff diff=this.clockon }}</td>
</tr>
<tr style="height: 22px; display: none;">
<td style="width: 14.2857%; height: 22px;"><span>{{/each}}</span></td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 14.2857%;">&nbsp;</td>
<td style="width: 7.14285%;">&nbsp;</td>
<td style="width: 7.14285%;">&nbsp;</td>
</tr>
</tbody>
</table>
</div>