mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 09:35:00 +02:00
Tasks custom attributes hot fix (#1667)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
@@ -15,14 +15,17 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import contact from '@anticrm/contact'
|
||||
import core, { Class, Doc, Ref, RefTo } from '@anticrm/core'
|
||||
import core, { Class, Doc, Mixin, Ref, RefTo } from '@anticrm/core'
|
||||
import { AttributesBar, getClient, KeyedAttribute, UserBox } from '@anticrm/presentation'
|
||||
import { Label } from '@anticrm/ui'
|
||||
import { Task } from '@anticrm/task'
|
||||
import task from '../plugin'
|
||||
import { DocAttributeBar } from '@anticrm/view-resources'
|
||||
|
||||
export let object: Task
|
||||
export let keys: KeyedAttribute[]
|
||||
export let mixins: Mixin<Doc>[]
|
||||
export let ignoreKeys: string[]
|
||||
export let vertical: boolean = false
|
||||
|
||||
const client = getClient()
|
||||
@@ -51,7 +54,9 @@
|
||||
return contact.class.Employee
|
||||
}
|
||||
|
||||
$: filtredKeys = keys.filter((p) => p.key !== 'state' && p.key !== 'assignee' && p.key !== 'doneState') // todo
|
||||
const taskKeys = ['state', 'assignee', 'doneState']
|
||||
|
||||
$: filtredKeys = keys.filter((p) => !taskKeys.includes(p.key)) // todo
|
||||
</script>
|
||||
|
||||
{#if !vertical}
|
||||
@@ -73,7 +78,7 @@
|
||||
<AttributesBar {object} keys={['doneState', 'state']} showHeader={false} />
|
||||
</div>
|
||||
{:else}
|
||||
<div class="task-attr-prop">
|
||||
<div class="task-attr-prop mb-4">
|
||||
<span class="fs-bold"><Label label={task.string.TaskAssignee} /></span>
|
||||
<UserBox
|
||||
_class={getAssigneeClass(object)}
|
||||
@@ -88,9 +93,9 @@
|
||||
/>
|
||||
<div style:grid-column={'1/3'}>
|
||||
<AttributesBar {object} keys={['doneState', 'state']} vertical />
|
||||
<AttributesBar {object} keys={filtredKeys} vertical />
|
||||
</div>
|
||||
</div>
|
||||
<DocAttributeBar {object} ignoreKeys={[...ignoreKeys, ...taskKeys]} {mixins} on:update />
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user