removed Formatduration and fixed rounding error, working on overtime calculation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"arbeitszeitmessung/helper"
|
||||
"arbeitszeitmessung/models"
|
||||
"fmt"
|
||||
"net/url"
|
||||
@@ -39,6 +40,8 @@ templ inputForm() {
|
||||
templ dayComponent(workDay models.WorkDay) {
|
||||
{{
|
||||
work, pause := workDay.GetWorkTimeString()
|
||||
user := ctx.Value("user").(models.User)
|
||||
overtime := helper.FormatDuration(workDay.CalcOvertime(user))
|
||||
justify := ""
|
||||
if len(workDay.Bookings) <= 1 {
|
||||
justify = "justify-content: center"
|
||||
@@ -57,6 +60,7 @@ templ dayComponent(workDay models.WorkDay) {
|
||||
<p class=" text-accent">{ work }</p>
|
||||
}
|
||||
<p class="text-neutral-500">{ pause }</p>
|
||||
<p class="text-neutral-500">{ overtime }</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user