Browse Source
Merge pull request #12220 from ChantsovaEkaterina/bug/fix-invalid-timewindow-grouping-interval
Timewindow: fix applying invalid grouping interval
pull/12227/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
2 deletions
-
ui-ngx/src/app/shared/components/time/timeinterval.component.ts
|
|
|
@ -191,8 +191,7 @@ export class TimeintervalComponent implements OnInit, ControlValueAccessor, OnCh |
|
|
|
if (typeof this.modelValue !== 'undefined') { |
|
|
|
const min = this.timeService.boundMinInterval(this.minValue); |
|
|
|
const max = this.timeService.boundMaxInterval(this.maxValue); |
|
|
|
if (this.allowedIntervals?.length || |
|
|
|
IntervalMath.numberValue(this.modelValue) >= min && IntervalMath.numberValue(this.modelValue) <= max) { |
|
|
|
if (IntervalMath.numberValue(this.modelValue) >= min && IntervalMath.numberValue(this.modelValue) <= max) { |
|
|
|
const advanced = this.allowedIntervals?.length |
|
|
|
? !this.allowedIntervals.includes(this.modelValue) |
|
|
|
: !this.timeService.matchesExistingInterval(this.minValue, this.maxValue, this.modelValue, |
|
|
|
|