mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
TSK-1419: show greyed requests on holidays and weekends (#3121)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
afea88fc3b
commit
f893b2c1e5
@ -38,7 +38,10 @@
|
||||
|
||||
function getStyle (type: RequestType, request: Request): string {
|
||||
let res = `background-color: ${
|
||||
isWeekend(date) && noWeekendHolidayType.includes(type._id) ? getPlatformColor(16) : getPlatformColor(type.color)
|
||||
(isWeekend(date) || isHoliday(getHolidayDatesForEmployee(staffDepartmentMap, employee._id, holidays), date)) &&
|
||||
noWeekendHolidayType.includes(type._id)
|
||||
? getPlatformColor(16)
|
||||
: getPlatformColor(type.color)
|
||||
};`
|
||||
if (Math.abs(type.value % 1) === 0.5) {
|
||||
res += ' height: 50%;'
|
||||
@ -60,7 +63,7 @@
|
||||
<div class="w-full h-full relative p-1 flex">
|
||||
{#each requests as request}
|
||||
{#await getType(request) then type}
|
||||
{#if type && !((isWeekend(date) || isHoliday(getHolidayDatesForEmployee(staffDepartmentMap, employee._id, holidays), date)) && noWeekendHolidayType.includes(type._id))}
|
||||
{#if type}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="request flex-center"
|
||||
|
Loading…
Reference in New Issue
Block a user