From 6b7a4b2474fbe0879c7468636ca1c51f4e10b5a2 Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Tue, 30 Nov 2021 17:14:30 +0600 Subject: [PATCH] 391 397 fix (#431) Signed-off-by: Denis Bykhov --- models/recruit/src/index.ts | 5 +++++ plugins/chunter-resources/src/index.ts | 2 +- .../src/components/KanbanCard.svelte | 11 +++++------ plugins/recruit/src/index.ts | 1 + plugins/view-resources/src/components/Table.svelte | 2 +- .../view-resources/src/components/TableView.svelte | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index a28a16f9d2..6e43ac1f6b 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -75,6 +75,9 @@ export class TApplicant extends TDocWithState implements Applicant { @Prop(TypeString(), 'Attachments' as IntlString) attachments?: number + @Prop(TypeString(), 'Comments' as IntlString) + comments?: number + @Prop(TypeString(), 'Assigned recruiter' as IntlString) employee!: Ref } @@ -163,6 +166,8 @@ export function createModel (builder: Builder): void { '$lookup.state', '$lookup.attachedTo.city', { presenter: chunter.component.AttachmentsPresenter, label: 'Files' }, + { presenter: chunter.component.CommentsPresenter, label: 'Comments' }, + 'modifiedOn', '$lookup.attachedTo.channels'] }) diff --git a/plugins/chunter-resources/src/index.ts b/plugins/chunter-resources/src/index.ts index 7176f85904..7d0c22269f 100644 --- a/plugins/chunter-resources/src/index.ts +++ b/plugins/chunter-resources/src/index.ts @@ -22,7 +22,7 @@ import CommentsPresenter from './components/CommentsPresenter.svelte' import TxCommentCreate from './components/activity/TxCommentCreate.svelte' import TxAttachmentCreate from './components/activity/TxAttachmentCreate.svelte' -export { AttachmentsPresenter } +export { AttachmentsPresenter, CommentsPresenter } export default async () => ({ component: { diff --git a/plugins/recruit-resources/src/components/KanbanCard.svelte b/plugins/recruit-resources/src/components/KanbanCard.svelte index 021479cea4..417c37bb7c 100644 --- a/plugins/recruit-resources/src/components/KanbanCard.svelte +++ b/plugins/recruit-resources/src/components/KanbanCard.svelte @@ -21,7 +21,7 @@ import EditCandidate from './EditCandidate.svelte' - import { AttachmentsPresenter } from '@anticrm/chunter-resources' + import { AttachmentsPresenter, CommentsPresenter } from '@anticrm/chunter-resources' import { formatName } from '@anticrm/contact' import ApplicationPresenter from './ApplicationPresenter.svelte' @@ -49,13 +49,12 @@
- {#if object.attachments && Object.keys(object.attachments).length > 0} + {#if object.attachments ?? 0 > 0}
{/if} -
- - 5 -
+ {#if object.comments ?? 0 > 0} +
+ {/if} diff --git a/plugins/recruit/src/index.ts b/plugins/recruit/src/index.ts index a13d3474f9..e1158b2686 100644 --- a/plugins/recruit/src/index.ts +++ b/plugins/recruit/src/index.ts @@ -46,6 +46,7 @@ export interface Candidate extends Person { */ export interface Applicant extends DocWithState, AttachedDoc { attachments?: number + comments?: number employee: Ref } diff --git a/plugins/view-resources/src/components/Table.svelte b/plugins/view-resources/src/components/Table.svelte index 2335203651..a01a7f8ba0 100644 --- a/plugins/view-resources/src/components/Table.svelte +++ b/plugins/view-resources/src/components/Table.svelte @@ -77,7 +77,7 @@ {#each model as attribute} - changeSorting(attribute.key)}> + changeSorting(attribute.key)}>
{/if} - changeSorting(attribute.key)}> + changeSorting(attribute.key)}>