changed header + temporary removed empty days
This commit is contained in:
@@ -64,14 +64,7 @@ templ dayComponent(workDay models.WorkDay) {
|
||||
@lineComponent()
|
||||
<form id={ "time-" + workDay.Day.Format("2006-01-02") } class="flex flex-col gap-2 group w-full justify-between" style={ justify } method="post">
|
||||
if len(workDay.Bookings) <= 1 && workDay.Bookings[len(workDay.Bookings)-1].CounterId == 0 {
|
||||
<p class="text-xs">Keine Buchung gefunden. Bitte Grund der Abwesenheit eingeben!</p>
|
||||
<select class="cursor-pointer rounded-md text-neutral-800 p-2 md:px-4 border text-center text-sm transition-colors border-neutral-900" disabled name="abwesenheit">
|
||||
<option value="0">-</option>
|
||||
<option value="1">Urlaub</option>
|
||||
<option value="2">Kurzarbeit</option>
|
||||
<option value="3">Krank</option>
|
||||
<option value="4">Kindkrank</option>
|
||||
</select>
|
||||
@noBookingComponent()
|
||||
} else {
|
||||
for _, booking := range workDay.Bookings {
|
||||
@bookingComponent(booking)
|
||||
@@ -137,6 +130,20 @@ templ lineComponent() {
|
||||
</div>
|
||||
}
|
||||
|
||||
templ noBookingComponent() {
|
||||
<div class="flex flex-row gap-2 justify-strech">
|
||||
<button>Neue Buchung</button>
|
||||
// <p class="text-xs">Keine Buchung gefunden. Bitte Grund der Abwesenheit eingeben!</p>
|
||||
<select class="cursor-pointer rounded-md text-neutral-800 p-2 md:px-4 border text-center text-sm transition-colors border-neutral-900" disabled name="abwesenheit">
|
||||
<option value="0">-</option>
|
||||
<option value="1">Urlaub</option>
|
||||
<option value="2">Kurzarbeit</option>
|
||||
<option value="3">Krank</option>
|
||||
<option value="4">Kindkrank</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ bookingComponent(booking models.Booking) {
|
||||
<div>
|
||||
<p class="text-neutral-500">
|
||||
|
||||
Reference in New Issue
Block a user