Browse Source

Improve timezone-select component

pull/3951/head
Igor Kulikov 6 years ago
parent
commit
02714512fa
  1. 2
      ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule.component.html
  2. 5
      ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule.component.ts

2
ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule.component.html

@ -29,7 +29,7 @@
</mat-form-field>
<div *ngIf="alarmScheduleForm.get('type').value !== alarmScheduleType.ANY_TIME">
<tb-timezone-select
[defaultTimezone]="defaultTimezone$ | async"
userTimezoneByDefault
required
formControlName="timezone">
</tb-timezone-select>

5
ui-ngx/src/app/modules/home/components/profile/alarm/alarm-schedule.component.ts

@ -40,7 +40,6 @@ import {
import { isDefined, isDefinedAndNotNull } from '@core/utils';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { getDefaultTimezone } from '@shared/models/time/time.models';
import { share } from 'rxjs/operators';
@Component({
selector: 'tb-alarm-schedule',
@ -62,10 +61,6 @@ export class AlarmScheduleComponent implements ControlValueAccessor, Validator,
alarmScheduleForm: FormGroup;
defaultTimezone$ = getDefaultTimezone().pipe(
share()
);
alarmScheduleTypes = Object.keys(AlarmScheduleType);
alarmScheduleType = AlarmScheduleType;
alarmScheduleTypeTranslate = AlarmScheduleTypeTranslationMap;

Loading…
Cancel
Save