mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Add custom fields (#1844)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
bc5f9c0631
commit
feae5dc611
@ -16,14 +16,14 @@
|
||||
<script lang="ts">
|
||||
import { Attachments } from '@anticrm/attachment-resources'
|
||||
import type { Card } from '@anticrm/board'
|
||||
import core, { Class, Ref, Space } from '@anticrm/core'
|
||||
import core, { Class, Doc, Mixin, Ref, Space } from '@anticrm/core'
|
||||
import { Panel } from '@anticrm/panel'
|
||||
import { createQuery, getClient } from '@anticrm/presentation'
|
||||
import type { State, TodoItem } from '@anticrm/task'
|
||||
import task from '@anticrm/task'
|
||||
import { StyledTextBox } from '@anticrm/text-editor'
|
||||
import { Button, CircleButton, EditBox, IconAdd, IconMoreH, Label, showPopup } from '@anticrm/ui'
|
||||
import { ContextMenu, invokeAction, UpDownNavigator } from '@anticrm/view-resources'
|
||||
import { ContextMenu, DocAttributeBar, invokeAction, UpDownNavigator } from '@anticrm/view-resources'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import board from '../plugin'
|
||||
import { getCardActions } from '../utils/CardActionUtils'
|
||||
@ -47,6 +47,8 @@
|
||||
let space: Space | undefined
|
||||
let handleMove: (e: Event) => void
|
||||
let checklists: TodoItem[] = []
|
||||
const mixins: Mixin<Doc>[] = []
|
||||
const ignoreKeys = ['isArchived', 'location', 'title', 'description', 'state', 'members', 'doneState', 'number']
|
||||
|
||||
function change (field: string, value: any) {
|
||||
if (object) {
|
||||
@ -158,10 +160,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="actions-label"><Label label={board.string.Card} /></span>
|
||||
<span slot="actions" />
|
||||
<svelte:fragment slot="custom-attributes" let:direction>
|
||||
{#if direction === 'column'}
|
||||
<DocAttributeBar {object} {mixins} {ignoreKeys} />
|
||||
<!-- TODO: adjust rest actions -->
|
||||
<CardActions bind:value={object} />
|
||||
{:else}
|
||||
<Button icon={board.icon.Card} label={board.string.Actions} kind={'no-border'} size={'small'} />
|
||||
|
@ -19,7 +19,7 @@
|
||||
import { Employee } from '@anticrm/contact'
|
||||
import { Ref } from '@anticrm/core'
|
||||
import { getClient } from '@anticrm/presentation'
|
||||
import ui, { Button, CheckBox, DateRangePresenter, Label, IconAdd } from '@anticrm/ui'
|
||||
import { Button, CheckBox, Label, IconAdd } from '@anticrm/ui'
|
||||
import { invokeAction } from '@anticrm/view-resources'
|
||||
|
||||
import plugin from '../../plugin'
|
||||
@ -76,31 +76,6 @@
|
||||
</div>
|
||||
<CardLabels {value} />
|
||||
</div>
|
||||
<div class="flex-row-stretch flex-gap-1 items-center">
|
||||
<div class="label w-24">
|
||||
<Label label={ui.string.StartDate} />
|
||||
</div>
|
||||
<DateRangePresenter
|
||||
value={value.startDate}
|
||||
editable={true}
|
||||
withTime={false}
|
||||
on:change={(e) => {
|
||||
console.log(e)
|
||||
client.update(value, { startDate: e.detail })
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-row-stretch flex-gap-1 items-center">
|
||||
<div class="label w-24">
|
||||
<Label label={ui.string.DueDate} />
|
||||
</div>
|
||||
<DateRangePresenter
|
||||
value={value.dueDate}
|
||||
editable={true}
|
||||
withTime={false}
|
||||
on:change={(e) => client.update(value, { dueDate: e.detail })}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-row-stretch flex-gap-1 items-center">
|
||||
<div class="label w-24">
|
||||
<Label label={plugin.string.Cover} />
|
||||
|
Loading…
Reference in New Issue
Block a user