391 397 fix (#431)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2021-11-30 17:14:30 +06:00 committed by GitHub
parent c72376987e
commit 6b7a4b2474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 9 deletions

View File

@ -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<Employee>
}
@ -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']
})

View File

@ -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: {

View File

@ -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 @@
<div class="sm-tool-icon step-lr75">
<ApplicationPresenter value={object} />
</div>
{#if object.attachments && Object.keys(object.attachments).length > 0}
{#if object.attachments ?? 0 > 0}
<div class="step-lr75"><AttachmentsPresenter value={object} /></div>
{/if}
<div class="sm-tool-icon step-lr75">
<span class="icon"><IconThread size={'small'} /></span>
5
</div>
{#if object.comments ?? 0 > 0}
<div class="step-lr75"><CommentsPresenter value={object} /></div>
{/if}
</div>
<Avatar size={'x-small'} />
</div>

View File

@ -46,6 +46,7 @@ export interface Candidate extends Person {
*/
export interface Applicant extends DocWithState, AttachedDoc {
attachments?: number
comments?: number
employee: Ref<Employee>
}

View File

@ -77,7 +77,7 @@
<thead>
<tr class="tr-head">
{#each model as attribute}
<th class="sortable" class:sorted={attribute.key === sortKey} on:click={() => changeSorting(attribute.key)}>
<th class:sortable={attribute.key} class:sorted={attribute.key === sortKey} on:click={() => changeSorting(attribute.key)}>
<div class="flex-row-center">
<Label label = {attribute.label}/>
{#if attribute.key === sortKey}

View File

@ -89,7 +89,7 @@
</div>
</th>
{/if}
<th class="sortable" class:sorted={attribute.key === sortKey} on:click={() => changeSorting(attribute.key)}>
<th class:sortable={attribute.key} class:sorted={attribute.key === sortKey} on:click={() => changeSorting(attribute.key)}>
<div class="flex-row-center">
<Label label = {attribute.label}/>
{#if attribute.key === sortKey}