update quick add.
ci-cd-vm / ci-cd (push) Successful in 1m40s

This commit is contained in:
Chris Chen
2026-06-24 12:01:55 -07:00
parent e768f53ccc
commit e9aad74df6
3 changed files with 9 additions and 6 deletions
@@ -94,7 +94,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
private memberApi: MemberApiService,
private signalr: OfferingEntrySignalrService,
private mealAttendanceApi: MealAttendanceApiService,
) {}
) { }
ngOnInit(): void {
this.categoryApi.getAll(false).subscribe(c => {
@@ -339,7 +339,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
clearAnonymous(): void {
this.entry.isAnonymous = false;
}
lastAddedLine: OfferingBufferLine | null = null;
addLine(): void {
if (this.entry.amount <= 0) return;
if (this.entry.paymentMethod === 'Check' && !this.entry.checkNumber) return;
@@ -351,6 +351,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
};
if (this.editingIndex !== null) { this.buffer[this.editingIndex] = line; this.editingIndex = null; }
else { this.buffer = [...this.buffer, line]; }
this.lastAddedLine = line;
this.resetEntry();
}
@@ -405,7 +406,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
switchMap(id => this.pendingProofFiles.length === 0
? of(void 0)
: from(buildProofPdf(this.pendingProofFiles)).pipe(
switchMap(({ blob }) => this.api.uploadProof(id, blob)))),
switchMap(({ blob }) => this.api.uploadProof(id, blob)))),
).subscribe({
next: () => {
this.submitting = false;
@@ -503,7 +504,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
private blankEntry(): OfferingBufferLine {
return {
memberId: null, givingCategoryId: 0, amount: 0, paymentMethod: 'Cash',
memberId: null, givingCategoryId: this.lastAddedLine?.givingCategoryId, amount: 0, paymentMethod: this.lastAddedLine?.paymentMethod ?? 'Cash',
checkNumber: null, zelleReferenceCode: null, payPalTransactionId: null,
isAnonymous: false, notes: null, memberName: null, categoryName: '',
};