Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions models/calendar/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ export function createModel (builder: Builder): void {
{ state: 1 }
]
})

builder.mixin(calendar.class.Event, core.class.Class, view.mixin.ObjectTitle, {
titleProvider: calendar.function.EventTitleProvider
})
}

export default calendar
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Server CalDAV",
"CalDavAccessAccount": "Účet Huly",
"CalDavAccessPassword": "Heslo",
"CalDavAccessPasswordWarning": "Tohle heslo už nebudete moci znovu vidět. Uložte si ho na bezpečné místo."
"CalDavAccessPasswordWarning": "Tohle heslo už nebudete moci znovu vidět. Uložte si ho na bezpečné místo.",
"MeetingScheduledNotification": "Naplánována schůzka",
"MeetingRescheduledNotification": "Čas schůzky změněn",
"MeetingCanceledNotification": "Schůzka zrušena: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "CalDAV-Server",
"CalDavAccessAccount": "Huly-Konto",
"CalDavAccessPassword": "Passwort",
"CalDavAccessPasswordWarning": "Sie können dieses Passwort nicht erneut anzeigen. Bitte speichern Sie es an einem sicheren Ort."
"CalDavAccessPasswordWarning": "Sie können dieses Passwort nicht erneut anzeigen. Bitte speichern Sie es an einem sicheren Ort.",
"MeetingScheduledNotification": "Besprechung geplant",
"MeetingRescheduledNotification": "Besprechungszeit geändert",
"MeetingCanceledNotification": "Besprechung abgesagt: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "CalDAV server",
"CalDavAccessAccount": "Huly account",
"CalDavAccessPassword": "Password",
"CalDavAccessPasswordWarning": "You will not be able to see this password again. Please save it in a secure place."
"CalDavAccessPasswordWarning": "You will not be able to see this password again. Please save it in a secure place.",
"MeetingScheduledNotification": "Meeting scheduled",
"MeetingRescheduledNotification": "Meeting time changed",
"MeetingCanceledNotification": "Meeting canceled: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Servidor CalDAV",
"CalDavAccessAccount": "Cuenta de Huly",
"CalDavAccessPassword": "Contraseña",
"CalDavAccessPasswordWarning": "No podrá ver esta contraseña nuevamente. Guárdela en un lugar seguro."
"CalDavAccessPasswordWarning": "No podrá ver esta contraseña nuevamente. Guárdela en un lugar seguro.",
"MeetingScheduledNotification": "Reunión programada",
"MeetingRescheduledNotification": "Se modificó la hora de la reunión",
"MeetingCanceledNotification": "Reunión cancelada: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Serveur CalDAV",
"CalDavAccessAccount": "Compte Huly",
"CalDavAccessPassword": "Mot de passe",
"CalDavAccessPasswordWarning": "Vous ne pourrez plus voir ce mot de passe. Veuillez le conserver dans un endroit sûr."
"CalDavAccessPasswordWarning": "Vous ne pourrez plus voir ce mot de passe. Veuillez le conserver dans un endroit sûr.",
"MeetingScheduledNotification": "Réunion planifiée",
"MeetingRescheduledNotification": "Heure de la réunion modifiée",
"MeetingCanceledNotification": "Réunion annulée: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Server CalDAV",
"CalDavAccessAccount": "Account Huly",
"CalDavAccessPassword": "Password",
"CalDavAccessPasswordWarning": "Non potrai vedere di nuovo questa password. Conservala in un luogo sicuro."
"CalDavAccessPasswordWarning": "Non potrai vedere di nuovo questa password. Conservala in un luogo sicuro.",
"MeetingScheduledNotification": "Riunione pianificata",
"MeetingRescheduledNotification": "Orario della riunione modificato",
"MeetingCanceledNotification": "Riunione annullata: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Servidor CalDAV",
"CalDavAccessAccount": "Conta Huly",
"CalDavAccessPassword": "Password",
"CalDavAccessPasswordWarning": "Não será possível ver esta palavra-passe novamente. Guarde-a num local seguro."
"CalDavAccessPasswordWarning": "Não será possível ver esta palavra-passe novamente. Guarde-a num local seguro.",
"MeetingScheduledNotification": "Reunião agendada",
"MeetingRescheduledNotification": "Horário da reunião alterado",
"MeetingCanceledNotification": "Reunião cancelada: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "Сервер CalDAV",
"CalDavAccessAccount": "Учетная запись Huly",
"CalDavAccessPassword": "Пароль",
"CalDavAccessPasswordWarning": "Вы не сможете увидеть этот пароль снова. Пожалуйста, сохраните его в безопасном месте."
"CalDavAccessPasswordWarning": "Вы не сможете увидеть этот пароль снова. Пожалуйста, сохраните его в безопасном месте.",
"MeetingScheduledNotification": "Встреча запланирована",
"MeetingRescheduledNotification": "Время встречи изменено",
"MeetingCanceledNotification": "Встреча отменена: {title}"
}
}
5 changes: 4 additions & 1 deletion plugins/calendar-assets/lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
"CalDavAccessServer": "CalDAV 服务器",
"CalDavAccessAccount": "Huly 帐户",
"CalDavAccessPassword": "密码",
"CalDavAccessPasswordWarning": "您将无法再次看到此密码。请将其保存在安全的地方。"
"CalDavAccessPasswordWarning": "您将无法再次看到此密码。请将其保存在安全的地方。",
"MeetingScheduledNotification": "会议已安排",
"MeetingRescheduledNotification": "会议时间已更改",
"MeetingCanceledNotification": "会议已取消: {title}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
padding-top: 0;
}
&:not(.rightCropPadding) {
padding: 0.75rem 1.25rem;
padding: 0.75rem 1rem;
}
&.rightCropPadding {
padding: 0.75rem 1rem 0.75rem 1.25rem;
Expand Down
1 change: 1 addition & 0 deletions plugins/calendar-resources/src/components/EditEvent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
}
&.description {
padding: 0 1.25rem;
min-height: 2.625rem;
}
}
.top-icon {
Expand Down
37 changes: 22 additions & 15 deletions plugins/calendar-resources/src/components/EventReminders.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,30 @@
}
</script>

