-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UBER-668 UBER-669 UBER-670 UBER-671 (#3566)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
- Loading branch information
1 parent
32fd80c
commit afc881a
Showing
10 changed files
with
406 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
plugins/calendar-resources/src/components/CalendarEventPresenter.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!-- | ||
// Copyright © 2023 Hardcore Engineering Inc. | ||
// | ||
// Licensed under the Eclipse Public License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. You may | ||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
--> | ||
<script lang="ts"> | ||
import { Event } from '@hcengineering/calendar' | ||
import { addZero } from '@hcengineering/ui' | ||
export let event: Event | ||
export let oneRow: boolean = false | ||
export let narrow: boolean = false | ||
export let size: { width: number; height: number } | ||
$: startDate = new Date(event.date) | ||
$: endDate = new Date(event.dueDate) | ||
const getTime = (date: Date): string => { | ||
return `${addZero(date.getHours())}:${addZero(date.getMinutes())}` | ||
} | ||
</script> | ||
|
||
{#if !narrow} | ||
<b class="overflow-label">{event.title}</b> | ||
{/if} | ||
{#if !oneRow} | ||
<span class="overflow-label text-sm">{getTime(startDate)}-{getTime(endDate)}</span> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.