EditIssue: add due date to the right panel (#1272) (#1642)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
Sergei Ogorelkov 2022-05-05 16:42:12 +07:00 committed by GitHub
parent 86ea9694f3
commit 3066e8554e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 3 deletions

View File

@ -168,7 +168,7 @@ export class TIssue extends TDoc implements Issue {
declare space: Ref<Team>
@Prop(TypeDate(true), tracker.string.Number)
@Prop(TypeDate(true), tracker.string.DueDate)
dueDate!: Timestamp | null
@Prop(TypeString(), tracker.string.Rank)

View File

@ -20,7 +20,16 @@
import { createQuery, getClient, UserBox } from '@anticrm/presentation'
import { StyledTextBox } from '@anticrm/text-editor'
import type { Issue, IssueStatus, Team } from '@anticrm/tracker'
import { Button, EditBox, IconDownOutline, IconEdit, IconMoreH, IconUpOutline, Label } from '@anticrm/ui'
import {
Button,
DatePresenter,
EditBox,
IconDownOutline,
IconEdit,
IconMoreH,
IconUpOutline,
Label
} from '@anticrm/ui'
import { createEventDispatcher, onMount } from 'svelte'
import tracker from '../../plugin'
import IssuePresenter from './IssuePresenter.svelte'
@ -136,7 +145,7 @@
alwaysEdit
bind:content={issue.description}
placeholder={tracker.string.IssueDescriptionPlaceholder}
on:value={(evt) => change('description', evt.detail)}
on:value={(evt) => evt.detail !== issue?.description && change('description', evt.detail)}
/>
</div>
@ -221,6 +230,21 @@
kind="link"
/>
</div>
{#if issue.dueDate !== null}
<div class="devider" />
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.DueDate} />
</span>
<DatePresenter
bind:value={issue.dueDate}
editable
on:change={({ detail }) => change('dueDate', detail)}
/>
</div>
{/if}
</div>
{:else}
<div class="buttons-group small-gap">