Browse Source

Merge pull request #14833 from ArtemDzhereleiko/AD/bug-fix/2fa-settings-extension-panel

Fixed expansion panel toggle for 2FA settings
pull/14841/head
Vladyslav Prykhodko 7 months ago
committed by GitHub
parent
commit
b62fb52e00
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts
  2. 2
      ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html

15
ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts

@ -120,7 +120,12 @@ export class RelatedEntitiesAggregationComponentComponent implements ControlValu
takeUntilDestroyed()
).subscribe((value: CalculatedFieldRelatedAggregationConfiguration) => {
this.updatedModel(value);
})
});
this.relatedAggregationConfiguration.get('output').valueChanges.pipe(
takeUntilDestroyed(),
).subscribe(() => {
this.toggleScopeByOutputType();
});
}
validate(): ValidationErrors | null {
@ -158,4 +163,12 @@ export class RelatedEntitiesAggregationComponentComponent implements ControlValu
value.scheduledUpdateInterval = this.minAllowedScheduledUpdateIntervalInSecForCF;
this.propagateChange(value);
}
private toggleScopeByOutputType(): void {
if (this.relatedAggregationConfiguration.get('output').value.type === OutputType.Attribute) {
this.relatedAggregationConfiguration.get('useLatestTs').disable({emitEvent: false});
} else {
this.relatedAggregationConfiguration.get('useLatestTs').enable({emitEvent: false});
}
}
}

2
ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html

@ -208,7 +208,7 @@
<mat-expansion-panel class="tb-settings">
<mat-expansion-panel-header>
<mat-panel-title>
<mat-slide-toggle class="mat-slide flex items-center justify-start" (mousedown)="toggleExtensionPanel($event, providersForm.length, twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value)"
<mat-slide-toggle class="mat-slide flex items-center justify-start" (mousedown)="toggleExtensionPanel($event, providersForm.length+1, twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value)"
formControlName="verificationCodeCheckRateLimitEnable">
{{ 'admin.2fa.verification-code-check-rate-limit' | translate }}
</mat-slide-toggle>

Loading…
Cancel
Save