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
parent
commit
2eb74a8b62
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      ui-ngx/src/app/shared/components/time/timeinterval.component.ts

3
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') { if (typeof this.modelValue !== 'undefined') {
const min = this.timeService.boundMinInterval(this.minValue); const min = this.timeService.boundMinInterval(this.minValue);
const max = this.timeService.boundMaxInterval(this.maxValue); const max = this.timeService.boundMaxInterval(this.maxValue);
if (this.allowedIntervals?.length || if (IntervalMath.numberValue(this.modelValue) >= min && IntervalMath.numberValue(this.modelValue) <= max) {
IntervalMath.numberValue(this.modelValue) >= min && IntervalMath.numberValue(this.modelValue) <= max) {
const advanced = this.allowedIntervals?.length const advanced = this.allowedIntervals?.length
? !this.allowedIntervals.includes(this.modelValue) ? !this.allowedIntervals.includes(this.modelValue)
: !this.timeService.matchesExistingInterval(this.minValue, this.maxValue, this.modelValue, : !this.timeService.matchesExistingInterval(this.minValue, this.maxValue, this.modelValue,

Loading…
Cancel
Save