fix(giving): reset in-buffer line-edit index on reopen/cancel/submit
This commit is contained in:
+3
@@ -106,6 +106,7 @@ export class OfferingSessionPageComponent implements OnInit {
|
||||
|
||||
cancelEdit(): void {
|
||||
this.editingSessionId = null;
|
||||
this.editingIndex = null;
|
||||
this.buffer = []; this.cashTotal = 0; this.checkTotal = 0; this.notes = null;
|
||||
this.sessionDate = new Date();
|
||||
this.checkDate();
|
||||
@@ -192,6 +193,7 @@ export class OfferingSessionPageComponent implements OnInit {
|
||||
this.submitting = false;
|
||||
alert(this.editingSessionId != null ? 'Offering session updated.' : 'Offering session submitted.');
|
||||
this.editingSessionId = null;
|
||||
this.editingIndex = null;
|
||||
this.buffer = []; this.cashTotal = 0; this.checkTotal = 0; this.notes = null;
|
||||
this.sessionDate = new Date();
|
||||
this.checkDate();
|
||||
@@ -205,6 +207,7 @@ export class OfferingSessionPageComponent implements OnInit {
|
||||
}
|
||||
|
||||
private resetEntry(): void {
|
||||
this.editingIndex = null;
|
||||
this.selectedMemberId = null; this.selectedMemberName = null; this.memberResults = [];
|
||||
this.entry = this.blankEntry();
|
||||
this.entry.givingCategoryId = this.categories[0]?.id ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user