|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; |
|
|
|
import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; |
|
|
|
import { Subject } from 'rxjs'; |
|
|
|
import { Store } from '@ngrx/store'; |
|
|
|
import { AppState } from '@core/core.state'; |
|
|
|
@ -30,7 +30,7 @@ import { |
|
|
|
ResourceTypeTranslationMap |
|
|
|
} from '@shared/models/resource.models'; |
|
|
|
import { pairwise, startWith, takeUntil } from 'rxjs/operators'; |
|
|
|
import { ActionNotificationShow } from "@core/notification/notification.actions"; |
|
|
|
import { ActionNotificationShow } from '@core/notification/notification.actions'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'tb-resources-library', |
|
|
|
@ -48,8 +48,9 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme |
|
|
|
protected translate: TranslateService, |
|
|
|
@Inject('entity') protected entityValue: Resource, |
|
|
|
@Inject('entitiesTableConfig') protected entitiesTableConfigValue: EntityTableConfig<Resource>, |
|
|
|
public fb: FormBuilder) { |
|
|
|
super(store, fb, entityValue, entitiesTableConfigValue); |
|
|
|
public fb: FormBuilder, |
|
|
|
protected cd: ChangeDetectorRef) { |
|
|
|
super(store, fb, entityValue, entitiesTableConfigValue, cd); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
@ -102,7 +103,7 @@ export class ResourcesLibraryComponent extends EntityComponent<Resource> impleme |
|
|
|
if (this.isAdd) { |
|
|
|
form.addControl('data', this.fb.control(null, Validators.required)); |
|
|
|
} |
|
|
|
return form |
|
|
|
return form; |
|
|
|
} |
|
|
|
|
|
|
|
updateForm(entity: Resource) { |
|
|
|
|