separaded endpoints + cleaned page templates + added constants to time formatting
Some checks failed
Tests / Run Go Tests (push) Failing after 1m34s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m34s
This commit is contained in:
@@ -127,7 +127,7 @@ templ defaultDayComponent(day models.IWorkDay) {
|
||||
</div>
|
||||
<div class="all-booking-component grid-cell flex flex-row md:col-span-3 col-span-2 gap-2 w-full">
|
||||
@lineComponent()
|
||||
<form id={ "time-" + day.Date().Format("2006-01-02") } class={ "flex flex-col gap-2 w-full", justify } method="post">
|
||||
<form id={ "time-" + day.Date().Format(time.DateOnly) } class={ "flex flex-col gap-2 w-full", justify } method="post">
|
||||
if day.IsWorkDay() {
|
||||
{{
|
||||
workDay, _ := day.(*models.WorkDay)
|
||||
@@ -153,14 +153,14 @@ templ defaultDayComponent(day models.IWorkDay) {
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid-cell flex flex-row gap-2 items-end">
|
||||
@changeButtonComponent("time-"+day.Date().Format("2006-01-02"), day.IsWorkDay())
|
||||
@changeButtonComponent("time-"+day.Date().Format(time.DateOnly), day.IsWorkDay())
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ absentInput(a models.Absence) {
|
||||
<input type="hidden" name="date_from" value={ a.DateFrom.Format("2006-01-02") }/>
|
||||
<input type="hidden" name="date_to" value={ a.DateTo.Format("2006-01-02") }/>
|
||||
<input type="hidden" name="date_from" value={ a.DateFrom.Format(time.DateOnly) }/>
|
||||
<input type="hidden" name="date_to" value={ a.DateTo.Format(time.DateOnly) }/>
|
||||
<input type="hidden" name="aw_type" value={ a.AbwesenheitTyp.Id }/>
|
||||
<input type="hidden" name="aw_id" value={ a.CounterId }/>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user