minor fixes in pdf generator + new booking input select
This commit is contained in:
@@ -127,10 +127,14 @@ 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(time.DateOnly) } class={ "flex flex-col gap-2 w-full", justify } method="post">
|
||||
@newAbsenceComponent()
|
||||
@timeDayTypeSwitch(day, true)
|
||||
@newBookingComponent(day)
|
||||
<form id={ "time-" + day.Date().Format(time.DateOnly) } class={ "bookings flex flex-col gap-2 w-full", justify } method="post">
|
||||
if (day.GetDayProgress(user) < 100 || day.IsWorkDay()) {
|
||||
@newAbsenceComponent()
|
||||
@timeDayTypeSwitch(day, true)
|
||||
@newBookingComponent(day)
|
||||
} else {
|
||||
@timeDayTypeSwitch(day, true)
|
||||
}
|
||||
<input type="hidden" name="action" value="change"/> <!-- default action value for ändern button -->
|
||||
</form>
|
||||
</div>
|
||||
@@ -160,12 +164,14 @@ templ timeDayTypeSwitch(day models.IWorkDay, fromCompound bool) {
|
||||
templ workdayComponent(workDay *models.WorkDay) {
|
||||
if len(workDay.Bookings) < 1 {
|
||||
<p class="text group-[.edit]:hidden">Keine Buchung gefunden. Bitte Arbeitsstunden oder Grund der Abwesenheit eingeben!</p>
|
||||
}
|
||||
if workDay.IsKurzArbeit() && len(workDay.Bookings) > 0 {
|
||||
@absenceComponent(workDay.GetKurzArbeit(), true)
|
||||
}
|
||||
for _, booking := range workDay.Bookings {
|
||||
@bookingComponent(booking)
|
||||
} else {
|
||||
if workDay.IsKurzArbeit() && len(workDay.Bookings) > 0 {
|
||||
@absenceComponent(workDay.GetKurzArbeit(), true)
|
||||
}
|
||||
for _, booking := range workDay.Bookings {
|
||||
@bookingComponent(booking)
|
||||
}
|
||||
<input type="hidden" name="select_kommen" value={ len(workDay.Bookings) > 0 && workDay.Bookings[len(workDay.Bookings)-1].CheckInOut%2 == 0 }/>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user