Corrected No date. Fix Status and Priority editors. Little fixes. (#1697)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov
2022-05-09 18:37:34 +07:00
committed by GitHub
parent 9266a61c98
commit b8e942a145
16 changed files with 239 additions and 289 deletions
@@ -169,79 +169,67 @@
<svelte:fragment slot="custom-attributes" let:direction>
{#if issue && currentTeam && issueStatuses && direction === 'column'}
<div class="content mt-4">
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.Status} />
</span>
<StatusEditor value={issue} statuses={issueStatuses} currentSpace={currentTeam._id} shouldShowLabel />
</div>
<div class="content">
<span class="label">
<Label label={tracker.string.Status} />
</span>
<StatusEditor value={issue} statuses={issueStatuses} currentSpace={currentTeam._id} shouldShowLabel />
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.Priority} />
</span>
<PriorityEditor value={issue} currentSpace={currentTeam._id} shouldShowLabel />
</div>
<span class="label">
<Label label={tracker.string.Priority} />
</span>
<PriorityEditor value={issue} currentSpace={currentTeam._id} shouldShowLabel />
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.Assignee} />
</span>
<UserBox
_class={contact.class.Employee}
label={tracker.string.Assignee}
placeholder={tracker.string.Assignee}
bind:value={issue.assignee}
allowDeselect
titleDeselect={tracker.string.Unassigned}
size="large"
kind="link"
on:change={() => change('assignee', issue?.assignee)}
/>
</div>
<span class="label">
<Label label={tracker.string.Assignee} />
</span>
<UserBox
_class={contact.class.Employee}
label={tracker.string.Assignee}
placeholder={tracker.string.Assignee}
bind:value={issue.assignee}
allowDeselect
titleDeselect={tracker.string.Unassigned}
size={'large'}
kind={'link'}
width={'100%'}
justify={'left'}
on:change={() => change('assignee', issue?.assignee)}
/>
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.Labels} />
</span>
<Button
label={tracker.string.Labels}
icon={tracker.icon.Labels}
width="max-content"
size="large"
kind="link"
/>
</div>
<span class="label">
<Label label={tracker.string.Labels} />
</span>
<Button
label={tracker.string.Labels}
icon={tracker.icon.Labels}
size={'large'}
kind={'link'}
width={'100%'}
justify={'left'}
/>
<div class="devider" />
<div class="divider" />
<div class="flex-row-center mb-4">
<span class="label w-24">
<Label label={tracker.string.Project} />
</span>
<Button
label={tracker.string.Project}
icon={tracker.icon.Projects}
width="fit-content"
size="large"
kind="link"
/>
</div>
<span class="label">
<Label label={tracker.string.Project} />
</span>
<Button
label={tracker.string.Project}
icon={tracker.icon.Projects}
size={'large'}
kind={'link'}
width={'100%'}
justify={'left'}
/>
{#if issue.dueDate !== null}
<div class="devider" />
<div class="divider" />
<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>
<span class="label">
<Label label={tracker.string.DueDate} />
</span>
<DatePresenter bind:value={issue.dueDate} editable on:change={({ detail }) => change('dueDate', detail)} />
{/if}
</div>
{:else}
@@ -268,22 +256,20 @@
<style lang="scss">
.content {
display: grid;
grid-template-columns: 1fr 1.5fr;
grid-auto-flow: row;
justify-content: start;
align-items: center;
gap: 1rem;
margin-top: 1rem;
width: 100%;
height: min-content;
}
.content {
position: absolute;
inset: 2.5rem 0 0;
padding: 1.5rem 0.5rem 1.5rem 1.5rem;
.label {
margin: 0.625rem 0;
}
}
.devider {
.divider {
grid-column: 1 / 3;
height: 1px;
border-bottom: 1px solid var(--divider-color);
margin: 0.75rem 1.5rem 1.25rem 0;
background-color: var(--divider-color);
}
</style>
@@ -17,6 +17,7 @@
import { Issue, IssuePriority, Team } from '@anticrm/tracker'
import { getClient } from '@anticrm/presentation'
import { Tooltip } from '@anticrm/ui'
import type { ButtonKind, ButtonSize } from '@anticrm/ui'
import tracker from '../../plugin'
import PrioritySelector from '../PrioritySelector.svelte'
@@ -25,6 +26,11 @@
export let isEditable: boolean = true
export let shouldShowLabel: boolean = false
export let kind: ButtonKind = 'link'
export let size: ButtonSize = 'large'
export let justify: 'left' | 'center' = 'left'
export let width: string | undefined = '100%'
const client = getClient()
const handlePriorityChanged = async (newPriority: IssuePriority | undefined) => {
@@ -44,9 +50,12 @@
{#if value}
{#if isEditable}
<Tooltip direction={'bottom'} label={tracker.string.SetPriority}>
<Tooltip label={tracker.string.SetPriority} fill>
<PrioritySelector
kind={'icon'}
{kind}
{size}
{width}
{justify}
{isEditable}
{shouldShowLabel}
priority={value.priority}
@@ -54,6 +63,6 @@
/>
</Tooltip>
{:else}
<PrioritySelector kind={'icon'} {isEditable} {shouldShowLabel} priority={value.priority} />
<PrioritySelector {kind} {size} {width} {justify} {isEditable} {shouldShowLabel} priority={value.priority} />
{/if}
{/if}
@@ -17,6 +17,7 @@
import { Issue, IssueStatus, Team } from '@anticrm/tracker'
import { getClient } from '@anticrm/presentation'
import { Tooltip } from '@anticrm/ui'
import type { ButtonKind, ButtonSize } from '@anticrm/ui'
import tracker from '../../plugin'
import StatusSelector from '../StatusSelector.svelte'
@@ -26,6 +27,11 @@
export let isEditable: boolean = true
export let shouldShowLabel: boolean = false
export let kind: ButtonKind = 'link'
export let size: ButtonSize = 'large'
export let justify: 'left' | 'center' = 'left'
export let width: string | undefined = '100%'
const client = getClient()
const handleStatusChanged = async (newStatus: Ref<IssueStatus> | undefined) => {
@@ -45,9 +51,12 @@
{#if value}
{#if isEditable}
<Tooltip direction={'bottom'} label={tracker.string.SetStatus}>
<Tooltip label={tracker.string.SetStatus} fill>
<StatusSelector
kind={'icon'}
{kind}
{size}
{width}
{justify}
{isEditable}
{shouldShowLabel}
{statuses}
@@ -57,7 +66,10 @@
</Tooltip>
{:else}
<StatusSelector
kind={'icon'}
{kind}
{size}
{width}
{justify}
{isEditable}
{shouldShowLabel}
{statuses}