Skip to content

Commit

Permalink
EditIssue: add due date to the right panel (#1272) (#1642)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
  • Loading branch information
Sergei Ogorelkov authored May 5, 2022
1 parent 86ea969 commit 3066e85
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion models/tracker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 26 additions & 2 deletions plugins/tracker-resources/src/components/issues/EditIssue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit 3066e85

Please sign in to comment.