diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index 436ad6b1907..7ca4a82c79b 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -434,13 +434,13 @@ &:hover { background-color: var(--highlight-select-hover); } } } +} - .scroller-thead { - position: sticky; - top: 0; - z-index: 2; - background-color: var(--body-color); - } +.scroller-thead { + position: sticky; + top: 0; + z-index: 2; + background-color: var(--body-color); } // THead background-color in Tooltip and Popups diff --git a/plugins/hr-resources/src/components/Schedule.svelte b/plugins/hr-resources/src/components/Schedule.svelte index 6a8c4dd7e0e..2d110ee649a 100644 --- a/plugins/hr-resources/src/components/Schedule.svelte +++ b/plugins/hr-resources/src/components/Schedule.svelte @@ -119,6 +119,4 @@ -
- -
+ diff --git a/plugins/hr-resources/src/components/ScheduleView.svelte b/plugins/hr-resources/src/components/ScheduleView.svelte index 4662604b6ba..a0a7fae28e2 100644 --- a/plugins/hr-resources/src/components/ScheduleView.svelte +++ b/plugins/hr-resources/src/components/ScheduleView.svelte @@ -189,47 +189,60 @@ } return total } + + let hoveredIndex: number = -1 {#if departmentStaff.length} - + - {#each values as value} + {#each values as value, i} {#if mode === CalendarMode.Year} {@const month = getMonth(currentDate, value)} {:else} {@const day = getDay(new Date(startDate), value)} - {/if} {/each} - {#each departmentStaff as employee} + {#each departmentStaff as employee, row} - {#each values as value} + {#each values as value, i} {#if mode === CalendarMode.Year} {@const month = getMonth(currentDate, value)} {@const requests = getRequests(employee._id, month)} @@ -256,6 +269,9 @@ class:today={areDatesEqual(todayDate, date)} class:weekend={isWeekend(date)} class:cursor-pointer={editable} + class:hovered={i === hoveredIndex} + class:firstLine={row === 0} + class:lastLine={row === departmentStaff.length - 1} use:tooltip={tooltipValue} on:click={(e) => createRequest(e, date, employee)} > @@ -272,24 +288,26 @@
{ + hoveredIndex = i + }} + on:mouseleave={() => { + hoveredIndex = -1 + }} > -
-
{getMonthName(month)}
-
+ {getMonthName(month)}
-
-
{getWeekDayName(day, 'short')}
-
{day.getDate()}
-
+
{ + hoveredIndex = i + }} + on:mouseleave={() => { + hoveredIndex = -1 + }} + > + {getWeekDayName(day, 'short')} + {day.getDate()}
{:else} -
+
{/if}