From cfe5972a11499f82a513bc87e27955e0f8f010e7 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 25 Oct 2022 10:04:11 +0300 Subject: [PATCH] Adaptation of IssuesList, IssuesListItem added (#2322) Signed-off-by: Alexander Platov --- models/tracker/src/index.ts | 2 +- plugins/tracker-assets/lang/ru.json | 2 +- .../src/components/issues/IssuesList.svelte | 254 ++---------------- .../components/issues/IssuesListItem.svelte | 245 +++++++++++++++++ .../issues/ModificationDatePresenter.svelte | 1 + .../components/projects/ProjectEditor.svelte | 1 - .../components/sprints/SprintEditor.svelte | 2 +- 7 files changed, 274 insertions(+), 233 deletions(-) create mode 100644 plugins/tracker-resources/src/components/issues/IssuesListItem.svelte diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index 58d5dea197..f42120e500 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -459,7 +459,7 @@ export function createModel (builder: Builder): void { presenter: tracker.component.PriorityEditor, props: { type: 'priority', kind: 'list', size: 'small' } }, - { key: '', presenter: tracker.component.IssuePresenter, props: { type: 'issue' } }, + { key: '', presenter: tracker.component.IssuePresenter, props: { type: 'issue', fixed: 'left' } }, { key: '', presenter: tracker.component.StatusEditor, diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index 4e66270a13..b9552364b6 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -87,7 +87,7 @@ "Space": "", "SetDueDate": "Указать срок выполнения\u2026", "ChangeDueDate": "Изменить срок выполнения\u2026", - "ModificationDate": "Изменино {value}", + "ModificationDate": "Изменено {value}", "Team": "", "Issue": "Задача", "Document": "", diff --git a/plugins/tracker-resources/src/components/issues/IssuesList.svelte b/plugins/tracker-resources/src/components/issues/IssuesList.svelte index 4b0317f19a..04a970cb34 100644 --- a/plugins/tracker-resources/src/components/issues/IssuesList.svelte +++ b/plugins/tracker-resources/src/components/issues/IssuesList.svelte @@ -14,8 +14,7 @@ --> + +
+
+
+
+ { + dispatch('check', { docs: [docObject], value: event.detail }) + }} + /> +
+ +
+
+ {#each model as attributeModel} + {#if attributeModel.props?.type === 'grow'} + + {:else if attributeModel.props?.excludeByKey !== groupByKey && !(attributeModel.props?.optional && compactMode)} + {#if attributeModel.props?.fixed} + checkWidth(attributeModel.key, result)} + > + + + {:else} + + {/if} + {/if} + {/each} + {#if compactMode} +
+ +
+ +
+
+
+ +
+ +
+
+ {#each model as attributeModel} + {@const value = getObjectValue(attributeModel.key, docObject)} + {#if attributeModel.props?.optional && attributeModel.props?.excludeByKey !== groupByKey && value !== undefined} + + {/if} + {/each} +
+
+ {/if} +
+ + diff --git a/plugins/tracker-resources/src/components/issues/ModificationDatePresenter.svelte b/plugins/tracker-resources/src/components/issues/ModificationDatePresenter.svelte index a30993f2a1..6a26330e18 100644 --- a/plugins/tracker-resources/src/components/issues/ModificationDatePresenter.svelte +++ b/plugins/tracker-resources/src/components/issues/ModificationDatePresenter.svelte @@ -41,6 +41,7 @@