empty notes save fix. correct default value if no current zone aggregate first entry found.

main 1.8.2
isark 1 year ago
parent 5730861acf
commit 67f43d4b7f

@ -8,7 +8,7 @@
},
"package": {
"productName": "Nothing",
"version": "1.8.0"
"version": "1.8.2"
},
"tauri": {
"systemTray": {

@ -149,7 +149,7 @@ export class AggregateDisplayComponent {
}
currentFirst() {
return (this.currentAggregate?.get(this.latestEntry!.zone)?.aggregateFirstEntry) ?? 0;
return (this.currentAggregate?.get(this.latestEntry!.zone)?.aggregateFirstEntry) ?? this.latestEntry!.current_elapsed_millis;
}
}

@ -101,7 +101,4 @@
</div>
</div>
</div>
</div>

@ -304,11 +304,12 @@ export class EditorComponent implements OnInit {
const dialogRef = this.dialog.open(EditNotesComponentDialog, {
data: {
note: item.notes
}
})
},
disableClose: true
},)
dialogRef.afterClosed().subscribe(note => {
if (note) {
if (note != undefined && note != null) {
if (item.notes !== note) {
item.edited = true;
}

@ -12,6 +12,6 @@
</div>
<div mat-dialog-actions>
<button mat-button color="warn" (click)="cancel()">Cancel</button>
<button mat-button [mat-dialog-close]="note" cdkFocusInitial>Save</button>
<button mat-button (click)="save()" cdkFocusInitial>Save</button>
</div>
</div>

@ -41,7 +41,8 @@ export class NotesComponent implements AfterViewInit {
encapsulation: ViewEncapsulation.None,
})
export class EditNotesComponentDialog {
note: string;
note?: string;
constructor(
public dialogRef: MatDialogRef<EditNotesComponentDialog>,
@Inject(MAT_DIALOG_DATA) public data: DialogData,
@ -54,6 +55,10 @@ export class EditNotesComponentDialog {
}
cancel() {
this.dialogRef.close();
this.dialogRef.close(undefined);
}
save() {
this.dialogRef.close(this.note);
}
}

Loading…
Cancel
Save