mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
TSK-1328 Comment input in popup (#3154)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
16da75f6d8
commit
d486dea298
@ -20,11 +20,13 @@
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import { Label, resizeObserver, Spinner } from '@hcengineering/ui'
|
||||
import { DocNavLink, ObjectPresenter } from '@hcengineering/view-resources'
|
||||
import CommentPresenter from './CommentPresenter.svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import CommentInput from './CommentInput.svelte'
|
||||
import CommentPresenter from './CommentPresenter.svelte'
|
||||
|
||||
export let objectId: Ref<Doc>
|
||||
export let object: Doc
|
||||
export let withInput: boolean = true
|
||||
|
||||
let loading = true
|
||||
|
||||
@ -68,6 +70,11 @@
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
{#if withInput}
|
||||
<div class="mt-2">
|
||||
<CommentInput {object} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.item {
|
||||
|
@ -23,6 +23,7 @@
|
||||
export let object: Doc
|
||||
export let size: 'small' | 'medium' | 'large' = 'small'
|
||||
export let showCounter = true
|
||||
export let withInput: boolean = true
|
||||
</script>
|
||||
|
||||
{#if value && value > 0}
|
||||
@ -31,7 +32,7 @@
|
||||
<div
|
||||
use:tooltip={{
|
||||
component: CommentPopup,
|
||||
props: { objectId: object._id, object }
|
||||
props: { objectId: object._id, object, withInput }
|
||||
}}
|
||||
class="sm-tool-icon"
|
||||
>
|
||||
|
@ -110,7 +110,11 @@
|
||||
<CommentsPresenter value={object.comments} {object} />
|
||||
{/if}
|
||||
{#if object.$lookup?.attachedTo !== undefined && (object.$lookup.attachedTo.comments ?? 0) > 0}
|
||||
<CommentsPresenter value={object.$lookup?.attachedTo?.comments} object={object.$lookup?.attachedTo} />
|
||||
<CommentsPresenter
|
||||
value={object.$lookup?.attachedTo?.comments}
|
||||
object={object.$lookup?.attachedTo}
|
||||
withInput={false}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -426,7 +426,11 @@
|
||||
<CommentsPresenter value={object.comments} {object} />
|
||||
{/if}
|
||||
{#if object.$lookup?.attachedTo !== undefined && (object.$lookup.attachedTo.comments ?? 0) > 0}
|
||||
<CommentsPresenter value={object.$lookup?.attachedTo?.comments} object={object.$lookup?.attachedTo} />
|
||||
<CommentsPresenter
|
||||
value={object.$lookup?.attachedTo?.comments}
|
||||
object={object.$lookup?.attachedTo}
|
||||
withInput={false}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user