diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 768813118f..7baef748bd 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -120,6 +120,10 @@ p:last-child { margin-block-end: 0; } } } +.text-center { text-align: center; } + +.firstLetter span::first-letter { text-transform: uppercase; } + .inline-height2 { line-height: 200%; } @@ -198,6 +202,12 @@ input.search { flex-wrap: nowrap; min-height: 0; } +.flex-col-reverse { + display: flex; + flex-direction: column-reverse; + flex-wrap: nowrap; + min-height: 0; +} .flex-col-center { display: flex; flex-direction: column; @@ -516,6 +526,7 @@ input.search { .min-h-2 { min-height: .5rem; } .min-h-7 { min-height: 1.75rem; } .min-h-60 { min-height: 15rem; } +.max-w-9 { max-width: 2.25rem; } .max-w-30 { max-width: 7.5rem; } .max-w-60 { max-width: 15rem; } .max-w-80 { max-width: 20rem; } diff --git a/packages/ui/src/components/Panel.svelte b/packages/ui/src/components/Panel.svelte index fab96f7bec..1b986515c8 100644 --- a/packages/ui/src/components/Panel.svelte +++ b/packages/ui/src/components/Panel.svelte @@ -36,7 +36,6 @@ let asideFloat: boolean = false let asideShown: boolean = false let fullSize: boolean = false - let twoRows: boolean = false $: twoRows = $deviceInfo.minWidth const checkPanel = (): void => { diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index e0f8385de9..2463eb74dc 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -225,6 +225,7 @@ export interface FadeOptions { } export const defaultSP: FadeOptions = { multipler: { top: 0, bottom: 0 } } export const tableSP: FadeOptions = { offset: { top: true }, multipler: { top: 2.5, bottom: 0 } } +export const tableHRscheduleY: FadeOptions = { offset: { top: true }, multipler: { top: 5, bottom: 0 } } export const issueSP: FadeOptions = { offset: { top: true }, multipler: { top: 3, bottom: 0 } } export interface DeviceOptions { diff --git a/plugins/hr-resources/src/components/Schedule.svelte b/plugins/hr-resources/src/components/Schedule.svelte index 08be644101..7f74429d22 100644 --- a/plugins/hr-resources/src/components/Schedule.svelte +++ b/plugins/hr-resources/src/components/Schedule.svelte @@ -18,7 +18,15 @@ import { Ref } from '@hcengineering/core' import { Department } from '@hcengineering/hr' import { createQuery, SpaceSelector } from '@hcengineering/presentation' - import { Button, Icon, IconBack, IconForward, Label } from '@hcengineering/ui' + import { + Button, + Icon, + IconBack, + IconForward, + Label, + deviceOptionsStore as deviceInfo, + TabList + } from '@hcengineering/ui' import view from '@hcengineering/view' import hr from '../plugin' import ScheduleMonthView from './ScheduleView.svelte' @@ -66,81 +74,108 @@ month: 'long' }).format(date) } + + $: twoRows = $deviceInfo.twoRows + const handleSelect = (result: any) => { + if (result.type === 'select') { + const res = result.detail + if (res.id === 'ModeMonth') mode = CalendarMode.Month + else if (res.id === 'ModeYear') mode = CalendarMode.Year + } + } -