mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
TSK-868 Component icon is missing (#2772)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
c1e4abd766
commit
81f290fef4
@ -365,9 +365,6 @@ export class TComponent extends TDoc implements Component {
|
||||
@Prop(TypeMarkup(), tracker.string.Description)
|
||||
description?: Markup
|
||||
|
||||
@Prop(TypeString(), tracker.string.AssetLabel)
|
||||
icon!: Asset
|
||||
|
||||
@Prop(TypeComponentStatus(), tracker.string.Status)
|
||||
status!: ComponentStatus
|
||||
|
||||
|
@ -310,24 +310,6 @@ async function migrateIssueComponents (client: MigrationClient): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function upgradeComponentIcons (tx: TxOperations): Promise<void> {
|
||||
const components = await tx.findAll(tracker.class.Component, {})
|
||||
|
||||
if (components.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
for (const component of components) {
|
||||
const icon = component.icon as unknown
|
||||
|
||||
if (icon !== undefined) {
|
||||
continue
|
||||
}
|
||||
|
||||
await tx.update(component, { icon: tracker.icon.Components })
|
||||
}
|
||||
}
|
||||
|
||||
async function createDefaults (tx: TxOperations): Promise<void> {
|
||||
await createDefaultProject(tx)
|
||||
await createOrUpdate(
|
||||
@ -415,10 +397,6 @@ async function upgradeIssues (tx: TxOperations): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function upgradeComponents (tx: TxOperations): Promise<void> {
|
||||
await upgradeComponentIcons(tx)
|
||||
}
|
||||
|
||||
async function renameProject (client: MigrationClient): Promise<void> {
|
||||
await client.update(
|
||||
DOMAIN_TRACKER,
|
||||
@ -786,6 +764,5 @@ export const trackerOperation: MigrateOperation = {
|
||||
await createDefaults(tx)
|
||||
await upgradeProjects(tx)
|
||||
await upgradeIssues(tx)
|
||||
await upgradeComponents(tx)
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,6 @@
|
||||
$: handleSelectedComponentIdUpdated(value, rawComponents)
|
||||
|
||||
$: translate(tracker.string.Component, {}).then((result) => (defaultComponentLabel = result))
|
||||
$: componentIcon = selectedComponent?.icon ?? tracker.icon.Components
|
||||
$: componentText = shouldShowLabel ? selectedComponent?.label ?? defaultComponentLabel : undefined
|
||||
|
||||
const handleSelectedComponentIdUpdated = async (
|
||||
@ -81,7 +80,7 @@
|
||||
{ id: null, icon: tracker.icon.Components, label: tracker.string.NoComponent, isSelected: !selectedComponent },
|
||||
...rawComponents.map((p) => ({
|
||||
id: p._id,
|
||||
icon: p.icon,
|
||||
icon: tracker.icon.Components,
|
||||
text: p.label,
|
||||
isSelected: selectedComponent ? p._id === selectedComponent._id : false
|
||||
}))
|
||||
@ -103,7 +102,7 @@
|
||||
{shape}
|
||||
{width}
|
||||
{justify}
|
||||
icon={componentIcon}
|
||||
icon={tracker.icon.Components}
|
||||
disabled={!isEditable}
|
||||
{loading}
|
||||
on:click={handleComponentEditorOpened}
|
||||
@ -115,7 +114,7 @@
|
||||
{shape}
|
||||
{width}
|
||||
{justify}
|
||||
icon={componentIcon}
|
||||
icon={tracker.icon.Components}
|
||||
disabled={!isEditable}
|
||||
{loading}
|
||||
on:click={handleComponentEditorOpened}
|
||||
|
@ -95,7 +95,6 @@
|
||||
const tR: TimelineRow = { items: [] }
|
||||
tR.items = [
|
||||
{
|
||||
icon: proj.icon,
|
||||
presenter: ComponentPresenter,
|
||||
props: { value: proj },
|
||||
startDate: proj.startDate as Timestamp,
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
{#if value}
|
||||
<span class="overflow-label flex">
|
||||
<Icon icon={value.icon ?? tracker.icon.Component} size={'small'} />
|
||||
<Icon icon={tracker.icon.Component} size={'small'} />
|
||||
<div class="ml-2 mr-2">
|
||||
{value.label}
|
||||
</div></span
|
||||
|
@ -13,11 +13,8 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { WithLookup } from '@hcengineering/core'
|
||||
import { Component } from '@hcengineering/tracker'
|
||||
import { Button } from '@hcengineering/ui'
|
||||
|
||||
export let value: WithLookup<Component>
|
||||
import tracker from '../../plugin'
|
||||
</script>
|
||||
|
||||
<Button size="small" kind="link" icon={value.icon} />
|
||||
<Button size="small" kind="link" icon={tracker.icon.Components} />
|
||||
|
@ -30,7 +30,6 @@
|
||||
const object: Data<Component> = {
|
||||
label: '' as IntlString,
|
||||
description: '',
|
||||
icon: tracker.icon.Components,
|
||||
status: ComponentStatus.Backlog,
|
||||
lead: null,
|
||||
members: [],
|
||||
|
@ -68,4 +68,3 @@
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
AddToComponent
|
||||
|
@ -345,7 +345,6 @@ export enum ComponentStatus {
|
||||
export interface Component extends Doc {
|
||||
label: string
|
||||
description?: Markup
|
||||
icon: Asset
|
||||
|
||||
status: ComponentStatus
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
await client.createDoc(view.class.FilteredView, preference.space.Preference, {
|
||||
name: filterName,
|
||||
location: loc,
|
||||
filterClass: _class,
|
||||
filters,
|
||||
attachedTo: loc.path[2] as Ref<Doc>,
|
||||
viewOptions,
|
||||
|
Loading…
Reference in New Issue
Block a user