<div class="flex-row-center gap-1" class:pb-0-5={reminders.length}>
<Icon icon={calendar.icon.Notifications} size="small" />
<Button
label={reminders.length > 0 ? calendar.string.AddReminder : calendar.string.Reminders}
{disabled}
justify={'left'}
flex="1"
padding="0.5rem"
kind={'ghost'}
{focusIndex}
on:click={(e) => {
addReminder(e)
}}
/>
</div>
{#if !disabled}
<div class="flex-row-center gap-1" class:pb-0-5={reminders.length}>
<Icon icon={calendar.icon.Notifications} size="small" />
<Button
label={reminders.length > 0 ? calendar.string.AddReminder : calendar.string.Reminders}
{disabled}
justify={'left'}
flex="1"
padding="0.5rem"
kind={'ghost'}
{focusIndex}
on:click={(e) => {
addReminder(e)
}}
/>
</div>
{/if}
{#if reminders.length}
<Scroller padding={'.125rem 0 0 1.25rem'} shrink>
{#if disabled}
<div style="position:absolute; left:0; top:0.625rem">
<Icon icon={calendar.icon.Participants} size="small" />
</div>
{/if}
{#if reminders.length > maxReminders && !shown}
{#each reminders.slice(0, maxReminders - 2) as reminder, i}
<EventReminderItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

function change (val: Visibility): void {
if (value !== val) {
console.log('Changed', val)
dispatch('change', val)
value = val
}
Expand All @@ -70,7 +69,6 @@
opened = true
closeTooltip()
showPopup(ModernPopup, { items, selected: selected?.id }, eventToHTMLElement(ev), (selectedId) => {
console.log('Selected', selectedId)
if (selectedId !== undefined) {
change(selectedId)
}
Expand Down
5 changes: 3 additions & 2 deletions plugins/calendar-resources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import ScheduleNavSection from './components/ScheduleNavSection.svelte'
import calendar from './plugin'
import contact from '@hcengineering/contact'
import { deleteObjects } from '@hcengineering/view-resources'
import { configureCalDavAccess } from './utils'
import { eventTitleProvider, configureCalDavAccess } from './utils'

export {
EventElement,
Expand Down Expand Up @@ -216,6 +216,7 @@ export default async (): Promise<Resources> => ({
}
},
function: {
ConfigureCalDavAccess: configureCalDavAccess
ConfigureCalDavAccess: configureCalDavAccess,
EventTitleProvider: eventTitleProvider
}
})
19 changes: 18 additions & 1 deletion plugins/calendar-resources/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ import {
type ReccuringInstance,
generateEventId
} from '@hcengineering/calendar'
import { type DocumentUpdate, type IdMap, type Timestamp, getCurrentAccount, toIdMap } from '@hcengineering/core'
import {
type Client,
type Doc,
type DocumentUpdate,
type IdMap,
type Ref,
type Timestamp,
getCurrentAccount,
toIdMap
} from '@hcengineering/core'
import presentation, { createQuery, getClient, onClient } from '@hcengineering/presentation'
import { closePopup, DAY, showPopup } from '@hcengineering/ui'
import { writable } from 'svelte/store'
Expand Down Expand Up @@ -210,3 +219,11 @@ export function getAccountClient (): AccountClient {

return getAccountClientRaw(accountsUrl, token)
}

export async function eventTitleProvider (client: Client, ref: Ref<Doc>, doc?: Event): Promise<string> {
const object = doc ?? (await client.findOne(calendar.class.Event, { _id: ref as Ref<Event> }))
if (object === undefined) {
return ''
}
return object.title
}
23 changes: 19 additions & 4 deletions plugins/calendar/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Hardcore Engineering Inc.
// Copyright © 2022-2025 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
Expand All @@ -12,7 +12,18 @@
// limitations under the License.

import { Contact, Employee } from '@hcengineering/contact'
import type { AttachedDoc, Class, Doc, Markup, Mixin, PersonId, Ref, SystemSpace, Timestamp } from '@hcengineering/core'
import type {
AttachedDoc,
Class,
Client,
Doc,
Markup,
Mixin,
PersonId,
Ref,
SystemSpace,
Timestamp
} from '@hcengineering/core'
import { NotificationType } from '@hcengineering/notification'
import type { Asset, IntlString, Metadata, Plugin, Resource } from '@hcengineering/platform'
import { plugin } from '@hcengineering/platform'
Expand Down Expand Up @@ -246,7 +257,10 @@ const calendarPlugin = plugin(calendarId, {
CalDavAccessServer: '' as IntlString,
CalDavAccessAccount: '' as IntlString,
CalDavAccessPassword: '' as IntlString,
CalDavAccessPasswordWarning: '' as IntlString
CalDavAccessPasswordWarning: '' as IntlString,
MeetingScheduledNotification: '' as IntlString,
MeetingRescheduledNotification: '' as IntlString,
MeetingCanceledNotification: '' as IntlString
},
handler: {
DisconnectHandler: '' as Handler
Expand All @@ -267,7 +281,8 @@ const calendarPlugin = plugin(calendarId, {
NoAttached: '' as Ref<Event>
},
function: {
ConfigureCalDavAccess: '' as Resource<() => Promise<void>>
ConfigureCalDavAccess: '' as Resource<() => Promise<void>>,
EventTitleProvider: '' as Resource<(client: Client, ref: Ref<Doc>, doc?: Doc) => Promise<string>>
}
})

Expand Down
1 change: 1 addition & 0 deletions plugins/love-resources/src/components/MeetingData.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
kind={'ghost'}
padding={'0 .5rem'}
justify={'left'}
flex="1"
on:click={() => {
isMeeting = !isMeeting
changeIsMeeting(isMeeting)
Expand Down
5 changes: 5 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,11 @@
"projectFolder": "services/calendar/pod-calendar",
"shouldPublish": false
},
{
"packageName": "@hcengineering/pod-calendar-mailer",
"projectFolder": "services/calendar/pod-calendar-mailer",
"shouldPublish": false
},
{
"packageName": "@hcengineering/qms-doc-import-tool",
"projectFolder": "dev/doc-import-tool",
Expand Down
1 change: 1 addition & 0 deletions server-plugins/calendar-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@hcengineering/server-token": "^0.6.11",
"@hcengineering/calendar": "^0.6.24",
"@hcengineering/contact": "^0.6.24",
"@hcengineering/kafka": "^0.6.0",
"@hcengineering/server-core": "^0.6.1",
"@hcengineering/server-notification-resources": "^0.6.0",
"@hcengineering/server-contact": "^0.6.1"
Expand Down
Loading