diff --git a/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts b/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts index 2d1132e572..1149376e10 100644 --- a/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts +++ b/packages/context/src/lib/context-manager/context-edit/context-edit.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Output, EventEmitter } from '@angular/core'; +import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core'; import { Context } from '../shared/context.interface'; @@ -13,10 +13,15 @@ export class ContextEditComponent { } set context(value: Context) { this._context = value; + this.refresh(); } private _context: Context; @Output() submitForm: EventEmitter = new EventEmitter(); - constructor() {} + constructor(private cd: ChangeDetectorRef) {} + + refresh() { + this.cd.detectChanges(); + } } diff --git a/packages/context/src/lib/context-manager/context-form/context-form.component.scss b/packages/context/src/lib/context-manager/context-form/context-form.component.scss index a10eda725b..7a16acee87 100644 --- a/packages/context/src/lib/context-manager/context-form/context-form.component.scss +++ b/packages/context/src/lib/context-manager/context-form/context-form.component.scss @@ -1,3 +1,7 @@ +form { + margin: 0 10px; +} + .full-width { width: 100%; } diff --git a/packages/context/src/lib/context-manager/shared/context.service.ts b/packages/context/src/lib/context-manager/shared/context.service.ts index 759a66932c..667dbb995b 100644 --- a/packages/context/src/lib/context-manager/shared/context.service.ts +++ b/packages/context/src/lib/context-manager/shared/context.service.ts @@ -372,7 +372,7 @@ export class ContextService { context.layers.push(opts); } - context.tools = this.tools.map(tool => String(tool.id)); + context.tools = this.tools.map(tool => {id: String(tool.id)}); return context; } diff --git a/packages/integration/src/lib/context/context-editor-tool/context-editor-tool.component.ts b/packages/integration/src/lib/context/context-editor-tool/context-editor-tool.component.ts index 2ed2abcdd8..050b3c0864 100644 --- a/packages/integration/src/lib/context/context-editor-tool/context-editor-tool.component.ts +++ b/packages/integration/src/lib/context/context-editor-tool/context-editor-tool.component.ts @@ -11,6 +11,4 @@ import { ToolComponent } from '@igo2/common'; selector: 'igo-context-editor-tool', templateUrl: './context-editor-tool.component.html' }) -export class ContextEditorToolComponent { - constructor() {} -} +export class ContextEditorToolComponent {} diff --git a/packages/integration/src/lib/context/context-manager-tool/context-manager-tool.component.ts b/packages/integration/src/lib/context/context-manager-tool/context-manager-tool.component.ts index 60449460dc..04834f4e0b 100644 --- a/packages/integration/src/lib/context/context-manager-tool/context-manager-tool.component.ts +++ b/packages/integration/src/lib/context/context-manager-tool/context-manager-tool.component.ts @@ -22,6 +22,6 @@ export class ContextManagerToolComponent { } managePermissions() { - this.toolState.toolbox.activateTool('permissionsContextManager'); + this.toolState.toolbox.activateTool('contextPermissionManager'); } } diff --git a/packages/integration/src/lib/context/context-permission-manager-tool/context-permission-manager-tool.component.ts b/packages/integration/src/lib/context/context-permission-manager-tool/context-permission-manager-tool.component.ts index f777c5438a..7d17ccb501 100644 --- a/packages/integration/src/lib/context/context-permission-manager-tool/context-permission-manager-tool.component.ts +++ b/packages/integration/src/lib/context/context-permission-manager-tool/context-permission-manager-tool.component.ts @@ -1,4 +1,4 @@ -import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { Component } from '@angular/core'; import { ToolComponent } from '@igo2/common'; @@ -11,6 +11,4 @@ import { ToolComponent } from '@igo2/common'; selector: 'igo-context-permission-manager-tool', templateUrl: './context-permission-manager-tool.component.html' }) -export class ContextPermissionManagerToolComponent { - constructor() {} -} +export class ContextPermissionManagerToolComponent {}