diff --git a/changelog.md b/changelog.md index ee6458d9cb..083636bc83 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,17 @@ ## 0.6.28 (upcoming) +Tracker: + +- Issue state history. +- Subissue issue popup. + +Lead: + +- Lead presentation changed to number. +- Title column for leads. +- Fix New Lead action for Organization. + ## 0.6.27 Platform: diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index adba28560d..b1b0e6ac94 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -149,6 +149,7 @@ export function createModel (builder: Builder): void { descriptor: task.viewlet.StatusTable, config: [ '', + 'title', '$lookup.attachedTo', '$lookup.state', '$lookup.doneState', @@ -253,7 +254,7 @@ export function createModel (builder: Builder): void { icon: lead.icon.Lead, input: 'focus', category: lead.category.Lead, - target: contact.class.Person, + target: contact.class.Contact, context: { mode: ['context', 'browser'] }, override: [lead.action.CreateGlobalLead] }) diff --git a/packages/kanban/src/components/Kanban.svelte b/packages/kanban/src/components/Kanban.svelte index 4b644ccd66..c975c121d2 100644 --- a/packages/kanban/src/components/Kanban.svelte +++ b/packages/kanban/src/components/Kanban.svelte @@ -313,6 +313,7 @@ { dispatch('close', item.id) }} + on:focus={() => dispatch('update', item)} + on:mouseover={() => dispatch('update', item)} > {#if hasSelected}
diff --git a/plugins/lead-resources/src/components/LeadPresenter.svelte b/plugins/lead-resources/src/components/LeadPresenter.svelte index 1032f46a3c..fbc62f3bc0 100644 --- a/plugins/lead-resources/src/components/LeadPresenter.svelte +++ b/plugins/lead-resources/src/components/LeadPresenter.svelte @@ -32,6 +32,6 @@
- {value.title} + LEAD-{value.number} {/if} diff --git a/plugins/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json index ad7dfbdcee..ac3004c945 100644 --- a/plugins/tracker-assets/lang/en.json +++ b/plugins/tracker-assets/lang/en.json @@ -141,7 +141,14 @@ "AnyFilter": "any filter", "AllFilters": "all filters", "NoDescription": "No description", - "SearchIssue": "Search for task..." + "SearchIssue": "Search for task...", + + "DurMinutes": "{minutes, plural, =0 {less than a minute} =1 {a minute} other {# minutes}}", + "DurHours": "{hours, plural, =0 {less than an hour} =1 {an hour} other {# hours}}", + "DurDays": "{days, plural, =0 {today} =1 {1 day} other {# days }}", + "DurMonths": "{months, plural, =0 {this month} =1 {1 month} other {# months}}", + "DurYears": "{years, plural, =0 {this year} =1 {a year} other {# years}}", + "StatusHistory": "State History" }, "status": {} } diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index 8e97d3b145..67ed6107ca 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -141,7 +141,14 @@ "AnyFilter": "любому фильтру", "AllFilters": "всем фильтрам", "NoDescription": "Нет описания", - "SearchIssue": "Поиск задачи..." + "SearchIssue": "Поиск задачи...", + + "DurMinutes": "{minutes, plural, =0 {меньше минуты} =1 {1 минута} =2 {2 минуты} =3 {3 минуты} =4 {4 минуты} other {# минут}}", + "DurHours": "{hours, plural, =0 {меньше часа} =1 {1 час} =2 {2 часа} =3 {3 часа} =4 {часа} =21 {21 час} =22 {22 часа} =23 {23 часа} =24 {24 часа} other {# часов}}", + "DurDays": "{days, plural, =0 {сегодня} =1 {1 день} =2 {2 дня} =3 {3 дня} =4 {4 дня} other {# дней }}", + "DurMonths": "{months, plural, =0 {меньше месяця} =1 {месяц} =2 {2 месяца} =3 {3 месяца} =4 {4 месяца} other {# месяцев}}", + "DurYears": "{years, plural, =0 {меньше года} =1 {год} =2 {2 года} =3 {3 года} =4 {4 года} other {# лет}}", + "StatusHistory": "История состояний" }, "status": {} } diff --git a/plugins/tracker-resources/src/components/issues/Duration.svelte b/plugins/tracker-resources/src/components/issues/Duration.svelte new file mode 100644 index 0000000000..51f5001fec --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/Duration.svelte @@ -0,0 +1,60 @@ + + + + + + + {time} + diff --git a/plugins/tracker-resources/src/components/issues/IssuePreview.svelte b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte index 2d12f6aef3..f435944dec 100644 --- a/plugins/tracker-resources/src/components/issues/IssuePreview.svelte +++ b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte @@ -21,6 +21,7 @@ import AssigneeEditor from './AssigneeEditor.svelte' import PriorityEditor from './PriorityEditor.svelte' import StatusEditor from './StatusEditor.svelte' + import IssueStatusActivity from './IssueStatusActivity.svelte' export let object: Issue let issue: Issue | undefined @@ -31,7 +32,7 @@ const spaceQuery = createQuery() const statusesQuery = createQuery() - issueQuery.query( + $: issueQuery.query( object._class, { _id: object._id }, (res) => { @@ -87,6 +88,11 @@ {/if}
+ + +
+
{#if issue.description}
= limit} bind:clientHeight={cHeight}> diff --git a/plugins/tracker-resources/src/components/issues/IssueStatusActivity.svelte b/plugins/tracker-resources/src/components/issues/IssueStatusActivity.svelte new file mode 100644 index 0000000000..cbbbc1f732 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/IssueStatusActivity.svelte @@ -0,0 +1,126 @@ + + +
+
diff --git a/plugins/tracker-resources/src/components/issues/edit/EditIssue.svelte b/plugins/tracker-resources/src/components/issues/edit/EditIssue.svelte index fe19f8d9ba..f3cd401109 100644 --- a/plugins/tracker-resources/src/components/issues/edit/EditIssue.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/EditIssue.svelte @@ -13,10 +13,13 @@ // limitations under the License. --> + + {#each issues as issue, index (issue._id)}
(hoveringIndex = index)} on:drop|preventDefault={(ev) => handleDrop(ev, index)} on:dragend={resetDrag} + on:mouseover={() => { + listProvider.updateFocus(issue) + }} + on:focus={() => { + listProvider.updateFocus(issue) + }} >
diff --git a/plugins/tracker-resources/src/components/issues/edit/SubIssuesSelector.svelte b/plugins/tracker-resources/src/components/issues/edit/SubIssuesSelector.svelte index facae6141c..c606b8a47a 100644 --- a/plugins/tracker-resources/src/components/issues/edit/SubIssuesSelector.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/SubIssuesSelector.svelte @@ -17,6 +17,7 @@ import { Issue, IssueStatus, Team } from '@anticrm/tracker' import type { ButtonKind, ButtonSize } from '@anticrm/ui' import { Button, closeTooltip, ProgressCircle, SelectPopup, showPanel, showPopup } from '@anticrm/ui' + import { updateFocus } from '@anticrm/view-resources' import tracker from '../../../plugin' import { getIssueId } from '../../../utils' @@ -54,7 +55,6 @@ showPanel(tracker.component.EditIssue, target, issue._class, 'content') } } - function showSubIssues () { if (subIssues) { closeTooltip() @@ -77,7 +77,16 @@ return DOMRect.fromRect({ width: 1, height: 1, x: rect.left + offsetX, y: rect.bottom + offsetY }) } }, - (selectedIssue) => selectedIssue !== undefined && openIssue(selectedIssue) + (selectedIssue) => { + selectedIssue !== undefined && openIssue(selectedIssue) + }, + (selectedIssue) => { + const focus = subIssues?.find((it) => it._id === selectedIssue.id) + if (focus !== undefined) { + console.log('ISE', selectedIssue, focus) + updateFocus({ focus }) + } + } ) } } diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts index ace7572db1..1fcd025823 100644 --- a/plugins/tracker-resources/src/plugin.ts +++ b/plugins/tracker-resources/src/plugin.ts @@ -157,7 +157,14 @@ export default mergeIds(trackerId, tracker, { IncludeItemsThatMatch: '' as IntlString, AnyFilter: '' as IntlString, AllFilters: '' as IntlString, - NoDescription: '' as IntlString + NoDescription: '' as IntlString, + + DurMinutes: '' as IntlString, + DurHours: '' as IntlString, + DurDays: '' as IntlString, + DurMonths: '' as IntlString, + DurYears: '' as IntlString, + StatusHistory: '' as IntlString }, component: { NopeComponent: '' as AnyComponent, diff --git a/plugins/view-resources/src/components/ActionHandler.svelte b/plugins/view-resources/src/components/ActionHandler.svelte index f28769a0b2..fe64f75c32 100644 --- a/plugins/view-resources/src/components/ActionHandler.svelte +++ b/plugins/view-resources/src/components/ActionHandler.svelte @@ -66,12 +66,10 @@ } $: ctx = $contextStore[$contextStore.length - 1] + $: mode = $contextStore[$contextStore.length - 1]?.mode + $: application = $contextStore[$contextStore.length - 1]?.application $: if (ctx !== undefined) { - updateActions( - { mode: ctx.mode as ViewContextType, application: ctx.application }, - $focusStore.focus, - $selectionStore - ) + updateActions({ mode: mode as ViewContextType, application: application }, $focusStore.focus, $selectionStore) } function keyPrefix (key: KeyboardEvent): string { return ( diff --git a/plugins/view-resources/src/selection.ts b/plugins/view-resources/src/selection.ts index ec5c895163..5d3463560d 100644 --- a/plugins/view-resources/src/selection.ts +++ b/plugins/view-resources/src/selection.ts @@ -1,4 +1,5 @@ import { Doc } from '@anticrm/core' +import { panelstore } from '@anticrm/ui' import { onDestroy } from 'svelte' import { writable } from 'svelte/store' @@ -53,13 +54,16 @@ export const selectionStore = writable([]) export const previewDocument = writable() +panelstore.subscribe((val) => { + previewDocument.set(undefined) +}) /** * @public */ export function updateFocus (selection?: FocusSelection): void { focusStore.update((cur) => { const now = Date.now() - if (selection === undefined || now - ((cur as any).now ?? 0) >= 25) { + if (selection === undefined || now - ((cur as any).now ?? 0) >= 50) { cur.focus = selection?.focus cur.provider = selection?.provider ;(cur as any).now = now