mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
UBERF-5565 (#4669)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
e3e7856b02
commit
0b06f0bbe7
@ -398,7 +398,12 @@ async function buildModel (
|
||||
const userTx: Tx[] = []
|
||||
|
||||
const atxes = modelResponse.transactions
|
||||
atxes.forEach((tx) => (tx.modifiedBy === core.account.System && !isPersonAccount(tx) ? systemTx : userTx).push(tx))
|
||||
atxes.forEach((tx) =>
|
||||
((tx.modifiedBy === core.account.ConfigUser || tx.modifiedBy === core.account.System) && !isPersonAccount(tx)
|
||||
? systemTx
|
||||
: userTx
|
||||
).push(tx)
|
||||
)
|
||||
|
||||
if (allowedPlugins != null) {
|
||||
fillConfiguration(systemTx, configs)
|
||||
|
@ -228,25 +228,6 @@ export async function createProjectType (
|
||||
const baseClassClass = client.getHierarchy().getClass(categoryObj.baseClass)
|
||||
|
||||
const targetProjectClassId: Ref<Class<Doc>> = generateId()
|
||||
|
||||
await client.createDoc(
|
||||
core.class.Mixin,
|
||||
core.space.Model,
|
||||
{
|
||||
extends: categoryObj.baseClass,
|
||||
kind: ClassifierKind.MIXIN,
|
||||
label: getEmbeddedLabel(data.name),
|
||||
icon: baseClassClass.icon
|
||||
},
|
||||
targetProjectClassId,
|
||||
undefined,
|
||||
core.account.ConfigUser
|
||||
)
|
||||
|
||||
await client.createMixin(targetProjectClassId, core.class.Mixin, core.space.Model, task.mixin.ProjectTypeClass, {
|
||||
projectType: _id
|
||||
})
|
||||
|
||||
const tmpl = await client.createDoc(
|
||||
task.class.ProjectType,
|
||||
core.space.Model,
|
||||
@ -266,6 +247,22 @@ export async function createProjectType (
|
||||
_id
|
||||
)
|
||||
|
||||
await client.createDoc(
|
||||
core.class.Mixin,
|
||||
core.space.Model,
|
||||
{
|
||||
extends: categoryObj.baseClass,
|
||||
kind: ClassifierKind.MIXIN,
|
||||
label: getEmbeddedLabel(data.name),
|
||||
icon: baseClassClass.icon
|
||||
},
|
||||
targetProjectClassId
|
||||
)
|
||||
|
||||
await client.createMixin(targetProjectClassId, core.class.Mixin, core.space.Model, task.mixin.ProjectTypeClass, {
|
||||
projectType: _id
|
||||
})
|
||||
|
||||
return tmpl
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ export async function initModel (
|
||||
|
||||
try {
|
||||
for (const op of migrateOperations) {
|
||||
logger.log('Migrage', op[0])
|
||||
logger.log('Migrate', op[0])
|
||||
await op[1].upgrade(connection, logger)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user