diff --git a/dev/tool/package.json b/dev/tool/package.json index d8bc84ecb0..aff66608d4 100644 --- a/dev/tool/package.json +++ b/dev/tool/package.json @@ -62,8 +62,6 @@ "@anticrm/server-chunter": "~0.6.1", "@anticrm/server-chunter-resources": "~0.6.0", "@anticrm/server-recruit": "~0.6.0", - "@anticrm/server-recruit-resources": "~0.6.0", - "@anticrm/server-task": "~0.6.0", - "@anticrm/server-task-resources": "~0.6.0" + "@anticrm/server-recruit-resources": "~0.6.0" } } diff --git a/dev/tool/src/elastic.ts b/dev/tool/src/elastic.ts index 5ff8dc1fe9..26dbd2c4e1 100644 --- a/dev/tool/src/elastic.ts +++ b/dev/tool/src/elastic.ts @@ -24,7 +24,6 @@ import { DOMAIN_ATTACHMENT } from '@anticrm/model-attachment' import { createInMemoryAdapter, createInMemoryTxAdapter } from '@anticrm/dev-storage' import { serverChunterId } from '@anticrm/server-chunter' import { serverRecruitId } from '@anticrm/server-recruit' -import { serverViewId } from '@anticrm/server-task' import { addLocation } from '@anticrm/platform' import { listMinioObjects } from './minio' @@ -71,7 +70,6 @@ async function dropElastic (elasticUrl: string, dbName: string): Promise { async function restoreElastic (mongoUrl: string, dbName: string, minio: Client, elasticUrl: string): Promise { addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources')) addLocation(serverRecruitId, () => import('@anticrm/server-recruit-resources')) - addLocation(serverViewId, () => import('@anticrm/server-task-resources')) const mongoClient = new MongoClient(mongoUrl) try { await mongoClient.connect() diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 90620c9a18..6d09eb018e 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -176,14 +176,18 @@ export function createModel (builder: Builder): void { options: { lookup: { attachedTo: recruit.class.Candidate, - state: task.class.State + state: task.class.State, + assignee: contact.class.Employee, + doneState: task.class.DoneState } } as FindOptions, // TODO: fix config: [ '', '$lookup.attachedTo', + '$lookup.assignee', '$lookup.state', - '$lookup.attachedTo.city', + '$lookup.doneState', + // '$lookup.attachedTo.city', { presenter: attachment.component.AttachmentsPresenter, label: 'Files' }, { presenter: chunter.component.CommentsPresenter, label: 'Comments' }, 'modifiedOn', diff --git a/models/task/src/index.ts b/models/task/src/index.ts index 3095618c41..0a8db6472f 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -87,7 +87,7 @@ export class TTask extends TAttachedDoc implements Task { @Prop(TypeRef(task.class.State), 'State' as IntlString) state!: Ref - @Prop(TypeRef(task.class.DoneState), 'Done Status' as IntlString) + @Prop(TypeRef(task.class.DoneState), 'Done' as IntlString) doneState!: Ref | null @Prop(TypeString(), 'No.' as IntlString) @@ -383,6 +383,10 @@ export function createModel (builder: Builder): void { }, task.space.Sequence ) + + builder.mixin(task.class.DoneState, core.class.Class, view.mixin.AttributePresenter, { + presenter: task.component.DoneStatePresenter + }) } export { taskOperation } from './migration' diff --git a/models/task/src/migration.ts b/models/task/src/migration.ts index 3d5d0122ac..5b699bfade 100644 --- a/models/task/src/migration.ts +++ b/models/task/src/migration.ts @@ -78,6 +78,12 @@ export const taskOperation: MigrateOperation = { 'view:class:DoneStateTemplate' as Ref>, task.class.DoneStateTemplate ) + await migrateClass( + client, + DOMAIN_KANBAN, + 'view:class:WonStateTemplate' as Ref>, + task.class.WonStateTemplate + ) await migrateClass( client, DOMAIN_KANBAN, diff --git a/models/task/src/plugin.ts b/models/task/src/plugin.ts index 4dec21e58c..985c73a832 100644 --- a/models/task/src/plugin.ts +++ b/models/task/src/plugin.ts @@ -44,6 +44,7 @@ export default mergeIds(taskId, task, { KanbanCard: '' as AnyComponent, TemplatesIcon: '' as AnyComponent, StatePresenter: '' as AnyComponent, + DoneStatePresenter: '' as AnyComponent, StateEditor: '' as AnyComponent, KanbanView: '' as AnyComponent }, diff --git a/packages/ui/src/components/ErrorPopup.svelte b/packages/ui/src/components/ErrorPopup.svelte index 1d8b0de2e3..713d3da846 100644 --- a/packages/ui/src/components/ErrorPopup.svelte +++ b/packages/ui/src/components/ErrorPopup.svelte @@ -22,7 +22,9 @@ export let error: any {error.message}
-  {#if error.status.params}
+  {#if error?.status?.params}
     {JSON.stringify(error.status.params, undefined, 2)}
+  {:else}
+    {JSON.stringify(error, undefined, 2)}
   {/if}
 
diff --git a/plugins/contact-resources/src/components/PersonPresenter.svelte b/plugins/contact-resources/src/components/PersonPresenter.svelte index c913848436..28d9b9d72e 100644 --- a/plugins/contact-resources/src/components/PersonPresenter.svelte +++ b/plugins/contact-resources/src/components/PersonPresenter.svelte @@ -31,8 +31,6 @@
{formatName(value.name)}
-{:else} -
Not defined
{/if} diff --git a/plugins/task-resources/src/components/state/StatePresenter.svelte b/plugins/task-resources/src/components/state/StatePresenter.svelte index 3e12875354..0330147439 100644 --- a/plugins/task-resources/src/components/state/StatePresenter.svelte +++ b/plugins/task-resources/src/components/state/StatePresenter.svelte @@ -15,7 +15,7 @@ -->