|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, forwardRef, Input, OnDestroy } from '@angular/core'; |
|
|
|
import { Component, forwardRef, Input, OnDestroy, OnInit } from '@angular/core'; |
|
|
|
import { |
|
|
|
AbstractControl, |
|
|
|
ControlValueAccessor, |
|
|
|
@ -53,7 +53,7 @@ import { takeUntil } from 'rxjs/operators'; |
|
|
|
} |
|
|
|
] |
|
|
|
}) |
|
|
|
export class TenantProfileQueuesComponent implements ControlValueAccessor, Validator, OnDestroy { |
|
|
|
export class TenantProfileQueuesComponent implements ControlValueAccessor, Validator, OnInit, OnDestroy { |
|
|
|
|
|
|
|
tenantProfileQueuesFormGroup: UntypedFormGroup; |
|
|
|
newQueue = false; |
|
|
|
@ -115,7 +115,7 @@ export class TenantProfileQueuesComponent implements ControlValueAccessor, Valid |
|
|
|
} |
|
|
|
|
|
|
|
writeValue(queues: Array<QueueInfo> | null): void { |
|
|
|
if (queues.length === this.queuesFormArray.length) { |
|
|
|
if (queues?.length === this.queuesFormArray.length) { |
|
|
|
this.queuesFormArray.patchValue(queues, {emitEvent: false}); |
|
|
|
} else { |
|
|
|
const queuesControls: Array<AbstractControl> = []; |
|
|
|
|