From 585358ea0971ba3d0fe69ee2ba87f848189faf35 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 9 Jan 2026 15:02:01 +0500 Subject: [PATCH] Fix exporter (#10378) * Fix exporter Signed-off-by: Denis Bykhov * Fix formatting Signed-off-by: Denis Bykhov --------- Signed-off-by: Denis Bykhov --- plugins/card-resources/src/exporter.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/plugins/card-resources/src/exporter.ts b/plugins/card-resources/src/exporter.ts index 4cd46dc088..3e370d177d 100644 --- a/plugins/card-resources/src/exporter.ts +++ b/plugins/card-resources/src/exporter.ts @@ -1,22 +1,22 @@ import core, { type AnyAttribute, + type ArrOf, + type AttachedData, + type AttachedDoc, type Class, + type Data, type Doc, type EnumOf, - type ModelDb, type Hierarchy, + type ModelDb, type Ref, type RefTo, - type ArrOf, - type Data, - type AttachedDoc, - type AttachedData, type TypeIdentifier } from '@hcengineering/core' +import { getResource } from '@hcengineering/platform' import { getClient } from '@hcengineering/presentation' import view from '@hcengineering/view' import card from './plugin' -import { getResource } from '@hcengineering/platform' export async function importModule (json: string): Promise { try { @@ -130,6 +130,9 @@ async function exportType (_id: Ref>, processed: Set>): Prom const type = m.findObject(_id) processed.add(_id) if (type === undefined) return res + if (type.icon === view.ids.IconWithEmoji && typeof type.color === 'string') { + type.icon = card.icon.Card + } res.push(type) res.push(...m.findAllSync(core.class.ClassPermission, { targetClass: _id })) @@ -149,7 +152,7 @@ async function exportType (_id: Ref>, processed: Set>): Prom res.push(...m.findAllSync(card.class.Role, { types: _id })) - res.push(...m.findAllSync(view.class.Viewlet, { attachedTo: _id })) + res.push(...m.findAllSync(view.class.Viewlet, { attachTo: _id })) const assocA = m.findAllSync(core.class.Association, { classA: _id }) for (const assoc of assocA) {