diff --git a/README.md b/README.md index 711bf028c1..55d0a4ad28 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ By default docker volumes `dev_db` `dev_elastic` `dev_files` will be created for Before we could start we need to create workspace/account and associate it with workspace. ```bash -cd ./dev/tools +cd ./dev/tool rushx run-local create-workspace ws1 -o DevWorkspace # Create workspace rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account rushx run-local assign-workspace user1 ws1 # Assign worksapce to user diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ed8d25f1a1..5d990a7d72 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -112,6 +112,7 @@ specifiers: '@types/koa-bodyparser': ^4.3.3 '@types/koa-router': ^7.4.4 '@types/koa__cors': ^3.0.3 + '@types/mime-types': ~2.1.1 '@types/minio': ^7.0.10 '@types/pdfkit': ~0.12.3 '@types/toposort': ^2.0.3 @@ -284,6 +285,7 @@ dependencies: '@types/koa-bodyparser': 4.3.4 '@types/koa-router': 7.4.4 '@types/koa__cors': 3.1.0 + '@types/mime-types': 2.1.1 '@types/minio': 7.0.11 '@types/pdfkit': 0.12.3 '@types/toposort': 2.0.3 @@ -11928,7 +11930,7 @@ packages: dev: false file:projects/presentation.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-tpa5gk8H/quPYXkpBhp5jS0bp/E+Jk7mTGhfE54q4RTr5LOYGTCg2HKmxZWqRV1N3g1Jk7nKAZHWMxMSGHCuKw==, tarball: file:projects/presentation.tgz} + resolution: {integrity: sha512-KbCYAGG7rz+Ov6f0yICsx0yzzufqd0RcVJ6XVLzYxLTurJiTeYNYSthU045vLXkRURpz4gEICQ0RHv9dvckMMA==, tarball: file:projects/presentation.tgz} id: file:projects/presentation.tgz name: '@rush-temp/presentation' version: 0.0.0 @@ -11941,6 +11943,7 @@ packages: eslint-plugin-node: 11.1.0_eslint@7.32.0 eslint-plugin-promise: 5.2.0_eslint@7.32.0 eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.44.3 + fast-equals: 2.0.4 prettier: 2.5.1 prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.44.3 sass: 1.45.0 @@ -12527,7 +12530,7 @@ packages: dev: false file:projects/tool.tgz: - resolution: {integrity: sha512-kxAczrVzjVh47GTnScTkjjXIpSAkovYmCIxJSznbPqT4XOdtQ0F8eadl3h2mhqjKzgE7VoFOdTB5JJ3oy4+TUg==, tarball: file:projects/tool.tgz} + resolution: {integrity: sha512-qHMgirlUUHe5dhM4Ebp1jCkPR759Wec5zhDTLNt4y0eKhQIVeshkraGGp0mGdUmvIDN+e+CbJMCXDXY35r0BqQ==, tarball: file:projects/tool.tgz} name: '@rush-temp/tool' version: 0.0.0 dependencies: @@ -12609,7 +12612,7 @@ packages: dev: false file:projects/view-resources.tgz_096c09b0b673a57c275d9767a12070b1: - resolution: {integrity: sha512-oT79PCOUvwaL6QgjuwTNVJJqyE82WDmBx37jF5/c6SpSrYNF14+hN41rrPReKQyhhxkyrBts73IePyHxIn653Q==, tarball: file:projects/view-resources.tgz} + resolution: {integrity: sha512-Ec9uQXBdFop5UPSMzA6UQaryHWmVTWVsDnWOzCH7BYtq7Zvw+763oJMFChaDsoGgeE2znn5zgam4sUn/1alqxQ==, tarball: file:projects/view-resources.tgz} id: file:projects/view-resources.tgz name: '@rush-temp/view-resources' version: 0.0.0 @@ -12622,6 +12625,7 @@ packages: eslint-plugin-node: 11.1.0_eslint@7.32.0 eslint-plugin-promise: 5.2.0_eslint@7.32.0 eslint-plugin-svelte3: 3.2.1_eslint@7.32.0+svelte@3.44.3 + fast-equals: 2.0.4 prettier: 2.5.1 prettier-plugin-svelte: 2.5.1_prettier@2.5.1+svelte@3.44.3 sass: 1.45.0 diff --git a/plugins/view-resources/src/components/Table.svelte b/plugins/view-resources/src/components/Table.svelte index 96e690526e..0bb82c741b 100644 --- a/plugins/view-resources/src/components/Table.svelte +++ b/plugins/view-resources/src/components/Table.svelte @@ -37,14 +37,18 @@ let objects: Doc[] const q = createQuery() - $: q.query( - _class, - query, - (result) => { - objects = result - }, - { sort: { [sortKey]: sortOrder }, ...options, limit: 200 } - ) + + async function update(_class: Ref>, query: DocumentQuery, sortKey: string, sortOrder: SortingOrder, options?: FindOptions) { + q.query( + _class, + query, + (result) => { + objects = result + }, + { sort: { [sortKey]: sortOrder }, ...options, limit: 200 } + ) + } + $: update(_class, query, sortKey, sortOrder, options) function getValue (doc: Doc, key: string): any { if (key.length === 0) { diff --git a/plugins/view-resources/src/components/TableView.svelte b/plugins/view-resources/src/components/TableView.svelte index b35f0cc155..4600ffa493 100644 --- a/plugins/view-resources/src/components/TableView.svelte +++ b/plugins/view-resources/src/components/TableView.svelte @@ -26,12 +26,12 @@ export let config: string[] export let search: string = '' - $: query = search === '' ? { space } : { $search: search, space } + $: resultQuery = search === '' ? { space, ...query } : { $search: search, space, ...query }
- +
diff --git a/plugins/workbench-resources/src/components/SpaceContent.svelte b/plugins/workbench-resources/src/components/SpaceContent.svelte index 42a7d06444..f522b7932b 100644 --- a/plugins/workbench-resources/src/components/SpaceContent.svelte +++ b/plugins/workbench-resources/src/components/SpaceContent.svelte @@ -19,7 +19,6 @@ import type { Viewlet } from '@anticrm/view' import { Component } from '@anticrm/ui' - export let _class: Ref> export let space: Ref export let search: string @@ -27,16 +26,18 @@ {#if viewlet} -
- -
+ {#key space} +
+ +
+ {/key} {/if}