|
|
@ -30,7 +30,6 @@ import { |
|
|
RateLimitsDetailsDialogData |
|
|
RateLimitsDetailsDialogData |
|
|
} from '@home/components/profile/tenant/rate-limits/rate-limits-details-dialog.component'; |
|
|
} from '@home/components/profile/tenant/rate-limits/rate-limits-details-dialog.component'; |
|
|
import { |
|
|
import { |
|
|
addRateLimitTranslationMap, |
|
|
|
|
|
editRateLimitTranslationMap, |
|
|
editRateLimitTranslationMap, |
|
|
rateLimitLabelTranslationMap, |
|
|
rateLimitLabelTranslationMap, |
|
|
RateLimitsType, |
|
|
RateLimitsType, |
|
|
@ -106,11 +105,11 @@ export class RateLimitsComponent implements ControlValueAccessor, OnInit, Valida |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onClick($event: Event, action: string) { |
|
|
public onClick($event: Event) { |
|
|
if ($event) { |
|
|
if ($event) { |
|
|
$event.stopPropagation(); |
|
|
$event.stopPropagation(); |
|
|
} |
|
|
} |
|
|
const title = this.setTitle(action); |
|
|
const title = editRateLimitTranslationMap.get(this.type); |
|
|
this.dialog.open<RateLimitsDetailsDialogComponent, RateLimitsDetailsDialogData, |
|
|
this.dialog.open<RateLimitsDetailsDialogComponent, RateLimitsDetailsDialogData, |
|
|
string>(RateLimitsDetailsDialogComponent, { |
|
|
string>(RateLimitsDetailsDialogComponent, { |
|
|
disableClose: true, |
|
|
disableClose: true, |
|
|
@ -128,15 +127,6 @@ export class RateLimitsComponent implements ControlValueAccessor, OnInit, Valida |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private setTitle(action: string): string { |
|
|
|
|
|
switch (action) { |
|
|
|
|
|
case 'add': |
|
|
|
|
|
return addRateLimitTranslationMap.get(this.type); |
|
|
|
|
|
case 'edit': |
|
|
|
|
|
return editRateLimitTranslationMap.get(this.type); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private updateRateLimitsInfo() { |
|
|
private updateRateLimitsInfo() { |
|
|
this.rateLimitsFormGroup.patchValue( |
|
|
this.rateLimitsFormGroup.patchValue( |
|
|
{ |
|
|
{ |
|
|
|