Vladyslav
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
ui-ngx/src/app/modules/home/components/entity/entity.component.ts
-
ui-ngx/src/app/modules/home/pages/dashboard/dashboard-form.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<T extends BaseData<HasId>, |
|
|
|
P extends PageLink = PageLink, |
|
|
|
L extends BaseData<HasId> = T, |
|
|
|
|
|
|
|
@ -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<Dashboard> { |
|
|
|
} |
|
|
|
|
|
|
|
private updateFields(entity: Dashboard): void { |
|
|
|
if (entity) { |
|
|
|
if (entity && !isEqual(entity, {})) { |
|
|
|
this.assignedCustomersText = getDashboardAssignedCustomersText(entity); |
|
|
|
this.publicLink = this.dashboardService.getPublicDashboardLink(entity); |
|
|
|
} |
|
|
|
|