diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts
index 0d01744fff..d5d0d1eb47 100644
--- a/models/recruit/src/index.ts
+++ b/models/recruit/src/index.ts
@@ -213,7 +213,8 @@ export function createModel (builder: Builder): void {
['assigned', view.string.Assigned, {}],
['created', view.string.Created, {}],
['subscribed', view.string.Subscribed, {}]
- ]
+ ],
+ descriptors: [view.viewlet.List, view.viewlet.Table, task.viewlet.Kanban]
}
},
{
diff --git a/plugins/task-resources/src/components/AssignedTasks.svelte b/plugins/task-resources/src/components/AssignedTasks.svelte
index 55baae4ca0..755767e184 100644
--- a/plugins/task-resources/src/components/AssignedTasks.svelte
+++ b/plugins/task-resources/src/components/AssignedTasks.svelte
@@ -14,11 +14,10 @@
-->
-
+
@@ -166,7 +144,7 @@
bind:value={search}
collapsed
on:change={() => {
- updateResultQuery(search, documentIds, doneStates, mode)
+ updateResultQuery(search, doneStates, mode)
}}
/>
@@ -179,18 +157,19 @@
(resultQuery = e.detail)} />
-
-
-{#if viewlet}
- {#if loading}
-
- {:else}
-
- {/if}
+{#if loading || !viewlet || !viewlet?.$lookup?.descriptor?.component}
+
+{:else}
+
{/if}
diff --git a/plugins/task-resources/src/components/kanban/KanbanView.svelte b/plugins/task-resources/src/components/kanban/KanbanView.svelte
index c3b9054f34..f9868b5bac 100644
--- a/plugins/task-resources/src/components/kanban/KanbanView.svelte
+++ b/plugins/task-resources/src/components/kanban/KanbanView.svelte
@@ -56,7 +56,7 @@
export let space: Ref | undefined = undefined
export let baseMenuClass: Ref> | undefined = undefined
export let query: DocumentQuery = {}
- export let viewOptionsConfig: ViewOptionModel[] | undefined
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let viewOptions: ViewOptions
export let viewlet: Viewlet
export let config: (string | BuildModelKey)[]
diff --git a/plugins/tracker-resources/src/components/issues/KanbanView.svelte b/plugins/tracker-resources/src/components/issues/KanbanView.svelte
index 15826b4aa8..8091bc9d3f 100644
--- a/plugins/tracker-resources/src/components/issues/KanbanView.svelte
+++ b/plugins/tracker-resources/src/components/issues/KanbanView.svelte
@@ -85,7 +85,7 @@
export let space: Ref | undefined = undefined
export let baseMenuClass: Ref> | undefined = undefined
export let query: DocumentQuery = {}
- export let viewOptionsConfig: ViewOptionModel[] | undefined
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let viewOptions: ViewOptions
export let viewlet: Viewlet
export let config: (string | BuildModelKey)[]
diff --git a/plugins/view-resources/src/components/TableBrowser.svelte b/plugins/view-resources/src/components/TableBrowser.svelte
index 2189876f7b..c7870cc746 100644
--- a/plugins/view-resources/src/components/TableBrowser.svelte
+++ b/plugins/view-resources/src/components/TableBrowser.svelte
@@ -16,7 +16,7 @@
import type { Class, Doc, DocumentQuery, FindOptions, Ref } from '@hcengineering/core'
import { ActionContext } from '@hcengineering/presentation'
import { FadeOptions, Scroller, tableSP } from '@hcengineering/ui'
- import { BuildModelKey, ViewOptions, Viewlet } from '@hcengineering/view'
+ import { BuildModelKey, ViewOptionModel, ViewOptions, Viewlet } from '@hcengineering/view'
import { onMount } from 'svelte'
import { focusStore, ListSelectionProvider, SelectDirection } from '../selection'
import { LoadingProps } from '../utils'
@@ -35,6 +35,7 @@
export let fade: FadeOptions = tableSP
export let prefferedSorting: string = 'modifiedOn'
export let viewOptions: ViewOptions | undefined = undefined
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let viewlet: Viewlet | undefined = undefined
export let readonly = false
@@ -83,7 +84,7 @@
{prefferedSorting}
{tableId}
{viewOptions}
- viewOptionsConfig={viewlet?.viewOptions?.other}
+ viewOptionsConfig={viewOptionsConfig ?? viewlet?.viewOptions?.other}
selection={listProvider.current($focusStore)}
{readonly}
on:row-focus={(evt) => {
diff --git a/plugins/view-resources/src/components/ViewOptionsButton.svelte b/plugins/view-resources/src/components/ViewOptionsButton.svelte
index 781e27f369..b80dbafa82 100644
--- a/plugins/view-resources/src/components/ViewOptionsButton.svelte
+++ b/plugins/view-resources/src/components/ViewOptionsButton.svelte
@@ -15,7 +15,7 @@
{#if viewlet}
{#if viewOptions}
-
+
{/if}
Record | undefined
- export let viewOptionsConfig: ViewOptionModel[] | undefined
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let dragItem: {
doc?: Doc
revert?: () => void
diff --git a/plugins/view-resources/src/components/list/ListCategory.svelte b/plugins/view-resources/src/components/list/ListCategory.svelte
index 3c616e6dce..a44a8da2f4 100644
--- a/plugins/view-resources/src/components/list/ListCategory.svelte
+++ b/plugins/view-resources/src/components/list/ListCategory.svelte
@@ -67,7 +67,7 @@
export let configurationsVersion: number
export let viewOptions: ViewOptions
export let newObjectProps: (doc: Doc | undefined) => Record | undefined
- export let viewOptionsConfig: ViewOptionModel[] | undefined
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let dragItem: {
doc?: Doc
revert?: () => void
diff --git a/plugins/view-resources/src/components/list/ListView.svelte b/plugins/view-resources/src/components/list/ListView.svelte
index e1495cc494..ebd437c797 100644
--- a/plugins/view-resources/src/components/list/ListView.svelte
+++ b/plugins/view-resources/src/components/list/ListView.svelte
@@ -17,7 +17,7 @@
import { IntlString } from '@hcengineering/platform'
import { ActionContext } from '@hcengineering/presentation'
import { AnyComponent, Scroller, resizeObserver } from '@hcengineering/ui'
- import { BuildModelKey, ViewOptions, Viewlet } from '@hcengineering/view'
+ import { BuildModelKey, ViewOptionModel, ViewOptions, Viewlet } from '@hcengineering/view'
import { onMount } from 'svelte'
import { ListSelectionProvider, SelectDirection, focusStore } from '../..'
@@ -37,6 +37,7 @@
export let createItemLabel: IntlString | undefined
export let createItemEvent: string | undefined
export let viewOptions: ViewOptions
+ export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
export let props: Record = {}
let list: List
@@ -94,7 +95,7 @@
{props}
{listProvider}
compactMode={listWidth <= 800}
- viewOptionsConfig={viewlet.viewOptions?.other}
+ viewOptionsConfig={viewOptionsConfig ?? viewlet.viewOptions?.other}
selectedObjectIds={$selection ?? []}
selection={listProvider.current($focusStore)}
on:row-focus={(event) => {
diff --git a/plugins/view-resources/src/viewOptions.ts b/plugins/view-resources/src/viewOptions.ts
index 66855b0530..38eba41617 100644
--- a/plugins/view-resources/src/viewOptions.ts
+++ b/plugins/view-resources/src/viewOptions.ts
@@ -18,7 +18,7 @@ import { groupByCategory } from './utils'
export const noCategory = '#no_category'
-export const defaulOptions: ViewOptions = {
+export const defaultOptions: ViewOptions = {
groupBy: [noCategory],
orderBy: ['modifiedBy', SortingOrder.Descending]
}
@@ -75,8 +75,8 @@ function _getViewOptions (viewlet: Viewlet, viewOptionStore: Map,
- defaults = defaulOptions
+ defaults = defaultOptions
): ViewOptions {
if (viewlet === undefined) {
return { ...defaults }
diff --git a/pods/server/package.json b/pods/server/package.json
index e09a5a206d..a3dc2127fe 100644
--- a/pods/server/package.json
+++ b/pods/server/package.json
@@ -9,6 +9,7 @@
"license": "EPL-2.0",
"scripts": {
"start": "rush bundle --to @hcengineering/pod-server && cross-env NODE_ENV=production MODEL_VERSION=$(node ../../common/scripts/show_version.js) ACCOUNTS_URL=http://localhost:3000 REKONI_URL=http://localhost:4004 MONGO_URL=mongodb://localhost:27017 DB_URL=mongodb://localhost:27017 FRONT_URL=http://localhost:8087 UPLOAD_URL=/upload MINIO_ENDPOINT=localhost MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin METRICS_CONSOLE=true SERVER_SECRET=secret OPERATION_PROFILING=false MODEL_JSON=../../models/all/bundle/model.json STATS_URL=http://host.docker.internal:4900 node --inspect bundle/bundle.js",
+ "start-cr": "rush bundle --to @hcengineering/pod-server && cross-env NODE_ENV=production MODEL_VERSION=$(node ../../common/scripts/show_version.js) ACCOUNTS_URL=http://localhost:3000 REKONI_URL=http://localhost:4004 DB_URL=postgresql://root@host.docker.internal:26257/defaultdb?sslmode=disable FRONT_URL=http://localhost:8087 UPLOAD_URL=/upload MINIO_ENDPOINT=localhost MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin METRICS_CONSOLE=true SERVER_SECRET=secret OPERATION_PROFILING=false MODEL_JSON=../../models/all/bundle/model.json STATS_URL=http://host.docker.internal:4900 FULLTEXT_URL=http://host.docker.internal:4702 SERVER_PORT=3332 node --inspect bundle/bundle.js",
"start-flame": "rush bundle --to @hcengineering/pod-server && cross-env NODE_ENV=production MODEL_VERSION=$(node ../../common/scripts/show_version.js) ACCOUNTS_URL=http://localhost:3000 REKONI_URL=http://localhost:4004 MONGO_URL=mongodb://localhost:27017 FRONT_URL=http://localhost:8087 UPLOAD_URL=/upload MINIO_ENDPOINT=localhost MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin METRICS_CONSOLE=true SERVER_SECRET=secret MODEL_JSON=../../models/all/bundle/model.json clinic flame --dest ./out -- node --nolazy -r ts-node/register --enable-source-maps src/__start.ts",
"start-raw": "ts-node src/__start.ts",
"build": "compile",