diff --git a/ui-ngx/src/app/modules/home/components/entity/entity.component.ts b/ui-ngx/src/app/modules/home/components/entity/entity.component.ts index 57ab9e18e2..09dd2be4dc 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity.component.ts +++ b/ui-ngx/src/app/modules/home/components/entity/entity.component.ts @@ -17,7 +17,7 @@ import { BaseData, HasId } from '@shared/models/base-data'; import { FormBuilder, FormGroup, NgForm } from '@angular/forms'; import { PageComponent } from '@shared/components/page.component'; -import { EventEmitter, Input, OnInit, Output, ViewChild, Directive } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { EntityAction } from '@home/models/entity/entity-component.models'; @@ -25,7 +25,7 @@ import { EntityTableConfig } from '@home/models/entity/entities-table-config.mod import { PageLink } from '@shared/models/page/page-link'; // @dynamic -@Directive() +@Component({}) export abstract class EntityComponent, P extends PageLink = PageLink, L extends BaseData = T, diff --git a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts index a84f335831..7f19cfe571 100644 --- a/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts +++ b/ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.component.ts @@ -29,6 +29,7 @@ import { } from '@shared/models/dashboard.models'; import { DashboardService } from '@core/http/dashboard.service'; import { EntityTableConfig } from '@home/models/entity/entities-table-config.models'; +import { isEqual } from '@core/utils'; @Component({ selector: 'tb-dashboard-form', @@ -106,7 +107,7 @@ export class DashboardFormComponent extends EntityComponent { } private updateFields(entity: Dashboard): void { - if (entity) { + if (entity && !isEqual(entity, {})) { this.assignedCustomersText = getDashboardAssignedCustomersText(entity); this.publicLink = this.dashboardService.getPublicDashboardLink(entity); }