diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 20436cbefb..e741cc5824 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -59,6 +59,7 @@ --primary-color-skyblue: #93CAF3; --primary-color-pink: #FA8DA1; + --highlight-blue-01: #0084FF; --highlight-red: #F96E50; --highlight-red-hover: #ff967e; --highlight-red-press: #f96f50bd; @@ -349,9 +350,13 @@ --theme-calendar-today-color: #000; --theme-calendar-holiday-color: #eb5757; --theme-calendar-weekend-color: rgba(242, 153, 74, 1); - --theme-calendar-today-bgcolor: rgba(43, 81, 144, .1); + --theme-calendar-today-bgcolor: rgba(51, 157, 255, .1); --theme-calendar-holiday-bgcolor: rgba(235, 87, 87, .1); --theme-calendar-weekend-bgcolor: rgba(242, 153, 74, .1); + --theme-calendar-event-available-color: rgba(55, 122, 230, 0.20); + --theme-calendar-event-available-bgcolor: #f6f9fe; + --theme-calendar-event-unavailable-color: rgba(244, 119, 88, 0.20); + --theme-calendar-event-unavailable-bgcolor: #fdece7; --theme-tooltip-color: #FFF; --theme-tooltip-bg: #444248; diff --git a/plugins/hr-resources/src/components/DepartmentStaff.svelte b/plugins/hr-resources/src/components/DepartmentStaff.svelte index 758dac88ea..acf2ed92bd 100644 --- a/plugins/hr-resources/src/components/DepartmentStaff.svelte +++ b/plugins/hr-resources/src/components/DepartmentStaff.svelte @@ -98,6 +98,7 @@ + diff --git a/plugins/hr-resources/src/components/ScheduleRequests.svelte b/plugins/hr-resources/src/components/ScheduleRequests.svelte deleted file mode 100644 index c8bf988507..0000000000 --- a/plugins/hr-resources/src/components/ScheduleRequests.svelte +++ /dev/null @@ -1,90 +0,0 @@ - - - -
|
-
-
-
- |
- # | -## | - {#each values as value, i} - {@const day = getDay(startDate, value)} -{ - hoveredIndex = i - }} - on:mouseleave={() => { - hoveredIndex = -1 - }} - on:click={() => isFutureDate() && setPublicHoliday(day)} - > - {getWeekDayName(day, 'short')} - {day.getDate()} - | - {/each} -
|---|---|---|---|
|
-
-
+ {#key [containerWidthRem, columnWidthRem, headerWidthRem]}
+
+
+
+
+
+ {dep?.name}
- |
- - {getTotal( - requests, - startDate, - endDate, - types, - getHolidayDatesForEmployee(staffDepartmentMap, employee._id, holidays) - )} - | - -showReportInfo(employee, rTime)} - > - {#if rTime !== undefined} - {floorFractionDigits(rTime.value, 3)} - ({rTime.tasks.size}) - {:else} - 0 - {/if} - | - {#each values as value, i} + createRequest(e, day, employee)}
- on:mousemove={() => {
- hoveredColumn = i
- }}
- on:mouseleave={() => {
- hoveredColumn = -1
- }}
+ {@const today = areDatesEqual(todayDate, day)}
+
+ isFutureDate() && setPublicHoliday(day)}
+ >
+
+
+
+
+
-
+ {/each}
+ 0} class="h-full w-full">
- {#if requests.length}
-
+ {getWeekDayName(day, 'short')}
+
+ {#each rows as row}
+ {@const employee = row.employee}
+ {@const tracks = row.tracks}
+ {@const editable = isEditable(employee)}
+
+
+
+ {#each tracks as track, trackIndex}
+ {#each track.elements as element}
+ {@const request = element.request}
+
+
+ {#each values as value, i}
+ {@const day = getDay(startDate, value)}
+ {@const today = areDatesEqual(todayDate, day)}
+ {@const weekend = isWeekend(day)}
+ {@const holiday = isHoliday(
+ getHolidayDatesForEmployee(staffDepartmentMap, employee._id, holidays),
+ day
+ )}
+ {@const requests = getRequests(employeeRequests, day, day, employee._id)}
+ {@const tooltipValue = getTooltip(requests, day, employee)}
+
+ {#key [tooltipValue, editable]}
+
+
+
+ {/each}
+ {/each}
+ createRequest(e, day, employee)}
+ >
+ {#if today}
+
{/if}
- |
- {/key}
- {/each}
-
|
-
-
+ {/key}
+ {/each}
- |
- - {getTotal( - Array.from(employeeRequests.values()).flat(), - startDate, - endDate, - types, - [...holidays.values()].flat() - )} - | -- {floorFractionDigits( - Array.from(timeReports.values()) - .flat() - .reduce((a, b) => a + b.value, 0), - 3 - )} - | - {#each values as value, i} - {@const day = getDay(startDate, value)} -{ - hoveredColumn = i - }} - on:mouseleave={() => { - hoveredColumn = -1 - }} - > - {getTotal([...employeeRequests.values()].flat(), day, day, types, [...holidays.values()].flat())} - | {/each} -