|
|
|
|
@@ -40,7 +40,7 @@ func inputForm() templ.Component {
|
|
|
|
|
|
|
|
|
|
urlParams := ctx.Value("urlParams").(url.Values)
|
|
|
|
|
user := ctx.Value("user").(models.User)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"grid-sub divide-x-1 bg-neutral-300 max-md:flex max-md:flex-col\"><div class=\"grid-cell col-span-2 md:col-span-1 max-md:grid grid-cols-2\"><p class=\"font-bold uppercase\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"grid-sub divide-x-1 bg-neutral-300 max-md:flex max-md:flex-col\"><div class=\"grid-cell md:col-span-1 max-md:grid grid-cols-2\"><p class=\"font-bold uppercase\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -53,7 +53,7 @@ func inputForm() templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</p><div class=\"justify-self-end\"><p class=\"text-sm\">Überstunden</p><p class=\"text-accent\">4h 32min</p></div></div><form id=\"timeRangeForm\" method=\"GET\" class=\"grid-cell flex flex-row col-span-3 md:col-span-3 gap-2 \">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</p><div class=\"justify-self-end\"><p class=\"text-sm\">Überstunden</p><p class=\"text-accent\">4h 32min</p></div></div><form id=\"timeRangeForm\" method=\"GET\" class=\"grid-cell flex flex-row md:col-span-3 gap-2 \">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -122,7 +122,7 @@ func dayComponent(workDay models.WorkDay) templ.Component {
|
|
|
|
|
if len(workDay.Bookings) <= 1 {
|
|
|
|
|
justify = "justify-content: center"
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<div class=\"grid-sub divide-x-1 hover:bg-neutral-200 transition-colors\"><div class=\"grid-cell col-span-2 md:col-span-1 flex flex-row gap-2\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<div class=\"grid-sub divide-x-1 hover:bg-neutral-200 transition-colors\"><div class=\"grid-cell md:col-span-1 flex flex-row gap-2\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -207,7 +207,7 @@ func dayComponent(workDay models.WorkDay) templ.Component {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</div></div><div class=\"time-component flex flex-row col-span-3 md:col-span-3 gap-2 w-full grid-cell\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</div></div><div class=\"time-component flex flex-row md:col-span-3 gap-2 w-full grid-cell\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -246,7 +246,7 @@ func dayComponent(workDay models.WorkDay) templ.Component {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
if len(workDay.Bookings) <= 1 && workDay.Bookings[len(workDay.Bookings)-1].CounterId == 0 {
|
|
|
|
|
templ_7745c5c3_Err = noBookingComponent().Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
templ_7745c5c3_Err = noBookingComponent(workDay).Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -257,8 +257,16 @@ func dayComponent(workDay models.WorkDay) templ.Component {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, " ")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</form></div><div class=\"grid-cell\">")
|
|
|
|
|
templ_7745c5c3_Err = newBookingComponent(workDay).Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</form></div><div class=\"grid-cell\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -266,7 +274,7 @@ func dayComponent(workDay models.WorkDay) templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</div></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -299,7 +307,7 @@ func changeButtonComponent(id string) templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<button type=\"button\" class=\"cursor-pointer rounded-md text-neutral-800 p-2 md:px-4 border text-center text-sm hover:text-white transition-colors border-neutral-900 hover:bg-neutral-700 disabled:pointer-events-none disabled:opacity-50 group\" type=\"button\" onclick=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<button type=\"button\" class=\"cursor-pointer rounded-md text-neutral-800 p-2 md:px-4 border text-center text-sm hover:text-white transition-colors border-neutral-900 hover:bg-neutral-700 disabled:pointer-events-none disabled:opacity-50 group\" type=\"button\" onclick=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -308,7 +316,7 @@ func changeButtonComponent(id string) templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\"><p class=\"hidden md:block group-[.edit]:hidden\">Ändern</p><p class=\"hidden group-[.edit]:md:block\">Absenden</p><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"w-4 h-4 md:hidden\"><path d=\"m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z\"></path></svg></button>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"><p class=\"hidden md:block group-[.edit]:hidden\">Ändern</p><p class=\"hidden group-[.edit]:md:block\">Absenden</p><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"w-4 h-4 md:hidden\"><path class=\"group-[.edit]:hidden md:hidden\" d=\"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325\"></path> <path class=\"hidden group-[.edit]:block md:hidden\" d=\"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z\"></path></svg></button>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -357,7 +365,7 @@ func timeGaugeComponent(progress uint8, today bool, warning bool) templ.Componen
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
if today {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<div class=\"flex-start flex w-2 h-full overflow-hidden rounded-full bg-neutral-300 print:hidden\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"flex-start flex w-2 h-full overflow-hidden rounded-full bg-neutral-300 print:hidden\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -366,7 +374,7 @@ func timeGaugeComponent(progress uint8, today bool, warning bool) templ.Componen
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<div class=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -379,20 +387,20 @@ func timeGaugeComponent(progress uint8, today bool, warning bool) templ.Componen
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" style=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" style=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var17 string
|
|
|
|
|
templ_7745c5c3_Var17, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(fmt.Sprintf("height: %d%%", int(progress)))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 114, Col: 149}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 116, Col: 149}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\"></div></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\"></div></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -402,7 +410,7 @@ func timeGaugeComponent(progress uint8, today bool, warning bool) templ.Componen
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<div class=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<div class=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -415,7 +423,7 @@ func timeGaugeComponent(progress uint8, today bool, warning bool) templ.Componen
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\"></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\"></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -445,7 +453,7 @@ func lineComponent() templ.Component {
|
|
|
|
|
templ_7745c5c3_Var20 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<div class=\"flex flex-col w-2 py-2 items-center text-accent print:hidden\"><svg class=\"size-2\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><polygon points=\"12,2 22,12 12,22 2,12\"></polygon></svg><div class=\"w-[2px] bg-accent flex-grow -my-1\"></div><svg class=\"size-2\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><polygon points=\"12,2 22,12 12,22 2,12\"></polygon></svg></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div class=\"flex flex-col w-2 py-2 items-center text-accent print:hidden\"><svg class=\"size-2\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><polygon points=\"12,2 22,12 12,22 2,12\"></polygon></svg><div class=\"w-[2px] bg-accent flex-grow -my-1\"></div><svg class=\"size-2\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><polygon points=\"12,2 22,12 12,22 2,12\"></polygon></svg></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -453,7 +461,7 @@ func lineComponent() templ.Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func noBookingComponent() templ.Component {
|
|
|
|
|
func noBookingComponent(d models.WorkDay) templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
@@ -474,7 +482,77 @@ func noBookingComponent() templ.Component {
|
|
|
|
|
templ_7745c5c3_Var21 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div class=\"flex flex-row gap-2 justify-strech\"><button>Neue Buchung</button><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_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<div class=\"flex flex-col gap-2 align-center\"><select class=\"grow 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\">Abwesenheit?</option> <option value=\"1\">Urlaub</option> <option value=\"2\">Kurzarbeit</option> <option value=\"3\">Krank</option> <option value=\"4\">Kindkrank</option></select>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = newBookingComponent(d).Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func newBookingComponent(d models.WorkDay) templ.Component {
|
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
|
return templ_7745c5c3_CtxErr
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
|
defer func() {
|
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
|
}
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var22 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var22 == nil {
|
|
|
|
|
templ_7745c5c3_Var22 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<div class=\"hidden group-[.edit]:block\"><input type=\"time\" value=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var23 string
|
|
|
|
|
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(time.Now().Format("15:04"))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 151, Col: 55}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" class=\"text-neutral-700 group-[.edit]:inline hidden bg-neutral-100 text-sm border border-neutral-200 rounded-md px-3 py-2 transition duration-300 ease focus:outline-none focus:border-neutral-400 hover:border-neutral-300\"> <button type=\"button\">Neue Buchung</button> <select><option value=\"0\" disabled>Kommen/Gehen</option> <option value=\"3\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
if d.Bookings[len(d.Bookings)-1].CheckInOut%2 == 0 {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, " selected")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, ">Kommen</option> <option value=\"4\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
if d.Bookings[len(d.Bookings)-1].CheckInOut%2 == 1 {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, " selected")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, ">Gehen</option></select></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -498,64 +576,64 @@ func bookingComponent(booking models.Booking) templ.Component {
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var22 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var22 == nil {
|
|
|
|
|
templ_7745c5c3_Var22 = templ.NopComponent
|
|
|
|
|
templ_7745c5c3_Var24 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var24 == nil {
|
|
|
|
|
templ_7745c5c3_Var24 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<div><p class=\"text-neutral-500\"><span class=\"text-neutral-700 group-[.edit]:hidden inline\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var23 string
|
|
|
|
|
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(booking.Timestamp.Format("15:04"))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 150, Col: 97}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</span> <input disabled name=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var24 string
|
|
|
|
|
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs("booking_" + strconv.Itoa(booking.CounterId))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 151, Col: 70}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" type=\"time\" value=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div><p class=\"text-neutral-500\"><span class=\"text-neutral-700 group-[.edit]:hidden inline\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var25 string
|
|
|
|
|
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(booking.Timestamp.Format("15:04"))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 151, Col: 126}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 164, Col: 97}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" class=\"text-neutral-700 group-[.edit]:inline hidden bg-neutral-100 text-sm border border-neutral-200 rounded-md px-3 py-2 transition duration-300 ease focus:outline-none focus:border-neutral-400 hover:border-neutral-300\"> ")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "</span> <input disabled name=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var26 string
|
|
|
|
|
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(booking.GetBookingType())
|
|
|
|
|
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs("booking_" + strconv.Itoa(booking.CounterId))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 152, Col: 29}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 165, Col: 70}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</p></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" type=\"time\" value=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var27 string
|
|
|
|
|
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(booking.Timestamp.Format("15:04"))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 165, Col: 126}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" class=\"text-neutral-700 group-[.edit]:inline hidden bg-neutral-100 text-sm border border-neutral-200 rounded-md px-3 py-2 transition duration-300 ease focus:outline-none focus:border-neutral-400 hover:border-neutral-300\"> ")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var28 string
|
|
|
|
|
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(booking.GetBookingType())
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/timeComponents.templ`, Line: 166, Col: 29}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</p></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@@ -579,12 +657,12 @@ func LegendComponent() templ.Component {
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Var27 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var27 == nil {
|
|
|
|
|
templ_7745c5c3_Var27 = templ.NopComponent
|
|
|
|
|
templ_7745c5c3_Var29 := templ.GetChildren(ctx)
|
|
|
|
|
if templ_7745c5c3_Var29 == nil {
|
|
|
|
|
templ_7745c5c3_Var29 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<div class=\"flex flex-row gap-4 md:mx-[10%] print:hidden\"><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-red-600\"></div><span>Fehler</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-orange-500\"></div><span>Arbeitszeit unter regulär</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-accent\"></div><span>Arbeitszeit vollständig</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-purple-600\"></div><span>Überstunden</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-neutral-400\"></div><span>Keine Buchungen</span></div></div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<div class=\"flex flex-row gap-4 md:mx-[10%] print:hidden\"><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-red-600\"></div><span>Fehler</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-orange-500\"></div><span>Arbeitszeit unter regulär</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-accent\"></div><span>Arbeitszeit vollständig</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-purple-600\"></div><span>Überstunden</span></div><div class=\"flex flex-row items-center gap-2\"><div class=\"rounded-full size-4 bg-neutral-400\"></div><span>Keine Buchungen</span></div></div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
|