diff --git a/models/training/src/index.ts b/models/training/src/index.ts index fc25f209de..dcd9c2e091 100644 --- a/models/training/src/index.ts +++ b/models/training/src/index.ts @@ -16,7 +16,7 @@ import activity from '@hcengineering/activity' import notification, { type NotificationType } from '@hcengineering/notification' import { type Asset, type IntlString } from '@hcengineering/platform' -import type { BuildModelKey, Viewlet, ViewletDescriptor } from '@hcengineering/view' +import type { BuildModelKey, KeyFilterPreset, Viewlet, ViewletDescriptor } from '@hcengineering/view' import questions from '@hcengineering/model-questions' import contact from '@hcengineering/contact' import tracker from '@hcengineering/model-tracker' @@ -659,9 +659,19 @@ function defineTrainingAttempt (builder: Builder): void { sortingKey: 'state', displayProps: { align: 'center' } } - const columnOwner: BuildModelKey = { - ...columns.owner, - key: 'owner' + const columnTrainee: BuildModelKey = { + key: 'owner', + label: training.string.TrainingRequestTrainee, + presenter: contacts.component.EmployeePresenter, + props: { shouldShowName: true }, + displayProps: { align: 'center' } + } + + const columnTraineeFilter: KeyFilterPreset = { + _class: training.class.TrainingAttempt, + component: contacts.component.EmployeeFilter, + key: 'owner', + label: training.string.TrainingRequestTrainee } defineTableBrowserViewletDescriptor( @@ -693,7 +703,7 @@ function defineTrainingAttempt (builder: Builder): void { columnScore, 'createdOn', 'submittedOn', - columnOwner + columnTrainee ], configOptions: { strict: true, @@ -720,7 +730,7 @@ function defineTrainingAttempt (builder: Builder): void { }) builder.mixin(training.class.TrainingAttempt, core.class.Class, view.mixin.ClassFilters, { - filters: ['state', 'owner', 'submittedOn'] as Array, + filters: ['state', 'submittedOn', columnTraineeFilter] as Array, strict: true }) diff --git a/packages/presentation/src/components/ActionContext.svelte b/packages/presentation/src/components/ActionContext.svelte index f6926950de..c5e86e3001 100644 --- a/packages/presentation/src/components/ActionContext.svelte +++ b/packages/presentation/src/components/ActionContext.svelte @@ -13,37 +13,43 @@ // limitations under the License. --> diff --git a/packages/text/src/kits/default-kit.ts b/packages/text/src/kits/default-kit.ts index 56aea0a518..30d78e7dad 100644 --- a/packages/text/src/kits/default-kit.ts +++ b/packages/text/src/kits/default-kit.ts @@ -56,7 +56,7 @@ export const DefaultKit = Extension.create({ }), Typography.configure({}), Link.extend({ inclusive: false }).configure({ - openOnClick: true, + openOnClick: false, HTMLAttributes: { class: 'cursor-pointer', rel: 'noopener noreferrer', target: '_blank' } }) ] diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 6fc0a2c934..e1110ddc22 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -68,9 +68,9 @@ --text-editor-selected-node-background: rgba(43, 81, 144, 0.1); --text-editor-selected-node-color: #93CAF3; - --text-editor-highlighted-node-warning-active-background-color: #F2D7AE; - --text-editor-highlighted-node-warning-background-color: #F8EBD7; - --text-editor-highlighted-node-warning-border-color: #DE9B35; + --text-editor-highlighted-node-warning-active-background-color: rgba(255, 203, 0, .24); + --text-editor-highlighted-node-warning-background-color: rgba(255, 203, 0, .12); + --text-editor-highlighted-node-warning-border-color: rgba(255, 203, 0, .35); --text-editor-highlighted-node-add-background-color: #DAEDDC; --text-editor-highlighted-node-add-font-color: #1C4220; diff --git a/packages/theme/styles/_text-editor.scss b/packages/theme/styles/_text-editor.scss index c546f3cebf..20f56a6045 100644 --- a/packages/theme/styles/_text-editor.scss +++ b/packages/theme/styles/_text-editor.scss @@ -323,7 +323,9 @@ .text-editor-highlighted-node-warning { background-color: var(--text-editor-highlighted-node-warning-background-color); - border-bottom: 0.0625rem solid var(--text-editor-highlighted-node-warning-border-color); + border-bottom: 2px solid var(--text-editor-highlighted-node-warning-border-color); + padding-bottom: 2px; + transition: background 0.2s ease, border 0.2s ease; &.text-editor-highlighted-node-selected, &:hover { background-color: var(--text-editor-highlighted-node-warning-active-background-color); diff --git a/plugins/controlled-documents-assets/assets/icons.svg b/plugins/controlled-documents-assets/assets/icons.svg index 83134837a7..e80406dd60 100644 --- a/plugins/controlled-documents-assets/assets/icons.svg +++ b/plugins/controlled-documents-assets/assets/icons.svg @@ -1,7 +1,7 @@ - - + + diff --git a/plugins/controlled-documents-resources/src/components/document/EditDocContent.svelte b/plugins/controlled-documents-resources/src/components/document/EditDocContent.svelte index 033191c900..5e404a3980 100644 --- a/plugins/controlled-documents-resources/src/components/document/EditDocContent.svelte +++ b/plugins/controlled-documents-resources/src/components/document/EditDocContent.svelte @@ -20,7 +20,7 @@ import { getClient } from '@hcengineering/presentation' import view from '@hcengineering/view' import attachment, { Attachment } from '@hcengineering/attachment' - import documents from '@hcengineering/controlled-documents' + import documents, { DocumentState } from '@hcengineering/controlled-documents' import { Editor, Heading } from '@hcengineering/text-editor' import { CollaboratorEditor, @@ -34,8 +34,9 @@ highlightUpdateCommand, getNodeElement } from '@hcengineering/text-editor-resources' - import { navigate, EditBox, Scroller } from '@hcengineering/ui' + import { navigate, EditBox, Scroller, Label } from '@hcengineering/ui' import { getCollaborationUser, getObjectLinkFragment } from '@hcengineering/view-resources' + import plugin from '../../plugin' import { $areDocumentCommentPopupsOpened as areDocumentCommentPopupsOpened, @@ -248,7 +249,7 @@ handleShowHeading(ev.detail)} /> -
+
{#if $isEditable} + {#if $controlledDocument.state === DocumentState.Obsolete} +
+ {#each { length: 24 } as _, i} +
+ {/each} +
+ {/if} diff --git a/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte b/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte index efe2ffc34c..06c4edb0d7 100644 --- a/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte +++ b/plugins/controlled-documents-resources/src/components/document/EditDocRelease.svelte @@ -58,33 +58,33 @@ const client = getClient() - async function changePlannedEffectiveDate (plannedEffectiveDate: Timestamp) { - if (!$controlledDocument) { - return - } + // async function changePlannedEffectiveDate (plannedEffectiveDate: Timestamp) { + // if (!$controlledDocument) { + // return + // } - await client.update($controlledDocument, { plannedEffectiveDate }) - } + // await client.update($controlledDocument, { plannedEffectiveDate }) + // } - let selectedDate: Timestamp = - $controlledDocument?.plannedEffectiveDate != null && $controlledDocument?.plannedEffectiveDate > 0 - ? $controlledDocument.plannedEffectiveDate - : Date.now() + // let selectedDate: Timestamp = + // $controlledDocument?.plannedEffectiveDate != null && $controlledDocument?.plannedEffectiveDate > 0 + // ? $controlledDocument.plannedEffectiveDate + // : Date.now() - let selected: IntlString | undefined = undefined - if ($controlledDocument?.plannedEffectiveDate === 0) { - selected = documentsRes.string.EffectiveImmediately - } else if ($controlledDocument?.plannedEffectiveDate != null) { - selected = documentsRes.string.EffectiveOn - } + // let selected: IntlString | undefined = undefined + // if ($controlledDocument?.plannedEffectiveDate === 0) { + // selected = documentsRes.string.EffectiveImmediately + // } else if ($controlledDocument?.plannedEffectiveDate != null) { + // selected = documentsRes.string.EffectiveOn + // } - async function changeSelectedDate (ev: CustomEvent) { - if (ev.detail !== undefined) { - selectedDate = ev.detail - await changePlannedEffectiveDate(ev.detail) - selected = documentsRes.string.EffectiveOn - } - } + // async function changeSelectedDate (ev: CustomEvent) { + // if (ev.detail !== undefined) { + // selectedDate = ev.detail + // await changePlannedEffectiveDate(ev.detail) + // selected = documentsRes.string.EffectiveOn + // } + // } const reviewIntervals: DropdownTextItem[] = [] for (const interval of periodicReviewIntervals) { @@ -254,10 +254,10 @@ gap="none" />
-
+
- +