Can update exception ignore field
This commit is contained in:
parent
51a52fcb8e
commit
45efc3601e
@ -12,8 +12,10 @@ export class AlarmRepeated {
|
|||||||
this.routines = routines == null ? [] : routines;
|
this.routines = routines == null ? [] : routines;
|
||||||
this.ignore_exceptions = ignore_exceptions;
|
this.ignore_exceptions = ignore_exceptions;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.excepts = excepts;
|
if (excepts !== undefined)
|
||||||
this.next_time = next_time;
|
this.excepts = excepts;
|
||||||
|
if (next_time !== undefined)
|
||||||
|
this.next_time = next_time;
|
||||||
|
|
||||||
if (this.routines.length < 1) {
|
if (this.routines.length < 1) {
|
||||||
this.routines.push("");
|
this.routines.push("");
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
Col,
|
Col,
|
||||||
Container,
|
Container,
|
||||||
Icon,
|
Icon,
|
||||||
|
Input,
|
||||||
ListGroup,
|
ListGroup,
|
||||||
ListGroupItem,
|
ListGroupItem,
|
||||||
Row,
|
Row,
|
||||||
@ -117,12 +118,13 @@
|
|||||||
<ListGroupItem>
|
<ListGroupItem>
|
||||||
<strong>Heure du réveil</strong> {alarm.time}
|
<strong>Heure du réveil</strong> {alarm.time}
|
||||||
</ListGroupItem>
|
</ListGroupItem>
|
||||||
<ListGroupItem>
|
<ListGroupItem class="d-flex">
|
||||||
<strong>Ignorer les exceptions ?</strong> {alarm.ignore_exceptions?"oui":"non"}
|
<strong>Ignorer les exceptions ?</strong>
|
||||||
|
<Input type="switch" class="ms-2" on:change={() => {obj.ignore_exceptions = !obj.ignore_exceptions; obj.save();}} checked={obj.ignore_exceptions} /> {obj.ignore_exceptions?"oui":"non"}
|
||||||
</ListGroupItem>
|
</ListGroupItem>
|
||||||
{#if alarm.next_time}
|
{#if alarm.next_time}
|
||||||
<ListGroupItem>
|
<ListGroupItem>
|
||||||
<strong>Prochaine occurrence</strong> <DateFormat date={new Date(alarm.next_time)} dateStyle="long" />
|
<strong>Prochaine occurrence</strong> <DateFormat date={new Date(obj.next_time)} dateStyle="long" />
|
||||||
</ListGroupItem>
|
</ListGroupItem>
|
||||||
{/if}
|
{/if}
|
||||||
</ListGroup>
|
</ListGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user