FIX: Schedule-editor doesn't apply any changes
This commit is contained in:
parent
113614f1e7
commit
bc6f0c73b2
@ -45,7 +45,7 @@
|
|||||||
<ng-container *ngTemplateOutlet="boolean;context:{entry: entry, value: entry.sunday, key:'sunday'}"></ng-container>
|
<ng-container *ngTemplateOutlet="boolean;context:{entry: entry, value: entry.sunday, key:'sunday'}"></ng-container>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<select [ngModel]="entry.type" (ngModelChange)="set(entry, 'type', entry.type)">
|
<select [ngModel]="entry.type" (ngModelChange)="set(entry, 'type', $event)">
|
||||||
<option value="TIME">Uhrzeit</option>
|
<option value="TIME">Uhrzeit</option>
|
||||||
<option value="SUNRISE">Sonnenaufgang</option>
|
<option value="SUNRISE">Sonnenaufgang</option>
|
||||||
<option value="SUNSET">Sonnenuntergang</option>
|
<option value="SUNSET">Sonnenuntergang</option>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<ng-container *ngIf="entry.type === 'SUNRISE' || entry.type === 'SUNSET'">
|
<ng-container *ngIf="entry.type === 'SUNRISE' || entry.type === 'SUNSET'">
|
||||||
<td>
|
<td>
|
||||||
<select [ngModel]="entry.zenith" (ngModelChange)="set(entry, 'zenith', entry.zenith)">
|
<select [ngModel]="entry.zenith" (ngModelChange)="set(entry, 'zenith', $event)">
|
||||||
<option value="87">
|
<option value="87">
|
||||||
[ 87°]
|
[ 87°]
|
||||||
<ng-container *ngIf="entry.type === 'SUNRISE'">Nach Sonnenaufgang</ng-container>
|
<ng-container *ngIf="entry.type === 'SUNRISE'">Nach Sonnenaufgang</ng-container>
|
||||||
@ -78,13 +78,13 @@
|
|||||||
|
|
||||||
<ng-container *ngIf="entry.type === 'TIME'">
|
<ng-container *ngIf="entry.type === 'TIME'">
|
||||||
<td class="first">
|
<td class="first">
|
||||||
<select [ngModel]="entry.hour" (ngModelChange)="set(entry, 'hour', entry.hour)">
|
<select [ngModel]="entry.hour" (ngModelChange)="set(entry, 'hour', $event)">
|
||||||
<option *ngFor="let _ of [].constructor(24); let value = index" [ngValue]="value">{{value}}</option>
|
<option *ngFor="let _ of [].constructor(24); let value = index" [ngValue]="value">{{value}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="middle">:</td>
|
<td class="middle">:</td>
|
||||||
<td class="last">
|
<td class="last">
|
||||||
<select [ngModel]="entry.minute" (ngModelChange)="set(entry, 'minute', entry.minute)">
|
<select [ngModel]="entry.minute" (ngModelChange)="set(entry, 'minute', $event)">
|
||||||
<option *ngFor="let _ of [].constructor(60); let value = index" [ngValue]="value">{{value | number:'2.0'}}</option>
|
<option *ngFor="let _ of [].constructor(60); let value = index" [ngValue]="value">{{value | number:'2.0'}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
<td *ngIf="entry.type !== 'TIME'" colspan="3" class="empty"></td>
|
<td *ngIf="entry.type !== 'TIME'" colspan="3" class="empty"></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<select [ngModel]="entry.fuzzySeconds" (ngModelChange)="set(entry, 'fuzzySeconds', entry.fuzzySeconds)">
|
<select [ngModel]="entry.fuzzySeconds" (ngModelChange)="set(entry, 'fuzzySeconds', $event)">
|
||||||
<option [ngValue]="0">Keine</option>
|
<option [ngValue]="0">Keine</option>
|
||||||
<option [ngValue]="60">1 Minute</option>
|
<option [ngValue]="60">1 Minute</option>
|
||||||
<option [ngValue]="300">5 Minuten</option>
|
<option [ngValue]="300">5 Minuten</option>
|
||||||
@ -137,7 +137,7 @@
|
|||||||
{{entry.value ? "An" : "Aus"}}
|
{{entry.value ? "An" : "Aus"}}
|
||||||
</td>
|
</td>
|
||||||
<td *ngSwitchCase="'SHUTTER'" [class.true]="entry.value === 0" [class.false]="entry.value === 100" [class.tristate]="0 < entry.value && entry.value < 100">
|
<td *ngSwitchCase="'SHUTTER'" [class.true]="entry.value === 0" [class.false]="entry.value === 100" [class.tristate]="0 < entry.value && entry.value < 100">
|
||||||
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', entry.value)">
|
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', $event)">
|
||||||
<option [ngValue]="0">100% Offen</option>
|
<option [ngValue]="0">100% Offen</option>
|
||||||
<option [ngValue]="35"> 50%</option>
|
<option [ngValue]="35"> 50%</option>
|
||||||
<option [ngValue]="55"> 75%</option>
|
<option [ngValue]="55"> 75%</option>
|
||||||
@ -147,22 +147,22 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td *ngSwitchCase="'BRIGHTNESS_PERCENT'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
<td *ngSwitchCase="'BRIGHTNESS_PERCENT'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
||||||
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', entry.value)">
|
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', $event)">
|
||||||
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td *ngSwitchCase="'COLOR_TEMPERATURE'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
<td *ngSwitchCase="'COLOR_TEMPERATURE'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
||||||
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', entry.value)">
|
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', $event)">
|
||||||
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td *ngSwitchCase="'LUX'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
<td *ngSwitchCase="'LUX'" [class.true]="entry.value" [class.false]="!entry.value" [class.tristate]="0 < entry.value && entry.value < 100">
|
||||||
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', entry.value)">
|
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', $event)">
|
||||||
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
<option *ngFor="let _ of [].constructor(21); let value = index" [ngValue]="value * 5">{{value * 5}}%</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td *ngSwitchCase="'SCENE'">
|
<td *ngSwitchCase="'SCENE'">
|
||||||
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', entry.value)">
|
<select [ngModel]="entry.value" (ngModelChange)="set(entry, 'value', $event)">
|
||||||
<option *ngFor="let scene of scenes" [ngValue]="scene.number">#{{scene.number | number:'2.0-0'}} {{scene.title}}</option>
|
<option *ngFor="let scene of scenes" [ngValue]="scene.number">#{{scene.number | number:'2.0-0'}} {{scene.title}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
package de.ph87.homeautomation.schedule.entry;
|
package de.ph87.homeautomation.schedule.entry;
|
||||||
|
|
||||||
import de.ph87.homeautomation.bulk.BulkReader;
|
|
||||||
import de.ph87.homeautomation.property.PropertyReader;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -12,10 +10,6 @@ public class ScheduleEntryController {
|
|||||||
|
|
||||||
private final ScheduleEntryWriter scheduleEntryWriter;
|
private final ScheduleEntryWriter scheduleEntryWriter;
|
||||||
|
|
||||||
private final BulkReader bulkReader;
|
|
||||||
|
|
||||||
private final PropertyReader propertyReader;
|
|
||||||
|
|
||||||
@GetMapping("create/{scheduleId}")
|
@GetMapping("create/{scheduleId}")
|
||||||
public ScheduleEntryDto create(@PathVariable final long scheduleId) {
|
public ScheduleEntryDto create(@PathVariable final long scheduleId) {
|
||||||
return scheduleEntryWriter.create(scheduleId);
|
return scheduleEntryWriter.create(scheduleId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user