diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9fa0051bfd..5f1981eebd 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9666,6 +9666,9 @@ importers: '@hcengineering/model-core': specifier: workspace:^0.7.0 version: link:../core + '@hcengineering/model-print': + specifier: workspace:^0.7.0 + version: link:../print '@hcengineering/model-tracker': specifier: workspace:^0.7.0 version: link:../tracker diff --git a/models/all/src/index.ts b/models/all/src/index.ts index 47cb2ed9fa..e41b28a9da 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -428,9 +428,9 @@ export default function buildModel (): Builder { questionsId, { label: setting.string.Configure, - enabled: false, + enabled: true, beta: false, - hidden: true, + hidden: false, classFilter: defaultFilter } ], diff --git a/models/questions/package.json b/models/questions/package.json index 26b4f9af82..4f6c6e3882 100644 --- a/models/questions/package.json +++ b/models/questions/package.json @@ -44,6 +44,7 @@ "@hcengineering/model-core": "workspace:^0.7.0", "@hcengineering/model-tracker": "workspace:^0.7.0", "@hcengineering/model-view": "workspace:^0.7.0", + "@hcengineering/model-print": "workspace:^0.7.0", "@hcengineering/platform": "workspace:^0.7.20", "@hcengineering/view": "workspace:^0.7.0" } diff --git a/models/questions/src/index.ts b/models/questions/src/index.ts index 77f04ecd59..7baefe38b3 100644 --- a/models/questions/src/index.ts +++ b/models/questions/src/index.ts @@ -24,6 +24,7 @@ import { type Builder } from '@hcengineering/model' import core from '@hcengineering/model-core' import tracker from '@hcengineering/model-tracker' import view, { createAction } from '@hcengineering/model-view' +import print from '@hcengineering/model-print' import { TAnswer, TAssessment, @@ -215,7 +216,15 @@ function defineActions (builder: Builder): void { ) builder.mixin(questions.class.Question, core.class.Class, view.mixin.IgnoreActions, { - actions: [view.action.Open, view.action.OpenInNewTab, view.action.Delete, tracker.action.NewRelatedIssue] + actions: [ + view.action.Open, + view.action.OpenInNewTab, + view.action.Delete, + tracker.action.NewRelatedIssue, + view.action.CopyLink, + view.action.AddRelation, + print.action.Print + ] }) createAction( diff --git a/models/view/src/index.ts b/models/view/src/index.ts index d0afec43fc..d8670ffb18 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -890,24 +890,28 @@ export function createModel (builder: Builder): void { view.action.Join ) - createAction(builder, { - action: view.actionImpl.ShowPopup, - actionProps: { - component: view.component.AddRelationPopup, - fillProps: { - _objects: 'value' + createAction( + builder, + { + action: view.actionImpl.ShowPopup as ViewAction>, + actionProps: { + component: view.component.AddRelationPopup, + fillProps: { + _objects: 'value' + } + }, + label: core.string.AddRelation, + input: 'any', + icon: view.icon.CopyLink, + category: view.category.Editor, + target: core.class.Doc, + context: { + mode: ['context', 'browser'], + group: 'associate' } }, - label: core.string.AddRelation, - input: 'any', - icon: view.icon.CopyLink, - category: view.category.Editor, - target: core.class.Doc, - context: { - mode: ['context', 'browser'], - group: 'associate' - } - }) + view.action.AddRelation + ) createAction( builder, diff --git a/plugins/questions-resources/src/components/QuestionsItemEditor.svelte b/plugins/questions-resources/src/components/QuestionsItemEditor.svelte index e08a69c951..5d7d7205af 100644 --- a/plugins/questions-resources/src/components/QuestionsItemEditor.svelte +++ b/plugins/questions-resources/src/components/QuestionsItemEditor.svelte @@ -134,10 +134,3 @@ {/await} {/if} - - diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index efb4a29923..d6fd373e20 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -163,7 +163,8 @@ const view = plugin(viewId, { RemoveRelation: '' as Ref, CopyLink: '' as Ref>, - CopyDocumentMarkdown: '' as Ref> + CopyDocumentMarkdown: '' as Ref>, + AddRelation: '' as Ref> }, viewlet: { Table: '' as Ref,