You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.8 KiB
40 lines
1.8 KiB
extends ../layout/main
|
|
block view-content
|
|
|
|
include components/weekly-summary
|
|
|
|
section.uk-section.uk-section-default.uk-section
|
|
.uk-container
|
|
h1 Week of #{dayjs(weekStartDate).format('MMMM DD')}
|
|
+renderWeeklySummaryReport(weeklyEarnings)
|
|
|
|
.uk-margin-medium
|
|
h2 Daily Hours
|
|
table.uk-table.uk-table-small.uk-table-divider
|
|
thead
|
|
tr
|
|
th.uk-table-expand Day of Week
|
|
th.uk-text-nowrap.uk-text-right.uk-table-shrink Session Count
|
|
th.uk-text-nowrap.uk-text-right.uk-table-shrink Hours Worked
|
|
th.uk-text-nowrap.uk-text-right.uk-table-shrink Time Worked
|
|
tbody
|
|
-
|
|
var totalHoursWorked = 0;
|
|
var totalSessionCount = 0;
|
|
|
|
each day in dailyTimeWorked
|
|
-
|
|
totalHoursWorked += day.hoursWorked;
|
|
totalSessionCount += day.workSessionCount;
|
|
|
|
tr
|
|
td.uk-table-expand= dayjs(day.date).format('dddd')
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= (day.workSessionCount > 0) ? formatCount(day.workSessionCount) : '---'
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= (day.hoursWorked > 0) ? numeral(day.hoursWorked).format('0.00') : '---'
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= (day.hoursWorked > 0) ? numeral(day.hoursWorked * 3600).format('0:00:00') : '---'
|
|
tfoot
|
|
tr
|
|
td.uk-table-expand TOTALS
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= formatCount(totalSessionCount)
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= numeral(totalHoursWorked).format('0.00')
|
|
td.uk-text-right.uk-text-nowrap.uk-table-shrink= numeral(totalHoursWorked * 3600).format('0:00:00')
|