diff --git a/Backend/models/workDay.go b/Backend/models/workDay.go index 78094e8..f1dc6d0 100644 --- a/Backend/models/workDay.go +++ b/Backend/models/workDay.go @@ -101,12 +101,7 @@ func (d *WorkDay) GetWorkDays(card_uid string, tsFrom, tsTo time.Time) []WorkDay workDay.calcPauseTime() } - //TODO: remove - if len(workDay.Bookings) == 1 && workDay.Bookings[0].CounterId == 0 { - log.Println("No booking") - } else { - workDays = append(workDays, workDay) - } + workDays = append(workDays, workDay) } if err = rows.Err(); err != nil { return workDays @@ -130,6 +125,9 @@ func (d *WorkDay) calcPauseTime() { // Gets the duration someone worked that day func (d *WorkDay) getWorkTime() { + if len(d.Bookings) <= 1 && d.Bookings[0].CounterId == 0 { + return + } var workTime, pauseTime time.Duration var lastBooking Booking for _, booking := range d.Bookings { diff --git a/Backend/src/main.css b/Backend/src/main.css index 2330065..4b3439b 100644 --- a/Backend/src/main.css +++ b/Backend/src/main.css @@ -2,62 +2,62 @@ @source "../templates/*.templ"; @theme { - --color-accent-50: #e7fdea; - --color-accent-100: #cbfbd1; - --color-accent-200: #9cf7a8; - --color-accent-300: #68f37a; - --color-accent-400: #33ef4d; - --color-accent-500: #11db2d; - --color-accent-600: #0eaf23; - --color-accent-700: #0a851b; - --color-accent-800: #075a12; - --color-accent-900: #032b09; - --color-accent-950: #021805; - --color-accent: #0eaf23; - --color-text-50: #f7f8f7; - --color-text-100: #f2f3f2; - --color-text-200: #e2e4e2; - --color-text-300: #d2d6d2; - --color-text-400: #c2c7c2; - --color-text-500: #afb6af; - --color-text-600: #97a097; - --color-text-700: #7d877d; - --color-text-800: #5a625a; - --color-text-900: #161816; - --color-text-950: #000000; + --color-accent-50: #e7fdea; + --color-accent-100: #cbfbd1; + --color-accent-200: #9cf7a8; + --color-accent-300: #68f37a; + --color-accent-400: #33ef4d; + --color-accent-500: #11db2d; + --color-accent-600: #0eaf23; + --color-accent-700: #0a851b; + --color-accent-800: #075a12; + --color-accent-900: #032b09; + --color-accent-950: #021805; + --color-accent: #0eaf23; + --color-text-50: #f7f8f7; + --color-text-100: #f2f3f2; + --color-text-200: #e2e4e2; + --color-text-300: #d2d6d2; + --color-text-400: #c2c7c2; + --color-text-500: #afb6af; + --color-text-600: #97a097; + --color-text-700: #7d877d; + --color-text-800: #5a625a; + --color-text-900: #161816; + --color-text-950: #000000; } @layer components { + .grid-main { + display: grid; + grid-template-columns: 2fr auto 1fr; + align-items: stretch; + } + + .grid-sub { + display: grid; + grid-template-columns: subgrid; + grid-column: 1 / -1; + border-color: var(--color-neutral-400); + transition: background-color 0.2s ease-in-out; + } + + .grid-sub:hover { + background-color: var(--color-neutral-200); + } + + .grid-cell { + padding: calc(var(--spacing) * 2); + border-color: var(--color-neutral-400); + } + + @media (width >=48rem) { .grid-main { - display: grid; - grid-template-columns: repeat(6, 1fr); - align-items: stretch; + grid-template-columns: repeat(5, 1fr); + margin: 0 10%; } .grid-sub { - display: grid; - grid-template-columns: subgrid; - grid-column: 1 / -1; - border-color: var(--color-neutral-400); - transition: background-color 0.2s ease-in-out; - } - - .grid-sub:hover { - background-color: var(--color-neutral-200); - } - - .grid-cell { - padding: calc(var(--spacing) * 2); - border-color: var(--color-neutral-400); - } - - @media (width >=48rem) { - .grid-main { - grid-template-columns: repeat(5, 1fr); - margin: 0 10%; - } - - .grid-sub { - } } + } } diff --git a/Backend/static/css/styles.css b/Backend/static/css/styles.css index 1476a73..481b265 100644 --- a/Backend/static/css/styles.css +++ b/Backend/static/css/styles.css @@ -541,12 +541,6 @@ } } @layer utilities { - .collapse { - visibility: collapse; - } - .relative { - position: relative; - } .static { position: static; } @@ -565,27 +559,15 @@ .mb-2 { margin-bottom: calc(var(--spacing) * 2); } - .block { - display: block; - } .flex { display: flex; } - .grid { - display: grid; - } .hidden { display: none; } .inline { display: inline; } - .inline-flex { - display: inline-flex; - } - .list-item { - display: list-item; - } .table { display: table; } @@ -612,9 +594,6 @@ .w-4 { width: calc(var(--spacing) * 4); } - .w-9 { - width: calc(var(--spacing) * 9); - } .w-9\/10 { width: calc(9/10 * 100%); } @@ -633,18 +612,9 @@ .grow-1 { flex-grow: 1; } - .border-collapse { - border-collapse: collapse; - } - .transform { - transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y); - } .cursor-pointer { cursor: pointer; } - .resize { - resize: both; - } .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } @@ -789,20 +759,9 @@ .uppercase { text-transform: uppercase; } - .underline { - text-decoration-line: underline; - } - .outline { - outline-style: var(--tw-outline-style); - outline-width: 1px; - } .filter { filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); } - .backdrop-filter { - -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); - backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); - } .transition { transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); @@ -817,9 +776,10 @@ --tw-duration: 300ms; transition-duration: 300ms; } - .ease-in-out { - --tw-ease: var(--ease-in-out); - transition-timing-function: var(--ease-in-out); + .group-\[\.edit\]\:block { + &:is(:where(.group):is(.edit) *) { + display: block; + } } .group-\[\.edit\]\:hidden { &:is(:where(.group):is(.edit) *) { @@ -959,6 +919,11 @@ width: calc(1/2 * 100%); } } + .md\:flex-row-reverse { + @media (width >= 48rem) { + flex-direction: row-reverse; + } + } .md\:px-4 { @media (width >= 48rem) { padding-inline: calc(var(--spacing) * 4); @@ -980,7 +945,7 @@ @layer components { .grid-main { display: grid; - grid-template-columns: repeat(6, 1fr); + grid-template-columns: 2fr auto 1fr; align-items: stretch; } .grid-sub { @@ -1030,31 +995,6 @@ animation-timing-function: cubic-bezier(0, 0, 0.2, 1); } } -@property --tw-rotate-x { - syntax: "*"; - inherits: false; - initial-value: rotateX(0); -} -@property --tw-rotate-y { - syntax: "*"; - inherits: false; - initial-value: rotateY(0); -} -@property --tw-rotate-z { - syntax: "*"; - inherits: false; - initial-value: rotateZ(0); -} -@property --tw-skew-x { - syntax: "*"; - inherits: false; - initial-value: skewX(0); -} -@property --tw-skew-y { - syntax: "*"; - inherits: false; - initial-value: skewY(0); -} @property --tw-divide-x-reverse { syntax: "*"; inherits: false; @@ -1074,11 +1014,6 @@ syntax: "*"; inherits: false; } -@property --tw-outline-style { - syntax: "*"; - inherits: false; - initial-value: solid; -} @property --tw-blur { syntax: "*"; inherits: false; @@ -1115,47 +1050,7 @@ syntax: "*"; inherits: false; } -@property --tw-backdrop-blur { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-brightness { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-contrast { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-grayscale { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-hue-rotate { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-invert { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-opacity { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-saturate { - syntax: "*"; - inherits: false; -} -@property --tw-backdrop-sepia { - syntax: "*"; - inherits: false; -} @property --tw-duration { syntax: "*"; inherits: false; } -@property --tw-ease { - syntax: "*"; - inherits: false; -} diff --git a/Backend/templates/timeComponents.templ b/Backend/templates/timeComponents.templ index 518ead4..e760250 100644 --- a/Backend/templates/timeComponents.templ +++ b/Backend/templates/timeComponents.templ @@ -14,14 +14,14 @@ templ inputForm() { user := ctx.Value("user").(models.User) }}
{ user.Vorname + " " + user.Name }
Überstunden
4h 32min